Database Class |
Namespace: DataTables
public class Database : IDisposable
The Database type exposes the following members.
Name | Description | |
---|---|---|
Database(String, DbConnection) |
Create a database connection
| |
Database(String, DbConnectionStringBuilder) |
Create a database connection
| |
Database(String, String, String) |
Create a database connection
|
Name | Description | |
---|---|---|
Adapter |
Get the database provider factory
| |
Adapter(String) |
Set the database provider factory
| |
Any |
Determine if there is any data in the table that matches the query condition
| |
Commit |
Commit the current transaction
| |
Conn |
Get the database connection
| |
Debug |
Get the current debug state for this Database instance
| |
Debug(ActionObject) | ||
Debug(Boolean) |
Set the debug state. true will enable recording of SQL statements
| |
Delete |
Perform a delete query on a table.
This is a short cut method that creates and update query and then uses the
query('delete') | |
Dispose |
Dispose of this database instance
| |
Equals | Determines whether the specified object is equal to the current object. (Inherited from Object.) | |
Finalize | Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (Inherited from Object.) | |
GetHashCode | Serves as the default hash function. (Inherited from Object.) | |
GetType | Gets the Type of the current instance. (Inherited from Object.) | |
Insert |
Insert data into a table.
This is a short cut method that creates an update query and then uses
the query('insert') | |
MemberwiseClone | Creates a shallow copy of the current Object. (Inherited from Object.) | |
Push |
Update or Insert data. When doing an insert, the where condition is
added as a set field
| |
Query(String) |
Create a query object to build a database query.
| |
Query(String, String) |
Create a query object to build a database query.
| |
Rollback |
Rollback the database state to the start of the transaction.
| |
Select(String, IEnumerableString, ActionQuery, IEnumerableString) |
Select data from a table.
This is a short cut method that creates an update query and then uses
the query('select') | |
Select(String, IEnumerableString, DictionaryString, Object, IEnumerableString) |
Select data from a table.
This is a short cut method that creates an update query and then uses
the query('select') | |
SelectDistinct(String, IEnumerableString, ActionQuery, IEnumerableString) |
Select distinct data from a table.
This is a short cut method that creates an update query and then uses the
query('select') | |
SelectDistinct(String, IEnumerableString, ActionQuery, String) |
Select distinct data from a table.
This is a short cut method that creates an update query and then uses the
query('select') | |
SelectDistinct(String, IEnumerableString, DictionaryString, Object, IEnumerableString) |
Select distinct data from a table.
This is a short cut method that creates an update query and then uses the
query('select') | |
Sql |
Execute an raw SQL query - i.e. give the method your own SQL, rather
than having the Database classes building it for you.
| |
ToString | Returns a string that represents the current object. (Inherited from Object.) | |
Transaction |
Start a new database transaction.
| |
Update |
Update data.
This is a short cut method that creates an update query and then uses
the query('update') |