4354
4355
4356
4357
4358
4359
4360
4361
4362
4363
4364
4365
4366
4367
4368
4369
4370
4371
4372
4373
4374
4375
4376
4377
4378
4379
4380
4381
4382
4383
4384
4385
4386
4387
4388
4389
4390
4391
4392
4393
4394
4395
|
4354
4355
4356
4357
4358
4359
4360
4361
4362
4363
4364
4365
4366
4367
4368
4369
4370
4371
4372
4373
4374
4375
4376
4377
4378
4379
4380
4381
4382
4383
4384
4385
4386
4387
4388
4389
4390
4391
4392
4393
4394
4395
4396
4397
4398
4399
4400
4401
4402
4403
4404
4405
4406
4407
4408
|
-
+
-
+
-
-
+
+
+
+
+
+
-
-
-
+
+
+
+
+
+
+
+
+
+
-
+
-
-
-
-
+
+
+
+
+
+
+
-
-
+
+
+
+
-
+
-
-
+
-
-
|
** ^Call the sqlite3_enable_load_extension() routine with onoff==1
** to turn extension loading on and call it with onoff==0 to turn
** it back off again.
*/
int sqlite3_enable_load_extension(sqlite3 *db, int onoff);
/*
** CAPI3REF: Automatically Load An Extensions
** CAPI3REF: Automatically Load Statically Linked Extensions
**
** ^This API can be invoked at program startup in order to register
** ^This interface causes the xEntryPoint() function to be invoked for
** one or more statically linked extensions that will be available
** to all new [database connections].
** each new [database connection] that is created. The idea here is that
** xEntryPoint() is the entry point for a statically linked SQLite extension
** that is to be automatically loaded into all new database connections.
**
** ^(Even though the function prototype shows that xEntryPoint() takes
** no arguments and returns void, SQLite invokes xEntryPoint() with three
** arguments and expects and integer result as if the signature of the
** ^(This routine stores a pointer to the extension entry point
** in an array that is obtained from [sqlite3_malloc()]. That memory
** is deallocated by [sqlite3_reset_auto_extension()].)^
** entry point where as follows:
**
** <blockquote><pre>
** int xEntryPoint(
** sqlite3 *db,
** const char **pzErrMsg,
** const struct sqlite3_api_routines *pThunk
** );
** </pre></blockquote>)^
**
** If the xEntryPoint routine encounters an error, it should make *pzErrMsg
** ^This function registers an extension entry point that is
** point to an appropriate error message (obtained from [sqlite3_mprintf()])
** automatically invoked whenever a new [database connection]
** is opened using [sqlite3_open()], [sqlite3_open16()],
** or [sqlite3_open_v2()].
** ^Duplicate extensions are detected so calling this routine
** and return an appropriate [error code]. ^SQLite ensures that *pzErrMsg
** is NULL before calling the xEntryPoint(). ^SQLite will invoke
** [sqlite3_free()] on *pzErrMsg after xEntryPoint() returns. ^If any
** xEntryPoint() returns an error, the [sqlite3_open()], [sqlite3_open16()],
** or [sqlite3_open_v2()] call that provoked the xEntryPoint() will fail.
**
** ^Calling sqlite3_auto_extension(X) with an entry point X that is already
** multiple times with the same extension is harmless.
** ^Automatic extensions apply across all threads.
** on the list of automatic extensions is a harmless no-op. ^No entry point
** will be called more than once for each database connection that is opened.
**
** See also: [sqlite3_reset_auto_extension()].
*/
int sqlite3_auto_extension(void (*xEntryPoint)(void));
/*
** CAPI3REF: Reset Automatic Extension Loading
**
** ^(This function disables all previously registered automatic
** ^This interface disables all automatic extensions previously
** extensions. It undoes the effect of all prior
** [sqlite3_auto_extension()] calls.)^
** registered using [sqlite3_auto_extension()].
**
** ^This function disables automatic extensions in all threads.
*/
void sqlite3_reset_auto_extension(void);
/*
** The interface to the virtual-table mechanism is currently considered
** to be experimental. The interface might change in incompatible ways.
** If this is a problem for you, do not use the interface at this time.
|