public ISqlExpressionBuilder Join(SqlJoinTypes type, Table table, string on, IEnumerable <string> columns,
                                   IEnumerable <IDbDataParameter> parameters)
 {
     Join(type, table, on, columns);
     BindParameters(parameters);
     return(this);
 }
예제 #2
0
 public StatementJoin(SqlJoinTypes joinType, Table table, string on)
     : base(SqlExpressionTypes.Join)
 {
     JoinType = joinType;
     Table    = table;
     On       = on;
 }
 public ISqlExpressionBuilder Join(SqlJoinTypes type, Table table, string on, IEnumerable <string> columns)
 {
     Join(type, table, on);
     if (columns != null)
     {
         _AddColumnsToSelect(columns, table);
     }
     return(this);
 }
 public ISqlExpressionBuilder Join(SqlJoinTypes type, Compare <ColumnExpression, ColumnExpression> on,
                                   IEnumerable <string> columns)
 {
     if (columns != null)
     {
         _AddColumnsToSelect(columns, on.Expected.Table);
     }
     Join(type, on);
     return(this);
 }
        public ISqlExpressionBuilder Join(SqlJoinTypes type, Compare <ColumnExpression, ColumnExpression> on)
        {
            if (!_IsTablePresent(on.Actual.Table))
            {
                throw new InvalidOperationException(
                          "The referenced table you want to add does not exist in this context. " +
                          "The actual column has to be the first parameter, to check the context correctly");
            }

            _stmtJoin.Add(new StatementJoin(type, on));
            return(this);
        }
예제 #6
0
 /// <summary>
 /// Связывание таблиц.
 /// </summary>
 /// <param name="name">Имя таблицы с которой связываемся</param>
 /// <param name="conditional">Условия связывания</param>
 /// <param name="type">Тип связывания</param>
 /// <returns>Объект для создания строки запроса</returns>
 public Select Join(string name, string conditional, SqlJoinTypes type)
 {
     _collectionJoin.Add(new JoinObj(name, conditional, type));
     return(this);
 }
예제 #7
0
 public JoinObj(string name, string conditional, SqlJoinTypes type)
 {
     _name        = name;
     _conditional = conditional;
     _type        = type;
 }
예제 #8
0
 public StatementJoin(SqlJoinTypes joinType, Compare <ColumnExpression, ColumnExpression> comparer)
     : this(joinType, comparer.Expected.Table, comparer.ToString())
 {
 }
 public ISqlExpressionBuilder Join(SqlJoinTypes type, string table, string alias, string on)
 {
     Join(type, new Table(table, alias), on);
     return(this);
 }
 public ISqlExpressionBuilder Join(SqlJoinTypes type, Table table, string on)
 {
     _SetParameters(_ParseParameters(on));
     _stmtJoin.Add(new StatementJoin(type, table, on));
     return(this);
 }