You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

66 lines
2.0 KiB

4 years ago
4 years ago
3 years ago
3 years ago
4 years ago
  1. using Apewer;
  2. using System;
  3. using System.Collections.Generic;
  4. using System.Data;
  5. namespace Apewer.Source
  6. {
  7. /// <summary>查询数据表。</summary>
  8. public interface IQuery : IDisposable, IToJson
  9. {
  10. #region 结果集的属性。
  11. /// <summary>语句执行成功。</summary>
  12. bool Success { get; }
  13. /// <summary>消息。</summary>
  14. string Message { get; }
  15. /// <summary>获取默认结果表。如果设置默认结果表,会丢失设置前的所有结果表。</summary>
  16. DataTable Table { get; }
  17. /// <summary>默认表中的数据总行数。</summary>
  18. int Rows { get; }
  19. /// <summary>默认表中的数据总列数。</summary>
  20. int Columns { get; }
  21. #endregion
  22. #region 读取 DateTime 对象。
  23. /// <summary>获取默认表中第 0 行、第 0 列的单元格内容。</summary>
  24. object Value();
  25. /// <summary>获取默认表中指定行中第 0 列的内容。</summary>
  26. /// <param name="rowIndex">行索引,从 0 开始。</param>
  27. object Value(int rowIndex);
  28. /// <summary>获取默认表中第 0 行指定列的内容。</summary>
  29. /// <param name="columnName">列名称/字段名称,此名称不区分大小写。</param>
  30. object Value(string columnName);
  31. /// <summary>获取默认表中指定单元的内容。</summary>
  32. /// <param name="rowIndex">行索引,从 0 开始。</param>
  33. /// <param name="columnIndex">列索引,从 0 开始。</param>
  34. object Value(int rowIndex, int columnIndex);
  35. /// <summary>获取默认表中指定单元的内容。</summary>
  36. /// <param name="rowIndex">行索引,从 0 开始。</param>
  37. /// <param name="columnName">列名称/字段名称,此名称不区分大小写。</param>
  38. object Value(int rowIndex, string columnName);
  39. #endregion
  40. #region 模型化。
  41. /// <summary>转换为模型数组。</summary>
  42. ObjectSet[] ToArray();
  43. #endregion
  44. }
  45. }