Exemple #1
0
 public QueryArgs(string table, string tag, string id)
 {
     this.TableName = table;
     this.Condition = new NullCondtion();
     this.TagName   = tag;
     this.IDName    = id;
 }
Exemple #2
0
 public QueryArgs(string table, ParadoxCondition condition, string tag, string id)
 {
     this.TableName = table;
     this.Condition = condition;
     this.TagName   = tag;
     this.IDName    = id;
 }
Exemple #3
0
 public QueryArgs(string table)
 {
     this.TableName = table;
     this.Condition = new NullCondtion();
     this.TagName   = "";
     this.IDName    = "";
 }
        /// <summary>
        /// 获取数据库游标
        /// </summary>
        /// <param name="tableName">要查询的数据库表名称</param>
        /// <param name="where">数据库查询条件</param>
        /// <param name="useIndex">是否使用数据库索引</param>
        /// <returns></returns>
        public ParadoxDataReader ExecuteQuery(string tableName, ParadoxCondition where, bool useIndex)
        {
            var table = GetParadoxTable(tableName);
            IEnumerable <ParadoxRecord> qry = null;

            if (useIndex)
            {
                var index = table.PrimaryKeyIndex; // index
                qry = index.Enumerate(where);      // query
            }
            else
            {
                qry = table.Enumerate(where);          // query
            }
            return(new ParadoxDataReader(table, qry)); // reader
        }
 /// <summary>
 /// 获取数据库游标
 /// </summary>
 /// <param name="tableName">要查询的数据库表名称</param>
 /// <param name="where">数据库查询条件</param>
 /// <returns></returns>
 public ParadoxDataReader ExecuteQuery(string tableName, ParadoxCondition where)
 {
     return(ExecuteQuery(tableName, where, true));
 }