예제 #1
0
 public SubquerySourceBuilder(ISelect select,
                              IReadQueryExecutor readQueryExecutor,
                              ITableAliasGenerator tableAliasGenerator,
                              IUniqueParameterNameGenerator uniqueParameterNameGenerator,
                              CommandParameterValues parameterValues,
                              Parameters parameters,
                              ParameterDefaults parameterDefaults)
     : base(readQueryExecutor, tableAliasGenerator, uniqueParameterNameGenerator, parameterValues, parameters, parameterDefaults)
 {
     this.select = select;
 }
예제 #2
0
 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;
 }
예제 #3
0
 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;
 }
예제 #4
0
 public DeleteQueryBuilder(
     IUniqueParameterNameGenerator uniqueParameterNameGenerator,
     Action <Type, Where, CommandParameterValues, int?> executeDelete,
     IEnumerable <IWhereClause> whereClauses,
     CommandParameterValues parameterValues)
 {
     this.uniqueParameterNameGenerator = uniqueParameterNameGenerator;
     this.executeDelete   = executeDelete;
     this.whereClauses    = whereClauses;
     this.parameterValues = parameterValues;
 }
예제 #5
0
 public DeleteQueryBuilder(IRelationalTransaction relationalTransaction,
                           IUniqueParameterNameGenerator uniqueParameterNameGenerator,
                           string tableName,
                           IEnumerable <IWhereClause> whereClauses,
                           CommandParameterValues parameterValues)
 {
     this.relationalTransaction        = relationalTransaction;
     this.uniqueParameterNameGenerator = uniqueParameterNameGenerator;
     this.tableName       = tableName;
     this.whereClauses    = whereClauses;
     this.parameterValues = parameterValues;
 }
예제 #6
0
 public DeleteQueryBuilder(
     IUniqueParameterNameGenerator uniqueParameterNameGenerator,
     DataModificationQueryBuilder queryBuilder,
     IWriteQueryExecutor queryExecutor,
     IEnumerable <IWhereClause> whereClauses = null,
     CommandParameterValues parameterValues  = null)
 {
     this.uniqueParameterNameGenerator = uniqueParameterNameGenerator;
     this.queryBuilder    = queryBuilder;
     this.queryExecutor   = queryExecutor;
     this.whereClauses    = whereClauses ?? new List <IWhereClause>();
     this.parameterValues = parameterValues ?? new CommandParameterValues();
 }
예제 #7
0
 public TableSourceQueryBuilder(string tableOrViewName,
                                string schemaName,
                                IReadTransaction readQueryExecutor,
                                ITableAliasGenerator tableAliasGenerator,
                                IUniqueParameterNameGenerator uniqueParameterNameGenerator,
                                CommandParameterValues parameterValues,
                                Parameters parameters,
                                ParameterDefaults parameterDefaults)
     : base(readQueryExecutor, tableAliasGenerator, uniqueParameterNameGenerator, parameterValues, parameters, parameterDefaults)
 {
     this.schemaName      = schemaName;
     this.tableOrViewName = tableOrViewName;
 }
예제 #8
0
 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;
 }
예제 #9
0
 protected SourceQueryBuilder(IReadQueryExecutor readQueryExecutor,
                              ITableAliasGenerator tableAliasGenerator,
                              IUniqueParameterNameGenerator uniqueParameterNameGenerator,
                              CommandParameterValues parameterValues,
                              Parameters parameters,
                              ParameterDefaults parameterDefaults)
 {
     ReadQueryExecutor            = readQueryExecutor;
     TableAliasGenerator          = tableAliasGenerator;
     UniqueParameterNameGenerator = uniqueParameterNameGenerator;
     ParamValues   = parameterValues;
     Params        = parameters;
     ParamDefaults = parameterDefaults;
 }
예제 #10
0
 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;
 }
예제 #11
0
 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;
 }
예제 #12
0
 public QueryBuilder(TSelectBuilder selectBuilder,
                     IReadQueryExecutor readQueryExecutor,
                     ITableAliasGenerator tableAliasGenerator,
                     IUniqueParameterNameGenerator uniqueParameterNameGenerator,
                     CommandParameterValues paramValues,
                     Parameters @params,
                     ParameterDefaults paramDefaults)
 {
     this.selectBuilder                = selectBuilder;
     this.readQueryExecutor            = readQueryExecutor;
     this.tableAliasGenerator          = tableAliasGenerator;
     this.uniqueParameterNameGenerator = uniqueParameterNameGenerator;
     this.paramValues   = paramValues;
     this.@params       = @params;
     this.paramDefaults = paramDefaults;
 }
예제 #13
0
        protected static (IQueryBuilder <Foo> builder, (Parameters parameters, CommandParameterValues paramValues)) NewQueryBuilder(IUniqueParameterNameGenerator uniqueParameterNameGenerator = null)
        {
            var parameters = new Parameters();
            var captures   = new CommandParameterValues();
            var builder    = new QueryBuilder <Foo, TableSelectBuilder>(
                new TableSelectBuilder(new SimpleTableSource("Foo")),
                Substitute.For <IRelationalTransaction>(),
                new TableAliasGenerator(),
                uniqueParameterNameGenerator ?? CreateSubstituteParameterNameGenerator(),
                captures,
                parameters,
                new ParameterDefaults()
                );

            return(builder, (parameters, captures));
        }
예제 #14
0
 public UniqueParameter(IUniqueParameterNameGenerator parameterNameGenerator, Parameter parameter)
     : base(parameterNameGenerator.GenerateUniqueParameterName(parameter.ParameterName), parameter.DataType)
 {
 }