Exemplo n.º 1
0
 public DefaultQuery(IDbConnection connection, IDbTransaction transaction, Session session, string tablePrefix, QueryState queryState, object compiledQuery)
 {
     _queryState    = queryState;
     _compiledQuery = compiledQuery;
     _session       = session;
     _dialect       = session.Store.Dialect;
 }
Exemplo n.º 2
0
 public DefaultQuery(IDbConnection connection, IDbTransaction transaction, Session session, string tablePrefix)
 {
     _connection  = connection;
     _transaction = transaction;
     _session     = session;
     _dialect     = SqlDialectFactory.For(connection);
     _queryState  = new QueryState(_dialect.CreateBuilder(tablePrefix));
 }
Exemplo n.º 3
0
 public DefaultQuery(IDbConnection connection, IDbTransaction transaction, Session session, string tablePrefix, QueryState queryState, object compiledQuery)
 {
     _queryState    = queryState;
     _compiledQuery = compiledQuery;
     _connection    = connection;
     _transaction   = transaction;
     _session       = session;
     _dialect       = SqlDialectFactory.For(connection);
 }
Exemplo n.º 4
0
        public QueryState Clone()
        {
            var clone = new QueryState(_sqlBuilder.Clone());

            clone._bound             = new List <Type>(_bound);
            clone._lastParameterName = _lastParameterName;
            clone._parameterBindings = _parameterBindings == null ? null : new List <Action <object, ISqlBuilder> >(_parameterBindings);
            clone._builder           = new StringBuilder(_builder.ToString());

            // Clear previous paging if any
            clone._sqlBuilder.ClearTrail();
            clone._sqlBuilder.Skip(null);
            clone._sqlBuilder.Take(null);

            return(clone);
        }
Exemplo n.º 5
0
 public DefaultQuery(IDbConnection connection, IDbTransaction transaction, Session session, string tablePrefix)
 {
     _session    = session;
     _dialect    = session.Store.Dialect;
     _queryState = new QueryState(_dialect.CreateBuilder(tablePrefix));
 }