Skip to content

Issue 525 - Added doxygen-based documentation #526

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions pljava-so/src/main/c/Backend.c
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,11 @@
#include "pljava/SPI.h"
#include "pljava/type/String.h"

/**
* \addtogroup JNI
* @{
*/

/* Include the 'magic block' that PostgreSQL 8.2 and up will use to ensure
* that a module is not loaded into an incompatible server.
*/
Expand Down Expand Up @@ -2392,3 +2397,4 @@ Java_org_postgresql_pljava_internal_Backend_00024EarlyNatives__1defineClass(JNIE
(*env)->ReleaseStringUTFChars(env, name, utfName);
return newcls;
}
/** @} */
6 changes: 6 additions & 0 deletions pljava-so/src/main/c/DualState.c
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,11 @@ extern void pljava_ExecutionPlan_initialize(void);
#include "pljava/SQLInputFromTuple.h"
#include "pljava/VarlenaWrapper.h"

/**
* \addtogroup JNI
* @{
*/

static jclass s_DualState_class;

static jmethodID s_DualState_resourceOwnerRelease;
Expand Down Expand Up @@ -422,3 +427,4 @@ Java_org_postgresql_pljava_internal_DualState_00024SingleSPIcursorClose__1spiCur
PG_END_TRY();
END_NATIVE
}
/** @} */
6 changes: 6 additions & 0 deletions pljava-so/src/main/c/ExecutionPlan.c
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,11 @@
#include <miscadmin.h>
#endif

/**
* \addtogroup JNI
* @{
*/

/* Class 07 - Dynamic SQL Error */
#define ERRCODE_PARAMETER_COUNT_MISMATCH MAKE_SQLSTATE('0','7', '0','0','1')

Expand Down Expand Up @@ -340,3 +345,4 @@ Java_org_postgresql_pljava_internal_ExecutionPlan__1prepare(JNIEnv* env, jclass
END_NATIVE
return result;
}
/** @} */
6 changes: 6 additions & 0 deletions pljava-so/src/main/c/Function.c
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,11 @@
#include <funcapi.h>
#include <utils/typcache.h>

/**
* \addtogroup JNI
* @{
*/

#if PG_VERSION_NUM >= 160000
#define PG_FUNCNAME_MACRO __func__
#endif
Expand Down Expand Up @@ -1417,3 +1422,4 @@ JNIEXPORT void JNICALL

END_NATIVE
}
/** @} */
41 changes: 41 additions & 0 deletions pljava-so/src/main/c/Grouping.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
/*
* Copyright (c) 2004-2025 Tada AB and other contributors, as listed below.
*
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the The BSD 3-Clause License
* which accompanies this distribution, and is available at
* http://opensource.org/licenses/BSD-3-Clause
*/

/*
* This file doesn't do anything other than defining doxygen groupings.
*/

/**
* \defgroup Datum Database objects
* \name Database objects
* @{
* - Array
* - BigDecimal
* - Boolean
* - Byte
* - Coerce
* - Composite
* - Date
* - Double
* - Float
* - Integer
* - Long
* - Short
* - String
* - Time
* - Timestamp
* - Type
* - UDT
* - Void
* @}
*/

/**
* \defgroup JNI JNI glue
*/
6 changes: 6 additions & 0 deletions pljava-so/src/main/c/Invocation.c
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,11 @@
#include "pljava/DualState.h"
#include "pljava/Exception.h"

/**
* \addtogroup JNI
* @{
*/

#define LOCAL_FRAME_SIZE 128

static jmethodID s_Invocation_onExit;
Expand Down Expand Up @@ -303,3 +308,4 @@ Java_org_postgresql_pljava_jdbc_Invocation__1register(JNIEnv* env, jobject _this
"mismanaged PL/Java invocation stack");
END_NATIVE
}
/** @} */
7 changes: 7 additions & 0 deletions pljava-so/src/main/c/JNICalls.c
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,11 @@
#include "pljava/type/ErrorData.h"
#include "pljava/type/String.h"

/**
* \addtogroup JNI
* @{
*/

JNIEnv* jniEnv;
jint (JNICALL *pljava_createvm)(JavaVM **, void **, void *);

Expand Down Expand Up @@ -1750,3 +1755,5 @@ static void _noopUpdater(jobject loader)
void _noopRestorer()
{
}

/** @} /*
5 changes: 4 additions & 1 deletion pljava-so/src/main/c/PgObject.c
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,9 @@
#include "pljava/PgObject_priv.h"
#include "pljava/type/String.h"

/**
*/

static bool s_loopLock = false;
static jclass s_Class_class = 0;
static jmethodID s_Class_getName = 0;
Expand Down Expand Up @@ -184,4 +187,4 @@ HeapTuple PgObject_getValidTuple(int cacheId, Oid tupleId, const char* tupleType
if(!HeapTupleIsValid(tuple))
ereport(ERROR, (errmsg("cache lookup failed for %s %u", tupleType, tupleId)));
return tuple;
}
}
7 changes: 7 additions & 0 deletions pljava-so/src/main/c/PgSavepoint.c
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,11 @@
#include "pljava/type/String.h"
#include "pljava/SPI.h"

/**
* \addtogroup JNI
* @{
*/

/*
* Workaround for issue #260, PostgreSQL API breakage by EnterpriseDB. They
* added a ReleaseCurrentSubTransactionEx function with an added argument, and
Expand Down Expand Up @@ -198,3 +203,5 @@ Java_org_postgresql_pljava_internal_PgSavepoint__1rollback(JNIEnv* env, jclass c
PG_END_TRY();
END_NATIVE
}

/** @} */
6 changes: 6 additions & 0 deletions pljava-so/src/main/c/SPI.c
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,11 @@
#include <miscadmin.h>
#endif

/**
* \addtogroup JNI
* @{
*/

#define CONFIRMCONST(c) \
StaticAssertStmt((c) == (org_postgresql_pljava_internal_##c), \
"Java/C value mismatch for " #c)
Expand Down Expand Up @@ -204,3 +209,4 @@ Java_org_postgresql_pljava_internal_SPI__1freeTupTable(JNIEnv* env, jclass cls)
END_NATIVE
}
}
/** @} */
6 changes: 6 additions & 0 deletions pljava-so/src/main/c/SQLOutputToChunk.c
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,11 @@

#include "org_postgresql_pljava_jdbc_SQLOutputToChunk.h"

/**
* \addtogroup JNI
* @{
*/

static jclass s_SQLOutputToChunk_class;
static jmethodID s_SQLOutputToChunk_init;
static jmethodID s_SQLOutputToChunk_close;
Expand Down Expand Up @@ -110,3 +115,4 @@ JNIEXPORT jobject JNICALL Java_org_postgresql_pljava_jdbc_SQLOutputToChunk__1ens
END_NATIVE
return bb;
}
/** @} */
7 changes: 6 additions & 1 deletion pljava-so/src/main/c/Session.c
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,11 @@
#include "pljava/Session.h"
#include "pljava/type/AclId.h"

/**
* \addtogroup JNI
* @{
*/

extern void Session_initialize(void);
void Session_initialize(void)
{
Expand Down Expand Up @@ -63,4 +68,4 @@ Java_org_postgresql_pljava_internal_Session__1setUser(
END_NATIVE
return wasLocalChange ? JNI_TRUE : JNI_FALSE;
}

/** @} */
6 changes: 6 additions & 0 deletions pljava-so/src/main/c/SubXactListener.c
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,11 @@

#include <access/xact.h>

/**
* \addtogroup JNI
* @{
*/

static jclass s_SubXactListener_class;
static jmethodID s_SubXactListener_invokeListeners;

Expand Down Expand Up @@ -135,3 +140,4 @@ Java_org_postgresql_pljava_internal_SubXactListener__1unregister(JNIEnv* env, jc
PG_END_TRY();
END_NATIVE
}
/** @} */
6 changes: 6 additions & 0 deletions pljava-so/src/main/c/TypeOid.c
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,11 @@
#include "pljava/pljava.h"
#include "org_postgresql_pljava_jdbc_TypeOid.h"

/**
* \addtogroup JNI
* @{
*/

/*
* A compilation unit with no run-time purpose, merely to hold a bunch of
* StaticAssertStmts to confirm at compile time that we haven't fat-fingered
Expand Down Expand Up @@ -53,3 +58,4 @@ JNIEXPORT void JNICALL Java_org_postgresql_pljava_jdbc_TypeOid__1dummy(JNIEnv *
CONFIRMCONST(PG_NODE_TREEOID);
CONFIRMCONST(TRIGGEROID);
}
/** @} */
6 changes: 6 additions & 0 deletions pljava-so/src/main/c/VarlenaWrapper.c
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,11 @@
#include "pljava/PgObject.h"
#include "pljava/JNICalls.h"

/**
* \addtogroup JNI
* @{
*/

#if PG_VERSION_NUM < 90600
#define GetOldestSnapshot() NULL
#endif
Expand Down Expand Up @@ -529,3 +534,4 @@ Java_org_postgresql_pljava_internal_VarlenaWrapper_00024Output_00024State__1next

return dbb;
}
/** @} */
6 changes: 6 additions & 0 deletions pljava-so/src/main/c/XactListener.c
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,11 @@

#include "access/xact.h"

/**
* \addtogroup JNI
* @{
*/

static jclass s_XactListener_class;
static jmethodID s_XactListener_invokeListeners;

Expand Down Expand Up @@ -116,3 +121,4 @@ Java_org_postgresql_pljava_internal_XactListener__1unregister(JNIEnv* env, jclas
PG_END_TRY();
END_NATIVE
}
/** @} */
Loading