123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130 |
- using System;
- using System.Collections.Generic;
- using System.Data;
- using System.Linq;
- using System.Text;
- namespace Ant.Oracle
- {
- public class OracleCommand : IDbCommand, IDisposable
- {
- IDbCommand _dbCommand;
- public OracleCommand(IDbCommand dbCommand)
- {
- Utils.CheckNull(dbCommand);
- this._dbCommand = dbCommand;
- }
- /// <summary>
- /// SQL语句
- /// </summary>
- public string CommandText
- {
- get
- {
- return this._dbCommand.CommandText;
- }
- set
- {
- this._dbCommand.CommandText = value;
- }
- }
- /// <summary>
- /// 超时时间
- /// </summary>
- public int CommandTimeout
- {
- get
- {
- return this._dbCommand.CommandTimeout;
- }
- set
- {
- this._dbCommand.CommandTimeout = value;
- }
- }
- public CommandType CommandType
- {
- get
- {
- return this._dbCommand.CommandType;
- }
- set
- {
- this._dbCommand.CommandType = value;
- }
- }
- public IDbConnection Connection
- {
- get
- {
- return this._dbCommand.Connection;
- }
- set
- {
- this._dbCommand.Connection = value;
- }
- }
- public IDataParameterCollection Parameters
- {
- get
- {
- return this._dbCommand.Parameters;
- }
- }
- public IDbTransaction Transaction
- {
- get
- {
- return this._dbCommand.Transaction;
- }
- set
- {
- this._dbCommand.Transaction = value;
- }
- }
- public UpdateRowSource UpdatedRowSource
- {
- get
- {
- return this._dbCommand.UpdatedRowSource;
- }
- set
- {
- this._dbCommand.UpdatedRowSource = value;
- }
- }
- public void Cancel()
- {
- this._dbCommand.Cancel();
- }
- public IDbDataParameter CreateParameter()
- {
- return this._dbCommand.CreateParameter();
- }
- public int ExecuteNonQuery()
- {
- return this._dbCommand.ExecuteNonQuery();
- }
- public IDataReader ExecuteReader()
- {
- return new OracleDataReader(this._dbCommand.ExecuteReader());
- }
- public IDataReader ExecuteReader(CommandBehavior behavior)
- {
- return new OracleDataReader(this._dbCommand.ExecuteReader(behavior));
- }
- public object ExecuteScalar()
- {
- return this._dbCommand.ExecuteScalar();
- }
- public void Prepare()
- {
- this._dbCommand.Prepare();
- }
- public void Dispose()
- {
- this._dbCommand.Dispose();
- }
- }
- }
|