using System; using System.Collections.Generic; using System.Data; using System.Reflection; namespace SqlSugar { public partial interface IAdo { string SqlParameterKeyWord { get; } IDbConnection Connection { get; set; } IDbTransaction Transaction { get; set; } IDataParameter[] ToIDbDataParameter(params SugarParameter[] pars); SugarParameter[] GetParameters(object obj, PropertyInfo[] propertyInfo = null); SqlSugarClient Context { get; set; } void ExecuteBefore(string sql, SugarParameter[] pars); void ExecuteAfter(string sql, SugarParameter[] pars); IDataParameterCollection DataReaderParameters { get; set; } CommandType CommandType { get; set; } bool IsEnableLogEvent { get; set; } Action LogEventStarting { get; set; } Action LogEventCompleted { get; set; } Func> ProcessingEventStartingSQL { get; set; } Action ErrorEvent { get; set; } bool IsClearParameters { get; set; } int CommandTimeOut { get; set; } IDbBind DbBind { get; } void SetCommandToAdapter(IDataAdapter adapter, IDbCommand command); IDataAdapter GetAdapter(); IDbCommand GetCommand(string sql, SugarParameter[] parameters); DataTable GetDataTable(string sql, object parameters); DataTable GetDataTable(string sql, params SugarParameter[] parameters); DataTable GetDataTable(string sql, List parameters); DataSet GetDataSetAll(string sql, object parameters); DataSet GetDataSetAll(string sql, params SugarParameter[] parameters); DataSet GetDataSetAll(string sql, List parameters); IDataReader GetDataReader(string sql, object parameters); IDataReader GetDataReader(string sql, params SugarParameter[] parameters); IDataReader GetDataReader(string sql, List parameters); object GetScalar(string sql, object parameters); object GetScalar(string sql, params SugarParameter[] parameters); object GetScalar(string sql, List parameters); int ExecuteCommand(string sql, object parameters); int ExecuteCommand(string sql, params SugarParameter[] parameters); int ExecuteCommand(string sql, List parameters); string GetString(string sql, object parameters); string GetString(string sql, params SugarParameter[] parameters); string GetString(string sql, List parameters); int GetInt(string sql, object pars); int GetInt(string sql, params SugarParameter[] parameters); int GetInt(string sql, List parameters); Double GetDouble(string sql, object parameters); Double GetDouble(string sql, params SugarParameter[] parameters); Double GetDouble(string sql, List parameters); decimal GetDecimal(string sql, object parameters); decimal GetDecimal(string sql, params SugarParameter[] parameters); decimal GetDecimal(string sql, List parameters); DateTime GetDateTime(string sql, object parameters); DateTime GetDateTime(string sql, params SugarParameter[] parameters); DateTime GetDateTime(string sql, List parameters); List SqlQuery(string sql, object parameters = null); List SqlQuery(string sql, params SugarParameter[] parameters); List SqlQuery(string sql, List parameters); T SqlQuerySingle(string sql, object whereObj = null); T SqlQuerySingle(string sql, params SugarParameter[] parameters); T SqlQuerySingle(string sql, List parameters); dynamic SqlQueryDynamic(string sql, object whereObj = null); dynamic SqlQueryDynamic(string sql, params SugarParameter[] parameters); dynamic SqlQueryDynamic(string sql, List parameters); void Dispose(); void Close(); void Open(); void CheckConnection(); void BeginTran(); void BeginTran(IsolationLevel iso); void BeginTran(string transactionName); void BeginTran(IsolationLevel iso, string transactionName); void RollbackTran(); void CommitTran(); DbResult UseTran(Action action); DbResult UseTran(Func action); void UseStoredProcedure(Action action); T UseStoredProcedure(Func action); IAdo UseStoredProcedure(); } }