SQLiteConnection Class |
Namespace: SQLite
public class SQLiteConnection : IDisposable
The SQLiteConnection type exposes the following members.
Name | Description | |
---|---|---|
SQLiteConnection(String, Boolean) |
Constructs a new SQLiteConnection and opens a SQLite database specified by databasePath.
| |
SQLiteConnection(String, SQLiteOpenFlags, Boolean) |
Constructs a new SQLiteConnection and opens a SQLite database specified by databasePath.
|
Name | Description | |
---|---|---|
BusyTimeout |
Sets a busy handler to sleep the specified amount of time when a table is locked.
The handler will sleep multiple times until a total time of BusyTimeout has accumulated.
| |
DatabasePath | ||
Handle | ||
IsInTransaction |
Whether BeginTransaction has been called and the database is waiting for a Commit.
| |
StoreDateTimeAsTicks | ||
TableMappings |
Returns the mappings from types to tables that the connection
currently understands.
| |
TimeExecution | ||
Trace |
Name | Description | |
---|---|---|
BeginTransaction |
Begins a new transaction. Call Commit to end the transaction.
| |
Close | ||
Commit |
Commits the transaction that was begun by BeginTransaction.
| |
CreateCommand |
Creates a new SQLiteCommand given the command text with arguments. Place a '?'
in the command text for each of the arguments.
| |
CreateIndex(String, String, Boolean) |
Creates an index for the specified table and column.
| |
CreateIndex(String, String, Boolean) |
Creates an index for the specified table and columns.
| |
CreateIndex(String, String, String, Boolean) |
Creates an index for the specified table and column.
| |
CreateIndex(String, String, String, Boolean) |
Creates an index for the specified table and columns.
| |
CreateIndexT(ExpressionFuncT, Object, Boolean) | ||
CreateTable(Type, CreateFlags) |
Executes a "create table if not exists" on the database. It also
creates any specified indexes on the columns of the table. It uses
a schema automatically generated from the specified type. You can
later access this schema by calling GetMapping.
| |
CreateTableT(CreateFlags) |
Executes a "create table if not exists" on the database. It also
creates any specified indexes on the columns of the table. It uses
a schema automatically generated from the specified type. You can
later access this schema by calling GetMapping.
| |
DeferredQuery(TableMapping, String, Object) |
Creates a SQLiteCommand given the command text (SQL) with arguments. Place a '?'
in the command text for each of the arguments and then executes that command.
It returns each row of the result using the specified mapping. This function is
only used by libraries in order to query the database via introspection. It is
normally not used.
| |
DeferredQueryT(String, Object) |
Creates a SQLiteCommand given the command text (SQL) with arguments. Place a '?'
in the command text for each of the arguments and then executes that command.
It returns each row of the result using the mapping automatically generated for
the given type.
| |
Delete(Object) |
Deletes the given object from the database using its primary key.
| |
DeleteT(Object) |
Deletes the object with the specified primary key.
| |
DeleteAllT |
Deletes all the objects from the specified table.
WARNING WARNING: Let me repeat. It deletes ALL the objects from the
specified table. Do you really want to do that?
| |
Dispose | ||
Dispose(Boolean) | ||
DropTableT |
Executes a "drop table" on the database. This is non-recoverable.
| |
EnableLoadExtension | ||
Equals | Determines whether the specified object is equal to the current object. (Inherited from Object.) | |
Execute |
Creates a SQLiteCommand given the command text (SQL) with arguments. Place a '?'
in the command text for each of the arguments and then executes that command.
Use this method instead of Query when you don't expect rows back. Such cases include
INSERTs, UPDATEs, and DELETEs.
You can set the Trace or TimeExecution properties of the connection
to profile execution.
| |
ExecuteScalarT | ||
Finalize | (Overrides ObjectFinalize.) | |
Find(Object, TableMapping) |
Attempts to retrieve an object with the given primary key from the table
associated with the specified type. Use of this method requires that
the given type have a designated PrimaryKey (using the PrimaryKeyAttribute).
| |
FindT(ExpressionFuncT, Boolean) |
Attempts to retrieve the first object that matches the predicate from the table
associated with the specified type.
| |
FindT(Object) |
Attempts to retrieve an object with the given primary key from the table
associated with the specified type. Use of this method requires that
the given type have a designated PrimaryKey (using the PrimaryKeyAttribute).
| |
GetT(ExpressionFuncT, Boolean) |
Attempts to retrieve the first object that matches the predicate from the table
associated with the specified type.
| |
GetT(Object) |
Attempts to retrieve an object with the given primary key from the table
associated with the specified type. Use of this method requires that
the given type have a designated PrimaryKey (using the PrimaryKeyAttribute).
| |
GetHashCode | Serves as the default hash function. (Inherited from Object.) | |
GetMapping(Type, CreateFlags) |
Retrieves the mapping that is automatically generated for the given type.
| |
GetMappingT |
Retrieves the mapping that is automatically generated for the given type.
| |
GetTableInfo | ||
GetType | Gets the Type of the current instance. (Inherited from Object.) | |
Insert(Object) |
Inserts the given object and retrieves its
auto incremented primary key if it has one.
| |
Insert(Object, String) |
Inserts the given object and retrieves its
auto incremented primary key if it has one.
| |
Insert(Object, Type) |
Inserts the given object and retrieves its
auto incremented primary key if it has one.
| |
Insert(Object, String, Type) |
Inserts the given object and retrieves its
auto incremented primary key if it has one.
| |
InsertAll(IEnumerable) |
Inserts all specified objects.
| |
InsertAll(IEnumerable, String) |
Inserts all specified objects.
| |
InsertAll(IEnumerable, Type) |
Inserts all specified objects.
| |
InsertOrReplace(Object) |
Inserts the given object and retrieves its
auto incremented primary key if it has one.
If a UNIQUE constraint violation occurs with
some pre-existing object, this function deletes
the old object.
| |
InsertOrReplace(Object, Type) |
Inserts the given object and retrieves its
auto incremented primary key if it has one.
If a UNIQUE constraint violation occurs with
some pre-existing object, this function deletes
the old object.
| |
MemberwiseClone | Creates a shallow copy of the current Object. (Inherited from Object.) | |
NewCommand |
Creates a new SQLiteCommand. Can be overridden to provide a sub-class.
| |
Query(TableMapping, String, Object) |
Creates a SQLiteCommand given the command text (SQL) with arguments. Place a '?'
in the command text for each of the arguments and then executes that command.
It returns each row of the result using the specified mapping. This function is
only used by libraries in order to query the database via introspection. It is
normally not used.
| |
QueryT(String, Object) |
Creates a SQLiteCommand given the command text (SQL) with arguments. Place a '?'
in the command text for each of the arguments and then executes that command.
It returns each row of the result using the mapping automatically generated for
the given type.
| |
Release |
Releases a savepoint returned from SaveTransactionPoint. Releasing a savepoint
makes changes since that savepoint permanent if the savepoint began the transaction,
or otherwise the changes are permanent pending a call to Commit.
The RELEASE command is like a COMMIT for a SAVEPOINT.
| |
Rollback |
Rolls back the transaction that was begun by BeginTransaction or SaveTransactionPoint.
| |
RollbackTo |
Rolls back the savepoint created by BeginTransaction or SaveTransactionPoint.
| |
RunInTransaction | ||
SaveTransactionPoint |
Creates a savepoint in the database at the current point in the transaction timeline.
Begins a new transaction if one is not in progress.
Call RollbackTo(String) to undo transactions since the returned savepoint.
Call Release(String) to commit transactions after the savepoint returned here.
Call Commit to end the transaction, committing all changes.
| |
TableT |
Returns a queryable interface to the table represented by the given type.
| |
ToString | Returns a string that represents the current object. (Inherited from Object.) | |
Update(Object) |
Updates all of the columns of a table using the specified object
except for its primary key.
The object is required to have a primary key.
| |
Update(Object, Type) |
Updates all of the columns of a table using the specified object
except for its primary key.
The object is required to have a primary key.
| |
UpdateAll |
Updates all specified objects.
|
Name | Description | |
---|---|---|
TableChanged |