Skip to content

QueryWithParams class

namespace: Serenity.Data   assembly: Serenity.Net.Services

Base class for queries with params like SqlQuery, SqlUpdate, SqlInsert.

public class QueryWithParams : IQueryWithParams

Public Members

name description
QueryWithParams() Initializes a new instance of the QueryWithParams class.
DebugText { get; } Gets the debug text.
HasAutoParams { get; } Gets a value indicating whether any automatically named parameters were generated for this query or one of the queries sharing its parameter storage. Derived from the auto param counter, so no separate tracking state is needed. Note that this may still return false before the query is rendered (e.g. via ToString()), as auto parameters only materialize at render time.
IsDialectOverridden { get; } Gets a value indicating whether the dialect is overridden.
IsFrozen { get; } Gets a value indicating whether this query or one of its parents has been frozen.
IsParamsFrozen { get; } Gets a value indicating whether parameters have been frozen.
ParamCount { get; } Gets the parameter count.
Params { get; } Gets the parameters.
Parent { get; } Gets access to parent query if any.
AddParam(…) Adds the parameter.
AutoParam() Creates an automatically named parameter.
CreateSubQuery<TQuery>() Creates a new query that shares parameter storage and dialect with this query tree.
Dialect() Gets the dialect (SQL server type / version) for query.
HasAlias(…) Gets a value indicating whether this query tree has an alias registered.
SetParam(…) Sets the parameter.

Protected Members

name description
cachedToString The cached SQL string and the dialect it was formatted with.
dialect The dialect.
dialectOverridden Is the dialect overridden.
nextAutoParam The next auto param counter.
parameters The parameters.
parent The parent query with param storage.
BeforeModify() Invalidates this query's cached SQL and that of its parent query.
CloneAliasExpressionsTo(…) Copies this query's local alias expressions to another query.
CloneParams(…) Clones the parameters into a target query.
GetAliasExpression(…) Gets the source expression registered for an alias.
GetCachedToString(…) Gets the cached SQL string, regenerating it when this query tree's dialect changes.
ResetAliasExpressions(…) Clears the alias expressions registered in this query. If localOnly is false, clears the alias expressions in the root query.
SetAliasExpression(…) Sets the source expression for an alias.
SetDialect(…) Sets the dialect for this query tree, propagating the change to its root.

See Also