Skip to content

@graphty/graph-io / styles / Predicate

Type Alias: Predicate ​

Predicate = { all: true; } | { has: ColumnRef; } | { eq: readonly [ColumnRef, Scalar]; } | { in: readonly [ColumnRef, readonly Scalar[]]; } | { and: readonly Predicate[]; } | { or: readonly Predicate[]; } | { not: Predicate; }

Defined in: styles/types.ts:979

Which elements a rule applies to. Readers and the planner emit only all, has, not over has, eq and in (at most 8 values), with at most one and; a wider group is written onto the elements as a style column and selected with has. Open union.

Union Members ​

Type Literal ​

{ all: true; }

all ​

readonly all: true

Every element.


Type Literal ​

{ has: ColumnRef; }

has ​

readonly has: ColumnRef

The elements whose column holds a value (not null, not false).


Type Literal ​

{ eq: readonly [ColumnRef, Scalar]; }

eq ​

readonly eq: readonly [ColumnRef, Scalar]

The elements whose column equals the value.


Type Literal ​

{ in: readonly [ColumnRef, readonly Scalar[]]; }

in ​

readonly in: readonly [ColumnRef, readonly Scalar[]]

The elements whose column equals one of the values.


Type Literal ​

{ and: readonly Predicate[]; }

and ​

readonly and: readonly Predicate[]

The elements every predicate matches.


Type Literal ​

{ or: readonly Predicate[]; }

or ​

readonly or: readonly Predicate[]

The elements any predicate matches.


Type Literal ​

{ not: Predicate; }

not ​

readonly not: Predicate

The elements the predicate does not match.