Many hyperlinks are disabled.
Use anonymous login
to enable hyperlinks.
Overview
Comment: | More documentation spellcheck and cleanup. No changes to code. (CVS 5269) |
---|---|
Downloads: | Tarball | ZIP archive |
Timelines: | family | ancestors | descendants | both | trunk |
Files: | files | file ages | folders |
SHA1: |
d96b9bcd10c3fe27a449e6ad3ab77c21 |
User & Date: | mihailim 2008-06-22 08:58:50.000 |
Context
2008-06-22
| ||
09:55 | More documentation spellcheck and cleanup. No changes to code. (CVS 5270) (check-in: 3a88e3ded9 user: mihailim tags: trunk) | |
08:58 | More documentation spellcheck and cleanup. No changes to code. (CVS 5269) (check-in: d96b9bcd10 user: mihailim tags: trunk) | |
2008-06-21
| ||
20:11 | More documentation spellcheck and cleanup. No changes to code. (CVS 5268) (check-in: 65edead166 user: mihailim tags: trunk) | |
Changes
Changes to src/sqlite.h.in.
︙ | ︙ | |||
26 27 28 29 30 31 32 | ** on how SQLite interfaces are suppose to operate. ** ** The name of this file under configuration management is "sqlite.h.in". ** The makefile makes some minor changes to this file (such as inserting ** the version number) and changes its name to "sqlite3.h" as ** part of the build process. ** | | | 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 | ** on how SQLite interfaces are suppose to operate. ** ** The name of this file under configuration management is "sqlite.h.in". ** The makefile makes some minor changes to this file (such as inserting ** the version number) and changes its name to "sqlite3.h" as ** part of the build process. ** ** @(#) $Id: sqlite.h.in,v 1.349 2008/06/22 08:58:50 mihailim Exp $ */ #ifndef _SQLITE3_H_ #define _SQLITE3_H_ #include <stdarg.h> /* Needed for the definition of va_list */ /* ** Make sure we can call this stuff from C++. |
︙ | ︙ | |||
4444 4445 4446 4447 4448 4449 4450 | ); /* ** CAPI3REF: Collation Needed Callbacks {F16700} ** ** To avoid having to register all collation sequences before a database ** can be used, a single callback function may be registered with the | | | | | | | | < | | 4444 4445 4446 4447 4448 4449 4450 4451 4452 4453 4454 4455 4456 4457 4458 4459 4460 4461 4462 4463 4464 4465 4466 4467 4468 4469 4470 4471 4472 | ); /* ** CAPI3REF: Collation Needed Callbacks {F16700} ** ** To avoid having to register all collation sequences before a database ** can be used, a single callback function may be registered with the ** [database connection] to be called whenever an undefined collation ** sequence is required. ** ** If the function is registered using the sqlite3_collation_needed() API, ** then it is passed the names of undefined collation sequences as strings ** encoded in UTF-8. {F16703} If sqlite3_collation_needed16() is used, ** the names are passed as UTF-16 in machine native byte order. ** A call to either function replaces any existing callback. ** ** When the callback is invoked, the first argument passed is a copy ** of the second argument to sqlite3_collation_needed() or ** sqlite3_collation_needed16(). The second argument is the database ** connection. The third argument is one of [SQLITE_UTF8], [SQLITE_UTF16BE], ** or [SQLITE_UTF16LE], indicating the most desirable form of the collation ** sequence function required. The fourth parameter is the name of the ** required collation sequence. ** ** The callback function should register the desired collation using ** [sqlite3_create_collation()], [sqlite3_create_collation16()], or ** [sqlite3_create_collation_v2()]. ** ** INVARIANTS: |
︙ | ︙ | |||
4484 4485 4486 4487 4488 4489 4490 | ** interface. ** ** {F16706} The name of the requested collating function passed in the ** 4th parameter to the callback is in UTF-8 if the callback ** was registered using [sqlite3_collation_needed()] and ** is in UTF-16 native byte order if the callback was ** registered using [sqlite3_collation_needed16()]. | < < | 4483 4484 4485 4486 4487 4488 4489 4490 4491 4492 4493 4494 4495 4496 | ** interface. ** ** {F16706} The name of the requested collating function passed in the ** 4th parameter to the callback is in UTF-8 if the callback ** was registered using [sqlite3_collation_needed()] and ** is in UTF-16 native byte order if the callback was ** registered using [sqlite3_collation_needed16()]. */ int sqlite3_collation_needed( sqlite3*, void*, void(*)(void*,sqlite3*,int eTextRep,const char*) ); int sqlite3_collation_needed16( |
︙ | ︙ | |||
4526 4527 4528 4529 4530 4531 4532 | sqlite3 *db, /* Database to be rekeyed */ const void *pKey, int nKey /* The new key */ ); /* ** CAPI3REF: Suspend Execution For A Short Time {F10530} ** | | < | | | | 4523 4524 4525 4526 4527 4528 4529 4530 4531 4532 4533 4534 4535 4536 4537 4538 4539 4540 4541 4542 | sqlite3 *db, /* Database to be rekeyed */ const void *pKey, int nKey /* The new key */ ); /* ** CAPI3REF: Suspend Execution For A Short Time {F10530} ** ** The sqlite3_sleep() function causes the current thread to suspend execution ** for at least a number of milliseconds specified in its parameter. ** ** If the operating system does not support sleep requests with ** millisecond time resolution, then the time will be rounded up to ** the nearest second. The number of milliseconds of sleep actually ** requested from the operating system is returned. ** ** SQLite implements this interface by calling the xSleep() ** method of the default [sqlite3_vfs] object. ** ** INVARIANTS: ** |
︙ | ︙ | |||
4557 4558 4559 4560 4561 4562 4563 | /* ** CAPI3REF: Name Of The Folder Holding Temporary Files {F10310} ** ** If this global variable is made to point to a string which is ** the name of a folder (a.k.a. directory), then all temporary files ** created by SQLite will be placed in that directory. If this variable | | | | | | | | < | < | < | | | | | | | | | | | | | < | | | | | | < < | | | | | | | | < | | | | | | | | | | | | | | < | | | | | < | < | | | | 4553 4554 4555 4556 4557 4558 4559 4560 4561 4562 4563 4564 4565 4566 4567 4568 4569 4570 4571 4572 4573 4574 4575 4576 4577 4578 4579 4580 4581 4582 4583 4584 4585 4586 4587 4588 4589 4590 4591 4592 4593 4594 4595 4596 4597 4598 4599 4600 4601 4602 4603 4604 4605 4606 4607 4608 4609 4610 4611 4612 4613 4614 4615 4616 4617 4618 4619 4620 4621 4622 4623 4624 4625 4626 4627 4628 4629 4630 4631 4632 4633 4634 4635 4636 4637 4638 4639 4640 4641 4642 4643 4644 4645 4646 4647 4648 4649 4650 4651 4652 4653 4654 4655 4656 4657 4658 4659 4660 4661 4662 4663 4664 4665 4666 4667 4668 4669 4670 4671 4672 4673 4674 4675 4676 4677 4678 4679 4680 4681 4682 4683 4684 4685 4686 4687 4688 4689 4690 4691 4692 4693 4694 4695 4696 4697 4698 4699 4700 4701 4702 4703 4704 4705 4706 4707 4708 4709 4710 4711 4712 4713 4714 4715 4716 4717 4718 4719 4720 4721 4722 4723 4724 4725 4726 4727 4728 4729 4730 4731 4732 4733 4734 4735 4736 4737 4738 4739 4740 4741 4742 4743 4744 4745 4746 4747 4748 4749 4750 4751 4752 4753 4754 4755 4756 4757 4758 4759 4760 4761 4762 4763 4764 4765 4766 4767 4768 4769 4770 4771 4772 4773 4774 4775 4776 4777 4778 4779 | /* ** CAPI3REF: Name Of The Folder Holding Temporary Files {F10310} ** ** If this global variable is made to point to a string which is ** the name of a folder (a.k.a. directory), then all temporary files ** created by SQLite will be placed in that directory. If this variable ** is a NULL pointer, then SQLite performs a search for an appropriate ** temporary file directory. ** ** It is not safe to modify this variable once a [database connection] ** has been opened. It is intended that this variable be set once ** as part of process initialization and before any SQLite interface ** routines have been call and remain unchanged thereafter. */ SQLITE_EXTERN char *sqlite3_temp_directory; /* ** CAPI3REF: Test To See If The Database Is In Auto-Commit Mode {F12930} ** ** The sqlite3_get_autocommit() interface returns non-zero or ** zero if the given database connection is or is not in autocommit mode, ** respectively. Autocommit mode is on by default. ** Autocommit mode is disabled by a [BEGIN] statement. ** Autocommit mode is re-enabled by a [COMMIT] or [ROLLBACK]. ** ** If certain kinds of errors occur on a statement within a multi-statement ** transaction (errors including [SQLITE_FULL], [SQLITE_IOERR], ** [SQLITE_NOMEM], [SQLITE_BUSY], and [SQLITE_INTERRUPT]) then the ** transaction might be rolled back automatically. The only way to ** find out whether SQLite automatically rolled back the transaction after ** an error is to use this function. ** ** INVARIANTS: ** ** {F12931} The [sqlite3_get_autocommit(D)] interface returns non-zero or ** zero if the [database connection] D is or is not in autocommit ** mode, respectively. ** ** {F12932} Autocommit mode is on by default. ** ** {F12933} Autocommit mode is disabled by a successful [BEGIN] statement. ** ** {F12934} Autocommit mode is enabled by a successful [COMMIT] or [ROLLBACK] ** statement. ** ** LIMITATIONS: *** ** {U12936} If another thread changes the autocommit status of the database ** connection while this routine is running, then the return value ** is undefined. */ int sqlite3_get_autocommit(sqlite3*); /* ** CAPI3REF: Find The Database Handle Of A Prepared Statement {F13120} ** ** The sqlite3_db_handle interface returns the [database connection] handle ** to which a [prepared statement] belongs. The database handle returned by ** sqlite3_db_handle is the same database handle that was the first argument ** to the [sqlite3_prepare_v2()] call (or its variants) that was used to ** create the statement in the first place. ** ** INVARIANTS: ** ** {F13123} The [sqlite3_db_handle(S)] interface returns a pointer ** to the [database connection] associated with the ** [prepared statement] S. */ sqlite3 *sqlite3_db_handle(sqlite3_stmt*); /* ** CAPI3REF: Find the next prepared statement {F13140} ** ** This interface returns a pointer to the next [prepared statement] after ** pStmt associated with the [database connection] pDb. If pStmt is NULL ** then this interface returns a pointer to the first prepared statement ** associated with the database connection pDb. If no prepared statement ** satisfies the conditions of this routine, it returns NULL. ** ** INVARIANTS: ** ** {F13143} If D is a [database connection] that holds one or more ** unfinalized [prepared statements] and S is a NULL pointer, ** then [sqlite3_next_stmt(D, S)] routine shall return a pointer ** to one of the prepared statements associated with D. ** ** {F13146} If D is a [database connection] that holds no unfinalized ** [prepared statements] and S is a NULL pointer, then ** [sqlite3_next_stmt(D, S)] routine shall return a NULL pointer. ** ** {F13149} If S is a [prepared statement] in the [database connection] D ** and S is not the last prepared statement in D, then ** [sqlite3_next_stmt(D, S)] routine shall return a pointer ** to the next prepared statement in D after S. ** ** {F13152} If S is the last [prepared statement] in the ** [database connection] D then the [sqlite3_next_stmt(D, S)] ** routine shall return a NULL pointer. */ sqlite3_stmt *sqlite3_next_stmt(sqlite3 *pDb, sqlite3_stmt *pStmt); /* ** CAPI3REF: Commit And Rollback Notification Callbacks {F12950} ** ** The sqlite3_commit_hook() interface registers a callback ** function to be invoked whenever a transaction is committed. ** Any callback set by a previous call to sqlite3_commit_hook() ** for the same database connection is overridden. ** The sqlite3_rollback_hook() interface registers a callback ** function to be invoked whenever a transaction is committed. ** Any callback set by a previous call to sqlite3_commit_hook() ** for the same database connection is overridden. ** The pArg argument is passed through to the callback. ** If the callback on a commit hook function returns non-zero, ** then the commit is converted into a rollback. ** ** If another function was previously registered, its ** pArg value is returned. Otherwise NULL is returned. ** ** Registering a NULL function disables the callback. ** ** For the purposes of this API, a transaction is said to have been ** rolled back if an explicit "ROLLBACK" statement is executed, or ** an error or constraint causes an implicit rollback to occur. ** The rollback callback is not invoked if a transaction is ** automatically rolled back because the database connection is closed. ** The rollback callback is not invoked if a transaction is ** rolled back because a commit callback returned non-zero. ** <todo> Check on this </todo> ** ** These are experimental interfaces and are subject to change. ** ** INVARIANTS: ** ** {F12951} The [sqlite3_commit_hook(D,F,P)] interface registers the ** callback function F to be invoked with argument P whenever ** a transaction commits on the [database connection] D. ** ** {F12952} The [sqlite3_commit_hook(D,F,P)] interface returns the P argument ** from the previous call with the same [database connection] D, ** or NULL on the first call for a particular database connection D. ** ** {F12953} Each call to [sqlite3_commit_hook()] overwrites the callback ** registered by prior calls. ** ** {F12954} If the F argument to [sqlite3_commit_hook(D,F,P)] is NULL ** then the commit hook callback is canceled and no callback ** is invoked when a transaction commits. ** ** {F12955} If the commit callback returns non-zero then the commit is ** converted into a rollback. ** ** {F12961} The [sqlite3_rollback_hook(D,F,P)] interface registers the ** callback function F to be invoked with argument P whenever ** a transaction rolls back on the [database connection] D. ** ** {F12962} The [sqlite3_rollback_hook(D,F,P)] interface returns the P ** argument from the previous call with the same ** [database connection] D, or NULL on the first call ** for a particular database connection D. ** ** {F12963} Each call to [sqlite3_rollback_hook()] overwrites the callback ** registered by prior calls. ** ** {F12964} If the F argument to [sqlite3_rollback_hook(D,F,P)] is NULL ** then the rollback hook callback is canceled and no callback ** is invoked when a transaction rolls back. */ void *sqlite3_commit_hook(sqlite3*, int(*)(void*), void*); void *sqlite3_rollback_hook(sqlite3*, void(*)(void *), void*); /* ** CAPI3REF: Data Change Notification Callbacks {F12970} ** ** The sqlite3_update_hook() interface registers a callback function ** with the [database connection] identified by the first argument ** to be invoked whenever a row is updated, inserted or deleted. ** Any callback set by a previous call to this function ** for the same database connection is overridden. ** ** The second argument is a pointer to the function to invoke when a ** row is updated, inserted or deleted. ** The first argument to the callback is a copy of the third argument ** to sqlite3_update_hook(). ** The second callback argument is one of [SQLITE_INSERT], [SQLITE_DELETE], ** or [SQLITE_UPDATE], depending on the operation that caused the callback ** to be invoked. ** The third and fourth arguments to the callback contain pointers to the ** database and table name containing the affected row. ** The final callback parameter is the rowid of the row. In the case of ** an update, this is the rowid after the update takes place. ** ** The update hook is not invoked when internal system tables are ** modified (i.e. sqlite_master and sqlite_sequence). ** ** If another function was previously registered, its pArg value ** is returned. Otherwise NULL is returned. ** ** INVARIANTS: ** ** {F12971} The [sqlite3_update_hook(D,F,P)] interface causes the callback ** function F to be invoked with first parameter P whenever ** a table row is modified, inserted, or deleted on ** the [database connection] D. ** ** {F12973} The [sqlite3_update_hook(D,F,P)] interface returns the value ** of P for the previous call on the same [database connection] D, ** or NULL for the first call. ** ** {F12975} If the update hook callback F in [sqlite3_update_hook(D,F,P)] ** is NULL then the no update callbacks are made. ** ** {F12977} Each call to [sqlite3_update_hook(D,F,P)] overrides prior calls ** to the same interface on the same [database connection] D. ** ** {F12979} The update hook callback is not invoked when internal system ** tables such as sqlite_master and sqlite_sequence are modified. ** ** {F12981} The second parameter to the update callback ** is one of [SQLITE_INSERT], [SQLITE_DELETE] or [SQLITE_UPDATE], ** depending on the operation that caused the callback to be invoked. ** ** {F12983} The third and fourth arguments to the callback contain pointers ** to zero-terminated UTF-8 strings which are the names of the ** database and table that is being updated. |
︙ | ︙ | |||
4801 4802 4803 4804 4805 4806 4807 | ); /* ** CAPI3REF: Enable Or Disable Shared Pager Cache {F10330} ** KEYWORDS: {shared cache} {shared cache mode} ** ** This routine enables or disables the sharing of the database cache | | | | | | < | | | | < | 4787 4788 4789 4790 4791 4792 4793 4794 4795 4796 4797 4798 4799 4800 4801 4802 4803 4804 4805 4806 4807 4808 4809 4810 4811 4812 4813 4814 4815 4816 4817 4818 4819 | ); /* ** CAPI3REF: Enable Or Disable Shared Pager Cache {F10330} ** KEYWORDS: {shared cache} {shared cache mode} ** ** This routine enables or disables the sharing of the database cache ** and schema data structures between [database connection | connections] ** to the same database. Sharing is enabled if the argument is true ** and disabled if the argument is false. ** ** Cache sharing is enabled and disabled for an entire process. {END} ** This is a change as of SQLite version 3.5.0. In prior versions of SQLite, ** sharing was enabled or disabled for each thread separately. ** ** The cache sharing mode set by this interface effects all subsequent ** calls to [sqlite3_open()], [sqlite3_open_v2()], and [sqlite3_open16()]. ** Existing database connections continue use the sharing mode ** that was in effect at the time they were opened. ** ** Virtual tables cannot be used with a shared cache. When shared ** cache is enabled, the [sqlite3_create_module()] API used to register ** virtual tables will always return an error. ** ** This routine returns [SQLITE_OK] if shared cache was enabled or disabled ** successfully. An [error code] is returned otherwise. ** ** Shared cache is disabled by default. But this might change in ** future releases of SQLite. Applications that care about shared ** cache setting should set it explicitly. ** ** INVARIANTS: ** |
︙ | ︙ | |||
4869 4870 4871 4872 4873 4874 4875 | ** than the amount requested. */ int sqlite3_release_memory(int); /* ** CAPI3REF: Impose A Limit On Heap Size {F17350} ** | | | | | | < | < | | | 4853 4854 4855 4856 4857 4858 4859 4860 4861 4862 4863 4864 4865 4866 4867 4868 4869 4870 4871 4872 4873 4874 4875 4876 4877 4878 4879 4880 4881 4882 4883 | ** than the amount requested. */ int sqlite3_release_memory(int); /* ** CAPI3REF: Impose A Limit On Heap Size {F17350} ** ** The sqlite3_soft_heap_limit() interface places a "soft" limit ** on the amount of heap memory that may be allocated by SQLite. ** If an internal allocation is requested that would exceed the ** soft heap limit, [sqlite3_release_memory()] is invoked one or ** more times to free up some space before the allocation is performed. ** ** The limit is called "soft", because if [sqlite3_release_memory()] ** cannot free sufficient memory to prevent the limit from being exceeded, ** the memory is allocated anyway and the current operation proceeds. ** ** A negative or zero value for N means that there is no soft heap limit and ** [sqlite3_release_memory()] will only be called when memory is exhausted. ** The default value for the soft heap limit is zero. ** ** SQLite makes a best effort to honor the soft heap limit. ** But if the soft heap limit cannot be honored, execution will ** continue without error or notification. This is why the limit is ** called a "soft" limit. It is advisory only. ** ** Prior to SQLite version 3.5.0, this routine only constrained the memory ** allocated by a single thread - the same thread in which this routine ** runs. Beginning with SQLite version 3.5.0, the soft heap limit is ** applied to all threads. The value specified for the soft heap limit ** is an upper bound on the total memory allocation for all threads. In |
︙ | ︙ | |||
4929 4930 4931 4932 4933 4934 4935 | ** ** {F16358} Each call to [sqlite3_soft_heap_limit(N)] overrides the ** values set by all prior calls. */ void sqlite3_soft_heap_limit(int); /* | | < | | | | | | | | | | < | | | < | | | | | | | | | | | | | | | | | | > > > > | | > | > | | | | < | | | | | < | | | | | | > | > > | | | > > < < < < < | < < > > | | | | > | | > > > > | | > > > > < | < | < < < > > > > > > > < | 4911 4912 4913 4914 4915 4916 4917 4918 4919 4920 4921 4922 4923 4924 4925 4926 4927 4928 4929 4930 4931 4932 4933 4934 4935 4936 4937 4938 4939 4940 4941 4942 4943 4944 4945 4946 4947 4948 4949 4950 4951 4952 4953 4954 4955 4956 4957 4958 4959 4960 4961 4962 4963 4964 4965 4966 4967 4968 4969 4970 4971 4972 4973 4974 4975 4976 4977 4978 4979 4980 4981 4982 4983 4984 4985 4986 4987 4988 4989 4990 4991 4992 4993 4994 4995 4996 4997 4998 4999 5000 5001 5002 5003 5004 5005 5006 5007 5008 5009 5010 5011 5012 5013 5014 5015 5016 5017 5018 5019 5020 5021 5022 5023 5024 5025 5026 5027 5028 5029 5030 5031 5032 5033 5034 5035 5036 5037 5038 5039 5040 5041 5042 5043 5044 5045 5046 5047 5048 5049 5050 5051 5052 5053 5054 5055 5056 5057 5058 5059 5060 5061 5062 5063 5064 5065 5066 5067 5068 5069 5070 5071 5072 5073 5074 5075 5076 5077 5078 5079 5080 5081 5082 5083 5084 5085 5086 5087 5088 5089 5090 5091 5092 5093 5094 5095 5096 5097 5098 5099 | ** ** {F16358} Each call to [sqlite3_soft_heap_limit(N)] overrides the ** values set by all prior calls. */ void sqlite3_soft_heap_limit(int); /* ** CAPI3REF: Extract Metadata About A Column Of A Table {F12850} ** ** This routine returns metadata about a specific column of a specific ** database table accessible using the [database connection] handle ** passed as the first function argument. ** ** The column is identified by the second, third and fourth parameters to ** this function. The second parameter is either the name of the database ** (i.e. "main", "temp" or an attached database) containing the specified ** table or NULL. If it is NULL, then all attached databases are searched ** for the table using the same algorithm used by the database engine to ** resolve unqualified table references. ** ** The third and fourth parameters to this function are the table and column ** name of the desired column, respectively. Neither of these parameters ** may be NULL. ** ** Metadata is returned by writing to the memory locations passed as the 5th ** and subsequent parameters to this function. Any of these arguments may be ** NULL, in which case the corresponding element of metadata is omitted. ** <blockquote> ** <table border="1"> ** <tr><th> Parameter <th> Output<br>Type <th> Description ** ** <tr><td> 5th <td> const char* <td> Data type ** <tr><td> 6th <td> const char* <td> Name of default collation sequence ** <tr><td> 7th <td> int <td> True if column has a NOT NULL constraint ** <tr><td> 8th <td> int <td> True if column is part of the PRIMARY KEY ** <tr><td> 9th <td> int <td> True if column is AUTOINCREMENT ** </table> ** </blockquote> ** ** The memory pointed to by the character pointers returned for the ** declaration type and collation sequence is valid only until the next ** call to any SQLite API function. ** ** If the specified table is actually a view, an [error code] is returned. ** ** If the specified column is "rowid", "oid" or "_rowid_" and an ** INTEGER PRIMARY KEY column has been explicitly declared, then the output ** parameters are set for the explicitly declared column. If there is no ** explicitly declared INTEGER PRIMARY KEY column, then the output ** parameters are set as follows: ** ** <pre> ** data type: "INTEGER" ** collation sequence: "BINARY" ** not null: 0 ** primary key: 1 ** auto increment: 0 ** </pre> ** ** This function may load one or more schemas from database files. If an ** error occurs during this process, or if the requested table or column ** cannot be found, an [error code] is returned and an error message left ** in the [database connection] (to be retrieved using sqlite3_errmsg()). ** ** This API is only available if the library was compiled with the ** SQLITE_ENABLE_COLUMN_METADATA C preprocessor symbol defined. */ int sqlite3_table_column_metadata( sqlite3 *db, /* Connection handle */ const char *zDbName, /* Database name or NULL */ const char *zTableName, /* Table name */ const char *zColumnName, /* Column name */ char const **pzDataType, /* OUTPUT: Declared data type */ char const **pzCollSeq, /* OUTPUT: Collation sequence name */ int *pNotNull, /* OUTPUT: True if NOT NULL constraint exists */ int *pPrimaryKey, /* OUTPUT: True if column part of PK */ int *pAutoinc /* OUTPUT: True if column is auto-increment */ ); /* ** CAPI3REF: Load An Extension {F12600} ** ** This interface loads an SQLite extension library from the named file. ** ** INVARIANTS: ** ** {F12601} The sqlite3_load_extension() interface attempts to load an ** SQLite extension library contained in the file zFile. ** ** {F12602} The entry point is zProc. ** ** {F12603} zProc may be 0, in which case the name of the entry point ** defaults to "sqlite3_extension_init". ** ** {F12604} The sqlite3_load_extension() interface shall return ** [SQLITE_OK] on success and [SQLITE_ERROR] if something goes wrong. ** ** {F12605} If an error occurs and pzErrMsg is not 0, then the ** sqlite3_load_extension() interface shall attempt to fill ** *pzErrMsg with error message text stored in memory obtained ** from [sqlite3_malloc()]. {END} The calling function should free ** this memory by calling [sqlite3_free()]. ** {F12606} Extension loading must be enabled using ** [sqlite3_enable_load_extension()] prior to calling this API, ** otherwise an error will be returned. */ int sqlite3_load_extension( sqlite3 *db, /* Load the extension into this database connection */ const char *zFile, /* Name of the shared library containing extension */ const char *zProc, /* Entry point. Derived from zFile if 0 */ char **pzErrMsg /* Put error message here if not 0 */ ); /* ** CAPI3REF: Enable Or Disable Extension Loading {F12620} ** ** So as not to open security holes in older applications that are ** unprepared to deal with extension loading, and as a means of disabling ** extension loading while evaluating user-entered SQL, the following API ** is provided to turn the [sqlite3_load_extension()] mechanism on and off. ** ** Extension loading is off by default. See ticket #1863. ** ** INVARIANTS: ** ** {F12621} 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. ** ** {F12622} Extension loading is off by default. */ int sqlite3_enable_load_extension(sqlite3 *db, int onoff); /* ** CAPI3REF: Make Arrangements To Automatically Load An Extension {F12640} ** ** This API can be invoked at program startup in order to register ** one or more statically linked extensions that will be available ** to all new [database connections]. ** ** This interface is experimental and is subject to change or ** removal in future releases of SQLite. ** ** This routine stores a pointer to the extension in an array that is ** obtained from [sqlite3_malloc()]. If you run a memory leak checker ** on your program and it reports a leak because of this array, invoke ** [sqlite3_reset_auto_extension()] prior to shutdown to free the memory. ** ** INVARIANTS: ** ** {F12641} This function registers an extension entry point that is ** automatically invoked whenever a new [database connection] ** is opened using [sqlite3_open()], [sqlite3_open16()], ** or [sqlite3_open_v2()]. ** ** {F12642} Duplicate extensions are detected so calling this routine ** multiple times with the same extension is harmless. ** ** {F12643} This routine stores a pointer to the extension in an array ** that is obtained from [sqlite3_malloc()]. ** ** {F12644} Automatic extensions apply across all threads. */ int sqlite3_auto_extension(void *xEntryPoint); /* ** CAPI3REF: Reset Automatic Extension Loading {F12660} ** ** This function disables all previously registered automatic extensions. ** It undoes the effect of all prior [sqlite3_auto_extension()] calls. ** ** This interface is experimental and is subject to change or ** removal in future releases of SQLite. ** ** INVARIANTS: ** ** {F12661} This function disables all previously registered ** automatic extensions. ** ** {F12662} This function disabled automatic extensions in all threads. */ void sqlite3_reset_auto_extension(void); /* ****** EXPERIMENTAL - subject to change without notice ************** ** ** 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. |
︙ | ︙ |