SQLINQ Class Library
(April 2015)
Using SQLINQ to transform UML to C#
|
Represents an open connection to a SQLite database. More...
Classes | |
class | ColumnInfo |
Public Member Functions | |||
SQLiteConnection (string databasePath, bool storeDateTimeAsTicks=true) | |||
Constructs a new SQLiteConnection and opens a SQLite database specified by databasePath. More... | |||
SQLiteConnection (string databasePath, SQLiteOpenFlags openFlags, bool storeDateTimeAsTicks=true) | |||
Constructs a new SQLiteConnection and opens a SQLite database specified by databasePath. More... | |||
void | EnableLoadExtension (int onoff) | ||
TableMapping | GetMapping (Type type, CreateFlags createFlags=CreateFlags.None) | ||
Retrieves the mapping that is automatically generated for the given type. More... | |||
TableMapping | GetMapping< T > () | ||
Retrieves the mapping that is automatically generated for the given type. More... | |||
int | DropTable< T > () | ||
Executes a "drop table" on the database. This is non-recoverable. More... | |||
int | CreateTable< T > (CreateFlags createFlags=CreateFlags.None) | ||
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. More... | |||
int | CreateTable (Type ty, CreateFlags createFlags=CreateFlags.None) | ||
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. More... | |||
int | CreateIndex (string indexName, string tableName, string[] columnNames, bool unique=false) | ||
Creates an index for the specified table and columns. More... | |||
int | CreateIndex (string indexName, string tableName, string columnName, bool unique=false) | ||
Creates an index for the specified table and column. More... | |||
int | CreateIndex (string tableName, string columnName, bool unique=false) | ||
Creates an index for the specified table and column. More... | |||
int | CreateIndex (string tableName, string[] columnNames, bool unique=false) | ||
Creates an index for the specified table and columns. More... | |||
void | CreateIndex< T > (Expression< Func< T, object >> property, bool unique=false) | ||
Creates an index for the specified object property. e.g. CreateIndex<Client>(c => c.Name); More... | |||
List< ColumnInfo > | GetTableInfo (string tableName) | ||
SQLiteCommand | CreateCommand (string cmdText, params object[] ps) | ||
Creates a new SQLiteCommand given the command text with arguments. Place a '?' in the command text for each of the arguments. More... | |||
int | Execute (string query, params object[] args) | ||
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. More... | |||
T | ExecuteScalar< T > (string query, params object[] args) | ||
List< T > | Query< T > (string query, params object[] args) | ||
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. More... | |||
IEnumerable< T > | DeferredQuery< T > (string query, params object[] args) | ||
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. More... | |||
List< object > | Query (TableMapping map, string query, params object[] args) | ||
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. More... | |||
IEnumerable< object > | DeferredQuery (TableMapping map, string query, params object[] args) | ||
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. More... | |||
TableQuery< T > | Table< T > () | ||
Returns a queryable interface to the table represented by the given type. More... | |||
T | Get< T > (object pk) | ||
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). More... | |||
T | Get< T > (Expression< Func< T, bool >> predicate) | ||
Attempts to retrieve the first object that matches the predicate from the table associated with the specified type. More... | |||
T | Find< T > (object pk) | ||
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). More... | |||
object | Find (object pk, TableMapping map) | ||
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). More... | |||
T | Find< T > (Expression< Func< T, bool >> predicate) | ||
Attempts to retrieve the first object that matches the predicate from the table associated with the specified type. More... | |||
T | FindWithQuery< T > (string query, params object[] args) | ||
Attempts to retrieve the first object that matches the query from the table associated with the specified type. More... | |||
void | BeginTransaction () | ||
Begins a new transaction. Call Commit to end the transaction. More... | |||
string | 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. More... | |||
void | Rollback () | ||
Rolls back the transaction that was begun by BeginTransaction or SaveTransactionPoint. More... | |||
void | RollbackTo (string savepoint) | ||
Rolls back the savepoint created by BeginTransaction or SaveTransactionPoint. More... | |||
void | Release (string savepoint) | ||
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. More... | |||
void | Commit () | ||
Commits the transaction that was begun by BeginTransaction. More... | |||
void | RunInTransaction (Action action) | ||
Executes
| |||
int | InsertAll (System.Collections.IEnumerable objects, bool runInTransaction=true) | ||
Inserts all specified objects. More... | |||
int | InsertAll (System.Collections.IEnumerable objects, string extra, bool runInTransaction=true) | ||
Inserts all specified objects. More... | |||
int | InsertAll (System.Collections.IEnumerable objects, Type objType, bool runInTransaction=true) | ||
Inserts all specified objects. More... | |||
int | Insert (object obj) | ||
Inserts the given object and retrieves its auto incremented primary key if it has one. More... | |||
int | InsertOrReplace (object obj) | ||
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. More... | |||
int | Insert (object obj, Type objType) | ||
Inserts the given object and retrieves its auto incremented primary key if it has one. More... | |||
int | InsertOrReplace (object obj, Type objType) | ||
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. More... | |||
int | Insert (object obj, string extra) | ||
Inserts the given object and retrieves its auto incremented primary key if it has one. More... | |||
int | Insert (object obj, string extra, Type objType) | ||
Inserts the given object and retrieves its auto incremented primary key if it has one. More... | |||
int | Update (object obj) | ||
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. More... | |||
int | Update (object obj, Type objType) | ||
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. More... | |||
int | UpdateAll (System.Collections.IEnumerable objects, bool runInTransaction=true) | ||
Updates all specified objects. More... | |||
int | Delete (object objectToDelete) | ||
Deletes the given object from the database using its primary key. More... | |||
int | Delete< T > (object primaryKey) | ||
Deletes the object with the specified primary key. More... | |||
int | DeleteAll< T > () | ||
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? More... | |||
void | Dispose () | ||
void | Close () | ||
Protected Member Functions | |
virtual SQLiteCommand | NewCommand () |
Creates a new SQLiteCommand. Can be overridden to provide a sub-class. More... | |
virtual void | Dispose (bool disposing) |
Properties | |
IntPtr | Handle [get] |
string | DatabasePath [get] |
bool | TimeExecution [get, set] |
bool | Trace [get, set] |
bool | StoreDateTimeAsTicks [get] |
TimeSpan | BusyTimeout [get, set] |
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. More... | |
IEnumerable< TableMapping > | TableMappings [get] |
Returns the mappings from types to tables that the connection currently understands. More... | |
bool | IsInTransaction [get] |
Whether BeginTransaction has been called and the database is waiting for a Commit. More... | |
Events | |
EventHandler< NotifyTableChangedEventArgs > | TableChanged |
Represents an open connection to a SQLite database.
Assets.SQLINQ.SQLite.Net.SQLiteConnection.SQLiteConnection | ( | string | databasePath, |
bool | storeDateTimeAsTicks = true |
||
) |
Constructs a new SQLiteConnection and opens a SQLite database specified by databasePath.
databasePath | Specifies the path to the database file. |
storeDateTimeAsTicks | Specifies whether to store DateTime properties as ticks (true) or strings (false). You absolutely do want to store them as Ticks in all new projects. The value of false is only here for backwards compatibility. There is a significant speed advantage, with no down sides, when setting storeDateTimeAsTicks = true. If you use DateTimeOffset properties, it will be always stored as ticks regardingless the storeDateTimeAsTicks parameter. |
Assets.SQLINQ.SQLite.Net.SQLiteConnection.SQLiteConnection | ( | string | databasePath, |
SQLiteOpenFlags | openFlags, | ||
bool | storeDateTimeAsTicks = true |
||
) |
Constructs a new SQLiteConnection and opens a SQLite database specified by databasePath.
databasePath | Specifies the path to the database file. |
storeDateTimeAsTicks | Specifies whether to store DateTime properties as ticks (true) or strings (false). You absolutely do want to store them as Ticks in all new projects. The value of false is only here for backwards compatibility. There is a significant speed advantage, with no down sides, when setting storeDateTimeAsTicks = true. If you use DateTimeOffset properties, it will be always stored as ticks regardingless the storeDateTimeAsTicks parameter. |
void Assets.SQLINQ.SQLite.Net.SQLiteConnection.BeginTransaction | ( | ) |
Begins a new transaction. Call Commit to end the transaction.
Throws if a transaction has already begun.
void Assets.SQLINQ.SQLite.Net.SQLiteConnection.Commit | ( | ) |
Commits the transaction that was begun by BeginTransaction.
SQLiteCommand Assets.SQLINQ.SQLite.Net.SQLiteConnection.CreateCommand | ( | string | cmdText, |
params object[] | ps | ||
) |
Creates a new SQLiteCommand given the command text with arguments. Place a '?' in the command text for each of the arguments.
cmdText | The fully escaped SQL. |
args | Arguments to substitute for the occurences of '?' in the command text. |
int Assets.SQLINQ.SQLite.Net.SQLiteConnection.CreateIndex | ( | string | indexName, |
string | tableName, | ||
string[] | columnNames, | ||
bool | unique = false |
||
) |
Creates an index for the specified table and columns.
indexName | Name of the index to create |
tableName | Name of the database table |
columnNames | An array of column names to index |
unique | Whether the index should be unique |
int Assets.SQLINQ.SQLite.Net.SQLiteConnection.CreateIndex | ( | string | indexName, |
string | tableName, | ||
string | columnName, | ||
bool | unique = false |
||
) |
Creates an index for the specified table and column.
indexName | Name of the index to create |
tableName | Name of the database table |
columnName | Name of the column to index |
unique | Whether the index should be unique |
int Assets.SQLINQ.SQLite.Net.SQLiteConnection.CreateIndex | ( | string | tableName, |
string | columnName, | ||
bool | unique = false |
||
) |
Creates an index for the specified table and column.
tableName | Name of the database table |
columnName | Name of the column to index |
unique | Whether the index should be unique |
int Assets.SQLINQ.SQLite.Net.SQLiteConnection.CreateIndex | ( | string | tableName, |
string[] | columnNames, | ||
bool | unique = false |
||
) |
Creates an index for the specified table and columns.
tableName | Name of the database table |
columnNames | An array of column names to index |
unique | Whether the index should be unique |
void Assets.SQLINQ.SQLite.Net.SQLiteConnection.CreateIndex< T > | ( | Expression< Func< T, object >> | property, |
bool | unique = false |
||
) |
Creates an index for the specified object property. e.g. CreateIndex<Client>(c => c.Name);
T | Type to reflect to a database table. |
property | Property to index |
unique | Whether the index should be unique |
int Assets.SQLINQ.SQLite.Net.SQLiteConnection.CreateTable | ( | Type | ty, |
CreateFlags | createFlags = CreateFlags.None |
||
) |
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.
ty | Type to reflect to a database table. |
createFlags | Optional flags allowing implicit PK and indexes based on naming conventions. |
int Assets.SQLINQ.SQLite.Net.SQLiteConnection.CreateTable< T > | ( | CreateFlags | createFlags = CreateFlags.None | ) |
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.
IEnumerable<object> Assets.SQLINQ.SQLite.Net.SQLiteConnection.DeferredQuery | ( | TableMapping | map, |
string | query, | ||
params object[] | args | ||
) |
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.
map | A TableMapping to use to convert the resulting rows into objects. |
query | The fully escaped SQL. |
args | Arguments to substitute for the occurences of '?' in the query. |
IEnumerable<T> Assets.SQLINQ.SQLite.Net.SQLiteConnection.DeferredQuery< T > | ( | string | query, |
params object[] | args | ||
) |
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.
query | The fully escaped SQL. |
args | Arguments to substitute for the occurences of '?' in the query. |
T | : | new() |
int Assets.SQLINQ.SQLite.Net.SQLiteConnection.Delete | ( | object | objectToDelete | ) |
Deletes the given object from the database using its primary key.
objectToDelete | The object to delete. It must have a primary key designated using the PrimaryKeyAttribute. |
int Assets.SQLINQ.SQLite.Net.SQLiteConnection.Delete< T > | ( | object | primaryKey | ) |
Deletes the object with the specified primary key.
primaryKey | The primary key of the object to delete. |
T | The type of object. |
int Assets.SQLINQ.SQLite.Net.SQLiteConnection.DeleteAll< T > | ( | ) |
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?
T | The type of objects to delete. |
int Assets.SQLINQ.SQLite.Net.SQLiteConnection.DropTable< T > | ( | ) |
Executes a "drop table" on the database. This is non-recoverable.
int Assets.SQLINQ.SQLite.Net.SQLiteConnection.Execute | ( | string | query, |
params object[] | args | ||
) |
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.
query | The fully escaped SQL. |
args | Arguments to substitute for the occurences of '?' in the query. |
object Assets.SQLINQ.SQLite.Net.SQLiteConnection.Find | ( | object | pk, |
TableMapping | map | ||
) |
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).
pk | The primary key. |
map | The TableMapping used to identify the object type. |
T Assets.SQLINQ.SQLite.Net.SQLiteConnection.Find< T > | ( | object | pk | ) |
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).
pk | The primary key. |
T | : | new |
T Assets.SQLINQ.SQLite.Net.SQLiteConnection.Find< T > | ( | Expression< Func< T, bool >> | predicate | ) |
Attempts to retrieve the first object that matches the predicate from the table associated with the specified type.
predicate | A predicate for which object to find. |
T | : | new() |
T Assets.SQLINQ.SQLite.Net.SQLiteConnection.FindWithQuery< T > | ( | string | query, |
params object[] | args | ||
) |
Attempts to retrieve the first object that matches the query from the table associated with the specified type.
query | The fully escaped SQL. |
args | Arguments to substitute for the occurences of '?' in the query. |
T | : | new() |
T Assets.SQLINQ.SQLite.Net.SQLiteConnection.Get< T > | ( | object | pk | ) |
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).
pk | The primary key. |
T | : | new() |
T Assets.SQLINQ.SQLite.Net.SQLiteConnection.Get< T > | ( | Expression< Func< T, bool >> | predicate | ) |
Attempts to retrieve the first object that matches the predicate from the table associated with the specified type.
predicate | A predicate for which object to find. |
T | : | new() |
TableMapping Assets.SQLINQ.SQLite.Net.SQLiteConnection.GetMapping | ( | Type | type, |
CreateFlags | createFlags = CreateFlags.None |
||
) |
Retrieves the mapping that is automatically generated for the given type.
type | The type whose mapping to the database is returned. |
createFlags | Optional flags allowing implicit PK and indexes based on naming conventions |
Retrieves the mapping that is automatically generated for the given type.
int Assets.SQLINQ.SQLite.Net.SQLiteConnection.Insert | ( | object | obj | ) |
Inserts the given object and retrieves its auto incremented primary key if it has one.
obj | The object to insert. |
int Assets.SQLINQ.SQLite.Net.SQLiteConnection.Insert | ( | object | obj, |
Type | objType | ||
) |
Inserts the given object and retrieves its auto incremented primary key if it has one.
obj | The object to insert. |
objType | The type of object to insert. |
int Assets.SQLINQ.SQLite.Net.SQLiteConnection.Insert | ( | object | obj, |
string | extra | ||
) |
Inserts the given object and retrieves its auto incremented primary key if it has one.
obj | The object to insert. |
extra | Literal SQL code that gets placed into the command. INSERT {extra} INTO ... |
int Assets.SQLINQ.SQLite.Net.SQLiteConnection.Insert | ( | object | obj, |
string | extra, | ||
Type | objType | ||
) |
Inserts the given object and retrieves its auto incremented primary key if it has one.
obj | The object to insert. |
extra | Literal SQL code that gets placed into the command. INSERT {extra} INTO ... |
objType | The type of object to insert. |
int Assets.SQLINQ.SQLite.Net.SQLiteConnection.InsertAll | ( | System.Collections.IEnumerable | objects, |
bool | runInTransaction = true |
||
) |
Inserts all specified objects.
objects | An IEnumerable of the objects to insert.
|
int Assets.SQLINQ.SQLite.Net.SQLiteConnection.InsertAll | ( | System.Collections.IEnumerable | objects, |
string | extra, | ||
bool | runInTransaction = true |
||
) |
Inserts all specified objects.
objects | An IEnumerable of the objects to insert. |
extra | Literal SQL code that gets placed into the command. INSERT {extra} INTO ... |
runInTransaction | A boolean indicating if the inserts should be wrapped in a transaction. |
int Assets.SQLINQ.SQLite.Net.SQLiteConnection.InsertAll | ( | System.Collections.IEnumerable | objects, |
Type | objType, | ||
bool | runInTransaction = true |
||
) |
Inserts all specified objects.
objects | An IEnumerable of the objects to insert. |
objType | The type of object to insert. |
runInTransaction | A boolean indicating if the inserts should be wrapped in a transaction. |
int Assets.SQLINQ.SQLite.Net.SQLiteConnection.InsertOrReplace | ( | object | obj | ) |
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.
obj | The object to insert. |
int Assets.SQLINQ.SQLite.Net.SQLiteConnection.InsertOrReplace | ( | object | obj, |
Type | objType | ||
) |
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.
obj | The object to insert. |
objType | The type of object to insert. |
|
protectedvirtual |
Creates a new SQLiteCommand. Can be overridden to provide a sub-class.
List<object> Assets.SQLINQ.SQLite.Net.SQLiteConnection.Query | ( | TableMapping | map, |
string | query, | ||
params object[] | args | ||
) |
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.
map | A TableMapping to use to convert the resulting rows into objects. |
query | The fully escaped SQL. |
args | Arguments to substitute for the occurences of '?' in the query. |
List<T> Assets.SQLINQ.SQLite.Net.SQLiteConnection.Query< T > | ( | string | query, |
params object[] | args | ||
) |
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.
query | The fully escaped SQL. |
args | Arguments to substitute for the occurences of '?' in the query. |
T | : | new() |
void Assets.SQLINQ.SQLite.Net.SQLiteConnection.Release | ( | string | savepoint | ) |
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.
savepoint | The name of the savepoint to release. The string should be the result of a call to SaveTransactionPoint |
void Assets.SQLINQ.SQLite.Net.SQLiteConnection.Rollback | ( | ) |
Rolls back the transaction that was begun by BeginTransaction or SaveTransactionPoint.
void Assets.SQLINQ.SQLite.Net.SQLiteConnection.RollbackTo | ( | string | savepoint | ) |
Rolls back the savepoint created by BeginTransaction or SaveTransactionPoint.
savepoint | The name of the savepoint to roll back to, as returned by SaveTransactionPoint. If savepoint is null or empty, this method is equivalent to a call to Rollback |
void Assets.SQLINQ.SQLite.Net.SQLiteConnection.RunInTransaction | ( | Action | action | ) |
Executes
action | within a (possibly nested) transaction by wrapping it in a SAVEPOINT. If an exception occurs the whole transaction is rolled back, not just the current savepoint. The exception is rethrown. |
action | The Action to perform within a transaction.
|
string Assets.SQLINQ.SQLite.Net.SQLiteConnection.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 to undo transactions since the returned savepoint. Call Release to commit transactions after the savepoint returned here. Call Commit to end the transaction, committing all changes.
TableQuery<T> Assets.SQLINQ.SQLite.Net.SQLiteConnection.Table< T > | ( | ) |
Returns a queryable interface to the table represented by the given type.
T | : | new() |
int Assets.SQLINQ.SQLite.Net.SQLiteConnection.Update | ( | object | obj | ) |
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.
obj | The object to update. It must have a primary key designated using the PrimaryKeyAttribute. |
int Assets.SQLINQ.SQLite.Net.SQLiteConnection.Update | ( | object | obj, |
Type | objType | ||
) |
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.
obj | The object to update. It must have a primary key designated using the PrimaryKeyAttribute. |
objType | The type of object to insert. |
int Assets.SQLINQ.SQLite.Net.SQLiteConnection.UpdateAll | ( | System.Collections.IEnumerable | objects, |
bool | runInTransaction = true |
||
) |
Updates all specified objects.
objects | An IEnumerable of the objects to insert. |
runInTransaction | A boolean indicating if the inserts should be wrapped in a transaction |
|
getset |
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.
|
get |
Whether BeginTransaction has been called and the database is waiting for a Commit.
|
get |
Returns the mappings from types to tables that the connection currently understands.