Esempio n. 1
0
 public QueryArgs(string table, string tag, string id)
 {
     this.TableName = table;
     this.Condition = new NullCondtion();
     this.TagName   = tag;
     this.IDName    = id;
 }
Esempio n. 2
0
 public QueryArgs(string table, ParadoxCondition condition, string tag, string id)
 {
     this.TableName = table;
     this.Condition = condition;
     this.TagName   = tag;
     this.IDName    = id;
 }
Esempio n. 3
0
 public QueryArgs(string table)
 {
     this.TableName = table;
     this.Condition = new NullCondtion();
     this.TagName   = "";
     this.IDName    = "";
 }
Esempio n. 4
0
        /// <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
        }
Esempio n. 5
0
 /// <summary>
 /// 获取数据库游标
 /// </summary>
 /// <param name="tableName">要查询的数据库表名称</param>
 /// <param name="where">数据库查询条件</param>
 /// <returns></returns>
 public ParadoxDataReader ExecuteQuery(string tableName, ParadoxCondition where)
 {
     return(ExecuteQuery(tableName, where, true));
 }