using KGIS.Plugin.LayerProperty.Enum; using System; using System.Collections.Generic; using System.Data; using System.Linq; using System.Text; using System.Threading.Tasks; namespace KGIS.Plugin.LayerProperty.Interface { public interface ICoreRDBHelper { DatabaseType DataBase { get; } ConnectionState State { get; } string ConnectionString { get; set; } IDbConnection ActiveConn { get; set; } DateTime SystemDataTime { get; } bool Connect(); bool DisConnect(); bool BeginTransaction(); bool Rollback(); bool Commit(); DataTable GetTable(string tableName); IList GetTablesName(); bool SaveTable(string tableName); bool SaveTable(string tableName, bool release); bool ReleaseTable(string tableName, bool storage); bool ReleaseTable(string tableName); bool Clear(); byte[] ReadBlobToBytes(string commandText); byte[] ReadBlobToBytes(string commandText, IDbDataParameter[] commandParameters); bool ReadBlobToFile(string commandText, string filePath); bool ReadBlobToFile(string commandText, IDbDataParameter[] commandParameters, string filePath); bool WriteBytesToBlob(string tabname, string fieldname, string wherestr, ref byte[] content); bool WriteFileToBlob(string tabname, string fieldname, string wherestr, string filePath); long GetNextValidID(string tableName, string fieldName, long startNumber, long step); long GetNextValidID(string tableName, string fieldName); DataTable ExecuteDatatable(string tableName, string commandText, bool release); int ExecuteSQL(string sqlText); DataSet ExecuteDataset(string commandText, CommandType commandType); DataSet ExecuteDataset(string commandText, CommandType commandType, IDbDataParameter[] commandParameters); DataSet ExecuteDataset(string storedprocedureName, params object[] parameterValues); DataSet ExecuteDataset(string commandText, CommandType commandType, bool release, string dsName); DataSet ExecuteDataset(string commandText, CommandType commandType, IDbDataParameter[] commandParameters, bool release, string dsName); DataSet ExecuteDataset(string storedprocedureName, bool release, params object[] parameterValues); int ExecuteNonQuery(string commandText, CommandType commandType); int ExecuteNonQuery(string commandText, CommandType commandType, IDbDataParameter[] commandParameters); int ExecuteNonQuery(string storedprocedureName, params object[] parameterValues); IDataReader ExecuteReader(string commandText, CommandType commandType); IDataReader ExecuteReader(string commandText, CommandType commandType, IDbDataParameter[] commandParameters); IDataReader ExecuteReader(string storedprocedureName, params object[] parameterValues); object ExecuteScalar(string commandText, CommandType commandType); object ExecuteScalar(string commandText, CommandType commandType, IDbDataParameter[] commandParameters); object ExecuteScalar(string storedprocedureName, params object[] parameterValues); IDbCommand CreateCommand(); } }