public override IJoinSourceQueryBuilder <TRecord> Join(IAliasedSelectSource source, JoinType joinType, CommandParameterValues parameterValues, Parameters parameters, ParameterDefaults parameterDefaults) { if (clauses.Count == 0) { throw new InvalidOperationException("Must have at least one 'ON' clause per join"); } intermediateJoins.Add(new Join(clauses.ToList(), joinSource, type)); clauses = new List <JoinClause>(); joinSource = source; type = joinType; var commandParameterValues = new CommandParameterValues(ParamValues, parameterValues); var combinedParameters = new Parameters(Params, parameters); var combinedParameterDefaults = new ParameterDefaults(ParamDefaults, parameterDefaults); ParamValues.Clear(); ParamValues.AddRange(commandParameterValues); Params.Clear(); Params.AddRange(combinedParameters); ParamDefaults.Clear(); ParamDefaults.AddRange(combinedParameterDefaults); return(this); }
public void AddRange(ParameterDefaults defaults) { foreach (var def in defaults) { Add(def); } }
public SubquerySourceBuilder(ISelect select, IRelationalTransaction relationalTransaction, ITableAliasGenerator tableAliasGenerator, IUniqueParameterNameGenerator uniqueParameterNameGenerator, CommandParameterValues parameterValues, Parameters parameters, ParameterDefaults parameterDefaults) : base(relationalTransaction, tableAliasGenerator, uniqueParameterNameGenerator, parameterValues, parameters, parameterDefaults) { this.select = select; }
public TableSourceQueryBuilder(string tableOrViewName, IRelationalTransaction relationalTransaction, ITableAliasGenerator tableAliasGenerator, IUniqueParameterNameGenerator uniqueParameterNameGenerator, CommandParameterValues parameterValues, Parameters parameters, ParameterDefaults parameterDefaults) : base(relationalTransaction, tableAliasGenerator, uniqueParameterNameGenerator, parameterValues, parameters, parameterDefaults) { this.tableOrViewName = tableOrViewName; }
protected SourceQueryBuilder(IRelationalTransaction relationalTransaction, ITableAliasGenerator tableAliasGenerator, IUniqueParameterNameGenerator uniqueParameterNameGenerator, CommandParameterValues parameterValues, Parameters parameters, ParameterDefaults parameterDefaults) { RelationalTransaction = relationalTransaction; TableAliasGenerator = tableAliasGenerator; UniqueParameterNameGenerator = uniqueParameterNameGenerator; ParamValues = parameterValues; Params = parameters; ParamDefaults = parameterDefaults; }
public QueryBuilder(TSelectBuilder selectBuilder, IRelationalTransaction transaction, ITableAliasGenerator tableAliasGenerator, IUniqueParameterNameGenerator uniqueParameterNameGenerator, CommandParameterValues paramValues, Parameters @params, ParameterDefaults paramDefaults) { this.selectBuilder = selectBuilder; this.transaction = transaction; this.tableAliasGenerator = tableAliasGenerator; this.uniqueParameterNameGenerator = uniqueParameterNameGenerator; this.paramValues = paramValues; this.@params = @params; this.paramDefaults = paramDefaults; }
public JoinSourceQueryBuilder(IAliasedSelectSource originalSource, JoinType joinType, IAliasedSelectSource nextJoin, IRelationalTransaction relationalTransaction, ITableAliasGenerator tableAliasGenerator, IUniqueParameterNameGenerator uniqueParameterNameGenerator, CommandParameterValues parameterValues, Parameters parameters, ParameterDefaults parameterDefaults) : base(relationalTransaction, tableAliasGenerator, uniqueParameterNameGenerator, parameterValues, parameters, parameterDefaults) { this.originalSource = originalSource; clauses = new List <JoinClause>(); joinSource = nextJoin; type = joinType; }
public IJoinSourceQueryBuilder <TRecord> Join(IAliasedSelectSource source, JoinType joinType, CommandParameterValues parameterValues, Parameters parameters, ParameterDefaults parameterDefaults) { var subquery = new SubquerySource(selectBuilder.GenerateSelectWithoutDefaultOrderBy(), tableAliasGenerator.GenerateTableAlias()); return(new JoinSourceQueryBuilder <TRecord>(subquery, joinType, source, transaction, tableAliasGenerator, uniqueParameterNameGenerator, new CommandParameterValues(ParameterValues, parameterValues), new Parameters(Parameters, parameters), new ParameterDefaults(ParameterDefaults, parameterDefaults))); }
public override IJoinSourceQueryBuilder <TRecord> Join(IAliasedSelectSource source, JoinType joinType, CommandParameterValues parameterValues, Parameters parameters, ParameterDefaults parameterDefaults) { return(new JoinSourceQueryBuilder <TRecord>(AsSource(), joinType, source, RelationalTransaction, TableAliasGenerator, UniqueParameterNameGenerator, new CommandParameterValues(ParamValues, parameterValues), new Parameters(Params, parameters), new ParameterDefaults(ParamDefaults, parameterDefaults))); }
public abstract IJoinSourceQueryBuilder <TRecord> Join(IAliasedSelectSource source, JoinType joinType, CommandParameterValues parameterValues, Parameters parameters, ParameterDefaults parameterDefaults);
public ParameterDefaults(ParameterDefaults parameterDefaults) { AddRange(parameterDefaults); }