Click or drag to resize
SQLiteDatabaseConnection Class
An implementation of IDatabaseConnection that wraps a raw SQLite database connection.
Inheritance Hierarchy
SystemObject
  SQLitePCL.prettySQLiteDatabaseConnection

Namespace: SQLitePCL.pretty
Assembly: SQLitePCL.pretty (in SQLitePCL.pretty.dll) Version: 1.0.0.0 (1.0.0)
Syntax
public sealed class SQLiteDatabaseConnection : IDatabaseConnection, 
	IDisposable

The SQLiteDatabaseConnection type exposes the following members.

Methods
  NameDescription
Public methodBackupInit
Initializes a backup of database to a destination database.
Public methodDispose
Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
Public methodEquals
Determines whether the specified object is equal to the current object.
(Inherited from Object.)
Protected methodFinalize
Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.
(Overrides ObjectFinalize.)
Public methodGetHashCode
Serves as a hash function for a particular type.
(Inherited from Object.)
Public methodGetTableColumnMetadata
Returns metadata about a specific column of a specific database table,
Public methodGetType
Gets the Type of the current instance.
(Inherited from Object.)
Public methodInterrupt
Causes any pending database operation to abort and return at its earliest opportunity.
Public methodIsDatabaseReadOnly
Determine whether a database is readonly.
Public methodOpenBlob
Opens the blob located by the a database, table, column, and rowid for incremental I/O as a Stream.
Public methodPrepareStatement
Compiles a SQL statement into an IStatement.
Public methodStatus
Retrieve runtime status information about a single database connection.
Public methodToString
Returns a string that represents the current object.
(Inherited from Object.)
Public methodTryGetFileName
Returns the filename associated with the database if available.
Public methodWalCheckPoint
Run a checkpoint operation on a WAL database on the connection. The specific operation is determined by the value of the mode parameter.
Top
Extension Methods
  NameDescription
Public Extension MethodBackup
Performs a full backup from This to destConn.
(Defined by DatabaseConnection.)
Public Extension MethodDeleteAllT
Deleted all object instances specified by their primary keys.
(Defined by DatabaseConnection.)
Public Extension MethodDeleteAllRowsT
Deletes all rows in a given table.
(Defined by DatabaseConnection.)
Public Extension MethodDropTableIfExistsT
Drops the table if it exists. Otherwise this is a no-op.
(Defined by DatabaseConnection.)
Public Extension MethodExecute(String)Overloaded.
Compiles and executes a SQL statement.
(Defined by DatabaseConnection.)
Public Extension MethodExecute(String, Object)Overloaded.
Compiles and executes a SQL statement with the provided bind parameter values.
(Defined by DatabaseConnection.)
Public Extension MethodExecuteAll
Compiles and executes multiple SQL statements.
(Defined by DatabaseConnection.)
Public Extension MethodFindAllT
Finds all object instances specified by their primary keys.
(Defined by DatabaseConnection.)
Public Extension MethodGetFileName
Returns the filename associated with the database.
(Defined by DatabaseConnection.)
Public Extension MethodInitTableT
Creates or migrate a table in the database for the given table mapping, creating indexes if needed.
(Defined by DatabaseConnection.)
Public Extension MethodInsertOrReplaceT
Inserts an object into the database, replacing the existing entry if the primary key already exists.
(Defined by DatabaseConnection.)
Public Extension MethodInsertOrReplaceAllT
Inserts the objects into the database, replacing existing entries if the given primary keys already exist.
(Defined by DatabaseConnection.)
Public Extension MethodOpenBlob
Opens the blob located by the ColumnInfo and rowid for incremental I/O as a Stream.
(Defined by DatabaseConnection.)
Public Extension MethodPrepareAll
Compiles one or more SQL statements.
(Defined by DatabaseConnection.)
Public Extension MethodPrepareDeleteStatementT
Prepares a SQLite statement that can be bound to an object primary key to delete row from the database.
(Defined by DatabaseConnection.)
Public Extension MethodPrepareFindStatementT
Prepares a SQLite statement that can be bound to an object primary key to retrieve an instance from the database.
(Defined by DatabaseConnection.)
Public Extension MethodPrepareInsertOrReplaceStatementT
Prepares a SQLite statement that can be bound to an object of type T to insert into the database.
(Defined by DatabaseConnection.)
Public Extension MethodPrepareStatement(String)Overloaded.
Compiles a SQL statement.
(Defined by DatabaseConnection.)
Public Extension MethodPrepareStatement(ISqlQuery)Overloaded.
Compiles a SQL query.
(Defined by DatabaseConnection.)
Public Extension MethodQuery(String)Overloaded.
Compiles a SQL statement, returning the an IEnumerableT of rows in the result set.
(Defined by DatabaseConnection.)
Public Extension MethodQuery(ISqlQuery)Overloaded.
Compiles a SQL query, returning the an IEnumerableT of rows in the result set.
(Defined by DatabaseConnection.)
Public Extension MethodQuery(String, Object)Overloaded.
Compiles a SQL statement with provided bind parameter values, returning the an IEnumerableT of rows in the result set.
(Defined by DatabaseConnection.)
Public Extension MethodQuery(ISqlQuery, Object)Overloaded.
Compiles a SQL statement with provided bind parameter values, returning the an IEnumerableT of rows in the result set.
(Defined by DatabaseConnection.)
Public Extension MethodRunInTransaction(ActionIDatabaseConnection)Overloaded.
Runs the Action action in a transaction and returns the function result. If the database is not currently in a transaction, a new transaction is created using BeginTransaction with TransactionMode.Deferred and committed. Otherwise the transaction is created within a savepoint block but not fully committed to the database until the enclosing transaction is committed.
(Defined by DatabaseConnection.)
Public Extension MethodRunInTransaction(ActionIDatabaseConnection, TransactionMode)Overloaded.
Runs the Action action in a transaction and returns the function result. If the database is not currently in a transaction, a new transaction is created using the provided TransactionMode and committed. Otherwise the transaction is created within a savepoint block but not fully committed to the database until the enclosing transaction is committed.
(Defined by DatabaseConnection.)
Public Extension MethodRunInTransactionT(FuncIDatabaseConnection, T)Overloaded.
Runs the function f in a transaction and returns the function result. If the database is not currently in a transaction, a new transaction is created using BeginTransaction with TransactionMode.Deferred and committed. Otherwise the transaction is created within a savepoint block but not fully committed to the database until the enclosing transaction is committed.
(Defined by DatabaseConnection.)
Public Extension MethodRunInTransactionT(FuncIDatabaseConnection, T, TransactionMode)Overloaded.
Runs the function f in a transaction and returns the function result. If the database is not currently in a transaction, a new transaction is created using the provided TransactionMode and committed. Otherwise the transaction is created within a savepoint block but not fully committed to the database until the enclosing transaction is committed.
(Defined by DatabaseConnection.)
Public Extension MethodTryDeleteT
Tries to delete the object in the database with the provided primary key.
(Defined by DatabaseConnection.)
Public Extension MethodTryFindT
Tries to find an object in the database with the provided primary key.
(Defined by DatabaseConnection.)
Public Extension MethodTryRunInTransaction(ActionIDatabaseConnection)Overloaded.
Runs the Action action in a transaction and returns the function result. If the database is not currently in a transaction, a new transaction is created using BeginTransaction with TransactionMode.Deferred and committed. Otherwise the transaction is created within a savepoint block but not fully committed to the database until the enclosing transaction is committed.
(Defined by DatabaseConnection.)
Public Extension MethodTryRunInTransaction(ActionIDatabaseConnection, TransactionMode)Overloaded.
Runs the Action action in a transaction and returns the function result. If the database is not currently in a transaction, a new transaction is created using the provided TransactionMode and committed. Otherwise the transaction is created within a savepoint block but not fully committed to the database until the enclosing transaction is committed.
(Defined by DatabaseConnection.)
Public Extension MethodTryRunInTransactionT(FuncIDatabaseConnection, T, T)Overloaded.
Runs the function f in a transaction and returns the function result. If the database is not currently in a transaction, a new transaction is created using BeginTransaction with TransactionMode.Deferred and committed. Otherwise the transaction is created within a savepoint block but not fully committed to the database until the enclosing transaction is committed.
(Defined by DatabaseConnection.)
Public Extension MethodTryRunInTransactionT(FuncIDatabaseConnection, T, TransactionMode, T)Overloaded.
Runs the function f in a transaction and returns the function result. If the database is not currently in a transaction, a new transaction is created using the provided TransactionMode and committed. Otherwise the transaction is created within a savepoint block but not fully committed to the database until the enclosing transaction is committed.
(Defined by DatabaseConnection.)
Public Extension MethodVacuum
Executes the SQLite VACUUM command
(Defined by DatabaseConnection.)
Public Extension MethodWalCheckPoint
Checkpoint the database name dbName.
(Defined by DatabaseConnection.)
Top
Properties
  NameDescription
Public propertyChanges
Returns the number of database rows that were changed, inserted or deleted by the most recently completed IStatement.
Public propertyIsAutoCommit
Returns true if the given database connection is in autocommit mode,
Public propertyIsReadOnly
Returns true if the database connection is readonly.
Public propertyLastInsertedRowId
Returns the rowid of the most recent successful INSERT into a rowid or virtual table.
Public propertyStatements
An enumeration of the connection's currently opened statements in the order they were prepared.
Public propertyTotalChanges
Returns the number of row changes caused by INSERT, UPDATE or DELETE statements since the database connection was opened.
Top
Events
  NameDescription
Public eventProfile
Profiling event that occurs when a IStatement finishes.
Public eventRollback
Occurs whenever a transaction is rolled back on the database connection.
Public eventTrace
Tracing event that occurs at various times when IStatementis running.
Public eventUpdate
Occurs whenever a row is updated, inserted or deleted in a rowid table.
Top
See Also