コード例 #1
0
        internal void Init(
            SqlSelectClause select,
            SqlFromClause from,
            SqlWhereClause where,
            SqlGroupByClause groupBy,
            SqlWhereClause having,
            SqlOrderByClause orderBy,
            List <SqlUnion> unions,
            SelectQuery parentSelect,
            bool parameterDependent)
        {
            Select               = select;
            From                 = from;
            Where                = where;
            GroupBy              = groupBy;
            Having               = having;
            OrderBy              = orderBy;
            _unions              = unions;
            ParentSelect         = parentSelect;
            IsParameterDependent = parameterDependent;

            foreach (var col in select.Columns)
            {
                col.Parent = this;
            }

            Select.SetSqlQuery(this);
            From.SetSqlQuery(this);
            Where.SetSqlQuery(this);
            GroupBy.SetSqlQuery(this);
            Having.SetSqlQuery(this);
            OrderBy.SetSqlQuery(this);
        }
コード例 #2
0
        internal void Init(
            SqlSelectClause select,
            SqlFromClause from,
            SqlWhereClause where,
            SqlGroupByClause groupBy,
            SqlWhereClause having,
            SqlOrderByClause orderBy,
            List <SqlSetOperator>?setOperators,
            List <ISqlExpression[]>?uniqueKeys,
            SelectQuery?parentSelect,
            bool parameterDependent,
            string?queryName,
            bool doNotSetAliases)
        {
            Select               = select;
            From                 = from;
            Where                = where;
            GroupBy              = groupBy;
            Having               = having;
            OrderBy              = orderBy;
            _setOperators        = setOperators;
            ParentSelect         = parentSelect;
            IsParameterDependent = parameterDependent;
            QueryName            = queryName;
            DoNotSetAliases      = doNotSetAliases;

            if (uniqueKeys != null)
            {
                UniqueKeys.AddRange(uniqueKeys);
            }

            foreach (var col in select.Columns)
            {
                col.Parent = this;
            }

            Select.SetSqlQuery(this);
            From.SetSqlQuery(this);
            Where.SetSqlQuery(this);
            GroupBy.SetSqlQuery(this);
            Having.SetSqlQuery(this);
            OrderBy.SetSqlQuery(this);
        }
コード例 #3
0
ファイル: SelectQuery.cs プロジェクト: stsrki/linq2db
        internal void Init(
            SqlInsertClause insert,
            SqlUpdateClause update,
            SqlDeleteClause delete,
            SqlSelectClause select,
            SqlFromClause from,
            SqlWhereClause where,
            SqlGroupByClause groupBy,
            SqlWhereClause having,
            SqlOrderByClause orderBy,
            List <SqlUnion> unions,
            SelectQuery parentSelect,
            bool parameterDependent,
            List <SqlParameter> parameters)
        {
            _insert              = insert;
            _update              = update;
            _delete              = delete;
            Select               = select;
            _from                = from;
            _where               = where;
            _groupBy             = groupBy;
            _having              = having;
            _orderBy             = orderBy;
            _unions              = unions;
            ParentSelect         = parentSelect;
            IsParameterDependent = parameterDependent;

            Parameters.AddRange(parameters);

            foreach (var col in select.Columns)
            {
                col.Parent = this;
            }

            Select.SetSqlQuery(this);
            _from.SetSqlQuery(this);
            _where.SetSqlQuery(this);
            _groupBy.SetSqlQuery(this);
            _having.SetSqlQuery(this);
            _orderBy.SetSqlQuery(this);
        }