Reference - adamfoneil/Dapper.QX GitHub Wiki
Dapper.QX defines several attributes you can apply to properties of your query classes to control what criteria is injected at runtime.
- Case acts like a switch statement for including one of several criteria options in a query.
- Join lets you include optional join clauses in a query. Requires a {join} token in the query to indicate where optional joins are inserted.
-
Offset makes your query results pageable. Requires an {offset} token, and your query must have an
ORDER BY
clause. See Paginated Queries - OrderBy enables strong-typed order by clauses. Requires an {orderBy} token. See Dynamic Sorting
- Parameter is used to set a parameter without injecting any corresponding SQL. Used in some less common cases.
- Phrase is used to generate full text queries against a set of columns.
- Where injects the specified criteria into a query when the corresponding property is set. Use with nullable properties only.
-
Top inserts a dynamic
TOP
clause in your query. Example. Requires a{top}
token in your SQL.
Dapper.QX.PageableQuery PageableQuery.cs
- int? Page
- Task<int> GetPageCountAsync (IDbConnection connection, [ int newPageSize ])
- string Sql
- string ResolvedSql
- string DebugSql
- DynamicParameters Parameters
- string ResolveSql ([ int newPageSize ])
- string ResolveSql (DynamicParameters queryParams, [ Action setParams ], [ int newPageSize ])
- Task<IEnumerable<TResult>> ExecuteAsync (IDbConnection connection, [ IDbTransaction transaction ], [ int? commandTimeout ], [ CommandType? commandType ], [ List traces ], [ Action setParams ], [ int newPageSize ])
- Task<TResult> ExecuteSingleAsync (IDbConnection connection, [ IDbTransaction transaction ], [ int? commandTimeout ], [ CommandType? commandType ], [ List traces ], [ Action setParams ])
- Task<TResult> ExecuteSingleOrDefaultAsync (IDbConnection connection, [ IDbTransaction transaction ], [ int? commandTimeout ], [ CommandType? commandType ], [ List traces ], [ Action setParams ])
- IEnumerable<dynamic> TestExecuteHelper (IDbConnection connection)
- Task<IEnumerable<TResult>> ExecuteAsync (Func getConnection, [ int? commandTimeout ], [ CommandType? commandType ], [ List traces ], [ Action setParams ], [ int newPageSize ])
- Task<TResult> ExecuteSingleAsync (Func getConnection, [ int? commandTimeout ], [ CommandType? commandType ], [ List traces ], [ Action setParams ])
- Task<TResult> ExecuteSingleOrDefaultAsync (Func getConnection, [ int? commandTimeout ], [ CommandType? commandType ], [ List traces ], [ Action setParams ])
- IEnumerable<TResult> Execute (Func getConnection, [ int? commandTimeout ], [ CommandType? commandType ], [ List traces ], [ Action setParams ], [ int newPageSize ])
- TResult ExecuteSingle (Func getConnection, [ int? commandTimeout ], [ CommandType? commandType ], [ List traces ], [ Action setParams ])
- TResult ExecuteSingleOrDefault (Func getConnection, [ int? commandTimeout ], [ CommandType? commandType ], [ List traces ], [ Action setParams ])
- IEnumerable<TResult> Execute (IDbConnection connection, [ IDbTransaction transaction ], [ int? commandTimeout ], [ CommandType? commandType ], [ List traces ], [ Action setParams ], [ int newPageSize ])
- TResult ExecuteSingle (IDbConnection connection, [ IDbTransaction transaction ], [ int? commandTimeout ], [ CommandType? commandType ], [ List traces ], [ Action setParams ])
- TResult ExecuteSingleOrDefault (IDbConnection connection, [ IDbTransaction transaction ], [ int? commandTimeout ], [ CommandType? commandType ], [ List traces ], [ Action setParams ])