IDatabase Methods |
The IDatabase type exposes the following members.
Name | Description | |
---|---|---|
BeginTransaction |
Starts a database transaction.
Call CommitTransaction to commit a transaction.
Call RollbackTransaction to roll back a transaction.
| |
Clone |
Make a clone of the current database.
| |
Close |
The Close method closes the underlying Connection object and rolls back any pending transactions.
It then releases the connection to the connection pool, or closes the connection if connection pooling
is disabled.
| |
CommitTransaction |
Commits a database transaction.
Call BeginTransaction to begin a transaction.
Call RollbackTransaction to roll back a transaction.
| |
DBCount(String, String, String) |
Returns the number of items in the specified column and table using the SQL WHERE clause supplied.
Note: For improved performance use DBExists(String, String) when possible. | |
DBCount(String, String, String, DataFuncOptions, String) |
Returns the number of items in the specified column and table using the SQL WHERE clause supplied.
Note: For improved performance use DBExists(String, String, DataFuncOptions, String) when possible. | |
DBCount(String, String, String, DataFuncOptions, String, Int32) |
Returns the number of items in the specified column and table using the SQL WHERE clause supplied.
Note: For improved performance use DBExists(String, String, DataFuncOptions, String) when possible. | |
DBCountCache |
Returns the number of items in the specified column and table using the SQL WHERE clause supplied.
Note: For improved performance use DBExistsCache(String, String, DataFuncOptions, String) when possible.
DBCountCache is an enhancement to the existing DBCount function. Ultimately we still use the same DBCount mechanism to retrieve the required value
but the result is cached to Thread Local Storage. Subsequent requests to lookup the same count (using the SAME SQL) will pull that value from the thread cache
rather than hitting the database. | |
DBExists(String, String) |
Determines if a particular record exists.
For better performance and clarity, use this instead of DBCount(String, String, String) to
determine if a record or records exist.
| |
DBExists(String, String, DataFuncOptions) |
Determines if a particular record exists.
For better performance and clarity, use this instead of DBCount(String, String, String, DataFuncOptions, String) to
determine if a record or records exist.
| |
DBExists(String, String, DataFuncOptions, String) |
Determines if a particular record exists.
For better performance and clarity, use this instead of DBCount(String, String, String, DataFuncOptions, String) to
determine if a record or records exist.
| |
DBExistsCache |
Determines if a particular record exists.
For better performance and clarity, use this instead of DBCount(String, String, String, DataFuncOptions, String) to
determine if a record or records exist.
DBExistsCache is an enhancement to the existing DBExists function. Ultimately we still use the same DBExists mechanism to retrieve the required value
but the result is cached to Thread Local Storage. Subsequent requests to check existence of the same value (using the SAME SQL) will pull that value from the thread cache
rather than hitting the database.
| |
DBLookup(String, String, String) |
You can use the DBLookup function to get the value of a particular column from a specified set of records
(a domain). | |
DBLookup(String, String, String, DataFuncOptions, String) |
You can use the DBLookup function to get the value of a particular column from a specified set of records
(a domain). | |
DBLookup(String, String, String, DataFuncOptions, String, String) |
You can use the DBLookup function to get the value of a particular column from a specified set of records
(a domain). | |
DBLookupCache |
DBLookupCache is an enhancement to the existing DBLookup function. Ultimately we still use the same DBLookup mechanism to retrieve the required value
but the result is cached to Thread Local Storage. Subsequent requests to lookup the same value (using the SAME SQL) will pull that value from the thread cache
rather than hitting the database. | |
Exec |
The Exec method provides extended functionality.
(Inherited from IEAPBase.) | |
Execute(String) |
You can use the Execute method to perform catalog operations (for example, creating database objects such as tables),
or to change the data in a database without using a DataSet by executing UPDATE, INSERT, or DELETE statements.
For UPDATE, INSERT, and DELETE statements, the return value is the number of rows affected by the command. For all other types of statements, the return value is -1. | |
Execute(String, String) |
You can use the Execute method to perform catalog operations (for example, creating database objects such as tables),
or to change the data in a database without using a DataSet by executing UPDATE, INSERT, or DELETE statements.
For UPDATE, INSERT, and DELETE statements, the return value is the number of rows affected by the command. For all other types of statements, the return value is -1. | |
Execute(String, ExecuteOptions, String) |
You can use the Execute method to perform catalog operations (for example, creating database objects such as tables),
or to change the data in a database without using a DataSet by executing UPDATE, INSERT, or DELETE statements.
For UPDATE, INSERT, and DELETE statements, the return value is the number of rows affected by the command. For all other types of statements, the return value is -1. | |
Execute(String, String, Int32) |
You can use the Execute method to perform catalog operations (for example, creating database objects such as tables),
or to change the data in a database without using a DataSet by executing UPDATE, INSERT, or DELETE statements.
For UPDATE, INSERT, and DELETE statements, the return value is the number of rows affected by the command. For all other types of statements, the return value is -1. | |
Execute(String, ExecuteOptions, String, String) |
You can use the Execute method to perform catalog operations (for example, creating database objects such as tables),
or to change the data in a database without using a DataSet by executing UPDATE, INSERT, or DELETE statements.
For UPDATE, INSERT, and DELETE statements, the return value is the number of rows affected by the command. For all other types of statements, the return value is -1. | |
Execute(String, ExecuteOptions, String, String, Int32) |
You can use the Execute method to perform catalog operations (for example, creating database objects such as tables),
or to change the data in a database without using a DataSet by executing UPDATE, INSERT, or DELETE statements.
For UPDATE, INSERT, and DELETE statements, the return value is the number of rows affected by the command. For all other types of statements, the return value is -1. | |
Execute(String, ExecuteOptions, String, String, String) |
You can use the Execute method to perform catalog operations (for example, creating database objects such as tables),
or to change the data in a database without using a DataSet by executing UPDATE, INSERT, or DELETE statements.
For UPDATE, INSERT, and DELETE statements, the return value is the number of rows affected by the command. For all other types of statements, the return value is -1. | |
Execute(String, ExecuteOptions, String, String, String, Int32) |
You can use the Execute method to perform catalog operations (for example, creating database objects such as tables),
or to change the data in a database without using a DataSet by executing UPDATE, INSERT, or DELETE statements.
For UPDATE, INSERT, and DELETE statements, the return value is the number of rows affected by the command. For all other types of statements, the return value is -1. | |
Execute(String, ExecuteOptions, String, String, String, Int32, Int32) |
You can use the Execute method to perform catalog operations (for example, creating database objects such as tables),
or to change the data in a database without using a DataSet by executing UPDATE, INSERT, or DELETE statements.
For UPDATE, INSERT, and DELETE statements, the return value is the number of rows affected by the command. For all other types of statements, the return value is -1. | |
ExecuteScalar(String, String) |
Execute a scalar SQL statement (a statement that returns a single item).
| |
ExecuteScalar(String, String, Int32) |
Execute a scalar SQL statement (a statement that returns a single item).
| |
ExecuteThroughAdapter(String, String, Hashtable, ExecuteThroughAdapterAttrs) |
Executes an insert, update or delete through IDbDataAdapter, Dataset, DataTable, DataRow
| |
ExecuteThroughAdapter(String, String, Hashtable, ExecuteThroughAdapterAttrs, String) |
Executes an insert, update or delete through IDbDataAdapter, Dataset, DataTable, DataRow
| |
FillStringCollection |
Fill a StringCollection with the contents of the first column in the provided query.
Note that each value will be converted to a string.
| |
FireAndForget(String, ExecuteOptions, String) |
Execute the specified SQL asynchronously. The SQL execution is spun off to the thread pool to be executed when
a thread becomes available, and control is returned to the caller immediately.
Note that there is no way to get the result, or success/failure of the execution except to query if from the database.
| |
FireAndForget(String, ExecuteOptions, String, FireAndForgetOptions) |
Execute the specified SQL asynchronously. The SQL execution is spun off to the thread pool to be executed when
a thread becomes available, and control is returned to the caller immediately.
Note that there is no way to get the result, or success/failure of the execution except to query if from the database.
| |
GetSchemaInfo(String) |
Gets a SchemaInfoCollection describing the specified table or view with SchemaInfo objects for each column.
Note that schema information is cached on demand and per-DatabaseID.
If the specified table does not exist then an empty (but not null) SchemaInfoCollection will be returned and
you can test ObjectExists to determine whether or not the object exists.
You can use GetSchemaInfo(String, SchemaInfoType) for various schema object, including tables and views.
| |
GetSchemaInfo(String, SchemaInfoType) |
Gets a SchemaInfoCollection describing the specified database object with SchemaInfo objects for each column or input parameter.
Note that schema information is cached on demand and per-DatabaseID.
If the specified table does not exist then an empty (but not null) SchemaInfoCollection will be returned and
you can test ObjectExists to determine whether or not the object exists.
| |
Hibernate | Hibernate the DB. Hibernated DB's are awoken via WakeUp. | |
LoadFile |
Load the specified file data into a memory stream.
If no records are found then the stream object will be created, but will be empty.
If multiple records are found then data will be loaded from the first record only.
| |
LoadProperties |
Loads the database Properties from the repository database.
| |
Open |
Opens the connection to the underlying data source.
| |
Open(IAppContext, String) |
Opens the connection to the underlying data source.
| |
Open(IAppContext, String, DatabaseOpenOptions) |
Opens the connection to the underlying data source.
| |
OpenCachedTable(String, String) |
Opens a new DataSet and returns the first DataTable, retrieving it from the cache
if it is cached. If the object is not cached, it is opened from the datasource and
added to the global cache.
| |
OpenCachedTable(String, String, String) |
Opens a new DataSet and returns the first DataTable, retrieving it from the cache
if it is cached. If the object is not cached, it is opened from the datasource and
added to the global cache.
| |
OpenCachedTable(String, String, String, Boolean) |
Opens a new DataSet and returns the first DataTable, retrieving it from the cache
if it is cached. If the object is not cached, it is opened from the datasource and
added to the global cache.
| |
OpenDataReader(String) |
Opens a recordset using the internal connection and default options.
| |
OpenDataReader(String, String) |
Opens a recordset using the internal connection and default options.
| |
OpenDataReader(String, DataFuncOptions, String) |
Opens a recordset using the internal connection.
| |
OpenDataReader(String, String, Int32) |
Opens a recordset using the internal connection.
| |
OpenDataReader(String, IDbConnection, DataFuncOptions, String) |
Opens a recordset using the specified connection.
| |
OpenDataReader(String, IDbConnection, DataFuncOptions, String, String) |
Opens a recordset using the specified connection.
| |
OpenDataReader(String, IDbConnection, DataFuncOptions, String, String, Int32) |
Opens a recordset using the specified connection.
| |
OpenDataset(String) | Opens one or more tables or views. | |
OpenDataset(String, String) | Opens one or more tables or views. | |
OpenDataset(String, String, Int32) | Opens one or more tables or views. | |
OpenHashtable |
Opens a 2 column statement on the encapsulated connection and returns the results as a hashtable.
Note that a hashtable is ALWAYS returned even if no records were found (in which case it will be empty).
| |
OpenTable(String) |
Opens a new DataSet and returns the first DataTable.
If caching is appropriate use OpenCachedTable(String, String) for improved performace.
| |
OpenTable(String, String) |
Opens a new DataSet and returns the first DataTable.
If caching is appropriate use OpenCachedTable(String, String, String) for improved performace.
| |
OpenTable(String, String, Int32) |
Opens a new DataSet and returns the first DataTable.
If caching is appropriate use OpenCachedTable(String, String, String) for improved performace.
| |
ResolveEmbeddedFunction |
Resolve a SQL string for embedded functions.
See EmbeddedParser for more information on embedded functions.
| |
RollbackTransaction |
Rolls back a database transaction.
Call BeginTransaction to begin a transaction.
Call CommitTransaction to commit a transaction.
| |
TableSpace |
Gets the space used by the specified table.
Currently this method is only supported for SQL-Server where the
sp_spaceused stored procedure is used.
For non-supported DBMS's, an empty (non-null) space descriptor is returned.
At this time, an exception is thrown if the table does not exist, but this behaviour may change in the future and is not guaranteed. | |
WakeUp | Wake up (unhibernate) the DB. DB's are hibernated via Hibernate. |