crelte / queries / QueryVar
Class: QueryVar<T>
Type Parameters
T
T = any
Constructors
Constructor
ts
new QueryVar<T>(): QueryVar<T>;Returns
QueryVar<T>
Methods
__QueryVar__()
ts
__QueryVar__(): void;Returns
void
default()
ts
default(value): QueryVar<T>;Parameters
value
T
Returns
QueryVar<T>
id()
ts
id(): QueryVar<number>;Returns
QueryVar<number>
ids()
ts
ids(): QueryVar<number[]>;Returns
QueryVar<number[]>
nullable()
ts
nullable(): QueryVar<T | null>;Returns
QueryVar<T | null>
number()
ts
number(): QueryVar<number>;Returns
QueryVar<number>
string()
ts
string(): QueryVar<string>;Returns
QueryVar<string>
validIf()
ts
validIf(fn): QueryVar<T>;Set a validation function for this variable
If the value is allowed to be null and it is null valid will not be called.
Parameters
fn
ValidIf<T>
Returns
QueryVar<T>
validValue()
ts
validValue(v, cs): T | null;Parameters
v
any
cs
Returns
T | null