Implements IDbAccess for Oracle.
Default constructor
public Void OracleDbAccess()
Database SID or ServiceName.
public String Catalog { get; set; }
Catalog can be specified as: * SID:DatabaseSid * ServiceName:DatabaseServiceName * DatabaseSid (If no prefix, SID is used)
Name of the default tablespace used to store indexes.
public String DefaultIndexSpace { get; set; }
Name of the default role used to grant privileges to.
public String DefaultRole { get; set; }
Name of the default tablespace used to store tables.
public String DefaultTableSpace { get; set; }
Gets whether a connection is currently open.
public Boolean IsConnectionOpen { get; }
Gets whether a transaccion is in progress.
public Boolean IsInTransaction { get; }
Password of the user used to connect to the database.
public String Password { set; }
Database ServiceName. This property sets Catalog = "ServiceName:value" only if Catalog is empty.
public String ServiceName { get; set; }
Database SID. This property sets Catalog = "SID:value" only if Catalog is empty.
public String Sid { get; set; }
User name to connecto to the database.
public String UserName { set; }
Adds a parameter to the command.
public Void AddParameter(command, name, type, direction, size, value)
Name | Type | Summary |
---|---|---|
command | IDbCommand | The command where the parameter will be added. |
name | String | The quoted parameter name. |
type | DbType | The parameter data type. |
direction | ParameterDirection | The parameter direction. |
size | Int32 | The size of the data in the valueparameter. |
value | Object | The value of the parameter. |
Type | Summary |
---|---|
DataAccessException | Thrown when there are an error casting the parameter value. |
Initiates a transaction.
public IDbTransaction BeginTransaction()
An object representing the new transaction.
Initiates a transaction with the specified isolation level.
public IDbTransaction BeginTransaction(iso)
An object representing the new transaction.
Name | Type | Summary |
---|---|---|
iso | IsolationLevel | Isolation level for the transaction. |
Closes connection.
public Void CloseConnection()
Commits a transaction.
public Void CommitTransaction()
Creates a new IDbCommand.
public IDbCommand CreateCommand(commandType)
Name | Type | Summary |
---|---|---|
commandType | CommandType |
Performs applicarion-defined tasks associated with freeing, releasing, or reseting unmaneged resources.
public Void Dispose()
Executes the specified command against the database
public Int32 ExecuteCommand(command, tbl)
Amount of records affected by the command
If the command returns a set of records, the tbl parameter must contain an initialize DataTable, otherwise it must be null
Name | Type | Summary |
---|---|---|
command | IDbCommand | Command to excecute. |
tbl | DataTable | An initialized DataTable object or null. |
Type | Summary |
---|---|
DataAccessException | Thrown when an unindentify error occurs |
OpenConnectionException | Thrown when a connection could not be openned. |
DuplicatedPrimaryKeyException | Thrown when a primary key or unique index constraint fails |
ConstraintViolationException | Thrown if a constraint is violated |
DatabaseObjectNotFoundException | Thrown when a database object, as a table, view, field, etc., does not exist. |
Executes the specified command asyncronously againt the database.
public Task<Int32> ExecuteCommandAsync(command, dataTable)
If the command returns a set of records, the dataTable parameter must contain an initialized DataTable, otherwise it must be null.
Name | Type | Summary |
---|---|---|
command | IDbCommand | Command to execute. |
dataTable | DataTable | An initialized DataTable object or null. |
Type | Summary |
---|---|
DataAccessException | Thrown when an unindentify error occurs. |
DuplicatedPrimaryKeyException | Thrown when a primary key or unique index constraint fails. |
ConstraintViolationException | Thrown if a constraint is violated. |
DatabaseObjectNotFoundException | Thrown when a database object, as a table, view, field, etc., does not exist. |
Executes the specified command against the database and returns a IDataReader.
public IDataReader ExecuteReader(command)
A read only forward only IDataReader with the database data.
Name | Type | Summary |
---|---|---|
command | IDbCommand | Command to execute. |
Type | Summary |
---|---|
InvalidOperationException | Thrown the the connection is not open. |
DataAccessException | Thrown when an unindentify error occurs. |
DatabaseObjectNotFoundException | Thrown when a database object, as a table, view, field, etc., does not exist. |
Executes the specified command against the database asyncronously and returns an IDataReader.
public Task<IDataReader> ExecuteReaderAsync(command)
Name | Type | Summary |
---|---|---|
command | IDbCommand | Command to execute. |
Type | Summary |
---|---|
InvalidOperationException | Thrown when the database connection is not open. |
DataAccessException | Thrown when an unindentify error occurs. |
DatabaseObjectNotFoundException | Thrown when a database object, as a table, view, field, etc., does not exist. |
Executes the specified command against the database and returns the first fields of the first record retrieved
public Object ExecuteScalar(command)
Value of the first field of the first record. If the CommandType is a Stored Procedure the value of the parameter with Direction equals to ReturnValue is returned.
Name | Type | Summary |
---|---|---|
command | IDbCommand | Command to excecute. |
Type | Summary |
---|---|
DataAccessException | Thrown when an unindentify error occurs. |
OpenConnectionException | Thrown when a connection could not be openned. |
DatabaseObjectNotFoundException | Thrown when a database object, as a table, view, field, etc., does not exist. |
Executes the specified command againts the database asyncronously and returns the first field of the first record retrieved.
public Task<Object> ExecuteScalarAsync(command)
Value of the first field of the first record. If the CommandType is a Stored Procedure the value of the parameter with Direction equals to ReturnValue is returned.
Name | Type | Summary |
---|---|---|
command | IDbCommand | Command to execute. |
Type | Summary |
---|---|
DataAccessException | Thrown when an unindentify error occurs. |
OpenConnectionException | Thrown when a connection could not be openned. |
DatabaseObjectNotFoundException | Thrown when a database object, as a table, view, field, etc., does not exist. |
Ejecutes the underlaying connection GetSchema() method.
public DataTable GetSchema()
A DataTable as obtained from the GetSchema() method.
Type | Summary |
---|---|
DataAccessException | Thrown when an unindentify error occurs. |
Ejecutes the underlaying connection GetSchema() method.
public DataTable GetSchema(collectionName)
A DataTable as obtained from the GetSchema() method.
Name | Type | Summary |
---|---|---|
collectionName | String | The name of the collection to retrieve. |
Type | Summary |
---|---|
DataAccessException | Thrown when an unindentify error occurs. |
Ejecutes the underlaying connection GetSchema() method.
public DataTable GetSchema(collectionName, restrictionValues)
A DataTable as obtained from the GetSchema() method.
Name | Type | Summary |
---|---|---|
collectionName | String | The name of the collection to retrieve. |
restrictionValues | String[] | A set of restriction values. |
Type | Summary |
---|---|
DataAccessException | Thrown when an unindentify error occurs. |
Gets the server version.
public String GetServerVersion()
The server version.
Type | Summary |
---|---|
SchemaManipulationException | Thrown when there is an error accesing schema data. |
Opens a connection with the database server.
public Void OpenConnection()
Type | Summary |
---|---|
OpenConnectionException | Thrown when an unindentify error occurs. |
ServerUnavailableException | Thrown when the database server is not found. |
CatalogNotFoundException | Thrown when the catalog is not found. |
InvalidCredentialsException | Thrown when credentials are invalid. |
CredentialsExpiredException | Thrown when the password has expired. |
Opens a connection with the database server asyncronously.
public Task OpenConnectionAsync()
Type | Summary |
---|---|
OpenConnectionException | Thrown when an unindentify error occurs. |
ServerUnavailableException | Thrown when the database server is not found. |
InvalidCredentialsException | Thrown when credentials are invalid. |
Aborts the current transaction
public Void RollbackTransaction()
In this document