theSq3Lite 10.0 NHI1 - theKernel - theLink - theConfig - theSq3Lite - theCompiler - theBrain - theGuard - theLib - theATL
c - tcl - atl - cs - py - rb - jv - cc
Loading...
Searching...
No Matches
Sq3Lite_Setup_libsqlite3_JV_API

NATIVE - Initialize The SQLite Library libsqlite3More...

+ Collaboration diagram for Sq3Lite_Setup_libsqlite3_JV_API:

Functions

JNIEXPORT void JNICALL Java_jvsq3lite_Sq3Lite_Initialize (JNIEnv *env, jclass class)
  Java: [static] Initialize() C-API
Initialize The SQLite Library …
 
JNIEXPORT void JNICALL Java_jvsq3lite_Sq3Lite_OsEnd (JNIEnv *env, jclass class)
  Java: [static] OsEnd() C-API
Initialize The SQLite Library …
 
JNIEXPORT void JNICALL Java_jvsq3lite_Sq3Lite_OsInit (JNIEnv *env, jclass class)
  Java: [static] OsInit() C-API
Initialize The SQLite Library …
 
JNIEXPORT void JNICALL Java_jvsq3lite_Sq3Lite_Shutdown (JNIEnv *env, jclass class)
  Java: [static] Shutdown() C-API
Initialize The SQLite Library …
 
static native void jvsq3lite.Sq3Lite.Initialize ()
  Java: [static] Initialize() C-API
Initialize The SQLite Library …
 
static native void jvsq3lite.Sq3Lite.OsEnd ()
  Java: [static] OsEnd() C-API
Initialize The SQLite Library …
 
static native void jvsq3lite.Sq3Lite.OsInit ()
  Java: [static] OsInit() C-API
Initialize The SQLite Library …
 
static native void jvsq3lite.Sq3Lite.Shutdown ()
  Java: [static] Shutdown() C-API
Initialize The SQLite Library …
 

Detailed Description

NATIVE - Initialize The SQLite Library libsqlite3

Initialize The SQLite Library …

The Sq3Initialize() routine initializes the SQLite library. The Sq3Shutdown() routine deallocates any resources that were allocated by Sq3Initialize(). These routines are designed to aid in process initialization and shutdown on embedded systems. Workstation applications using SQLite normally do not need to invoke either of these routines.

A call to Sq3Initialize() is an "effective" call if it is the first time Sq3Initialize() is invoked during the lifetime of the process, or if it is the first time Sq3Initialize() is invoked following a call to Sq3Shutdown(). Only an effective call of Sq3Initialize() does any initialization. All other calls are harmless no-ops.

A call to Sq3Shutdown() is an "effective" call if it is the first call to Sq3Shutdown() since the last Sq3Initialize(). Only an effective call to Sq3Shutdown() does any deinitialization. All other valid calls to Sq3Shutdown() are harmless no-ops.

The Sq3Initialize() interface is threadsafe, but Sq3Shutdown() is not. The Sq3Shutdown() interface must only be called from a single thread. All open database connections must be closed and all other SQLite resources must be deallocated prior to invoking Sq3Shutdown().

Among other things, Sq3Initialize() will invoke Sq3OsInit(). Similarly, Sq3Shutdown() will invoke Sq3OsEnd().

The Sq3Initialize() routine returns SQ3_RESULT_OK on success. If for some reason, Sq3Initialize() is unable to initialize the library (perhaps it is unable to allocate a needed resource such as a mutex) it returns an error code other than SQ3_RESULT_OK.

The Sq3Initialize() routine is called internally by many other SQLite interfaces so that an application usually does not need to invoke Sq3Initialize() directly. For example, sqlite3_open () calls Sq3Initialize() so the SQLite library will be automatically initialized when sqlite3_open () is called if it has not be initialized already. However, if SQLite is compiled with the SQLITE_OMIT_AUTOINIT compile-time option, then the automatic calls to Sq3Initialize() are omitted and the application must call Sq3Initialize() directly prior to using any other SQLite interface. For maximum portability, it is recommended that applications always invoke Sq3Initialize() directly prior to using any other SQLite interface. Future releases of SQLite may require this. In other words, the behavior exhibited when SQLite is compiled with SQLITE_OMIT_AUTOINIT might become the default behavior in some future release of SQLite.

The Sq3OsInit() routine does operating-system specific initialization of the SQLite library. The Sq3OsEnd() routine undoes the effect of Sq3OsInit(). Typical tasks performed by these routines include allocation or deallocation of static resources, initialization of global variables, setting up a default sqlite3_vfs module, or setting up a default configuration using sqlite3_config ().

The application should never invoke either Sq3OsInit() or Sq3OsEnd() directly. The application should only invoke Sq3Initialize() and Sq3Shutdown(). The Sq3OsInit() interface is called automatically by Sq3Initialize() and Sq3OsEnd() is called by Sq3Shutdown(). Appropriate implementations for Sq3OsInit() and Sq3OsEnd() are built into SQLite when it is compiled for Unix, Windows, or OS/2. When built for other platforms (using the SQLITE_OS_OTHER=1 compile-time option) the application must supply a suitable implementation for Sq3OsInit() and Sq3OsEnd(). An application-supplied implementation of Sq3OsInit() or Sq3OsEnd() must return SQ3_RESULT_OK on success and some other error code upon failure.

Reference code from sqlite3:

#define SQLITE_API
SQLITE_API int sqlite3_os_end(void)
SQLITE_API int sqlite3_initialize(void)
SQLITE_API int sqlite3_os_init(void)
SQLITE_API int sqlite3_shutdown(void)

Initialize The SQLite Library …

The Sq3Initialize() routine initializes the SQLite library. The Sq3Shutdown() routine deallocates any resources that were allocated by Sq3Initialize(). These routines are designed to aid in process initialization and shutdown on embedded systems. Workstation applications using SQLite normally do not need to invoke either of these routines.

A call to Sq3Initialize() is an "effective" call if it is the first time Sq3Initialize() is invoked during the lifetime of the process, or if it is the first time Sq3Initialize() is invoked following a call to Sq3Shutdown(). Only an effective call of Sq3Initialize() does any initialization. All other calls are harmless no-ops.

A call to Sq3Shutdown() is an "effective" call if it is the first call to Sq3Shutdown() since the last Sq3Initialize(). Only an effective call to Sq3Shutdown() does any deinitialization. All other valid calls to Sq3Shutdown() are harmless no-ops.

The Sq3Initialize() interface is threadsafe, but Sq3Shutdown() is not. The Sq3Shutdown() interface must only be called from a single thread. All open database connections must be closed and all other SQLite resources must be deallocated prior to invoking Sq3Shutdown().

Among other things, Sq3Initialize() will invoke Sq3OsInit(). Similarly, Sq3Shutdown() will invoke Sq3OsEnd().

The Sq3Initialize() routine returns SQ3_RESULT_OK on success. If for some reason, Sq3Initialize() is unable to initialize the library (perhaps it is unable to allocate a needed resource such as a mutex) it returns an error code other than SQ3_RESULT_OK.

The Sq3Initialize() routine is called internally by many other SQLite interfaces so that an application usually does not need to invoke Sq3Initialize() directly. For example, sqlite3_open () calls Sq3Initialize() so the SQLite library will be automatically initialized when sqlite3_open () is called if it has not be initialized already. However, if SQLite is compiled with the SQLITE_OMIT_AUTOINIT compile-time option, then the automatic calls to Sq3Initialize() are omitted and the application must call Sq3Initialize() directly prior to using any other SQLite interface. For maximum portability, it is recommended that applications always invoke Sq3Initialize() directly prior to using any other SQLite interface. Future releases of SQLite may require this. In other words, the behavior exhibited when SQLite is compiled with SQLITE_OMIT_AUTOINIT might become the default behavior in some future release of SQLite.

The Sq3OsInit() routine does operating-system specific initialization of the SQLite library. The Sq3OsEnd() routine undoes the effect of Sq3OsInit(). Typical tasks performed by these routines include allocation or deallocation of static resources, initialization of global variables, setting up a default sqlite3_vfs module, or setting up a default configuration using sqlite3_config ().

The application should never invoke either Sq3OsInit() or Sq3OsEnd() directly. The application should only invoke Sq3Initialize() and Sq3Shutdown(). The Sq3OsInit() interface is called automatically by Sq3Initialize() and Sq3OsEnd() is called by Sq3Shutdown(). Appropriate implementations for Sq3OsInit() and Sq3OsEnd() are built into SQLite when it is compiled for Unix, Windows, or OS/2. When built for other platforms (using the SQLITE_OS_OTHER=1 compile-time option) the application must supply a suitable implementation for Sq3OsInit() and Sq3OsEnd(). An application-supplied implementation of Sq3OsInit() or Sq3OsEnd() must return SQ3_RESULT_OK on success and some other error code upon failure.

Reference code from sqlite3:

Function Documentation

◆ Initialize()

static native void jvsq3lite.Sq3Lite.Initialize ( )
static

Java: [static] Initialize() C-API
Initialize The SQLite Library …

◆ Java_jvsq3lite_Sq3Lite_Initialize()

JNIEXPORT void JNICALL Java_jvsq3lite_Sq3Lite_Initialize ( JNIEnv * env,
jclass class )

Java: [static] Initialize() C-API
Initialize The SQLite Library …

Definition at line 1635 of file LibSq3Lite_jv.c.

1635 {
1637 enum MkErrorE errVal = Sq3Initialize();
1638 MkErrorC_Check(NULL, errVal)
1639error:
1640 return;
1641}
MkErrorE
#define MkRtSetup_NULL
static enum MkErrorE Sq3Initialize(void)
Initialize The SQLite Library …

◆ Java_jvsq3lite_Sq3Lite_OsEnd()

JNIEXPORT void JNICALL Java_jvsq3lite_Sq3Lite_OsEnd ( JNIEnv * env,
jclass class )

Java: [static] OsEnd() C-API
Initialize The SQLite Library …

Definition at line 1644 of file LibSq3Lite_jv.c.

1644 {
1646 enum MkErrorE errVal = Sq3OsEnd();
1647 MkErrorC_Check(NULL, errVal)
1648error:
1649 return;
1650}
static enum MkErrorE Sq3OsEnd(void)
Initialize The SQLite Library …

◆ Java_jvsq3lite_Sq3Lite_OsInit()

JNIEXPORT void JNICALL Java_jvsq3lite_Sq3Lite_OsInit ( JNIEnv * env,
jclass class )

Java: [static] OsInit() C-API
Initialize The SQLite Library …

Definition at line 1653 of file LibSq3Lite_jv.c.

1653 {
1655 enum MkErrorE errVal = Sq3OsInit();
1656 MkErrorC_Check(NULL, errVal)
1657error:
1658 return;
1659}
static enum MkErrorE Sq3OsInit(void)
Initialize The SQLite Library …

◆ Java_jvsq3lite_Sq3Lite_Shutdown()

JNIEXPORT void JNICALL Java_jvsq3lite_Sq3Lite_Shutdown ( JNIEnv * env,
jclass class )

Java: [static] Shutdown() C-API
Initialize The SQLite Library …

Definition at line 1662 of file LibSq3Lite_jv.c.

1662 {
1664 enum MkErrorE errVal = Sq3Shutdown();
1665 MkErrorC_Check(NULL, errVal)
1666error:
1667 return;
1668}
static enum MkErrorE Sq3Shutdown(void)
Initialize The SQLite Library …

◆ OsEnd()

static native void jvsq3lite.Sq3Lite.OsEnd ( )
static

Java: [static] OsEnd() C-API
Initialize The SQLite Library …

◆ OsInit()

static native void jvsq3lite.Sq3Lite.OsInit ( )
static

Java: [static] OsInit() C-API
Initialize The SQLite Library …

◆ Shutdown()

static native void jvsq3lite.Sq3Lite.Shutdown ( )
static

Java: [static] Shutdown() C-API
Initialize The SQLite Library …