Interface IDBReadableCommand
Represents the SQL operator that can be used to read data.
Namespace: Terrasoft.Core.DB
Assembly: Terrasoft.Core.dll
Syntax
public interface IDBReadableCommand
Methods
ExecuteReader(DBExecutor)
Executes the SQL operator and returns System.Data.IDataReader with the resulting rowset, using the passed-in DBExecutor instance.
Declaration
IDataReader ExecuteReader(DBExecutor dbExecutor)
Parameters
Type | Name | Description |
---|---|---|
DBExecutor | dbExecutor | The DBExecutor instance used to query the database. |
Returns
Type | Description |
---|---|
System.Data.IDataReader | The System.Data.IDataReader instance with the resulting rowset. |
ExecuteScalar<TResult>()
Executes the SQL operator and returns the typed first column of the first row of the resulting set returned by the query.
Declaration
TResult ExecuteScalar<TResult>()
Returns
Type | Description |
---|---|
TResult | The first column of the first row in the resulting set of the |
Type Parameters
Name | Description |
---|---|
TResult | The return type of the column value. |
ExecuteScalar<TResult>(DBExecutor)
Executes the SQL operator and returns the typed first column of the first row of the resulting set, using the passed-in DBExecutor instance.
Declaration
TResult ExecuteScalar<TResult>(DBExecutor dbExecutor)
Parameters
Type | Name | Description |
---|---|---|
DBExecutor | dbExecutor | The DBExecutor instance used to query the database. |
Returns
Type | Description |
---|---|
TResult | The first column of the first row in the resulting set of the |
Type Parameters
Name | Description |
---|---|
TResult | The return type of the column value. |