System.Data.SQLite This is the method signature for the SQLite core library logging callback function for use with sqlite3_log() and the SQLITE_CONFIG_LOG. WARNING: This delegate is used more-or-less directly by native code, do not modify its type signature. The extra data associated with this message, if any. The error code associated with this message. The message string to be logged. This class implements SQLiteBase completely, and is the guts of the code that interop's SQLite with .NET This internal class provides the foundation of SQLite support. It defines all the abstract members needed to implement a SQLite data provider, and inherits from SQLiteConvert which allows for simple translations of string to and from SQLite. This base class provides datatype conversion services for the SQLite provider. The format string for DateTime values when using the InvariantCulture or CurrentCulture formats. The value for the Unix epoch (e.g. January 1, 1970 at midnight, in UTC). The value of the OLE Automation epoch represented as a Julian day. An array of ISO8601 datetime formats we support conversion from The internal default format for UTC DateTime values when converting to a string. The internal default format for local DateTime values when converting to a string. An UTF-8 Encoding instance, so we can convert strings to and from UTF-8 The default DateTime format for this instance The default DateTimeKind for this instance. Initializes the conversion class The default date/time format to use for this instance The DateTimeKind to use. Converts a string to a UTF-8 encoded byte array sized to include a null-terminating character. The string to convert to UTF-8 A byte array containing the converted string plus an extra 0 terminating byte at the end of the array. Convert a DateTime to a UTF-8 encoded, zero-terminated byte array. This function is a convenience function, which first calls ToString() on the DateTime, and then calls ToUTF8() with the string result. The DateTime to convert. The UTF-8 encoded string, including a 0 terminating byte at the end of the array. Converts a UTF-8 encoded IntPtr of the specified length into a .NET string The pointer to the memory where the UTF-8 string is encoded The number of bytes to decode A string containing the translated character(s) Converts a UTF-8 encoded IntPtr of the specified length into a .NET string The pointer to the memory where the UTF-8 string is encoded The number of bytes to decode A string containing the translated character(s) Converts a string into a DateTime, using the current DateTimeFormat specified for the connection when it was opened. Acceptable ISO8601 DateTime formats are: THHmmssK THHmmK HH:mm:ss.FFFFFFFK HH:mm:ssK HH:mmK yyyy-MM-dd HH:mm:ss.FFFFFFFK yyyy-MM-dd HH:mm:ssK yyyy-MM-dd HH:mmK yyyy-MM-ddTHH:mm:ss.FFFFFFFK yyyy-MM-ddTHH:mmK yyyy-MM-ddTHH:mm:ssK yyyyMMddHHmmssK yyyyMMddHHmmK yyyyMMddTHHmmssFFFFFFFK THHmmss THHmm HH:mm:ss.FFFFFFF HH:mm:ss HH:mm yyyy-MM-dd HH:mm:ss.FFFFFFF yyyy-MM-dd HH:mm:ss yyyy-MM-dd HH:mm yyyy-MM-ddTHH:mm:ss.FFFFFFF yyyy-MM-ddTHH:mm yyyy-MM-ddTHH:mm:ss yyyyMMddHHmmss yyyyMMddHHmm yyyyMMddTHHmmssFFFFFFF yyyy-MM-dd yyyyMMdd yy-MM-dd If the string cannot be matched to one of the above formats, an exception will be thrown. The string containing either a long integer number of 100-nanosecond units since System.DateTime.MinValue, a Julian day double, an integer number of seconds since the Unix epoch, a culture-independent formatted date and time string, a formatted date and time string in the current culture, or an ISO8601-format string. A DateTime value Converts a string into a DateTime, using the specified DateTimeFormat and DateTimeKind. Acceptable ISO8601 DateTime formats are: THHmmssK THHmmK HH:mm:ss.FFFFFFFK HH:mm:ssK HH:mmK yyyy-MM-dd HH:mm:ss.FFFFFFFK yyyy-MM-dd HH:mm:ssK yyyy-MM-dd HH:mmK yyyy-MM-ddTHH:mm:ss.FFFFFFFK yyyy-MM-ddTHH:mmK yyyy-MM-ddTHH:mm:ssK yyyyMMddHHmmssK yyyyMMddHHmmK yyyyMMddTHHmmssFFFFFFFK THHmmss THHmm HH:mm:ss.FFFFFFF HH:mm:ss HH:mm yyyy-MM-dd HH:mm:ss.FFFFFFF yyyy-MM-dd HH:mm:ss yyyy-MM-dd HH:mm yyyy-MM-ddTHH:mm:ss.FFFFFFF yyyy-MM-ddTHH:mm yyyy-MM-ddTHH:mm:ss yyyyMMddHHmmss yyyyMMddHHmm yyyyMMddTHHmmssFFFFFFF yyyy-MM-dd yyyyMMdd yy-MM-dd If the string cannot be matched to one of the above formats, an exception will be thrown. The string containing either a long integer number of 100-nanosecond units since System.DateTime.MinValue, a Julian day double, an integer number of seconds since the Unix epoch, a culture-independent formatted date and time string, a formatted date and time string in the current culture, or an ISO8601-format string. The SQLiteDateFormats to use. The DateTimeKind to use. A DateTime value Converts a julianday value into a DateTime The value to convert A .NET DateTime Converts a julianday value into a DateTime The value to convert The DateTimeKind to use. A .NET DateTime Converts a DateTime struct to a JulianDay double The DateTime to convert The JulianDay value the Datetime represents Converts a DateTime struct to the whole number of seconds since the Unix epoch. The DateTime to convert The whole number of seconds since the Unix epoch Returns the default DateTime format string to use for the specified DateTimeKind. The DateTimeKind to use. The default DateTime format string to use for the specified DateTimeKind. Converts a DateTime to a string value, using the current DateTimeFormat specified for the connection when it was opened. The DateTime value to convert Either a string containing the long integer number of 100-nanosecond units since System.DateTime.MinValue, a Julian day double, an integer number of seconds since the Unix epoch, a culture-independent formatted date and time string, a formatted date and time string in the current culture, or an ISO8601-format date/time string. Internal function to convert a UTF-8 encoded IntPtr of the specified length to a DateTime. This is a convenience function, which first calls ToString() on the IntPtr to convert it to a string, then calls ToDateTime() on the string to return a DateTime. A pointer to the UTF-8 encoded string The length in bytes of the string The parsed DateTime value Smart method of splitting a string. Skips quoted elements, removes the quotes. This split function works somewhat like the String.Split() function in that it breaks apart a string into pieces and returns the pieces as an array. The primary differences are: Only one character can be provided as a separator character Quoted text inside the string is skipped over when searching for the separator, and the quotes are removed. Thus, if splitting the following string looking for a comma:
One,Two, "Three, Four", Five

The resulting array would contain
[0] One
[1] Two
[2] Three, Four
[3] Five

Note that the leading and trailing spaces were removed from each item during the split.
Source string to split apart Separator character A string array of the split up elements
Convert a value to true or false. A string or number representing true or false Convert a string to true or false. A string representing true or false "yes", "no", "y", "n", "0", "1", "on", "off" as well as Boolean.FalseString and Boolean.TrueString will all be converted to a proper boolean value. Determines the data type of a column in a statement The statement to retrieve information for The column to retrieve type information on The SQLiteType to receive the affinity for the given column Converts a SQLiteType to a .NET Type object The SQLiteType to convert Returns a .NET Type object For a given intrinsic type, return a DbType The native type to convert The corresponding (closest match) DbType Returns the ColumnSize for the given DbType The DbType to get the size of Convert a DbType to a Type The DbType to convert from The closest-match .NET type For a given type, return the closest-match SQLite TypeAffinity, which only understands a very limited subset of types. The type to evaluate The SQLite type affinity for that type. For a given type name, return a closest-match .NET type The name of the type to match The .NET DBType the text evaluates to. Sets the status of the memory usage tracking subsystem in the SQLite core library. By default, this is enabled. If this is disabled, memory usage tracking will not be performed. This is not really a per-connection value, it is global to the process. Non-zero to enable memory usage tracking, zero otherwise. A standard SQLite return code (i.e. zero for success and non-zero for failure). Shutdown the SQLite engine so that it can be restarted with different config options. We depend on auto initialization to recover. Returns non-zero if a database connection is open. Opens a database. Implementers should call SQLiteFunction.BindFunctions() and save the array after opening a connection to bind all attributed user-defined functions and collating sequences to the new connection. The filename of the database to open. SQLite automatically creates it if it doesn't exist. The flags associated with the parent connection object The open flags to use when creating the connection The maximum size of the pool for the given filename If true, the connection can be pulled from the connection pool Closes the currently-open database. After the database has been closed implemeters should call SQLiteFunction.UnbindFunctions() to deallocate all interop allocated memory associated with the user-defined functions and collating sequences tied to the closed connection. Non-zero if the operation is allowed to throw exceptions, zero otherwise. Sets the busy timeout on the connection. SQLiteCommand will call this before executing any command. The number of milliseconds to wait before returning SQLITE_BUSY Returns the text of the last error issued by SQLite When pooling is enabled, force this connection to be disposed rather than returned to the pool When pooling is enabled, returns the number of pool entries matching the current file name. The number of pool entries matching the current file name. Prepares a SQL statement for execution. The source connection preparing the command. Can be null for any caller except LINQ The SQL command text to prepare The previous statement in a multi-statement command, or null if no previous statement exists The timeout to wait before aborting the prepare The remainder of the statement that was not processed. Each call to prepare parses the SQL up to to either the end of the text or to the first semi-colon delimiter. The remaining text is returned here for a subsequent call to Prepare() until all the text has been processed. Returns an initialized SQLiteStatement. Steps through a prepared statement. The SQLiteStatement to step through True if a row was returned, False if not. Resets a prepared statement so it can be executed again. If the error returned is SQLITE_SCHEMA, transparently attempt to rebuild the SQL statement and throw an error if that was not possible. The statement to reset Returns -1 if the schema changed while resetting, 0 if the reset was sucessful or 6 (SQLITE_LOCKED) if the reset failed due to a lock Enables or disabled extension loading by SQLite. True to enable loading of extensions, false to disable. Loads a SQLite extension library from the named file. The name of the dynamic link library file containing the extension. The name of the exported function used to initialize the extension. If null, the default "sqlite3_extension_init" will be used. Enables or disabled extened result codes returned by SQLite true to enable extended result codes, false to disable. Returns the numeric result code for the most recent failed SQLite API call associated with the database connection. Result code Returns the extended numeric result code for the most recent failed SQLite API call associated with the database connection. Extended result code Add a log message via the SQLite sqlite3_log interface. Error code to be logged with the message. String to be logged. Unlike the SQLite sqlite3_log() interface, this should be pre-formatted. Consider using the String.Format() function. Checks if the SQLite core library has been initialized in the current process. Non-zero if the SQLite core library has been initialized in the current process, zero otherwise. Creates a new SQLite backup object based on the provided destination database connection. The source database connection is the one associated with this object. The source and destination database connections cannot be the same. The destination database connection. The destination database name. The source database name. The newly created backup object. Copies up to N pages from the source database to the destination database associated with the specified backup object. The backup object to use. The number of pages to copy or negative to copy all remaining pages. Set to true if the operation needs to be retried due to database locking issues. True if there are more pages to be copied, false otherwise. Returns the number of pages remaining to be copied from the source database to the destination database associated with the specified backup object. The backup object to check. The number of pages remaining to be copied. Returns the total number of pages in the source database associated with the specified backup object. The backup object to check. The total number of pages in the source database. Destroys the backup object, rolling back any backup that may be in progess. The backup object to destroy. Returns the error message for the specified SQLite return code using the internal static lookup table. The SQLite return code. The error message or null if it cannot be found. Returns the error message for the specified SQLite return code using the sqlite3_errstr() function, falling back to the internal lookup table if necessary. The SQLite return code. The error message or null if it cannot be found. Returns a string representing the active version of SQLite Returns an integer representing the active version of SQLite Returns the rowid of the most recent successful INSERT into the database from this connection. Returns the number of changes the last executing insert/update caused. Returns the amount of memory (in bytes) currently in use by the SQLite core library. This is not really a per-connection value, it is global to the process. Returns the maximum amount of memory (in bytes) used by the SQLite core library since the high-water mark was last reset. This is not really a per-connection value, it is global to the process. The opaque pointer returned to us by the sqlite provider The user-defined functions registered on this connection Shutdown the SQLite engine so that it can be restarted with different config options. We depend on auto initialization to recover. Returns a result code Enables or disabled extension loading by SQLite. True to enable loading of extensions, false to disable. Loads a SQLite extension library from the named file. The name of the dynamic link library file containing the extension. The name of the exported function used to initialize the extension. If null, the default "sqlite3_extension_init" will be used. Enables or disabled extended result codes returned by SQLite Gets the last SQLite error code Gets the last SQLite extended error code Add a log message via the SQLite sqlite3_log interface. Allows the setting of a logging callback invoked by SQLite when a log event occurs. Only one callback may be set. If NULL is passed, the logging callback is unregistered. The callback function to invoke. Returns a result code Creates a new SQLite backup object based on the provided destination database connection. The source database connection is the one associated with this object. The source and destination database connections cannot be the same. The destination database connection. The destination database name. The source database name. The newly created backup object. Copies up to N pages from the source database to the destination database associated with the specified backup object. The backup object to use. The number of pages to copy, negative to copy all remaining pages. Set to true if the operation needs to be retried due to database locking issues; otherwise, set to false. True if there are more pages to be copied, false otherwise. Returns the number of pages remaining to be copied from the source database to the destination database associated with the specified backup object. The backup object to check. The number of pages remaining to be copied. Returns the total number of pages in the source database associated with the specified backup object. The backup object to check. The total number of pages in the source database. Destroys the backup object, rolling back any backup that may be in progess. The backup object to destroy. Determines if the SQLite core library has been initialized for the current process. A boolean indicating whether or not the SQLite core library has been initialized for the current process. Determines if the SQLite core library has been initialized for the current process. A boolean indicating whether or not the SQLite core library has been initialized for the current process. Helper function to retrieve a column of data from an active statement. The statement being step()'d through The column index to retrieve The type of data contained in the column. If Uninitialized, this function will retrieve the datatype information. Returns the data in the column Alternate SQLite3 object, overriding many text behaviors to support UTF-16 (Unicode) Overrides SQLiteConvert.ToString() to marshal UTF-16 strings instead of UTF-8 A pointer to a UTF-16 string The length (IN BYTES) of the string A .NET string Represents a single SQL backup in SQLite. The underlying SQLite object this backup is bound to. The actual backup handle. The destination database for the backup. The destination database name for the backup. The source database for the backup. The source database name for the backup. The last result from the StepBackup method of the SQLite3 class. This is used to determine if the call to the FinishBackup method of the SQLite3 class should throw an exception when it receives a non-Ok return code from the core SQLite library. Initializes the backup. The base SQLite object. The backup handle. The destination database for the backup. The destination database name for the backup. The source database for the backup. The source database name for the backup. Disposes and finalizes the backup. The extra behavioral flags that can be applied to a connection. No extra flags. Enable logging of all SQL statements to be prepared. Enable logging of all bound parameter types and raw values. Enable logging of all bound parameter strongly typed values. Enable logging of all exceptions caught from user-provided managed code called from native code via delegates. Enable logging of backup API errors. Skip adding the extension functions provided by the native interop assembly. Enable all logging. The default extra flags for new connections. SQLite implementation of DbCommand. The command text this command is based on The connection the command is associated with The version of the connection the command is associated with Indicates whether or not a DataReader is active on the command. The timeout for the command, kludged because SQLite doesn't support per-command timeout values Designer support Used by DbDataAdapter to determine updating behavior The collection of parameters for the command The SQL command text, broken into individual SQL statements as they are executed Unprocessed SQL text that has not been executed Transaction associated with this command Constructs a new SQLiteCommand Default constructor Initializes the command with the given command text The SQL command text Initializes the command with the given SQL command text and attach the command to the specified connection. The SQL command text The connection to associate with the command Initializes the command and associates it with the specified connection. The connection to associate with the command Initializes a command with the given SQL, connection and transaction The SQL command text The connection to associate with the command The transaction the command should be associated with Disposes of the command and clears all member variables Whether or not the class is being explicitly or implicitly disposed Clears and destroys all statements currently prepared Builds an array of prepared statements for each complete SQL statement in the command text Not implemented Forwards to the local CreateParameter() function Create a new parameter This function ensures there are no active readers, that we have a valid connection, that the connection is open, that all statements are prepared and all parameters are assigned in preparation for allocating a data reader. Creates a new SQLiteDataReader to execute/iterate the array of SQLite prepared statements The behavior the data reader should adopt Returns a SQLiteDataReader object Overrides the default behavior to return a SQLiteDataReader specialization class The flags to be associated with the reader A SQLiteDataReader Overrides the default behavior of DbDataReader to return a specialized SQLiteDataReader class A SQLiteDataReader Called by the SQLiteDataReader when the data reader is closed. Execute the command and return the number of rows inserted/updated affected by it. Execute the command and return the first column of the first row of the resultset (if present), or null if no resultset was returned. The first column of the first row of the first resultset from the query Does nothing. Commands are prepared as they are executed the first time, and kept in prepared state afterwards. Clones a command, including all its parameters A new SQLiteCommand with the same commandtext, connection and parameters The SQL command text associated with the command The amount of time to wait for the connection to become available before erroring out The type of the command. SQLite only supports CommandType.Text The connection associated with this command Forwards to the local Connection property Returns the SQLiteParameterCollection for the given command Forwards to the local Parameters property The transaction associated with this command. SQLite only supports one transaction per connection, so this property forwards to the command's underlying connection. Forwards to the local Transaction property Sets the method the SQLiteCommandBuilder uses to determine how to update inserted or updated rows in a DataTable. Determines if the command is visible at design time. Defaults to True. SQLite implementation of DbCommandBuilder. Default constructor Initializes the command builder and associates it with the specified data adapter. Minimal amount of parameter processing. Primarily sets the DbType for the parameter equal to the provider type in the schema The parameter to use in applying custom behaviors to a row The row to apply the parameter to The type of statement Whether the application of the parameter is part of a WHERE clause Returns a valid named parameter The name of the parameter Error Returns a named parameter for the given ordinal The i of the parameter Error Returns a placeholder character for the specified parameter i. The index of the parameter to provide a placeholder for Returns a named parameter Sets the handler for receiving row updating events. Used by the DbCommandBuilder to autogenerate SQL statements that may not have previously been generated. A data adapter to receive events on. Returns the automatically-generated SQLite command to delete rows from the database Returns the automatically-generated SQLite command to delete rows from the database Returns the automatically-generated SQLite command to update rows in the database Returns the automatically-generated SQLite command to update rows in the database Returns the automatically-generated SQLite command to insert rows into the database Returns the automatically-generated SQLite command to insert rows into the database Places brackets around an identifier The identifier to quote The bracketed identifier Removes brackets around an identifier The quoted (bracketed) identifier The undecorated identifier Override helper, which can help the base command builder choose the right keys for the given query Gets/sets the DataAdapter for this CommandBuilder Overridden to hide its property from the designer Overridden to hide its property from the designer Overridden to hide its property from the designer Overridden to hide its property from the designer Overridden to hide its property from the designer Event data for connection event handlers. The type of event being raised. The associated with this event, if any. The transaction associated with this event, if any. The command associated with this event, if any. Command or message text associated with this event, if any. Extra data associated with this event, if any. Constructs the object. The type of event being raised. The base associated with this event, if any. The transaction associated with this event, if any. The command associated with this event, if any. The command or message text, if any. The extra data, if any. Raised when an event pertaining to a connection occurs. The connection involved. Extra information about the event. SQLite implentation of DbConnection. The property can contain the following parameter(s), delimited with a semi-colon: Parameter Values Required Default Data Source This may be a file name, the string ":memory:", or any supported URI (starting with SQLite 3.7.7). Y Version 3 N 3 UseUTF16Encoding True
False
N False
DateTimeFormat Ticks - Use the value of DateTime.Ticks.
ISO8601 - Use the ISO-8601 format. Uses the "yyyy-MM-dd HH:mm:ss.FFFFFFFK" format for UTC DateTime values and "yyyy-MM-dd HH:mm:ss.FFFFFFF" format for local DateTime values).
JulianDay - The interval of time in days and fractions of a day since January 1, 4713 BC.
UnixEpoch - The whole number of seconds since the Unix epoch (January 1, 1970).
InvariantCulture - Any culture-independent string value that the .NET Framework can interpret as a valid DateTime.
CurrentCulture - Any string value that the .NET Framework can interpret as a valid DateTime using the current culture.
N ISO8601
DateTimeKind Unspecified - Not specified as either UTC or local time.
Utc - The time represented is UTC.
Local - The time represented is local time.
N Unspecified
BaseSchemaName Some base data classes in the framework (e.g. those that build SQL queries dynamically) assume that an ADO.NET provider cannot support an alternate catalog (i.e. database) without supporting alternate schemas as well; however, SQLite does not fit into this model. Therefore, this value is used as a placeholder and removed prior to preparing any SQL statements that may contain it. N sqlite_default_schema BinaryGUID True - Store GUID columns in binary form
False - Store GUID columns as text
N True
Cache Size {size in bytes} N 2000 Synchronous Normal - Normal file flushing behavior
Full - Full flushing after all writes
Off - Underlying OS flushes I/O's
N Full
Page Size {size in bytes} N 1024 Password {password} - Using this parameter requires that the CryptoAPI based codec be enabled at compile-time for both the native interop assembly and the core managed assemblies; otherwise, using this parameter may result in an exception being thrown when attempting to open the connection. N Enlist Y - Automatically enlist in distributed transactions
N - No automatic enlistment
N Y
Pooling True - Use connection pooling
False - Do not use connection pooling
N False
FailIfMissing True - Don't create the database if it does not exist, throw an error instead
False - Automatically create the database if it does not exist
N False
Max Page Count {size in pages} - Limits the maximum number of pages (limits the size) of the database N 0 Legacy Format True - Use the more compatible legacy 3.x database format
False - Use the newer 3.3x database format which compresses numbers more effectively
N False
Default Timeout {time in seconds}
The default command timeout
N 30
Journal Mode Delete - Delete the journal file after a commit
Persist - Zero out and leave the journal file on disk after a commit
Off - Disable the rollback journal entirely
N Delete
Read Only True - Open the database for read only access
False - Open the database for normal read/write access
N False
Max Pool Size The maximum number of connections for the given connection string that can be in the connection pool N 100 Default IsolationLevel The default transaciton isolation level N Serializable Foreign Keys Enable foreign key constraints N False Flags Extra behavioral flags for the connection. See the enumeration for possible values. N Default SetDefaults True - Apply the default connection settings to the opened database.
False - Skip applying the default connection settings to the opened database.
N True
ToFullPath True - Attempt to expand the data source file name to a fully qualified path before opening.
False - Skip attempting to expand the data source file name to a fully qualified path before opening.
N True
The default "stub" (i.e. placeholder) base schema name to use when returning column schema information. Used as the initial value of the BaseSchemaName property. This should start with "sqlite_*" because those names are reserved for use by SQLite (i.e. they cannot be confused with the names of user objects). Object used to synchronize access to the static instance data for this class. Used to hold the active library version number of SQLite. State of the current connection The connection string Nesting level of the transactions open on the connection If set, then the connection is currently being disposed. The default isolation level for new transactions Whether or not the connection is enlisted in a distrubuted transaction The base SQLite object to interop with The database filename minus path and extension Temporary password storage, emptied after the database has been opened The "stub" (i.e. placeholder) base schema name to use when returning column schema information. The extra behavioral flags for this connection, if any. See the enumeration for a list of possible values. Default command timeout Non-zero if the built-in (i.e. framework provided) connection string parser should be used when opening the connection. Constructs a new SQLiteConnection object Default constructor Initializes the connection with the specified connection string. The connection string to use. Initializes the connection with the specified connection string. The connection string to use on. Non-zero to parse the connection string using the built-in (i.e. framework provided) parser when opening the connection. Clones the settings and connection string from an existing connection. If the existing connection is already open, this function will open its own connection, enumerate any attached databases of the original connection, and automatically attach to them. The connection to copy the settings from. Raises the event. The connection associated with this event. A that contains the event data. Backs up the database, using the specified database connection as the destination. The destination database connection. The destination database name. The source database name. The number of pages to copy or negative to copy all remaining pages. The method to invoke between each step of the backup process. This parameter may be null (i.e. no callbacks will be performed). The number of milliseconds to sleep after encountering a locking error during the backup process. A value less than zero means that no sleep should be performed. Creates a clone of the connection. All attached databases and user-defined functions are cloned. If the existing connection is open, the cloned connection will also be opened. Creates a database file. This just creates a zero-byte file which SQLite will turn into a database when the file is opened properly. The file to create Raises the state change event when the state of the connection changes The new connection state. If this is different from the previous state, the event is raised. The event data created for the raised event, if it was actually raised. OBSOLETE. Creates a new SQLiteTransaction if one isn't already active on the connection. This parameter is ignored. When TRUE, SQLite defers obtaining a write lock until a write operation is requested. When FALSE, a writelock is obtained immediately. The default is TRUE, but in a multi-threaded multi-writer environment, one may instead choose to lock the database immediately to avoid any possible writer deadlock. Returns a SQLiteTransaction object. OBSOLETE. Creates a new SQLiteTransaction if one isn't already active on the connection. When TRUE, SQLite defers obtaining a write lock until a write operation is requested. When FALSE, a writelock is obtained immediately. The default is false, but in a multi-threaded multi-writer environment, one may instead choose to lock the database immediately to avoid any possible writer deadlock. Returns a SQLiteTransaction object. Creates a new if one isn't already active on the connection. Supported isolation levels are Serializable, ReadCommitted and Unspecified. Unspecified will use the default isolation level specified in the connection string. If no isolation level is specified in the connection string, Serializable is used. Serializable transactions are the default. In this mode, the engine gets an immediate lock on the database, and no other threads may begin a transaction. Other threads may read from the database, but not write. With a ReadCommitted isolation level, locks are deferred and elevated as needed. It is possible for multiple threads to start a transaction in ReadCommitted mode, but if a thread attempts to commit a transaction while another thread has a ReadCommitted lock, it may timeout or cause a deadlock on both threads until both threads' CommandTimeout's are reached. Returns a SQLiteTransaction object. Creates a new if one isn't already active on the connection. Returns the new transaction object. Forwards to the local function Supported isolation levels are Unspecified, Serializable, and ReadCommitted This method is not implemented; however, the event will still be raised. When the database connection is closed, all commands linked to this connection are automatically reset. Clears the connection pool associated with the connection. Any other active connections using the same database file will be discarded instead of returned to the pool when they are closed. Clears all connection pools. Any active connections will be discarded instead of sent to the pool when they are closed. Create a new and associate it with this connection. Returns a new command object already assigned to this connection. Forwards to the local function. Parses the connection string into component parts using the custom connection string parser. The connection string to parse An array of key-value pairs representing each parameter of the connection string Parses a connection string using the built-in (i.e. framework provided) connection string parser class and returns the key/value pairs. An exception may be thrown if the connection string is invalid or cannot be parsed. When compiled for the .NET Compact Framework, the custom connection string parser is always used instead because the framework provided one is unavailable there. The connection string to parse. Non-zero to throw an exception if any connection string values are not of the type. The list of key/value pairs. Manual distributed transaction enlistment support The distributed transaction to enlist in Looks for a key in the array of key/values of the parameter string. If not found, return the specified default value The list to look in The key to find The default value to return if the key is not found The value corresponding to the specified key, or the default value if not found. Attempts to convert the string value to an enumerated value of the specified type. The enumerated type to convert the string value to. The string value to be converted. Non-zero to make the conversion case-insensitive. The enumerated value upon success or null upon error. Enables or disabled extension loading. True to enable loading of extensions, false to disable. Loads a SQLite extension library from the named dynamic link library file. The name of the dynamic link library file containing the extension. Loads a SQLite extension library from the named dynamic link library file. The name of the dynamic link library file containing the extension. The name of the exported function used to initialize the extension. If null, the default "sqlite3_extension_init" will be used. Opens the connection using the parameters found in the . Opens the connection using the parameters found in the and then returns it. The current connection object. This method causes any pending database operation to abort and return at its earliest opportunity. This routine is typically called in response to a user action such as pressing "Cancel" or Ctrl-C where the user wants a long query operation to halt immediately. It is safe to call this routine from any thread. However, it is not safe to call this routine with a database connection that is closed or might close before this method returns. Sets the status of the memory usage tracking subsystem in the SQLite core library. By default, this is enabled. If this is disabled, memory usage tracking will not be performed. This is not really a per-connection value, it is global to the process. Non-zero to enable memory usage tracking, zero otherwise. A standard SQLite return code (i.e. zero for success and non-zero for failure). Passes a shutdown request off to SQLite. Enables or disabled extended result codes returned by SQLite Enables or disabled extended result codes returned by SQLite Enables or disabled extended result codes returned by SQLite Add a log message via the SQLite sqlite3_log interface. Add a log message via the SQLite sqlite3_log interface. Change the password (or assign a password) to an open database. No readers or writers may be active for this process. The database must already be open and if it already was password protected, the existing password must already have been supplied. The new password to assign to the database Change the password (or assign a password) to an open database. No readers or writers may be active for this process. The database must already be open and if it already was password protected, the existing password must already have been supplied. The new password to assign to the database Sets the password for a password-protected database. A password-protected database is unusable for any operation until the password has been set. The password for the database Sets the password for a password-protected database. A password-protected database is unusable for any operation until the password has been set. The password for the database Queries or modifies the number of retries or the retry interval (in milliseconds) for certain I/O operations that may fail due to anti-virus software. The number of times to retry the I/O operation. A negative value will cause the current count to be queried and replace that negative value. The number of milliseconds to wait before retrying the I/O operation. This number is multiplied by the number of retry attempts so far to come up with the final number of milliseconds to wait. A negative value will cause the current interval to be queried and replace that negative value. Zero for success, non-zero for error. Removes one set of surrounding single -OR- double quotes from the string value and returns the resulting string value. If the string is null, empty, or contains quotes that are not balanced, nothing is done and the original string value will be returned. The string value to process. The string value, modified to remove one set of surrounding single -OR- double quotes, if applicable. Expand the filename of the data source, resolving the |DataDirectory| macro as appropriate. The database filename to expand Non-zero if the returned file name should be converted to a full path (except when using the .NET Compact Framework). The expanded path and filename of the filename The following commands are used to extract schema information out of the database. Valid schema types are: MetaDataCollections DataSourceInformation Catalogs Columns ForeignKeys Indexes IndexColumns Tables Views ViewColumns Returns the MetaDataCollections schema A DataTable of the MetaDataCollections schema Returns schema information of the specified collection The schema collection to retrieve A DataTable of the specified collection Retrieves schema information using the specified constraint(s) for the specified collection The collection to retrieve The restrictions to impose A DataTable of the specified collection Builds a MetaDataCollections schema datatable DataTable Builds a DataSourceInformation datatable DataTable Build a Columns schema The catalog (attached database) to query, can be null The table to retrieve schema information for, must not be null The column to retrieve schema information for, can be null DataTable Returns index information for the given database and catalog The catalog (attached database) to query, can be null The name of the index to retrieve information for, can be null The table to retrieve index information for, can be null DataTable Retrieves table schema information for the database and catalog The catalog (attached database) to retrieve tables on The table to retrieve, can be null The table type, can be null DataTable Retrieves view schema information for the database The catalog (attached database) to retrieve views on The view name, can be null DataTable Retrieves catalog (attached databases) schema information for the database The catalog to retrieve, can be null DataTable Returns the base column information for indexes in a database The catalog to retrieve indexes for (can be null) The table to restrict index information by (can be null) The index to restrict index information by (can be null) The source column to restrict index information by (can be null) A DataTable containing the results Returns detailed column information for a specified view The catalog to retrieve columns for (can be null) The view to restrict column information by (can be null) The source column to restrict column information by (can be null) A DataTable containing the results Retrieves foreign key information from the specified set of filters An optional catalog to restrict results on An optional table to restrict results on An optional foreign key name to restrict results on A DataTable with the results of the query Static variable to store the connection event handlers to call. This event is raised whenever the database is opened or closed. This event is raised when events related to the lifecycle of a SQLiteConnection object occur. Returns the number of pool entries for the file name associated with this connection. The connection string containing the parameters for the connection Parameter Values Required Default Data Source This may be a file name, the string ":memory:", or any supported URI (starting with SQLite 3.7.7). Y Version 3 N 3 UseUTF16Encoding True
False
N False
DateTimeFormat Ticks - Use the value of DateTime.Ticks.
ISO8601 - Use the ISO-8601 format. Uses the "yyyy-MM-dd HH:mm:ss.FFFFFFFK" format for UTC DateTime values and "yyyy-MM-dd HH:mm:ss.FFFFFFF" format for local DateTime values).
JulianDay - The interval of time in days and fractions of a day since January 1, 4713 BC.
UnixEpoch - The whole number of seconds since the Unix epoch (January 1, 1970).
InvariantCulture - Any culture-independent string value that the .NET Framework can interpret as a valid DateTime.
CurrentCulture - Any string value that the .NET Framework can interpret as a valid DateTime using the current culture.
N ISO8601
DateTimeKind Unspecified - Not specified as either UTC or local time.
Utc - The time represented is UTC.
Local - The time represented is local time.
N Unspecified
BaseSchemaName Some base data classes in the framework (e.g. those that build SQL queries dynamically) assume that an ADO.NET provider cannot support an alternate catalog (i.e. database) without supporting alternate schemas as well; however, SQLite does not fit into this model. Therefore, this value is used as a placeholder and removed prior to preparing any SQL statements that may contain it. N sqlite_default_schema BinaryGUID True - Store GUID columns in binary form
False - Store GUID columns as text
N True
Cache Size {size in bytes} N 2000 Synchronous Normal - Normal file flushing behavior
Full - Full flushing after all writes
Off - Underlying OS flushes I/O's
N Full
Page Size {size in bytes} N 1024 Password {password} - Using this parameter requires that the CryptoAPI based codec be enabled at compile-time for both the native interop assembly and the core managed assemblies; otherwise, using this parameter may result in an exception being thrown when attempting to open the connection. N Enlist Y - Automatically enlist in distributed transactions
N - No automatic enlistment
N Y
Pooling True - Use connection pooling
False - Do not use connection pooling
N False
FailIfMissing True - Don't create the database if it does not exist, throw an error instead
False - Automatically create the database if it does not exist
N False
Max Page Count {size in pages} - Limits the maximum number of pages (limits the size) of the database N 0 Legacy Format True - Use the more compatible legacy 3.x database format
False - Use the newer 3.3x database format which compresses numbers more effectively
N False
Default Timeout {time in seconds}
The default command timeout
N 30
Journal Mode Delete - Delete the journal file after a commit
Persist - Zero out and leave the journal file on disk after a commit
Off - Disable the rollback journal entirely
N Delete
Read Only True - Open the database for read only access
False - Open the database for normal read/write access
N False
Max Pool Size The maximum number of connections for the given connection string that can be in the connection pool N 100 Default IsolationLevel The default transaciton isolation level N Serializable Foreign Keys Enable foreign key constraints N False Flags Extra behavioral flags for the connection. See the enumeration for possible values. N Default SetDefaults True - Apply the default connection settings to the opened database.
False - Skip applying the default connection settings to the opened database.
N True
ToFullPath True - Attempt to expand the data source file name to a fully qualified path before opening.
False - Skip attempting to expand the data source file name to a fully qualified path before opening.
N True
Returns the data source file name without extension or path. Returns the string "main". Gets/sets the default command timeout for newly-created commands. This is especially useful for commands used internally such as inside a SQLiteTransaction, where setting the timeout is not possible. This can also be set in the ConnectionString with "Default Timeout" Non-zero if the built-in (i.e. framework provided) connection string parser should be used when opening the connection. Gets/sets the extra behavioral flags for this connection. See the enumeration for a list of possible values. Returns the version of the underlying SQLite database engine Returns the rowid of the most recent successful INSERT into the database from this connection. Returns the number of rows changed by the last INSERT, UPDATE, or DELETE statement executed on this connection. Returns the amount of memory (in bytes) currently in use by the SQLite core library. Returns the maximum amount of memory (in bytes) used by the SQLite core library since the high-water mark was last reset. Returns a string containing the define constants (i.e. compile-time options) used to compile the core managed assembly, delimited with spaces. Returns the version of the underlying SQLite database engine This method returns the string whose value is the same as the SQLITE_SOURCE_ID C preprocessor macro used when compiling the SQLite core library. Returns the state of the connection. This event is raised whenever SQLite makes an update/delete/insert into the database on this connection. It only applies to the given connection. This event is raised whenever SQLite is committing a transaction. Return non-zero to trigger a rollback. This event is raised whenever SQLite statement first begins executing on this connection. It only applies to the given connection. This event is raised whenever SQLite is rolling back a transaction. Returns the instance. The I/O file cache flushing behavior for the connection Normal file flushing at critical sections of the code Full file flushing after every write operation Use the default operating system's file flushing, SQLite does not explicitly flush the file buffers after writing Raised when a transaction is about to be committed. To roll back a transaction, set the rollbackTrans boolean value to true. The connection committing the transaction Event arguments on the transaction Raised when data is inserted, updated and deleted on a given connection The connection committing the transaction The event parameters which triggered the event Raised when a statement first begins executing on a given connection The connection executing the statement Event arguments of the trace Raised between each backup step. The source database connection. The source database name. The destination database connection. The destination database name. The number of pages copied with each step. The number of pages remaining to be copied. The total number of pages in the source database. Set to true if the operation needs to be retried due to database locking issues; otherwise, set to false. True to continue with the backup process or false to halt the backup process, rolling back any changes that have been made so far. Whenever an update event is triggered on a connection, this enum will indicate exactly what type of operation is being performed. A row is being deleted from the given database and table A row is being inserted into the table. A row is being updated in the table. Passed during an Update callback, these event arguments detail the type of update operation being performed on the given connection. The name of the database being updated (usually "main" but can be any attached or temporary database) The name of the table being updated The type of update being performed (insert/update/delete) The RowId affected by this update. Event arguments raised when a transaction is being committed Set to true to abort the transaction and trigger a rollback Passed during an Trace callback, these event arguments contain the UTF-8 rendering of the SQL statement text SQL statement text as the statement first begins executing The connection pool object The default version number new pools will get The number of connections successfully opened from any pool. This value is incremented by the Remove method. The number of connections successfully closed from any pool. This value is incremented by the Add method. Counts the number of pool entries matching the specified file name. The file name to match or null to match all files. The pool entry counts for each matching file. The total number of connections successfully opened from any pool. The total number of connections successfully closed from any pool. The total number of pool entries for all matching files. Attempt to pull a pooled connection out of the queue for active duty The filename for a desired connection The maximum size the connection pool for the filename can be The pool version the returned connection will belong to Returns NULL if no connections were available. Even if none are, the poolversion will still be a valid pool version Clears out all pooled connections and rev's up the default pool version to force all old active objects not in the pool to get discarded rather than returned to their pools. Clear a given pool for a given filename. Discards anything in the pool for the given file, and revs the pool version so current active objects on the old version of the pool will get discarded rather than be returned to the pool. The filename of the pool to clear Return a connection to the pool for someone else to use. The filename of the pool to use The connection handle to pool The pool version the handle was created under If the version numbers don't match between the connection and the pool, then the handle is discarded. We don't have to thread-lock anything in this function, because it's only called by other functions above which already have a thread-safe lock. The queue to resize If a function intends to add to the pool, this is true, which forces the resize to take one more than it needs from the pool Keeps track of connections made on a specified file. The PoolVersion dictates whether old objects get returned to the pool or discarded when no longer in use. SQLite implementation of DbConnectionStringBuilder. Properties of this class Constructs a new instance of the class Default constructor Constructs a new instance of the class using the specified connection string. The connection string to parse Private initializer, which assigns the connection string and resets the builder The connection string to assign Helper function for retrieving values from the connectionstring The keyword to retrieve settings for The resulting parameter value Returns true if the value was found and returned Fallback method for MONO, which doesn't implement DbConnectionStringBuilder.GetProperties() The hashtable to fill with property descriptors Gets/Sets the default version of the SQLite engine to instantiate. Currently the only valid value is 3, indicating version 3 of the sqlite library. Gets/Sets the synchronization mode (file flushing) of the connection string. Default is "Normal". Gets/Sets the encoding for the connection string. The default is "False" which indicates UTF-8 encoding. Gets/Sets whether or not to use connection pooling. The default is "False" Gets/Sets whethor not to store GUID's in binary format. The default is True which saves space in the database. Gets/Sets the filename to open on the connection string. An alternate to the data source property An alternate to the data source property that uses the SQLite URI syntax. Gets/sets the default command timeout for newly-created commands. This is especially useful for commands used internally such as inside a SQLiteTransaction, where setting the timeout is not possible. Determines whether or not the connection will automatically participate in the current distributed transaction (if one exists) If set to true, will throw an exception if the database specified in the connection string does not exist. If false, the database will be created automatically. If enabled, uses the legacy 3.xx format for maximum compatibility, but results in larger database sizes. When enabled, the database will be opened for read-only access and writing will be disabled. Gets/sets the database encryption password Gets/Sets the page size for the connection. Gets/Sets the maximum number of pages the database may hold Gets/Sets the cache size for the connection. Gets/Sets the DateTime format for the connection. Gets/Sets the DateTime kind for the connection. Gets/Sets the placeholder base schema name used for .NET Framework compatibility purposes. Determines how SQLite handles the transaction journal file. Sets the default isolation level for transactions on the connection. If enabled, use foreign key constraints Gets/Sets the extra behavioral flags. If enabled, apply the default connection settings to opened databases. If enabled, attempt to resolve the provided data source file name to a full path before opening. SQLite has very limited types, and is inherently text-based. The first 5 types below represent the sum of all types SQLite understands. The DateTime extension to the spec is for internal use only. Not used All integers in SQLite default to Int64 All floating point numbers in SQLite default to double The default data type of SQLite is text Typically blob types are only seen when returned from a function Null types can be returned from functions Used internally by this provider Used internally These are the event types associated with the delegate (and its corresponding event) and the class. Not used. Not used. The connection is being opened. The connection string has been parsed. The connection was opened. The method was called on the connection. A transaction was created using the connection. The connection was enlisted into a transaction. A command was created using the connection. The connection is being closed. The connection was closed. This implementation of SQLite for ADO.NET can process date/time fields in databases in only one of three formats. Ticks, ISO8601 and JulianDay. ISO8601 is more compatible, readable, fully-processable, but less accurate as it doesn't provide time down to fractions of a second. JulianDay is the numeric format the SQLite uses internally and is arguably the most compatible with 3rd party tools. It is not readable as text without post-processing. Ticks less compatible with 3rd party tools that query the database, and renders the DateTime field unreadable as text without post-processing. The preferred order of choosing a datetime format is JulianDay, ISO8601, and then Ticks. Ticks is mainly present for legacy code support. Use the value of DateTime.Ticks. This value is not recommended and is not well supported with LINQ. Use the ISO-8601 format. Uses the "yyyy-MM-dd HH:mm:ss.FFFFFFFK" format for UTC DateTime values and "yyyy-MM-dd HH:mm:ss.FFFFFFF" format for local DateTime values). The interval of time in days and fractions of a day since January 1, 4713 BC. The whole number of seconds since the Unix epoch (January 1, 1970). Any culture-independent string value that the .NET Framework can interpret as a valid DateTime. Any string value that the .NET Framework can interpret as a valid DateTime using the current culture. The default format for this provider. This enum determines how SQLite treats its journal file. By default SQLite will create and delete the journal file when needed during a transaction. However, for some computers running certain filesystem monitoring tools, the rapid creation and deletion of the journal file can cause those programs to fail, or to interfere with SQLite. If a program or virus scanner is interfering with SQLite's journal file, you may receive errors like "unable to open database file" when starting a transaction. If this is happening, you may want to change the default journal mode to Persist. The default mode, this causes SQLite to use the existing journaling mode for the database. SQLite will create and destroy the journal file as-needed. When this is set, SQLite will keep the journal file even after a transaction has completed. It's contents will be erased, and the journal re-used as often as needed. If it is deleted, it will be recreated the next time it is needed. This option disables the rollback journal entirely. Interrupted transactions or a program crash can cause database corruption in this mode! SQLite will truncate the journal file to zero-length instead of deleting it. SQLite will store the journal in volatile RAM. This saves disk I/O but at the expense of database safety and integrity. If the application using SQLite crashes in the middle of a transaction when the MEMORY journaling mode is set, then the database file will very likely go corrupt. SQLite uses a write-ahead log instead of a rollback journal to implement transactions. The WAL journaling mode is persistent; after being set it stays in effect across multiple database connections and after closing and reopening the database. A database in WAL journaling mode can only be accessed by SQLite version 3.7.0 or later. Possible values for the "synchronous" database setting. This setting determines how often the database engine calls the xSync method of the VFS. Use the default "synchronous" database setting. Currently, this should be the same as using the FULL mode. The database engine continues without syncing as soon as it has handed data off to the operating system. If the application running SQLite crashes, the data will be safe, but the database might become corrupted if the operating system crashes or the computer loses power before that data has been written to the disk surface. The database engine will still sync at the most critical moments, but less often than in FULL mode. There is a very small (though non-zero) chance that a power failure at just the wrong time could corrupt the database in NORMAL mode. The database engine will use the xSync method of the VFS to ensure that all content is safely written to the disk surface prior to continuing. This ensures that an operating system crash or power failure will not corrupt the database. FULL synchronous is very safe, but it is also slower. Struct used internally to determine the datatype of a column in a resultset The DbType of the column, or DbType.Object if it cannot be determined The affinity of a column, used for expressions or when Type is DbType.Object SQLite implementation of DbDataAdapter. This class is just a shell around the DbDataAdapter. Nothing from DbDataAdapter is overridden here, just a few constructors are defined. Default constructor. Constructs a data adapter using the specified select command. The select command to associate with the adapter. Constructs a data adapter with the supplied select command text and associated with the specified connection. The select command text to associate with the data adapter. The connection to associate with the select command. Constructs a data adapter with the specified select command text, and using the specified database connection string. The select command text to use to construct a select command. A connection string suitable for passing to a new SQLiteConnection, which is associated with the select command. Raised by the underlying DbDataAdapter when a row is being updated The event's specifics Raised by DbDataAdapter after a row is updated The event's specifics Row updating event handler Row updated event handler Gets/sets the select command for this DataAdapter Gets/sets the insert command for this DataAdapter Gets/sets the update command for this DataAdapter Gets/sets the delete command for this DataAdapter SQLite implementation of DbDataReader. Underlying command this reader is attached to Index of the current statement in the command being processed Current statement being Read() State of the current statement being processed. -1 = First Step() executed, so the first Read() will be ignored 0 = Actively reading 1 = Finished reading 2 = Non-row-returning statement, no records Number of records affected by the insert/update statements executed on the command Count of fields (columns) in the row-returning statement currently being processed Maps the field (column) names to their corresponding indexes within the results. Datatypes of active fields (columns) in the current statement, used for type-restricting data The behavior of the datareader If set, then dispose of the command object when the reader is finished If set, then raise an exception when the object is accessed after being disposed. An array of rowid's for the active statement if CommandBehavior.KeyInfo is specified Matches the version of the connection. The "stub" (i.e. placeholder) base schema name to use when returning column schema information. Matches the base schema name used by the associated connection. Internal constructor, initializes the datareader and sets up to begin executing statements The SQLiteCommand this data reader is for The expected behavior of the data reader Dispose of all resources used by this datareader. Closes the datareader, potentially closing the connection as well if CommandBehavior.CloseConnection was specified. Throw an error if the datareader is closed Throw an error if a row is not loaded Enumerator support Returns a DbEnumerator object. SQLite is inherently un-typed. All datatypes in SQLite are natively strings. The definition of the columns of a table and the affinity of returned types are all we have to go on to type-restrict data in the reader. This function attempts to verify that the type of data being requested of a column matches the datatype of the column. In the case of columns that are not backed into a table definition, we attempt to match up the affinity of a column (int, double, string or blob) to a set of known types that closely match that affinity. It's not an exact science, but its the best we can do. This function throws an InvalidTypeCast() exception if the requested type doesn't match the column's definition or affinity. The index of the column to type-check The type we want to get out of the column Retrieves the column as a boolean value The index of the column to retrieve bool Retrieves the column as a single byte value The index of the column to retrieve byte Retrieves a column as an array of bytes (blob) The index of the column to retrieve The zero-based index of where to begin reading the data The buffer to write the bytes into The zero-based index of where to begin writing into the array The number of bytes to retrieve The actual number of bytes written into the array To determine the number of bytes in the column, pass a null value for the buffer. The total length will be returned. Returns the column as a single character The index of the column to retrieve char Retrieves a column as an array of chars (blob) The index of the column to retrieve The zero-based index of where to begin reading the data The buffer to write the characters into The zero-based index of where to begin writing into the array The number of bytes to retrieve The actual number of characters written into the array To determine the number of characters in the column, pass a null value for the buffer. The total length will be returned. Retrieves the name of the back-end datatype of the column The index of the column to retrieve string Retrieve the column as a date/time value The index of the column to retrieve DateTime Retrieve the column as a decimal value The index of the column to retrieve decimal Returns the column as a double The index of the column to retrieve double Returns the .NET type of a given column The index of the column to retrieve Type Returns a column as a float value The index of the column to retrieve float Returns the column as a Guid The index of the column to retrieve Guid Returns the column as a short The index of the column to retrieve Int16 Retrieves the column as an int The index of the column to retrieve Int32 Retrieves the column as a long The index of the column to retrieve Int64 Retrieves the name of the column The index of the column to retrieve string Retrieves the i of a column, given its name The name of the column to retrieve The int i of the column Schema information in SQLite is difficult to map into .NET conventions, so a lot of work must be done to gather the necessary information so it can be represented in an ADO.NET manner. Returns a DataTable containing the schema information for the active SELECT statement being processed. Retrieves the column as a string The index of the column to retrieve string Retrieves the column as an object corresponding to the underlying datatype of the column The index of the column to retrieve object Retreives the values of multiple columns, up to the size of the supplied array The array to fill with values from the columns in the current resultset The number of columns retrieved Returns a collection containing all the column names and values for the current row of data in the current resultset, if any. If there is no current row or no current resultset, an exception may be thrown. The collection containing the column name and value information for the current row of data in the current resultset or null if this information cannot be obtained. Returns True if the specified column is null The index of the column to retrieve True or False Moves to the next resultset in multiple row-returning SQL command. True if the command was successful and a new resultset is available, False otherwise. Retrieves the SQLiteType for a given column, and caches it to avoid repetetive interop calls. The index of the column to retrieve A SQLiteType structure Reads the next row from the resultset True if a new row was successfully loaded and is ready for processing Not implemented. Returns 0 Returns the number of columns in the current resultset Returns the number of visible fields in the current resultset Returns True if the resultset has rows that can be fetched Returns True if the data reader is closed Retrieve the count of records affected by an update/insert command. Only valid once the data reader is closed! Indexer to retrieve data from a column given its name The name of the column to retrieve data for The value contained in the column Indexer to retrieve data from a column given its i The index of the column to retrieve The value contained in the column SQLite exception class. Private constructor for use with serialization. Holds the serialized object data about the exception being thrown. Contains contextual information about the source or destination. Public constructor for generating a SQLite exception given the error code and message. The SQLite return code to report. Message text to go along with the return code message text. Public constructor that uses the base class constructor for the error message. Error message text. Public constructor that uses the default base class constructor. Public constructor that uses the base class constructor for the error message and inner exception. Error message text. The original (inner) exception. Adds extra information to the serialized object data specific to this class type. This is only used for serialization. Holds the serialized object data about the exception being thrown. Contains contextual information about the source or destination. Returns the error message for the specified SQLite return code. The SQLite return code. The error message or null if it cannot be found. Returns the composite error message based on the SQLite return code and the optional detailed error message. The SQLite return code. Optional detailed error message. Error message text for the return code. Gets the associated SQLite return code for this exception as a . This property returns the same underlying value as the property. Gets the associated SQLite return code for this exception as an . For desktop versions of the .NET Framework, this property overrides the property of the same name within the class. This property returns the same underlying value as the property. SQLite error codes. Actually, this enumeration represents a return code, which may also indicate success in one of several ways (e.g. SQLITE_OK, SQLITE_ROW, and SQLITE_DONE). Therefore, the name of this enumeration is something of a misnomer. Successful result SQL error or missing database Internal logic error in SQLite Access permission denied Callback routine requested an abort The database file is locked A table in the database is locked A malloc() failed Attempt to write a readonly database Operation terminated by sqlite3_interrupt() Some kind of disk I/O error occurred The database disk image is malformed Unknown opcode in sqlite3_file_control() Insertion failed because database is full Unable to open the database file Database lock protocol error Database is empty The database schema changed String or BLOB exceeds size limit Abort due to constraint violation Data type mismatch Library used incorrectly Uses OS features not supported on host Authorization denied Auxiliary database format error 2nd parameter to sqlite3_bind out of range File opened that is not a database file sqlite3_step() has another row ready sqlite3_step() has finished executing SQLite implementation of . SQLite implementation of . Constructs a new instance. Static instance member which returns an instanced class. Creates and returns a new object. The new object. Creates and returns a new object. The new object. Creates and returns a new object. The new object. Creates and returns a new object. The new object. Creates and returns a new object. The new object. Creates and returns a new object. The new object. Will provide a object in .NET 3.5. The class or interface type to query for. This event is raised whenever SQLite raises a logging event. Note that this should be set as one of the first things in the application. This event is provided for backward compatibility only. New code should use the class instead. This abstract class is designed to handle user-defined functions easily. An instance of the derived class is made for each connection to the database. Although there is one instance of a class derived from SQLiteFunction per database connection, the derived class has no access to the underlying connection. This is necessary to deter implementers from thinking it would be a good idea to make database calls during processing. It is important to distinguish between a per-connection instance, and a per-SQL statement context. One instance of this class services all SQL statements being stepped through on that connection, and there can be many. One should never store per-statement information in member variables of user-defined function classes. For aggregate functions, always create and store your per-statement data in the contextData object on the 1st step. This data will be automatically freed for you (and Dispose() called if the item supports IDisposable) when the statement completes. The error code used for logging exceptions caught in user-provided code. The base connection this function is attached to Internal array used to keep track of aggregate function context data The connection flags associated with this object (this should be the same value as the flags associated with the parent connection object). Holds a reference to the callback function for user functions Holds a reference to the callbakc function for stepping in an aggregate function Holds a reference to the callback function for finalizing an aggregate function Holds a reference to the callback function for collation sequences Current context of the current callback. Only valid during a callback This static list contains all the user-defined functions declared using the proper attributes. Internal constructor, initializes the function's internal variables. Disposes of any active contextData variables that were not automatically cleaned up. Sometimes this can happen if someone closes the connection while a DataReader is open. Placeholder for a user-defined disposal routine True if the object is being disposed explicitly Scalar functions override this method to do their magic. Parameters passed to functions have only an affinity for a certain data type, there is no underlying schema available to force them into a certain type. Therefore the only types you will ever see as parameters are DBNull.Value, Int64, Double, String or byte[] array. The arguments for the command to process You may return most simple types as a return value, null or DBNull.Value to return null, DateTime, or you may return an Exception-derived class if you wish to return an error to SQLite. Do not actually throw the error, just return it! Aggregate functions override this method to do their magic. Typically you'll be updating whatever you've placed in the contextData field and returning as quickly as possible. The arguments for the command to process The 1-based step number. This is incrememted each time the step method is called. A placeholder for implementers to store contextual data pertaining to the current context. Aggregate functions override this method to finish their aggregate processing. If you implemented your aggregate function properly, you've been recording and keeping track of your data in the contextData object provided, and now at this stage you should have all the information you need in there to figure out what to return. NOTE: It is possible to arrive here without receiving a previous call to Step(), in which case the contextData will be null. This can happen when no rows were returned. You can either return null, or 0 or some other custom return value if that is the case. Your own assigned contextData, provided for you so you can return your final results. You may return most simple types as a return value, null or DBNull.Value to return null, DateTime, or you may return an Exception-derived class if you wish to return an error to SQLite. Do not actually throw the error, just return it! User-defined collation sequences override this method to provide a custom string sorting algorithm. The first string to compare The second strnig to compare 1 if param1 is greater than param2, 0 if they are equal, or -1 if param1 is less than param2 Converts an IntPtr array of context arguments to an object array containing the resolved parameters the pointers point to. Parameters passed to functions have only an affinity for a certain data type, there is no underlying schema available to force them into a certain type. Therefore the only types you will ever see as parameters are DBNull.Value, Int64, Double, String or byte[] array. The number of arguments A pointer to the array of arguments An object array of the arguments once they've been converted to .NET values Takes the return value from Invoke() and Final() and figures out how to return it to SQLite's context. The context the return value applies to The parameter to return to SQLite Internal scalar callback function, which wraps the raw context pointer and calls the virtual Invoke() method. WARNING: Must not throw exceptions. A raw context pointer Number of arguments passed in A pointer to the array of arguments Internal collation sequence function, which wraps up the raw string pointers and executes the Compare() virtual function. WARNING: Must not throw exceptions. Not used Length of the string pv1 Pointer to the first string to compare Length of the string pv2 Pointer to the second string to compare Returns -1 if the first string is less than the second. 0 if they are equal, or 1 if the first string is greater than the second. Returns 0 if an exception is caught. Internal collation sequence function, which wraps up the raw string pointers and executes the Compare() virtual function. WARNING: Must not throw exceptions. Not used Length of the string pv1 Pointer to the first string to compare Length of the string pv2 Pointer to the second string to compare Returns -1 if the first string is less than the second. 0 if they are equal, or 1 if the first string is greater than the second. Returns 0 if an exception is caught. The internal aggregate Step function callback, which wraps the raw context pointer and calls the virtual Step() method. WARNING: Must not throw exceptions. This function takes care of doing the lookups and getting the important information put together to call the Step() function. That includes pulling out the user's contextData and updating it after the call is made. We use a sorted list for this so binary searches can be done to find the data. A raw context pointer Number of arguments passed in A pointer to the array of arguments An internal aggregate Final function callback, which wraps the context pointer and calls the virtual Final() method. WARNING: Must not throw exceptions. A raw context pointer Using reflection, enumerate all assemblies in the current appdomain looking for classes that have a SQLiteFunctionAttribute attribute, and registering them accordingly. Manual method of registering a function. The type must still have the SQLiteFunctionAttributes in order to work properly, but this is a workaround for the Compact Framework where enumerating assemblies is not currently supported. The type of the function to register Called by SQLiteBase derived classes, this function binds all user-defined functions to a connection. It is done this way so that all user-defined functions will access the database using the same encoding scheme as the connection (UTF-8 or UTF-16). The wrapper functions that interop with SQLite will create a unique cookie value, which internally is a pointer to all the wrapped callback functions. The interop function uses it to map CDecl callbacks to StdCall callbacks. The base object on which the functions are to bind The flags associated with the parent connection object Returns an array of functions which the connection object should retain until the connection is closed. Returns a reference to the underlying connection's SQLiteConvert class, which can be used to convert strings and DateTime's into the current connection's encoding schema. Extends SQLiteFunction and allows an inherited class to obtain the collating sequence associated with a function call. User-defined functions can call the GetCollationSequence() method in this class and use it to compare strings and char arrays. Obtains the collating sequence in effect for the given function. The type of user-defined function to declare Scalar functions are designed to be called and return a result immediately. Examples include ABS(), Upper(), Lower(), etc. Aggregate functions are designed to accumulate data until the end of a call and then return a result gleaned from the accumulated data. Examples include SUM(), COUNT(), AVG(), etc. Collation sequences are used to sort textual data in a custom manner, and appear in an ORDER BY clause. Typically text in an ORDER BY is sorted using a straight case-insensitive comparison function. Custom collating sequences can be used to alter the behavior of text sorting in a user-defined manner. An internal callback delegate declaration. Raw context pointer for the user function Count of arguments to the function A pointer to the array of argument pointers An internal final callback delegate declaration. Raw context pointer for the user function Internal callback delegate for implementing collation sequences Not used Length of the string pv1 Pointer to the first string to compare Length of the string pv2 Pointer to the second string to compare Returns -1 if the first string is less than the second. 0 if they are equal, or 1 if the first string is greater than the second. The type of collating sequence The built-in BINARY collating sequence The built-in NOCASE collating sequence The built-in REVERSE collating sequence A custom user-defined collating sequence The encoding type the collation sequence uses The collation sequence is UTF8 The collation sequence is UTF16 little-endian The collation sequence is UTF16 big-endian A struct describing the collating sequence a function is executing in The name of the collating sequence The type of collating sequence The text encoding of the collation sequence Context of the function that requested the collating sequence Calls the base collating sequence to compare two strings The first string to compare The second string to compare -1 if s1 is less than s2, 0 if s1 is equal to s2, and 1 if s1 is greater than s2 Calls the base collating sequence to compare two character arrays The first array to compare The second array to compare -1 if c1 is less than c2, 0 if c1 is equal to c2, and 1 if c1 is greater than c2 A simple custom attribute to enable us to easily find user-defined functions in the loaded assemblies and initialize them in SQLite as connections are made. Default constructor, initializes the internal variables for the function. The function's name as it will be used in SQLite command text. The number of arguments this function expects. -1 if the number of arguments is variable. The type of function this implementation will be. This class provides key info for a given SQLite statement. Providing key information for a given statement is non-trivial :( This function does all the nasty work at determining what keys need to be returned for a given statement. Make sure all the subqueries are open and ready and sync'd with the current rowid of the table they're supporting Release any readers on any subqueries Append all the columns we've added to the original query to the schema How many additional columns of keyinfo we're holding Used to support CommandBehavior.KeyInfo A single sub-query for a given table/database. Event data for logging event handlers. The error code. The type of this object value should be or . SQL statement text as the statement first begins executing Extra data associated with this event, if any. Constructs the object. Should be null. The error code. The type of this object value should be or . The error message, if any. The extra data, if any. Raised when a log event occurs. The current connection Event arguments of the trace Manages the SQLite custom logging functionality and the associated callback for the whole process. Object used to synchronize access to the static instance data for this class. Member variable to store the AppDomain.DomainUnload event handler. The default log event handler. The log callback passed to native SQLite engine. This must live as long as the SQLite library has a pointer to it. The base SQLite object to interop with. This will be non-zero if logging is currently enabled. Initializes the SQLite logging facilities. Handles the AppDomain being unloaded. Should be null. The data associated with this event. Log a message to all the registered log event handlers without going through the SQLite library. The message to be logged. Log a message to all the registered log event handlers without going through the SQLite library. The SQLite error code. The message to be logged. Log a message to all the registered log event handlers without going through the SQLite library. The integer error code. The message to be logged. Log a message to all the registered log event handlers without going through the SQLite library. The error code. The type of this object value should be System.Int32 or SQLiteErrorCode. The message to be logged. Creates and initializes the default log event handler. Adds the default log event handler to the list of handlers. Removes the default log event handler from the list of handlers. Internal proxy function that calls any registered application log event handlers. WARNING: This method is used more-or-less directly by native code, do not modify its type signature. The extra data associated with this message, if any. The error code associated with this message. The message string to be logged. Default logger. Currently, uses the Trace class (i.e. sends events to the current trace listeners, if any). Should be null. The data associated with this event. Member variable to store the application log handler to call. This event is raised whenever SQLite raises a logging event. Note that this should be set as one of the first things in the application. If this property is true, logging is enabled; otherwise, logging is disabled. When logging is disabled, no logging events will fire. MetaDataCollections specific to SQLite Returns a list of databases attached to the connection Returns column information for the specified table Returns index information for the optionally-specified table Returns base columns for the given index Returns the tables in the given catalog Returns user-defined views in the given catalog Returns underlying column information on the given view Returns foreign key information for the given catalog Returns the triggers on the database SQLite implementation of DbParameter. The data type of the parameter The version information for mapping the parameter The value of the data in the parameter The source column for the parameter The column name The data size, unused by SQLite Default constructor Constructs a named parameter given the specified parameter name The parameter name Constructs a named parameter given the specified parameter name and initial value The parameter name The initial value of the parameter Constructs a named parameter of the specified type The parameter name The datatype of the parameter Constructs a named parameter of the specified type and source column reference The parameter name The data type The source column Constructs a named parameter of the specified type, source column and row version The parameter name The data type The source column The row version information Constructs an unnamed parameter of the specified data type The datatype of the parameter Constructs an unnamed parameter of the specified data type and sets the initial value The datatype of the parameter The initial value of the parameter Constructs an unnamed parameter of the specified data type and source column The datatype of the parameter The source column Constructs an unnamed parameter of the specified data type, source column and row version The data type The source column The row version information Constructs a named parameter of the specified type and size The parameter name The data type The size of the parameter Constructs a named parameter of the specified type, size and source column The name of the parameter The data type The size of the parameter The source column Constructs a named parameter of the specified type, size, source column and row version The name of the parameter The data type The size of the parameter The source column The row version information Constructs a named parameter of the specified type, size, source column and row version The name of the parameter The data type The size of the parameter Only input parameters are supported in SQLite Ignored Ignored Ignored The source column The row version information The initial value to assign the parameter Constructs a named parameter, yet another flavor The name of the parameter The data type The size of the parameter Only input parameters are supported in SQLite Ignored Ignored The source column The row version information Whether or not this parameter is for comparing NULL's The intial value to assign the parameter Constructs an unnamed parameter of the specified type and size The data type The size of the parameter Constructs an unnamed parameter of the specified type, size, and source column The data type The size of the parameter The source column Constructs an unnamed parameter of the specified type, size, source column and row version The data type The size of the parameter The source column The row version information Resets the DbType of the parameter so it can be inferred from the value Clones a parameter A new, unassociated SQLiteParameter Whether or not the parameter can contain a null value Returns the datatype of the parameter Supports only input parameters Returns the parameter name Returns the size of the parameter Gets/sets the source column Used by DbCommandBuilder to determine the mapping for nullable fields Gets and sets the row version Gets and sets the parameter value. If no datatype was specified, the datatype will assume the type from the value given. SQLite implementation of DbParameterCollection. The underlying command to which this collection belongs The internal array of parameters in this collection Determines whether or not all parameters have been bound to their statement(s) Initializes the collection The command to which the collection belongs Retrieves an enumerator for the collection An enumerator for the underlying array Adds a parameter to the collection The parameter name The data type The size of the value The source column A SQLiteParameter object Adds a parameter to the collection The parameter name The data type The size of the value A SQLiteParameter object Adds a parameter to the collection The parameter name The data type A SQLiteParameter object Adds a parameter to the collection The parameter to add A zero-based index of where the parameter is located in the array Adds a parameter to the collection The parameter to add A zero-based index of where the parameter is located in the array Adds a named/unnamed parameter and its value to the parameter collection. Name of the parameter, or null to indicate an unnamed parameter The initial value of the parameter Returns the SQLiteParameter object created during the call. Adds an array of parameters to the collection The array of parameters to add Adds an array of parameters to the collection The array of parameters to add Clears the array and resets the collection Determines if the named parameter exists in the collection The name of the parameter to check True if the parameter is in the collection Determines if the parameter exists in the collection The SQLiteParameter to check True if the parameter is in the collection Not implemented Retrieve a parameter by name from the collection The name of the parameter to fetch A DbParameter object Retrieves a parameter by its index in the collection The index of the parameter to retrieve A DbParameter object Returns the index of a parameter given its name The name of the parameter to find -1 if not found, otherwise a zero-based index of the parameter Returns the index of a parameter The parameter to find -1 if not found, otherwise a zero-based index of the parameter Inserts a parameter into the array at the specified location The zero-based index to insert the parameter at The parameter to insert Removes a parameter from the collection The parameter to remove Removes a parameter from the collection given its name The name of the parameter to remove Removes a parameter from the collection given its index The zero-based parameter index to remove Re-assign the named parameter to a new parameter object The name of the parameter to replace The new parameter Re-assign a parameter at the specified index The zero-based index of the parameter to replace The new parameter Un-binds all parameters from their statements This function attempts to map all parameters in the collection to all statements in a Command. Since named parameters may span multiple statements, this function makes sure all statements are bound to the same named parameter. Unnamed parameters are bound in sequence. Returns true Returns false Returns false Returns null Returns a count of parameters in the collection Overloaded to specialize the return value of the default indexer Name of the parameter to get/set The specified named SQLite parameter Overloaded to specialize the return value of the default indexer The index of the parameter to get/set The specified SQLite parameter Represents a single SQL statement in SQLite. The underlying SQLite object this statement is bound to The command text of this SQL statement The actual statement pointer An index from which unnamed parameters begin Names of the parameters as SQLite understands them to be Parameters for this statement Command this statement belongs to (if any) The flags associated with the parent connection object. Initializes the statement and attempts to get all information about parameters in the statement The base SQLite object The flags associated with the parent connection object The statement The command text for this statement The previous command in a multi-statement command Disposes and finalizes the statement If the underlying database connection is open, fetches the number of changed rows resulting from the most recent query; otherwise, does nothing. The number of changes when true is returned. Undefined if false is returned. Non-zero if the number of changed rows was fetched. Called by SQLiteParameterCollection, this function determines if the specified parameter name belongs to this statement, and if so, keeps a reference to the parameter so it can be bound later. The parameter name to map The parameter to assign it Bind all parameters, making sure the caller didn't miss any Attempts to convert an arbitrary object to the Boolean data type. Null object values are converted to false. Throws a SQLiteException upon failure. The object value to convert. The format provider to use. The converted boolean value. Perform the bind operation for an individual parameter The index of the parameter to bind The parameter we're binding SQLite implementation of DbTransaction. The connection to which this transaction is bound Constructs the transaction object, binding it to the supplied connection The connection to open a transaction on TRUE to defer the writelock, or FALSE to lock immediately Disposes the transaction. If it is currently active, any changes are rolled back. Commits the current transaction. Rolls back the active transaction. Returns the underlying connection to which this transaction applies. Forwards to the local Connection property Gets the isolation level of the transaction. SQLite only supports Serializable transactions. A strongly-typed resource class, for looking up localized strings, etc. Returns the cached ResourceManager instance used by this class. Overrides the current thread's CurrentUICulture property for all resource lookups using this strongly typed resource class. Looks up a localized string similar to <?xml version="1.0" standalone="yes"?> <DocumentElement> <DataTypes> <TypeName>smallint</TypeName> <ProviderDbType>10</ProviderDbType> <ColumnSize>5</ColumnSize> <DataType>System.Int16</DataType> <CreateFormat>smallint</CreateFormat> <IsAutoIncrementable>false</IsAutoIncrementable> <IsCaseSensitive>false</IsCaseSensitive> <IsFixedLength>true</IsFixedLength> <IsFixedPrecisionScale>true</IsFixedPrecisionScale> <IsLong>false</IsLong> <IsNullable>true</ [rest of string was truncated]";. Looks up a localized string similar to ALL,ALTER,AND,AS,AUTOINCREMENT,BETWEEN,BY,CASE,CHECK,COLLATE,COMMIT,CONSTRAINT,CREATE,CROSS,DEFAULT,DEFERRABLE,DELETE,DISTINCT,DROP,ELSE,ESCAPE,EXCEPT,FOREIGN,FROM,FULL,GROUP,HAVING,IN,INDEX,INNER,INSERT,INTERSECT,INTO,IS,ISNULL,JOIN,LEFT,LIMIT,NATURAL,NOT,NOTNULL,NULL,ON,OR,ORDER,OUTER,PRIMARY,REFERENCES,RIGHT,ROLLBACK,SELECT,SET,TABLE,THEN,TO,TRANSACTION,UNION,UNIQUE,UPDATE,USING,VALUES,WHEN,WHERE. Looks up a localized string similar to <?xml version="1.0" encoding="utf-8" ?> <DocumentElement> <MetaDataCollections> <CollectionName>MetaDataCollections</CollectionName> <NumberOfRestrictions>0</NumberOfRestrictions> <NumberOfIdentifierParts>0</NumberOfIdentifierParts> </MetaDataCollections> <MetaDataCollections> <CollectionName>DataSourceInformation</CollectionName> <NumberOfRestrictions>0</NumberOfRestrictions> <NumberOfIdentifierParts>0</NumberOfIdentifierParts> </MetaDataCollections> <MetaDataC [rest of string was truncated]";. The name of the environment variable containing the processor architecture of the current process. This is the P/Invoke method that wraps the native Win32 LoadLibrary function. See the MSDN documentation for full details on what it does. The name of the executable library. The native module handle upon success -OR- IntPtr.Zero on failure. This lock is used to protect the static _SQLiteModule and processorArchitecturePlatforms fields, below. Stores the mappings between processor architecture names and platform names. The native module handle for the native SQLite library or the value IntPtr.Zero. For now, this method simply calls the Initialize method. Attempts to initialize this class by pre-loading the native SQLite library for the processor architecture of the current process. Queries and returns the base directory of the current application domain. The base directory for the current application domain -OR- null if it cannot be determined. Determines if the dynamic link library file name requires a suffix and adds it if necessary. The original dynamic link library file name to inspect. The dynamic link library file name, possibly modified to include an extension. Queries and returns the processor architecture of the current process. The processor architecture of the current process -OR- null if it cannot be determined. Always returns an empty string when running on the .NET Compact Framework. Given the processor architecture, returns the name of the platform. The processor architecture to be translated to a platform name. The platform name for the specified processor architecture -OR- null if it cannot be determined. Attempts to load the native SQLite library based on the specified directory and processor architecture. The base directory to use, null for default (the base directory of the current application domain). This directory should contain the processor architecture specific sub-directories. The requested processor architecture, null for default (the processor architecture of the current process). This caller should almost always specify null for this parameter. The native module handle as returned by LoadLibrary -OR- IntPtr.Zero if the loading fails for any reason.