egon-orm-workspace / egon-orm / Col
Interface: Col<T> ​
Defined in: core/src/query/expr.ts:1359
A column of a binding: u.email. Query bindings hold one per field, made once per schema and alias.
Example ​
const email = new Col<string>("u", meta(User).fieldsByName.get("email"));Extends ​
Type Parameters ​
T ​
T
Properties ​
~expr ​
readonly "~expr": object;Defined in: core/src/query/expr.ts:567
Type information only; there is no such property at run time. params is a function type so that P is contravariant: see SomeParams.
params ​
readonly params: (params) => void;Parameters ​
params ​
P
Returns ​
void
type ​
readonly type: T;Inherited from ​
binding ​
readonly binding: string;Defined in: core/src/query/expr.ts:1361
The alias of the binding.
fieldMeta ​
readonly fieldMeta: FieldMeta;Defined in: core/src/query/expr.ts:1363
The field the column belongs to. (Not field, which is the method that reads a field of an embed.)
lists ​
readonly lists: readonly number[];Defined in: core/src/query/expr.ts:577
The lengths of the lists of node, in canonical order.
Inherited from ​
named ​
readonly named: readonly NamedParamNode[];Defined in: core/src/query/expr.ts:579
The named parameters of node, in canonical order (a name may repeat).
Inherited from ​
node ​
readonly node: ExprNode;Defined in: core/src/query/expr.ts:569
The AST node.
Inherited from ​
params ​
readonly params: readonly unknown[];Defined in: core/src/query/expr.ts:575
The bound values of node, in canonical order.
Inherited from ​
redact ​
readonly redact: boolean;Defined in: core/src/query/expr.ts:573
Whether a value compared with or assigned to this expression is hidden from logs.
Inherited from ​
shape ​
readonly shape: number;Defined in: core/src/query/expr.ts:581
The structural hash of node (shapeOf(node)).
Inherited from ​
type ​
readonly type: AnyFieldType | undefined;Defined in: core/src/query/expr.ts:571
The type the value is loaded with when it is selected, when one is known.
Inherited from ​
Methods ​
add() ​
add<S, O, X>(this, other): Expr<Numeric<S> | NullOf<S> | NullOf<ValueOf<O>>, Simplify<NoParams & ParamsOf<O>>>;Defined in: core/src/query/expr.ts:991
+. The result is read as the wider of the two operands' types (integer < bigint < decimal < float; a plain value takes this operand's type) and is nullable when either side is. The same holds for sub, mul and div; mod keeps this operand's type.
Type Parameters ​
S ​
S extends number | bigint | null
O ​
O extends number | bigint | Expr<S | null, never>
X ​
X extends Expr<S, never>
Parameters ​
this ​
X & Expr<S, never>
other ​
O & ([ValueOf<O>] extends [null] ? object : unknown) & Compatible<NoParams, O> & Calculable<X, O>
Returns ​
Expr<Numeric<S> | NullOf<S> | NullOf<ValueOf<O>>, Simplify<NoParams & ParamsOf<O>>>
Example ​
u.loginCount.add(1);Throws ​
QueryError when given null or undefined.
Inherited from ​
and() ​
and<O>(this, other): Expr<boolean, Simplify<NoParams & ParamsOf<O>>>;Defined in: core/src/query/expr.ts:841
AND. Chained calls make one flat a AND b AND c.
Type Parameters ​
O ​
O extends BoolOperand
Parameters ​
this ​
Expr<boolean | null, never>
other ​
O & ([ValueOf<O>] extends [null] ? object : unknown) & Compatible<NoParams, O>
Returns ​
Expr<boolean, Simplify<NoParams & ParamsOf<O>>>
Example ​
u.age.gte(18).and(u.role.eq("admin"));Throws ​
QueryError when given anything but a boolean or a boolean expression.
Inherited from ​
append() ​
append<S, O>(this, element): Expr<NonNullable<S>, Simplify<NoParams & ParamsOf<O>>>;Defined in: core/src/query/expr.ts:1173
array_append(array, element): the array with element added at the end. Appending to a null array gives a one-element array. For bulk updates: .set(({ p }) => ({ tagList: p.tagList.append("ts") })).
Type Parameters ​
S ​
S extends readonly unknown[] | null
O ​
O extends | { } | Expr<ElementOf<S> | null, never> | null
Parameters ​
this ​
Expr<S, never>
element ​
O & Compatible<NoParams, O>
Returns ​
Expr<NonNullable<S>, Simplify<NoParams & ParamsOf<O>>>
Example ​
p.tagList.append("ts");Throws ​
QueryError when given undefined.
Inherited from ​
as() ​
as<U>(): Expr<U, NoParams>;Defined in: core/src/query/expr.ts:1299
Gives the expression another TypeScript type. No SQL: it is an assertion, so it is only as right as you make it.
Type Parameters ​
U ​
U
Returns ​
Example ​
fragment`lower(${u.email})`.as<string>();Inherited from ​
asc() ​
asc(): OrderExpr<NoParams>;Defined in: core/src/query/expr.ts:1313
Ascending order (ASC).
Returns ​
Example ​
u.name.asc().nullsLast();Inherited from ​
between() ​
between<S, L, H>(
this,
low,
high
): Expr<boolean, Simplify<NoParams & Simplify<ParamsOf<L> & ParamsOf<H>>>>;Defined in: core/src/query/expr.ts:724
BETWEEN low AND high, both ends included.
Type Parameters ​
S ​
S extends AnyExpr
L ​
L extends | { } | Expr<T | null, never>
H ​
H extends | { } | Expr<T | null, never>
Parameters ​
this ​
S
low ​
L & ([ValueOf<L>] extends [null] ? object : unknown) & Compatible<NoParams, L> & Comparable<S, L>
high ​
H & ([ValueOf<H>] extends [null] ? object : unknown) & Compatible<Simplify<NoParams & ParamsOf<L>>, H> & Comparable<S, H>
Returns ​
Expr<boolean, Simplify<NoParams & Simplify<ParamsOf<L> & ParamsOf<H>>>>
Example ​
u.age.between(18, 65);Throws ​
QueryError when either end is null or undefined.
Inherited from ​
cast() ​
cast<S, U, F>(this, type): Expr<CastResult<S, U>, NoParams>;Defined in: core/src/query/expr.ts:1274
CAST(x AS type), where type is a field type: t.integer(), t.string(). The result is loaded with that type. A nullable operand gives a nullable result.
Type Parameters ​
S ​
S
U ​
U
F ​
F extends FieldFlags
Parameters ​
this ​
Expr<S, never>
type ​
FieldBuilder<U, F>
Returns ​
Expr<CastResult<S, U>, NoParams>
Example ​
u.age.cast(t.string());
sum(p.views).cast(t.bigint());Throws ​
QueryError when type is not a field type.
Inherited from ​
concat() ​
concat<S, A>(this, ...parts): Expr<string | NullOf<S> | NullOf<ValueOf<A[number]>>, Simplify<NoParams & ParamsOfAll<A>>>;Defined in: core/src/query/expr.ts:940
||: text joined together. null anywhere makes the result null.
Type Parameters ​
S ​
S extends string | null
A ​
A extends readonly TextOperand[]
Parameters ​
this ​
Expr<S, never>
parts ​
...A & CompatibleParams<NoParams, ParamsOfAll<A>>
Returns ​
Expr<string | NullOf<S> | NullOf<ValueOf<A[number]>>, Simplify<NoParams & ParamsOfAll<A>>>
Example ​
u.firstName.concat(" ", u.lastName);Throws ​
QueryError when a part is null or undefined, or no part is given.
Inherited from ​
containedBy() ​
containedBy<O>(this, values): Expr<boolean, Simplify<NoParams & ParamsOf<O>>>;Defined in: core/src/query/expr.ts:1110
<@: every element of the array is in values.
Type Parameters ​
O ​
O extends | { } | Expr<T | null, never>
Parameters ​
this ​
Expr<readonly unknown[] | null, never>
values ​
O & ([ValueOf<O>] extends [null] ? object : unknown) & Compatible<NoParams, O>
Returns ​
Expr<boolean, Simplify<NoParams & ParamsOf<O>>>
Example ​
p.tagList.containedBy(["ts", "sql"]);Throws ​
QueryError when given null or undefined.
Inherited from ​
contains() ​
contains<O>(this, values): Expr<boolean, Simplify<NoParams & ParamsOf<O>>>;Defined in: core/src/query/expr.ts:1093
@>: the array holds every element of values.
Type Parameters ​
O ​
O extends | { } | Expr<T | null, never>
Parameters ​
this ​
Expr<readonly unknown[] | null, never>
values ​
O & ([ValueOf<O>] extends [null] ? object : unknown) & Compatible<NoParams, O>
Returns ​
Expr<boolean, Simplify<NoParams & ParamsOf<O>>>
Example ​
p.tagList.contains(["ts"]);Throws ​
QueryError when given null or undefined.
Inherited from ​
desc() ​
desc(): OrderExpr<NoParams>;Defined in: core/src/query/expr.ts:1332
Descending order (DESC).
Returns ​
Example ​
u.createdAt.desc().nullsLast();Inherited from ​
div() ​
div<S, O, X>(this, other): Expr<Numeric<S> | NullOf<S> | NullOf<ValueOf<O>>, Simplify<NoParams & ParamsOf<O>>>;Defined in: core/src/query/expr.ts:1043
/. Two integers divide as integers, truncating towards zero, on every database (on MySQL, whose / gives a decimal, it is written DIV).
Type Parameters ​
S ​
S extends number | bigint | null
O ​
O extends number | bigint | Expr<S | null, never>
X ​
X extends Expr<S, never>
Parameters ​
this ​
X & Expr<S, never>
other ​
O & ([ValueOf<O>] extends [null] ? object : unknown) & Compatible<NoParams, O> & Calculable<X, O>
Returns ​
Expr<Numeric<S> | NullOf<S> | NullOf<ValueOf<O>>, Simplify<NoParams & ParamsOf<O>>>
Example ​
p.views.div(2);Throws ​
QueryError when given null or undefined.
Inherited from ​
eq() ​
eq<S, O>(this, other): Expr<boolean, Simplify<NoParams & ParamsOf<O>>>;Defined in: core/src/query/expr.ts:622
=. A value becomes a bound parameter with this expression's type. null is refused: use isNull.
Type Parameters ​
S ​
S extends AnyExpr
O ​
O extends | { } | Expr<T | null, never>
Parameters ​
this ​
S
other ​
O & ([ValueOf<O>] extends [null] ? object : unknown) & Compatible<NoParams, O> & Comparable<S, O>
Returns ​
Expr<boolean, Simplify<NoParams & ParamsOf<O>>>
Example ​
u.email.eq("ada@example.com");Throws ​
QueryError when given null or undefined.
Inherited from ​
field() ​
field<S, K>(this, name): Expr<EmbedFieldValue<S, K>, NoParams>;Defined in: core/src/query/expr.ts:1253
A field of an embedded row, typed from the embedded schema: u.address.field("city") is an Expr<string>. It reads the field's JSON key (#>>, cast to the field's type where that is not text; #> for a nested embed or JSON field, so that field can be chained). The key is a bound parameter. A row stored without the key gives null.
Type Parameters ​
S ​
S
K ​
K extends string
Parameters ​
this ​
EmbedExpr<S>
name ​
K & { [K in string | number | symbol]-?: NonNullable<S>[K] extends (args: never[]) => unknown ? never : NonNullable<NonNullable<S>[K]> extends readonly unknown[] | Uint8Array<ArrayBufferLike> ? never : K }[keyof NonNullable<S>] & string
Returns ​
Expr<EmbedFieldValue<S, K>, NoParams>
Example ​
from(User, "u").where(({ u }) => u.address.field("city").eq("Oslo"));Throws ​
QueryError when the expression is not of an embed of one row, or the embedded schema has no stored field name.
Inherited from ​
gt() ​
gt<S, O>(this, other): Expr<boolean, Simplify<NoParams & ParamsOf<O>>>;Defined in: core/src/query/expr.ts:656
>.
Type Parameters ​
S ​
S extends AnyExpr
O ​
O extends | { } | Expr<T | null, never>
Parameters ​
this ​
S
other ​
O & ([ValueOf<O>] extends [null] ? object : unknown) & Compatible<NoParams, O> & Comparable<S, O>
Returns ​
Expr<boolean, Simplify<NoParams & ParamsOf<O>>>
Example ​
u.age.gt(17);Throws ​
QueryError when given null or undefined.
Inherited from ​
gte() ​
gte<S, O>(this, other): Expr<boolean, Simplify<NoParams & ParamsOf<O>>>;Defined in: core/src/query/expr.ts:673
>=.
Type Parameters ​
S ​
S extends AnyExpr
O ​
O extends | { } | Expr<T | null, never>
Parameters ​
this ​
S
other ​
O & ([ValueOf<O>] extends [null] ? object : unknown) & Compatible<NoParams, O> & Comparable<S, O>
Returns ​
Expr<boolean, Simplify<NoParams & ParamsOf<O>>>
Example ​
u.age.gte(18);Throws ​
QueryError when given null or undefined.
Inherited from ​
has() ​
has<S, O>(this, element): Expr<boolean, Simplify<NoParams & ParamsOf<O>>>;Defined in: core/src/query/expr.ts:1144
element = ANY(array): the array holds element.
Type Parameters ​
S ​
S extends readonly unknown[] | null
O ​
O extends | { } | Expr<ElementOf<S> | null, never>
Parameters ​
this ​
Expr<S, never>
element ​
O & ([ValueOf<O>] extends [null] ? object : unknown) & Compatible<NoParams, O>
Returns ​
Expr<boolean, Simplify<NoParams & ParamsOf<O>>>
Example ​
p.tagList.has("ts");Throws ​
QueryError when given null or undefined.
Inherited from ​
ilike() ​
ilike<O>(this, pattern): Expr<boolean, Simplify<NoParams & ParamsOf<O>>>;Defined in: core/src/query/expr.ts:923
ILIKE: LIKE ignoring case.
Type Parameters ​
O ​
O extends TextOperand
Parameters ​
this ​
Expr<string | null, never>
pattern ​
O & ([ValueOf<O>] extends [null] ? object : unknown) & Compatible<NoParams, O>
Returns ​
Expr<boolean, Simplify<NoParams & ParamsOf<O>>>
Example ​
u.name.ilike("%ann%");Throws ​
QueryError when given null or undefined.
Inherited from ​
in() ​
in<S, O>(this, values): Expr<boolean, Simplify<NoParams & ParamsOf<O>>>;Defined in: core/src/query/expr.ts:754
= ANY($1) (or IN (…)): one bound list, a column or expression of array type, or a query. An empty list is false, without a parameter.
Type Parameters ​
S ​
S extends AnyExpr
O ​
O extends InOperand<T>
Parameters ​
this ​
S
values ​
O & ([ValueOf<O>] extends [null] ? object : unknown) & Compatible<NoParams, O> & Comparable<S, O extends readonly E[] ? E : O>
Returns ​
Expr<boolean, Simplify<NoParams & ParamsOf<O>>>
Example ​
u.role.in(["admin", "member"]);Throws ​
QueryError when the list holds null or undefined, or the argument is not a list, an expression or a query.
Inherited from ​
isDistinctFrom() ​
isDistinctFrom<S, O>(this, other): Expr<boolean, Simplify<NoParams & ParamsOf<O>>>;Defined in: core/src/query/expr.ts:812
IS DISTINCT FROM: inequality that treats null as a value, so null is accepted.
Type Parameters ​
S ​
S extends AnyExpr
O ​
O extends | { } | Expr<T | null, never> | null
Parameters ​
this ​
S
other ​
O & Compatible<NoParams, O> & Comparable<S, O>
Returns ​
Expr<boolean, Simplify<NoParams & ParamsOf<O>>>
Example ​
u.name.isDistinctFrom(u.email);Throws ​
QueryError when given undefined.
Inherited from ​
isNotNull() ​
isNotNull(): Expr<boolean, NoParams>;Defined in: core/src/query/expr.ts:798
IS NOT NULL.
Returns ​
Example ​
u.name.isNotNull();Inherited from ​
isNull() ​
isNull(): Expr<boolean, NoParams>;Defined in: core/src/query/expr.ts:786
IS NULL.
Returns ​
Example ​
u.name.isNull();Inherited from ​
like() ​
like<O>(this, pattern): Expr<boolean, Simplify<NoParams & ParamsOf<O>>>;Defined in: core/src/query/expr.ts:889
LIKE: % matches any run of characters, _ one character.
Type Parameters ​
O ​
O extends TextOperand
Parameters ​
this ​
Expr<string | null, never>
pattern ​
O & ([ValueOf<O>] extends [null] ? object : unknown) & Compatible<NoParams, O>
Returns ​
Expr<boolean, Simplify<NoParams & ParamsOf<O>>>
Example ​
u.email.like("%@example.com");Throws ​
QueryError when given null or undefined.
Inherited from ​
lower() ​
lower<S>(this): Expr<string | NullOf<S>, NoParams>;Defined in: core/src/query/expr.ts:961
lower(x).
Type Parameters ​
S ​
S extends string | null
Parameters ​
this ​
Expr<S, never>
Returns ​
Expr<string | NullOf<S>, NoParams>
Example ​
u.email.lower().eq("ada@example.com");Inherited from ​
lt() ​
lt<S, O>(this, other): Expr<boolean, Simplify<NoParams & ParamsOf<O>>>;Defined in: core/src/query/expr.ts:690
<.
Type Parameters ​
S ​
S extends AnyExpr
O ​
O extends | { } | Expr<T | null, never>
Parameters ​
this ​
S
other ​
O & ([ValueOf<O>] extends [null] ? object : unknown) & Compatible<NoParams, O> & Comparable<S, O>
Returns ​
Expr<boolean, Simplify<NoParams & ParamsOf<O>>>
Example ​
p.createdAt.lt(new Date());Throws ​
QueryError when given null or undefined.
Inherited from ​
lte() ​
lte<S, O>(this, other): Expr<boolean, Simplify<NoParams & ParamsOf<O>>>;Defined in: core/src/query/expr.ts:707
<=.
Type Parameters ​
S ​
S extends AnyExpr
O ​
O extends | { } | Expr<T | null, never>
Parameters ​
this ​
S
other ​
O & ([ValueOf<O>] extends [null] ? object : unknown) & Compatible<NoParams, O> & Comparable<S, O>
Returns ​
Expr<boolean, Simplify<NoParams & ParamsOf<O>>>
Example ​
u.age.lte(65);Throws ​
QueryError when given null or undefined.
Inherited from ​
mod() ​
mod<S, O, X>(this, other): Expr<Numeric<S> | NullOf<S> | NullOf<ValueOf<O>>, Simplify<NoParams & ParamsOf<O>>>;Defined in: core/src/query/expr.ts:1060
%: the remainder.
Type Parameters ​
S ​
S extends number | bigint | null
O ​
O extends number | bigint | Expr<S | null, never>
X ​
X extends Expr<S, never>
Parameters ​
this ​
X & Expr<S, never>
other ​
O & ([ValueOf<O>] extends [null] ? object : unknown) & Compatible<NoParams, O> & Calculable<X, O>
Returns ​
Expr<Numeric<S> | NullOf<S> | NullOf<ValueOf<O>>, Simplify<NoParams & ParamsOf<O>>>
Example ​
u.id.mod(2).eq(0);Throws ​
QueryError when given null or undefined.
Inherited from ​
mul() ​
mul<S, O, X>(this, other): Expr<Numeric<S> | NullOf<S> | NullOf<ValueOf<O>>, Simplify<NoParams & ParamsOf<O>>>;Defined in: core/src/query/expr.ts:1025
*.
Type Parameters ​
S ​
S extends number | bigint | null
O ​
O extends number | bigint | Expr<S | null, never>
X ​
X extends Expr<S, never>
Parameters ​
this ​
X & Expr<S, never>
other ​
O & ([ValueOf<O>] extends [null] ? object : unknown) & Compatible<NoParams, O> & Calculable<X, O>
Returns ​
Expr<Numeric<S> | NullOf<S> | NullOf<ValueOf<O>>, Simplify<NoParams & ParamsOf<O>>>
Example ​
p.views.mul(2);Throws ​
QueryError when given null or undefined.
Inherited from ​
neg() ​
neg<S, X>(this): Expr<Numeric<S> | NullOf<S>, NoParams>;Defined in: core/src/query/expr.ts:1075
Unary -.
Type Parameters ​
S ​
S extends number | bigint | null
X ​
X extends Expr<S, never>
Parameters ​
this ​
X & Expr<S, never> & Negatable<X>
Returns ​
Expr<Numeric<S> | NullOf<S>, NoParams>
Example ​
p.views.neg();Inherited from ​
neq() ​
neq<S, O>(this, other): Expr<boolean, Simplify<NoParams & ParamsOf<O>>>;Defined in: core/src/query/expr.ts:639
<>.
Type Parameters ​
S ​
S extends AnyExpr
O ​
O extends | { } | Expr<T | null, never>
Parameters ​
this ​
S
other ​
O & ([ValueOf<O>] extends [null] ? object : unknown) & Compatible<NoParams, O> & Comparable<S, O>
Returns ​
Expr<boolean, Simplify<NoParams & ParamsOf<O>>>
Example ​
u.role.neq("admin");Throws ​
QueryError when given null or undefined.
Inherited from ​
not() ​
not(this): Expr<boolean, NoParams>;Defined in: core/src/query/expr.ts:873
NOT.
Parameters ​
this ​
Expr<boolean | null, never>
Returns ​
Example ​
p.published.not();Inherited from ​
notIn() ​
notIn<S, O>(this, values): Expr<boolean, Simplify<NoParams & ParamsOf<O>>>;Defined in: core/src/query/expr.ts:771
The negation of in. An empty list is true.
Type Parameters ​
S ​
S extends AnyExpr
O ​
O extends InOperand<T>
Parameters ​
this ​
S
values ​
O & ([ValueOf<O>] extends [null] ? object : unknown) & Compatible<NoParams, O> & Comparable<S, O extends readonly E[] ? E : O>
Returns ​
Expr<boolean, Simplify<NoParams & ParamsOf<O>>>
Example ​
u.role.notIn(["admin"]);Throws ​
QueryError when the list holds null or undefined, or the argument is not a list, an expression or a query.
Inherited from ​
notLike() ​
notLike<O>(this, pattern): Expr<boolean, Simplify<NoParams & ParamsOf<O>>>;Defined in: core/src/query/expr.ts:906
NOT LIKE.
Type Parameters ​
O ​
O extends TextOperand
Parameters ​
this ​
Expr<string | null, never>
pattern ​
O & ([ValueOf<O>] extends [null] ? object : unknown) & Compatible<NoParams, O>
Returns ​
Expr<boolean, Simplify<NoParams & ParamsOf<O>>>
Example ​
u.email.notLike("%@example.com");Throws ​
QueryError when given null or undefined.
Inherited from ​
or() ​
or<O>(this, other): Expr<boolean, Simplify<NoParams & ParamsOf<O>>>;Defined in: core/src/query/expr.ts:858
OR. Chained calls make one flat a OR b OR c.
Type Parameters ​
O ​
O extends BoolOperand
Parameters ​
this ​
Expr<boolean | null, never>
other ​
O & ([ValueOf<O>] extends [null] ? object : unknown) & Compatible<NoParams, O>
Returns ​
Expr<boolean, Simplify<NoParams & ParamsOf<O>>>
Example ​
u.role.eq("admin").or(u.age.gte(65));Throws ​
QueryError when given anything but a boolean or a boolean expression.
Inherited from ​
overlaps() ​
overlaps<O>(this, values): Expr<boolean, Simplify<NoParams & ParamsOf<O>>>;Defined in: core/src/query/expr.ts:1127
&&: the arrays share an element.
Type Parameters ​
O ​
O extends | { } | Expr<T | null, never>
Parameters ​
this ​
Expr<readonly unknown[] | null, never>
values ​
O & ([ValueOf<O>] extends [null] ? object : unknown) & Compatible<NoParams, O>
Returns ​
Expr<boolean, Simplify<NoParams & ParamsOf<O>>>
Example ​
p.tagList.overlaps(["ts", "sql"]);Throws ​
QueryError when given null or undefined.
Inherited from ​
path() ​
path(this, ...keys): Expr<unknown, NoParams>;Defined in: core/src/query/expr.ts:1220
#>: the JSON value at a path of keys (and array indexes). Each key is a bound parameter. The result is JSON of unknown shape: give it a type with cast or as.
Parameters ​
this ​
JsonExpr<T>
keys ​
...readonly [JsonKey, JsonKey]
Returns ​
Example ​
u.settings.path("theme");
u.settings.path("limits", 0).cast(t.integer());Throws ​
QueryError when no key is given, a key is not a string or a whole number, or the expression has a known type that is not JSON.
Inherited from ​
pathText() ​
pathText(this, ...keys): Expr<string | null, NoParams>;Defined in: core/src/query/expr.ts:1235
#>>: the value at a path of keys, as text (null when there is nothing there).
Parameters ​
this ​
JsonExpr<T>
keys ​
...readonly [JsonKey, JsonKey]
Returns ​
Example ​
u.settings.pathText("theme").eq("dark");Throws ​
QueryError when no key is given, a key is not a string or a whole number, or the expression has a known type that is not JSON.
Inherited from ​
remove() ​
remove<S, O>(this, element): Expr<S, Simplify<NoParams & ParamsOf<O>>>;Defined in: core/src/query/expr.ts:1194
array_remove(array, element): the array without any element equal to element.
Type Parameters ​
S ​
S extends readonly unknown[] | null
O ​
O extends | { } | Expr<ElementOf<S> | null, never> | null
Parameters ​
this ​
Expr<S, never>
element ​
O & Compatible<NoParams, O>
Returns ​
Expr<S, Simplify<NoParams & ParamsOf<O>>>
Example ​
p.tagList.remove("draft");Throws ​
QueryError when given undefined.
Inherited from ​
sub() ​
sub<S, O, X>(this, other): Expr<Numeric<S> | NullOf<S> | NullOf<ValueOf<O>>, Simplify<NoParams & ParamsOf<O>>>;Defined in: core/src/query/expr.ts:1008
-.
Type Parameters ​
S ​
S extends number | bigint | null
O ​
O extends number | bigint | Expr<S | null, never>
X ​
X extends Expr<S, never>
Parameters ​
this ​
X & Expr<S, never>
other ​
O & ([ValueOf<O>] extends [null] ? object : unknown) & Compatible<NoParams, O> & Calculable<X, O>
Returns ​
Expr<Numeric<S> | NullOf<S> | NullOf<ValueOf<O>>, Simplify<NoParams & ParamsOf<O>>>
Example ​
p.views.sub(1);Throws ​
QueryError when given null or undefined.
Inherited from ​
upper() ​
upper<S>(this): Expr<string | NullOf<S>, NoParams>;Defined in: core/src/query/expr.ts:973
upper(x).
Type Parameters ​
S ​
S extends string | null
Parameters ​
this ​
Expr<S, never>
Returns ​
Expr<string | NullOf<S>, NoParams>
Example ​
u.email.upper();
