Click or drag to resize
IDatabaseConnection Interface
A connection to a SQLite database.

Namespace: SQLitePCL.pretty
Assembly: SQLitePCL.pretty (in SQLitePCL.pretty.dll) Version: 1.0.0.0 (1.0.0)
Syntax
public interface IDatabaseConnection

The IDatabaseConnection type exposes the following members.

Methods
  NameDescription
Public methodGetTableColumnMetadata
Returns metadata about a specific column of a specific database table,
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 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 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 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 propertyTotalChanges
Returns the number of row changes caused by INSERT, UPDATE or DELETE statements since the database connection was opened.
Top
See Also