コード例 #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;
 }
コード例 #2
0
ファイル: DefaultQuery.cs プロジェクト: xxxcodexxx/yessql
 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));
 }
コード例 #3
0
ファイル: DefaultQuery.cs プロジェクト: xxxcodexxx/yessql
 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);
 }
コード例 #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);
        }
コード例 #5
0
 public DefaultQuery(IDbConnection connection, IDbTransaction transaction, Session session, string tablePrefix)
 {
     _session    = session;
     _dialect    = session.Store.Dialect;
     _queryState = new QueryState(_dialect.CreateBuilder(tablePrefix));
 }