示例#1
0
        public UpdateQuery(Type type)
        {
            fieldValues = new Dictionary<string, object>(StringComparer.Ordinal);
            conditions = new QueryCondition();

            table = DataFieldAttribute.GetTable(type);
        }
示例#2
0
        public UpdateQuery(string tableName)
        {
            fieldValues = new Dictionary<string, object>(StringComparer.Ordinal);
            conditions = new QueryCondition();

            table = tableName;
        }
示例#3
0
        public TableJoin(JoinTypes type, string joinTable, string table, string joinField, string tableField)
        {
            conditions = new QueryCondition();

            Type = type;
            JoinTable = joinTable;
            Table = table;
            JoinField = joinField;
            TableField = tableField;

            AddCondition(new DataField(joinTable, joinField).ToString(), new DataField(table, tableField));
        }
示例#4
0
        public TableJoin(JoinTypes type, DataField joinField, DataField tableField)
        {
            conditions = new QueryCondition();

            Type = type;
            JoinTable = joinField.Table;
            JoinField = joinField.Name;
            Table = tableField.Table;
            TableField = tableField.Name;

            AddCondition(joinField.ToString(), tableField);
        }
示例#5
0
        public DeleteQuery(Type type)
        {
            conditions = new QueryCondition();

            table = DataFieldAttribute.GetTable(type);
        }
示例#6
0
        public DeleteQuery(string tableName)
        {
            conditions = new QueryCondition();

            table = tableName;
        }
示例#7
0
        public QueryCondition AddCondition(ConditionRelations relation, string field, ConditionEquality equality, object value)
        {
            QueryCondition condition = new QueryCondition(field, equality, value);

            conditions.Add(new KeyValuePair<QueryCondition, ConditionRelations>(condition, relation));

            return condition;
        }
示例#8
0
 public TableSort(SortOrder order, DataField field, QueryCondition sortLast)
 {
     Order = order;
     Field = field.ToString();
     SortLast = sortLast;
 }
示例#9
0
 public TableSort(SortOrder order, string field, QueryCondition sortLast)
 {
     Order = order;
     Field = field;
     SortLast = sortLast;
 }
示例#10
0
 public void AddSort(SortOrder order, QueryCondition lastSort)
 {
     sorts.Add(new TableSort(order, string.Empty, lastSort));
 }
示例#11
0
        internal SelectQuery(Type type, QueryStub stub)
        {
            this.stub = stub;

            tables = new List<string>(4);
            fields = new List<string>(64);
            groupings = new List<string>(2);
            conditions = new QueryCondition();
            joins = new List<TableJoin>(4);
            sorts = new List<TableSort>(4);

            tables.Add(DataFieldAttribute.GetTable(type));
        }
示例#12
0
        public SelectQuery(Type type)
        {
            tables = new List<string>(4);
            fields = new List<string>(64);
            groupings = new List<string>(2);
            conditions = new QueryCondition();
            joins = new List<TableJoin>(4);
            sorts = new List<TableSort>(4);

            tables.Add(DataFieldAttribute.GetTable(type));
        }
示例#13
0
        public SelectQuery(string baseTableName)
        {
            tables = new List<string>(4);
            fields = new List<string>(64);
            groupings = new List<string>(2);
            conditions = new QueryCondition();
            joins = new List<TableJoin>(4);
            sorts = new List<TableSort>(4);

            tables.Add(baseTableName);
        }