IAutoQueryDb
AutoQuery RDBMS APIs
Assembly: ServiceStack.Server.dll
View Source
public interface IAutoQueryDb : IAutoCrudDb
Methods
GetFromType(Type)
Resolve the source Type for this Request DTO
View Source
Type GetFromType(Type requestDtoType)
Returns
Type
Parameters
Type | Name |
---|---|
Type | requestDtoType |
GetDb(Type, IRequest)
Non-generic API to resolve the DB Connection to use for this request
View Source
IDbConnection GetDb(Type fromType, IRequest req = null)
Returns
IDbConnection
Parameters
Type | Name |
---|---|
Type | fromType |
ServiceStack.Web.IRequest | req |
GetDb<From>(IRequest)
Generic API to resolve the DB Connection to use for this request
View Source
IDbConnection GetDb<From>(IRequest req = null)
Returns
IDbConnection
Parameters
Type | Name |
---|---|
ServiceStack.Web.IRequest | req |
Type Parameters
From
GetDbNamedConnection(Type, IRequest)
Non-generic API to resolve the DB Named Connection to use for this request
View Source
string GetDbNamedConnection(Type fromType, IRequest req = null)
Returns
System.String
Parameters
Type | Name |
---|---|
Type | fromType |
ServiceStack.Web.IRequest | req |
GetTypedQuery(Type, Type)
Generate an untyped AutoQuery Query Builder
View Source
ITypedQuery GetTypedQuery(Type dtoType, Type fromType)
Returns
Parameters
Type | Name |
---|---|
Type | dtoType |
Type | fromType |
CreateQuery<From>(IQueryDb<From>, Dictionary<String, String>, IRequest, IDbConnection)
Generate a populated and Typed OrmLite SqlExpression using the same model as the source and output target
View Source
SqlExpression<From> CreateQuery<From>(IQueryDb<From> dto, Dictionary<string, string> dynamicParams, IRequest req = null, IDbConnection db = null)
Returns
ServiceStack.OrmLite.SqlExpression<T>
Parameters
Type | Name |
---|---|
ServiceStack.IQueryDb<From> | dto |
Dictionary<System.String,System.String> | dynamicParams |
ServiceStack.Web.IRequest | req |
IDbConnection | db |
Type Parameters
From
Execute<From>(IQueryDb<From>, SqlExpression<From>, IRequest, IDbConnection)
Execute an OrmLite SqlExpression using the same model as the source and output target
View Source
QueryResponse<From> Execute<From>(IQueryDb<From> model, SqlExpression<From> query, IRequest req = null, IDbConnection db = null)
Returns
Parameters
Type | Name |
---|---|
ServiceStack.IQueryDb<From> | model |
ServiceStack.OrmLite.SqlExpression<T> | query |
ServiceStack.Web.IRequest | req |
IDbConnection | db |
Type Parameters
From
ExecuteAsync<From>(IQueryDb<From>, SqlExpression<From>, IRequest, IDbConnection)
Async Execute an OrmLite SqlExpression using the same model as the source and output target
View Source
Task<QueryResponse<From>> ExecuteAsync<From>(IQueryDb<From> model, SqlExpression<From> query, IRequest req = null, IDbConnection db = null)
Returns
Task<ServiceStack.QueryResponse<<From>>>
Parameters
Type | Name |
---|---|
ServiceStack.IQueryDb<From> | model |
ServiceStack.OrmLite.SqlExpression<T> | query |
ServiceStack.Web.IRequest | req |
IDbConnection | db |
Type Parameters
From
CreateQuery<From, Into>(IQueryDb<From, Into>, Dictionary<String, String>, IRequest, IDbConnection)
Generate a populated and Typed OrmLite SqlExpression using different models for source and output target
View Source
SqlExpression<From> CreateQuery<From, Into>(IQueryDb<From, Into> dto, Dictionary<string, string> dynamicParams, IRequest req = null, IDbConnection db = null)
Returns
ServiceStack.OrmLite.SqlExpression<T>
Parameters
Type | Name |
---|---|
ServiceStack.IQueryDb<From> | dto |
Dictionary<System.String,System.String> | dynamicParams |
ServiceStack.Web.IRequest | req |
IDbConnection | db |
Type Parameters
From
Into
Execute<From, Into>(IQueryDb<From, Into>, SqlExpression<From>, IRequest, IDbConnection)
Execute an OrmLite SqlExpression using different models for source and output target
View Source
QueryResponse<Into> Execute<From, Into>(IQueryDb<From, Into> model, SqlExpression<From> query, IRequest req = null, IDbConnection db = null)
Returns
Parameters
Type | Name |
---|---|
ServiceStack.IQueryDb<From> | model |
ServiceStack.OrmLite.SqlExpression<T> | query |
ServiceStack.Web.IRequest | req |
IDbConnection | db |
Type Parameters
From
Into
ExecuteAsync<From, Into>(IQueryDb<From, Into>, SqlExpression<From>, IRequest, IDbConnection)
Async Execute an OrmLite SqlExpression using different models for source and output target
View Source
Task<QueryResponse<Into>> ExecuteAsync<From, Into>(IQueryDb<From, Into> model, SqlExpression<From> query, IRequest req = null, IDbConnection db = null)
Returns
Task<ServiceStack.QueryResponse<<Into>>>
Parameters
Type | Name |
---|---|
ServiceStack.IQueryDb<From> | model |
ServiceStack.OrmLite.SqlExpression<T> | query |
ServiceStack.Web.IRequest | req |
IDbConnection | db |
Type Parameters
From
Into
CreateQuery(IQueryDb, Dictionary<String, String>, IRequest, IDbConnection)
Generate a populated untyped ISqlExpression from an untyped AutoQuery Request
View Source
ISqlExpression CreateQuery(IQueryDb dto, Dictionary<string, string> dynamicParams, IRequest req, IDbConnection db)
Returns
ServiceStack.OrmLite.ISqlExpression
Parameters
Type | Name |
---|---|
ServiceStack.IQueryDb | dto |
Dictionary<System.String,System.String> | dynamicParams |
ServiceStack.Web.IRequest | req |
IDbConnection | db |
Execute(IQueryDb, ISqlExpression, IDbConnection)
Execute an untyped ISqlExpression
View Source
IQueryResponse Execute(IQueryDb request, ISqlExpression q, IDbConnection db)
Returns
Parameters
Type | Name |
---|---|
ServiceStack.IQueryDb | request |
ServiceStack.OrmLite.ISqlExpression | q |
IDbConnection | db |
ExecuteAsync(IQueryDb, ISqlExpression, IDbConnection)
Async Execute an untyped ISqlExpression
View Source
Task<IQueryResponse> ExecuteAsync(IQueryDb request, ISqlExpression q, IDbConnection db)
Returns
Task<ServiceStack.IQueryResponse>
Parameters
Type | Name |
---|---|
ServiceStack.IQueryDb | request |
ServiceStack.OrmLite.ISqlExpression | q |
IDbConnection | db |