IDBTableBase.cs 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Data;
  4. using System.Data.SQLite;
  5. using System.Linq;
  6. using System.Text;
  7. using System.Threading.Tasks;
  8. namespace OTSModelSharp.DTLBase
  9. {
  10. public interface IDBTableBase
  11. {
  12. void AddColumn(ColumnDefine col);
  13. int GetColumnCount();
  14. string GetTableName();
  15. void SetTableName(string a_sTableName);
  16. //void AddColumn(string v, object sTRING);
  17. string GetColumnName(int a_nColId);
  18. string GetColumnFullName(int a_nColId);
  19. string GetColumnNames(bool a_bWithPrimary = true);
  20. string GetColumnFullNames(bool a_bWithPrimary = true);
  21. ColumnType GetColumnType(int a_nColId);
  22. string GetCreateTableCommandString();
  23. string GetDeleteTableCommandString();
  24. string GetRemoveAllRowsCommandString();
  25. string GetInsertCommandFormatString(bool a_bWithPrimary = false);
  26. KeyValuePair<string, SQLiteParameter[]> GetInsertCommand(bool a_bWithPrimary = false);
  27. string GetInsertCommandFormatString(List<int> a_colIndexes);
  28. string GetUpdateCommandFormatString(List<int> a_updateColIndexes, int a_nConditionColIndex);
  29. KeyValuePair<string, SQLiteParameter[]> GetUpdateCommand(List<int> a_updateColIndexes, int a_nConditionColIndex);
  30. }
  31. }