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

            dialect           = session.Factory.Dialect;
            resultSetsCommand = driver.GetResultSetsCommand(session);
            this.session      = session;
        }
Exemple #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;
        }
 private void CombineQueries(IResultSetsCommand resultSetsCommand)
 {
     foreach (var multiSource in _queries)
     {
         foreach (var cmd in multiSource.GetCommands())
         {
             resultSetsCommand.Append(cmd);
         }
     }
 }
Exemple #4
0
 private void CombineQueries(IResultSetsCommand resultSetsCommand)
 {
     foreach (var query in _queries)
     {
         foreach (var cmd in query.GetCommands())
         {
             resultSetsCommand.Append(cmd);
         }
     }
 }
 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);
         }
     }
 }