예제 #1
0
 /// <summary>
 /// Query the rows from the database by batch in an asynchronous way.
 /// </summary>
 /// <param name="page">The page of the batch to be used. This is a zero-based index (the first page is 0).</param>
 /// <param name="rowsPerBatch">The number of data per batch to be returned.</param>
 /// <param name="orderBy">The order definition of the fields to be used.</param>
 /// <param name="hints">The table hints to be used.</param>
 /// <param name="transaction">The transaction to be used.</param>
 /// <returns>An enumerable list of data entity objects.</returns>
 public Task <IEnumerable <TEntity> > BatchQueryAsync(int page,
                                                      int rowsPerBatch,
                                                      IEnumerable <OrderField> orderBy,
                                                      string hints = null,
                                                      IDbTransaction transaction = null)
 {
     return(DbRepository.BatchQueryAsync <TEntity>(page: page,
                                                   rowsPerBatch: rowsPerBatch,
                                                   orderBy: orderBy,
                                                   hints: hints,
                                                   transaction: transaction));
 }
예제 #2
0
 /// <summary>
 /// Query the rows from the database by batch in an asynchronous way.
 /// </summary>
 /// <param name="page">The page of the batch to be used. This is a zero-based index (the first page is 0).</param>
 /// <param name="rowsPerBatch">The number of data per batch to be returned.</param>
 /// <param name="orderBy">The order definition of the fields to be used.</param>
 /// <param name="where">The query expression to be used.</param>
 /// <param name="fields">The list of <see cref="Field"/> objects to be used.</param>
 /// <param name="hints">The table hints to be used.</param>
 /// <param name="transaction">The transaction to be used.</param>
 /// <returns>An enumerable list of data entity objects.</returns>
 public Task <IEnumerable <TEntity> > BatchQueryAsync(int page,
                                                      int rowsPerBatch,
                                                      IEnumerable <OrderField> orderBy,
                                                      Expression <Func <TEntity, bool> > where = null,
                                                      IEnumerable <Field> fields = null,
                                                      string hints = null,
                                                      IDbTransaction transaction = null)
 {
     return(DbRepository.BatchQueryAsync <TEntity>(page: page,
                                                   rowsPerBatch: rowsPerBatch,
                                                   orderBy: orderBy,
                                                   where : where,
                                                   fields: fields,
                                                   hints: hints,
                                                   transaction: transaction));
 }
예제 #3
0
 /// <summary>
 /// Query the rows from the database by batch in an asynchronous way.
 /// </summary>
 /// <param name="tableName">The name of the target table.</param>
 /// <param name="page">The page of the batch to be used. This is a zero-based index (the first page is 0).</param>
 /// <param name="rowsPerBatch">The number of data per batch to be returned.</param>
 /// <param name="orderBy">The order definition of the fields to be used.</param>
 /// <param name="where">The query expression to be used.</param>
 /// <param name="fields">The list of <see cref="Field"/> objects to be used.</param>
 /// <param name="hints">The table hints to be used.</param>
 /// <param name="transaction">The transaction to be used.</param>
 /// <returns>An enumerable list of data entity objects.</returns>
 public Task <IEnumerable <TEntity> > BatchQueryAsync(string tableName,
                                                      int page,
                                                      int rowsPerBatch,
                                                      IEnumerable <OrderField> orderBy,
                                                      QueryGroup where           = null,
                                                      string hints               = null,
                                                      IEnumerable <Field> fields = null,
                                                      IDbTransaction transaction = null)
 {
     return(DbRepository.BatchQueryAsync <TEntity>(tableName: tableName,
                                                   page: page,
                                                   rowsPerBatch: rowsPerBatch,
                                                   orderBy: orderBy,
                                                   where : where,
                                                   fields: fields,
                                                   hints: hints,
                                                   transaction: transaction));
 }