⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 sqlite.h.in

📁 最新的sqlite3.6.2源代码
💻 IN
📖 第 1 页 / 共 5 页
字号:
/*** 2001 September 15**** The author disclaims copyright to this source code.  In place of** a legal notice, here is a blessing:****    May you do good and not evil.**    May you find forgiveness for yourself and forgive others.**    May you share freely, never taking more than you give.***************************************************************************** This header file defines the interface that the SQLite library** presents to client programs.  If a C-function, structure, datatype,** or constant definition does not appear in this file, then it is** not a published API of SQLite, is subject to change without** notice, and should not be referenced by programs that use SQLite.**** Some of the definitions that are in this file are marked as** "experimental".  Experimental interfaces are normally new** features recently added to SQLite.  We do not anticipate changes** to experimental interfaces but reserve to make minor changes if** experience from use "in the wild" suggest such changes are prudent.**** The official C-language API documentation for SQLite is derived** from comments in this file.  This file is the authoritative source** 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.394 2008/08/25 21:23:02 drh 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++.*/#ifdef __cplusplusextern "C" {#endif/*** Add the ability to override 'extern'*/#ifndef SQLITE_EXTERN# define SQLITE_EXTERN extern#endif/*** Add the ability to mark interfaces as deprecated.*/#if (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 1))  /* GCC added the deprecated attribute in version 3.1 */  #define SQLITE_DEPRECATED __attribute__ ((deprecated))#elif defined(_MSC_VER)  #define SQLITE_DEPRECATED __declspec(deprecated)#else  #define SQLITE_DEPRECATED#endif/*** Add the ability to mark interfaces as experimental.*/#if (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3))  /* I can confirm that it does not work on version 4.1.0... */  /* First appears in GCC docs for version 4.3.0 */  #define SQLITE_EXPERIMENTAL __attribute__ ((warning ("is experimental")))#elif defined(_MSC_VER)  #define SQLITE_EXPERIMENTAL __declspec(deprecated("was declared experimental"))#else  #define SQLITE_EXPERIMENTAL#endif/*** Ensure these symbols were not defined by some previous header file.*/#ifdef SQLITE_VERSION# undef SQLITE_VERSION#endif#ifdef SQLITE_VERSION_NUMBER# undef SQLITE_VERSION_NUMBER#endif/*** CAPI3REF: Compile-Time Library Version Numbers {H10010} <S60100>**** The SQLITE_VERSION and SQLITE_VERSION_NUMBER #defines in** the sqlite3.h file specify the version of SQLite with which** that header file is associated.**** The "version" of SQLite is a string of the form "X.Y.Z".** The phrase "alpha" or "beta" might be appended after the Z.** The X value is major version number always 3 in SQLite3.** The X value only changes when backwards compatibility is** broken and we intend to never break backwards compatibility.** The Y value is the minor version number and only changes when** there are major feature enhancements that are forwards compatible** but not backwards compatible.** The Z value is the release number and is incremented with** each release but resets back to 0 whenever Y is incremented.**** See also: [sqlite3_libversion()] and [sqlite3_libversion_number()].**** INVARIANTS:**** {H10011} The SQLITE_VERSION #define in the sqlite3.h header file shall**          evaluate to a string literal that is the SQLite version**          with which the header file is associated.**** {H10014} The SQLITE_VERSION_NUMBER #define shall resolve to an integer**          with the value (X*1000000 + Y*1000 + Z) where X, Y, and Z**          are the major version, minor version, and release number.*/#define SQLITE_VERSION         "--VERS--"#define SQLITE_VERSION_NUMBER  --VERSION-NUMBER--/*** CAPI3REF: Run-Time Library Version Numbers {H10020} <S60100>** KEYWORDS: sqlite3_version**** These features provide the same information as the [SQLITE_VERSION]** and [SQLITE_VERSION_NUMBER] #defines in the header, but are associated** with the library instead of the header file.  Cautious programmers might** include a check in their application to verify that** sqlite3_libversion_number() always returns the value** [SQLITE_VERSION_NUMBER].**** The sqlite3_libversion() function returns the same information as is** in the sqlite3_version[] string constant.  The function is provided** for use in DLLs since DLL users usually do not have direct access to string** constants within the DLL.**** INVARIANTS:**** {H10021} The [sqlite3_libversion_number()] interface shall return**          an integer equal to [SQLITE_VERSION_NUMBER].**** {H10022} The [sqlite3_version] string constant shall contain**          the text of the [SQLITE_VERSION] string.**** {H10023} The [sqlite3_libversion()] function shall return**          a pointer to the [sqlite3_version] string constant.*/SQLITE_EXTERN const char sqlite3_version[];const char *sqlite3_libversion(void);int sqlite3_libversion_number(void);/*** CAPI3REF: Test To See If The Library Is Threadsafe {H10100} <S60100>**** SQLite can be compiled with or without mutexes.  When** the [SQLITE_THREADSAFE] C preprocessor macro is true, mutexes** are enabled and SQLite is threadsafe.  When that macro is false,** the mutexes are omitted.  Without the mutexes, it is not safe** to use SQLite concurrently from more than one thread.**** Enabling mutexes incurs a measurable performance penalty.** So if speed is of utmost importance, it makes sense to disable** the mutexes.  But for maximum safety, mutexes should be enabled.** The default behavior is for mutexes to be enabled.**** This interface can be used by a program to make sure that the** version of SQLite that it is linking against was compiled with** the desired setting of the [SQLITE_THREADSAFE] macro.**** This interface only reports on the compile-time mutex setting** of the [SQLITE_THREADSAFE] flag.  If SQLite is compiled with** SQLITE_THREADSAFE=1 then mutexes are enabled by default but** can be fully or partially disabled using a call to [sqlite3_config()]** with the verbs [SQLITE_CONFIG_SINGLETHREAD], [SQLITE_CONFIG_MULTITHREAD],** or [SQLITE_CONFIG_MUTEX].  The return value of this function shows** only the default compile-time setting, not any run-time changes** to that setting.**** INVARIANTS:**** {H10101} The [sqlite3_threadsafe()] function shall return nonzero if**          SQLite was compiled with the its mutexes enabled by default**          or zero if SQLite was compiled such that mutexes are**          permanently disabled.**** {H10102} The value returned by the [sqlite3_threadsafe()] function**          shall not change when mutex setting are modified at**          runtime using the [sqlite3_config()] interface and **          especially the [SQLITE_CONFIG_SINGLETHREAD],**          [SQLITE_CONFIG_MULTITHREAD], [SQLITE_CONFIG_SERIALIZED],**          and [SQLITE_CONFIG_MUTEX] verbs.*/int sqlite3_threadsafe(void);/*** CAPI3REF: Database Connection Handle {H12000} <S40200>** KEYWORDS: {database connection} {database connections}**** Each open SQLite database is represented by a pointer to an instance of** the opaque structure named "sqlite3".  It is useful to think of an sqlite3** pointer as an object.  The [sqlite3_open()], [sqlite3_open16()], and** [sqlite3_open_v2()] interfaces are its constructors, and [sqlite3_close()]** is its destructor.  There are many other interfaces (such as** [sqlite3_prepare_v2()], [sqlite3_create_function()], and** [sqlite3_busy_timeout()] to name but three) that are methods on an** sqlite3 object.*/typedef struct sqlite3 sqlite3;/*** CAPI3REF: 64-Bit Integer Types {H10200} <S10110>** KEYWORDS: sqlite_int64 sqlite_uint64**** Because there is no cross-platform way to specify 64-bit integer types** SQLite includes typedefs for 64-bit signed and unsigned integers.**** The sqlite3_int64 and sqlite3_uint64 are the preferred type definitions.** The sqlite_int64 and sqlite_uint64 types are supported for backwards** compatibility only.**** INVARIANTS:**** {H10201} The [sqlite_int64] and [sqlite3_int64] type shall specify**          a 64-bit signed integer.**** {H10202} The [sqlite_uint64] and [sqlite3_uint64] type shall specify**          a 64-bit unsigned integer.*/#ifdef SQLITE_INT64_TYPE  typedef SQLITE_INT64_TYPE sqlite_int64;  typedef unsigned SQLITE_INT64_TYPE sqlite_uint64;#elif defined(_MSC_VER) || defined(__BORLANDC__)  typedef __int64 sqlite_int64;  typedef unsigned __int64 sqlite_uint64;#else  typedef long long int sqlite_int64;  typedef unsigned long long int sqlite_uint64;#endiftypedef sqlite_int64 sqlite3_int64;typedef sqlite_uint64 sqlite3_uint64;/*** If compiling for a processor that lacks floating point support,** substitute integer for floating-point.*/#ifdef SQLITE_OMIT_FLOATING_POINT# define double sqlite3_int64#endif/*** CAPI3REF: Closing A Database Connection {H12010} <S30100><S40200>**** This routine is the destructor for the [sqlite3] object.**** Applications should [sqlite3_finalize | finalize] all [prepared statements]** and [sqlite3_blob_close | close] all [BLOB handles] associated with** the [sqlite3] object prior to attempting to close the object.** The [sqlite3_next_stmt()] interface can be used to locate all** [prepared statements] associated with a [database connection] if desired.** Typical code might look like this:**** <blockquote><pre>** sqlite3_stmt *pStmt;** while( (pStmt = sqlite3_next_stmt(db, 0))!=0 ){** &nbsp;   sqlite3_finalize(pStmt);** }** </pre></blockquote>**** If [sqlite3_close()] is invoked while a transaction is open,** the transaction is automatically rolled back.**** INVARIANTS:**** {H12011} A successful call to [sqlite3_close(C)] shall destroy the**          [database connection] object C.**** {H12012} A successful call to [sqlite3_close(C)] shall return SQLITE_OK.**** {H12013} A successful call to [sqlite3_close(C)] shall release all**          memory and system resources associated with [database connection]**          C.**** {H12014} A call to [sqlite3_close(C)] on a [database connection] C that**          has one or more open [prepared statements] shall fail with**          an [SQLITE_BUSY] error code.

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -