Skip to main content

IAutoQueryDb

AutoQuery RDBMS APIs

Assembly: ServiceStack.Server.dll
View Source
Declaration
public interface IAutoQueryDb : IAutoCrudDb

Methods

GetFromType(Type)

Resolve the source Type for this Request DTO

View Source
Declaration
Type GetFromType(Type requestDtoType)
Returns

Type

Parameters
TypeName
TyperequestDtoType

GetDb(Type, IRequest)

Non-generic API to resolve the DB Connection to use for this request

View Source
Declaration
IDbConnection GetDb(Type fromType, IRequest req = null)
Returns

IDbConnection

Parameters
TypeName
TypefromType
ServiceStack.Web.IRequestreq

GetDb<From>(IRequest)

Generic API to resolve the DB Connection to use for this request

View Source
Declaration
IDbConnection GetDb<From>(IRequest req = null)
Returns

IDbConnection

Parameters
TypeName
ServiceStack.Web.IRequestreq
Type Parameters
  • From

GetDbNamedConnection(Type, IRequest)

Non-generic API to resolve the DB Named Connection to use for this request

View Source
Declaration
string GetDbNamedConnection(Type fromType, IRequest req = null)
Returns

System.String

Parameters
TypeName
TypefromType
ServiceStack.Web.IRequestreq

GetTypedQuery(Type, Type)

Generate an untyped AutoQuery Query Builder

View Source
Declaration
ITypedQuery GetTypedQuery(Type dtoType, Type fromType)
Returns

ServiceStack.ITypedQuery

Parameters
TypeName
TypedtoType
TypefromType

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
Declaration
SqlExpression<From> CreateQuery<From>(IQueryDb<From> dto, Dictionary<string, string> dynamicParams, IRequest req = null, IDbConnection db = null)
Returns

ServiceStack.OrmLite.SqlExpression<T>

Parameters
TypeName
ServiceStack.IQueryDb<From>dto
Dictionary<System.String,System.String>dynamicParams
ServiceStack.Web.IRequestreq
IDbConnectiondb
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
Declaration
QueryResponse<From> Execute<From>(IQueryDb<From> model, SqlExpression<From> query, IRequest req = null, IDbConnection db = null)
Returns

ServiceStack.QueryResponse<T>

Parameters
TypeName
ServiceStack.IQueryDb<From>model
ServiceStack.OrmLite.SqlExpression<T>query
ServiceStack.Web.IRequestreq
IDbConnectiondb
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
Declaration
Task<QueryResponse<From>> ExecuteAsync<From>(IQueryDb<From> model, SqlExpression<From> query, IRequest req = null, IDbConnection db = null)
Returns

Task<ServiceStack.QueryResponse<<From>>>

Parameters
TypeName
ServiceStack.IQueryDb<From>model
ServiceStack.OrmLite.SqlExpression<T>query
ServiceStack.Web.IRequestreq
IDbConnectiondb
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
Declaration
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
TypeName
ServiceStack.IQueryDb<From>dto
Dictionary<System.String,System.String>dynamicParams
ServiceStack.Web.IRequestreq
IDbConnectiondb
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
Declaration
QueryResponse<Into> Execute<From, Into>(IQueryDb<From, Into> model, SqlExpression<From> query, IRequest req = null, IDbConnection db = null)
Returns

ServiceStack.QueryResponse<T>

Parameters
TypeName
ServiceStack.IQueryDb<From>model
ServiceStack.OrmLite.SqlExpression<T>query
ServiceStack.Web.IRequestreq
IDbConnectiondb
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
Declaration
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
TypeName
ServiceStack.IQueryDb<From>model
ServiceStack.OrmLite.SqlExpression<T>query
ServiceStack.Web.IRequestreq
IDbConnectiondb
Type Parameters
  • From
  • Into

CreateQuery(IQueryDb, Dictionary<String, String>, IRequest, IDbConnection)

Generate a populated untyped ISqlExpression from an untyped AutoQuery Request

View Source
Declaration
ISqlExpression CreateQuery(IQueryDb dto, Dictionary<string, string> dynamicParams, IRequest req, IDbConnection db)
Returns

ServiceStack.OrmLite.ISqlExpression

Parameters
TypeName
ServiceStack.IQueryDbdto
Dictionary<System.String,System.String>dynamicParams
ServiceStack.Web.IRequestreq
IDbConnectiondb

Execute(IQueryDb, ISqlExpression, IDbConnection)

Execute an untyped ISqlExpression

View Source
Declaration
IQueryResponse Execute(IQueryDb request, ISqlExpression q, IDbConnection db)
Returns

ServiceStack.IQueryResponse

Parameters
TypeName
ServiceStack.IQueryDbrequest
ServiceStack.OrmLite.ISqlExpressionq
IDbConnectiondb

ExecuteAsync(IQueryDb, ISqlExpression, IDbConnection)

Async Execute an untyped ISqlExpression

View Source
Declaration
Task<IQueryResponse> ExecuteAsync(IQueryDb request, ISqlExpression q, IDbConnection db)
Returns

Task<ServiceStack.IQueryResponse>

Parameters
TypeName
ServiceStack.IQueryDbrequest
ServiceStack.OrmLite.ISqlExpressionq
IDbConnectiondb