AutoQuery
Assembly: ServiceStack.Server.dll
View Source
Declaration
public class AutoQuery : object, IAutoQueryDb, IAutoCrudDb, IAutoQueryOptions
Properties
IgnoreCrudProperties
View Source
Declaration
public static HashSet<string> IgnoreCrudProperties { get; }
IncludeCrudProperties
View Source
Declaration
public static HashSet<string> IncludeCrudProperties { get; set; }
MaxLimit
View Source
Declaration
public int? MaxLimit { get; set; }
IncludeTotal
View Source
Declaration
public bool IncludeTotal { get; set; }
EnableUntypedQueries
View Source
Declaration
public bool EnableUntypedQueries { get; set; }
EnableSqlFilters
View Source
Declaration
public bool EnableSqlFilters { get; set; }
OrderByPrimaryKeyOnLimitQuery
View Source
Declaration
public bool OrderByPrimaryKeyOnLimitQuery { get; set; }
RequiredRoleForRawSqlFilters
View Source
Declaration
public string RequiredRoleForRawSqlFilters { get; set; }
IgnoreProperties
View Source
Declaration
public HashSet<string> IgnoreProperties { get; set; }
IllegalSqlFragmentTokens
View Source
Declaration
public HashSet<string> IllegalSqlFragmentTokens { get; set; }
StartsWithConventions
View Source
Declaration
public Dictionary<string, QueryDbFieldAttribute> StartsWithConventions { get; set; }
EndsWithConventions
View Source
Declaration
public Dictionary<string, QueryDbFieldAttribute> EndsWithConventions { get; set; }
UseNamedConnection
View Source
Declaration
public string UseNamedConnection { get; set; }
GlobalQueryFilter
View Source
Declaration
public QueryFilterDelegate GlobalQueryFilter { get; set; }
QueryFilters
View Source
Declaration
public Dictionary<Type, QueryFilterDelegate> QueryFilters { get; set; }
ResponseFilters
View Source
Declaration
public List<Action<QueryDbFilterContext>> ResponseFilters { get; set; }
Methods
Create<Table>(ICreateDb<Table>, IRequest, IDbConnection)
View Source
Declaration
public object Create<Table>(ICreateDb<Table> dto, IRequest req, IDbConnection db = null)
Returns
System.Object
Parameters
Type | Name |
---|---|
ServiceStack.ICreateDb<Table> | dto |
ServiceStack.Web.IRequest | req |
IDbConnection | db |
Type Parameters
Table
CreateAsync<Table>(ICreateDb<Table>, IRequest, IDbConnection)
View Source
Declaration
public async Task<object> CreateAsync<Table>(ICreateDb<Table> dto, IRequest req, IDbConnection db = null)
Returns
Task<System.Object>
Parameters
Type | Name |
---|---|
ServiceStack.ICreateDb<Table> | dto |
ServiceStack.Web.IRequest | req |
IDbConnection | db |
Type Parameters
Table
Update<Table>(IUpdateDb<Table>, IRequest, IDbConnection)
View Source
Declaration
public object Update<Table>(IUpdateDb<Table> dto, IRequest req, IDbConnection db = null)
Returns
System.Object
Parameters
Type | Name |
---|---|
ServiceStack.IUpdateDb<Table> | dto |
ServiceStack.Web.IRequest | req |
IDbConnection | db |
Type Parameters
Table
UpdateAsync<Table>(IUpdateDb<Table>, IRequest, IDbConnection)
View Source
Declaration
public Task<object> UpdateAsync<Table>(IUpdateDb<Table> dto, IRequest req, IDbConnection db = null)
Returns
Task<System.Object>
Parameters
Type | Name |
---|---|
ServiceStack.IUpdateDb<Table> | dto |
ServiceStack.Web.IRequest | req |
IDbConnection | db |
Type Parameters
Table
Patch<Table>(IPatchDb<Table>, IRequest, IDbConnection)
View Source
Declaration
public object Patch<Table>(IPatchDb<Table> dto, IRequest req, IDbConnection db = null)
Returns
System.Object
Parameters
Type | Name |
---|---|
ServiceStack.IPatchDb<Table> | dto |
ServiceStack.Web.IRequest | req |
IDbConnection | db |
Type Parameters
Table
PatchAsync<Table>(IPatchDb<Table>, IRequest, IDbConnection)
View Source
Declaration
public Task<object> PatchAsync<Table>(IPatchDb<Table> dto, IRequest req, IDbConnection db = null)
Returns
Task<System.Object>
Parameters
Type | Name |
---|---|
ServiceStack.IPatchDb<Table> | dto |
ServiceStack.Web.IRequest | req |
IDbConnection | db |
Type Parameters
Table
PartialUpdate<Table>(Object, IRequest, IDbConnection)
View Source
Declaration
public object PartialUpdate<Table>(object dto, IRequest req, IDbConnection db = null)
Returns
System.Object
Parameters
Type | Name |
---|---|
System.Object | dto |
ServiceStack.Web.IRequest | req |
IDbConnection | db |
Type Parameters
Table
PartialUpdateAsync<Table>(Object, IRequest, IDbConnection)
View Source
Declaration
public Task<object> PartialUpdateAsync<Table>(object dto, IRequest req, IDbConnection db = null)
Returns
Task<System.Object>
Parameters
Type | Name |
---|---|
System.Object | dto |
ServiceStack.Web.IRequest | req |
IDbConnection | db |
Type Parameters
Table
Delete<Table>(IDeleteDb<Table>, IRequest, IDbConnection)
View Source
Declaration
public object Delete<Table>(IDeleteDb<Table> dto, IRequest req, IDbConnection db = null)
Returns
System.Object
Parameters
Type | Name |
---|---|
ServiceStack.IDeleteDb<Table> | dto |
ServiceStack.Web.IRequest | req |
IDbConnection | db |
Type Parameters
Table
DeleteAsync<Table>(IDeleteDb<Table>, IRequest, IDbConnection)
View Source
Declaration
public async Task<object> DeleteAsync<Table>(IDeleteDb<Table> dto, IRequest req, IDbConnection db = null)
Returns
Task<System.Object>
Parameters
Type | Name |
---|---|
ServiceStack.IDeleteDb<Table> | dto |
ServiceStack.Web.IRequest | req |
IDbConnection | db |
Type Parameters
Table
Save<Table>(ISaveDb<Table>, IRequest, IDbConnection)
View Source
Declaration
public object Save<Table>(ISaveDb<Table> dto, IRequest req, IDbConnection db = null)
Returns
System.Object
Parameters
Type | Name |
---|---|
ServiceStack.ISaveDb<Table> | dto |
ServiceStack.Web.IRequest | req |
IDbConnection | db |
Type Parameters
Table
SaveAsync<Table>(ISaveDb<Table>, IRequest, IDbConnection)
View Source
Declaration
public async Task<object> SaveAsync<Table>(ISaveDb<Table> dto, IRequest req, IDbConnection db = null)
Returns
Task<System.Object>
Parameters
Type | Name |
---|---|
ServiceStack.ISaveDb<Table> | dto |
ServiceStack.Web.IRequest | req |
IDbConnection | db |
Type Parameters
Table
GetFromType(Type)
View Source
Declaration
public Type GetFromType(Type requestDtoType)
Returns
Type
Parameters
Type | Name |
---|---|
Type | requestDtoType |
GetTypedQuery(Type, Type)
View Source
Declaration
public ITypedQuery GetTypedQuery(Type dtoType, Type fromType)
Returns
Parameters
Type | Name |
---|---|
Type | dtoType |
Type | fromType |
Filter<From>(ISqlExpression, IQueryDb, IRequest)
View Source
Declaration
public SqlExpression<From> Filter<From>(ISqlExpression q, IQueryDb dto, IRequest req)
Returns
ServiceStack.OrmLite.SqlExpression<T>
Parameters
Type | Name |
---|---|
ServiceStack.OrmLite.ISqlExpression | q |
ServiceStack.IQueryDb | dto |
ServiceStack.Web.IRequest | req |
Type Parameters
From
Filter(ISqlExpression, IQueryDb, IRequest)
View Source
Declaration
public ISqlExpression Filter(ISqlExpression q, IQueryDb dto, IRequest req)
Returns
ServiceStack.OrmLite.ISqlExpression
Parameters
Type | Name |
---|---|
ServiceStack.OrmLite.ISqlExpression | q |
ServiceStack.IQueryDb | dto |
ServiceStack.Web.IRequest | req |
ResponseFilter<From, Into>(IDbConnection, QueryResponse<Into>, SqlExpression<From>, IQueryDb)
View Source
Declaration
public QueryResponse<Into> ResponseFilter<From, Into>(IDbConnection db, QueryResponse<Into> response, SqlExpression<From> expr, IQueryDb dto)
Returns
Parameters
Type | Name |
---|---|
IDbConnection | db |
ServiceStack.QueryResponse<T> | response |
ServiceStack.OrmLite.SqlExpression<T> | expr |
ServiceStack.IQueryDb | dto |
Type Parameters
From
Into
GetDbNamedConnection(Type, IRequest)
View Source
Declaration
public string GetDbNamedConnection(Type fromType, IRequest req = null)
Returns
System.String
Parameters
Type | Name |
---|---|
Type | fromType |
ServiceStack.Web.IRequest | req |
GetDb<From>(IRequest)
View Source
Declaration
public IDbConnection GetDb<From>(IRequest req = null)
Returns
IDbConnection
Parameters
Type | Name |
---|---|
ServiceStack.Web.IRequest | req |
Type Parameters
From
GetDb(Type, IRequest)
View Source
Declaration
public IDbConnection GetDb(Type fromType, IRequest req = null)
Returns
IDbConnection
Parameters
Type | Name |
---|---|
Type | fromType |
ServiceStack.Web.IRequest | req |
CreateQuery<From>(IQueryDb<From>, Dictionary<String, String>, IRequest, IDbConnection)
View Source
Declaration
public 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)
View Source
Declaration
public 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)
View Source
Declaration
public async 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)
View Source
Declaration
public 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)
View Source
Declaration
public 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)
View Source
Declaration
public async 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)
View Source
Declaration
public ISqlExpression CreateQuery(IQueryDb requestDto, Dictionary<string, string> dynamicParams, IRequest req = null, IDbConnection db = null)
Returns
ServiceStack.OrmLite.ISqlExpression
Parameters
Type | Name |
---|---|
ServiceStack.IQueryDb | requestDto |
Dictionary<System.String,System.String> | dynamicParams |
ServiceStack.Web.IRequest | req |
IDbConnection | db |
Execute(IQueryDb, ISqlExpression, IDbConnection)
View Source
Declaration
public 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)
View Source
Declaration
public 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 |