예제 #1
0
        public MultiQueryImpl(ISessionImplementor session)
        {
            IDriver driver = session.Factory.ConnectionProvider.Driver;

            dialect           = session.Factory.Dialect;
            resultSetsCommand = driver.GetResultSetsCommand(session);
            this.session      = session;
        }
예제 #2
0
        /// <summary>
        /// Initializes a new instance of the <see cref="MultiCriteriaImpl"/> class.
        /// </summary>
        /// <param name="session">The session.</param>
        /// <param name="factory">The factory.</param>
        internal MultiCriteriaImpl(SessionImpl session, ISessionFactoryImplementor factory)
        {
            IDriver driver = session.Factory.ConnectionProvider.Driver;

            dialect           = session.Factory.Dialect;
            resultSetsCommand = driver.GetResultSetsCommand(session);
            this.session      = session;
            this.factory      = factory;
        }
예제 #3
0
 private void CombineQueries(IResultSetsCommand resultSetsCommand)
 {
     foreach (var multiSource in _queries)
     {
         foreach (var cmd in multiSource.GetCommands())
         {
             resultSetsCommand.Append(cmd);
         }
     }
 }
예제 #4
0
 private void CombineQueries(IResultSetsCommand resultSetsCommand)
 {
     foreach (var query in _queries)
     {
         foreach (var cmd in query.GetCommands())
         {
             resultSetsCommand.Append(cmd);
         }
     }
 }
예제 #5
0
 private async Task CombineQueriesAsync(IResultSetsCommand resultSetsCommand, CancellationToken cancellationToken)
 {
     cancellationToken.ThrowIfCancellationRequested();
     foreach (var multiSource in _queries)
     {
         foreach (var cmd in await(multiSource.GetCommandsAsync(cancellationToken)).ConfigureAwait(false))
         {
             resultSetsCommand.Append(cmd);
         }
     }
 }