Skip to content

meos.js


meos.js / TBoolSeq

Class: TBoolSeq ​

Defined in: core/types/basic/tbool/TBoolSeq.ts:20

Temporal boolean — Sequence subtype.

A stepwise-interpolated sequence of (value, timestamp) pairs with inclusive/ exclusive bounds. Wraps a MEOS TBoolSeq pointer.

Example ​

ts
const i1 = TBoolInst.fromValue(true,  60_000_000);
const i2 = TBoolInst.fromValue(false, 120_000_000);
const seq = TBoolSeq.fromInstants([i1, i2]);
console.log(seq.toString()); // [t@2000-01-01 00:01:00+00, f@2000-01-01 00:02:00+00]

Extends ​

Constructors ​

Constructor ​

ts
new TBoolSeq(inner): TBoolSeq;

Defined in: core/types/basic/tbool/TBool.ts:61

Wrap a raw WASM pointer. The caller must ensure the pointer is a valid MEOS TBool*.

Parameters ​

inner ​

number

Returns ​

TBoolSeq

Inherited from ​

TBool.constructor

Accessors ​

inner ​

Get Signature ​

ts
get inner(): number;

Defined in: core/types/temporal/Temporal.ts:232

Raw WASM pointer. Use when passing this value to low-level functions.

Returns ​

number

Inherited from ​

TBool.inner

Methods ​

[dispose]() ​

ts
dispose: void;

Defined in: core/types/temporal/Temporal.ts:250

Explicit Resource Management support. Allows using t = TBool.fromString(...) to free automatically.

Returns ​

void

Inherited from ​

TBool.[dispose]


alwaysEq() ​

ts
alwaysEq(b): boolean;

Defined in: core/types/basic/tbool/TBool.ts:250

Returns true if the value is always equal to b.

See everEq for the > 0 conversion rationale.

MEOS: always_eq_tbool_bool

Parameters ​

b ​

boolean

Returns ​

boolean

Inherited from ​

TBool.alwaysEq


and() ​

ts
and(other): TBool;

Defined in: core/types/basic/tbool/TBool.ts:191

Temporal conjunction with another TBool or a constant boolean. MEOS: tand_tbool_tbool / tand_tbool_bool

Parameters ​

other ​

boolean | TBool

Returns ​

TBool

Inherited from ​

TBool.and


appendInstant() ​

ts
appendInstant(
   inst, 
   maxdist?, 
   maxt?, 
   expand?): this;

Defined in: core/types/temporal/Temporal.ts:606

Appends an instant to this temporal, returning a new temporal. MEOS: temporal_append_tinstant

Parameters ​

inst ​

this

The instant to append (same subtype as this).

maxdist? ​

number = 0

Maximum distance gap allowed (0 = no limit).

maxt? ​

number = 0

Maximum time gap as interval pointer (0 = no limit).

expand? ​

boolean = false

Whether to expand the sequence in-place.

Returns ​

this

Inherited from ​

TBool.appendInstant


appendSequence() ​

ts
appendSequence(seq, expand?): this;

Defined in: core/types/temporal/Temporal.ts:616

Appends a sequence to this temporal, returning a new temporal. MEOS: temporal_append_tsequence

Parameters ​

seq ​

this

expand? ​

boolean = false

Returns ​

this

Inherited from ​

TBool.appendSequence


asBinary() ​

ts
asBinary(variant?): Uint8Array;

Defined in: core/types/temporal/Temporal.ts:273

Returns the Well-Known Binary (WKB) representation.

The default variant 0 writes plain WKB in the native byte order; 0x08 (WKB_NDR) and 0x10 (WKB_XDR) choose the byte order. The spatial types write their SRID through asEWKB.

MEOS: temporal_as_wkb

Parameters ​

variant? ​

number = 0

Returns ​

Uint8Array

Inherited from ​

TBool.asBinary


asHexWKB() ​

ts
asHexWKB(variant?): string;

Defined in: core/types/temporal/Temporal.ts:286

Returns the hex-encoded Well-Known Binary (WKB) representation.

The default variant 0 writes plain WKB in the native byte order; 0x08 (WKB_NDR) and 0x10 (WKB_XDR) choose the byte order. The spatial types write their SRID through asHexEWKB.

MEOS: temporal_as_hexwkb

Parameters ​

variant? ​

number = 0

Returns ​

string

Inherited from ​

TBool.asHexWKB


asMFJSON() ​

ts
asMFJSON(
   withBbox?, 
   flags?, 
   precision?, 
   srs?): string;

Defined in: core/types/temporal/Temporal.ts:303

Returns the MF-JSON representation.

The hand-written wrapper converts an empty srs string to C NULL so that callers can omit the SRS without passing a null pointer directly.

MEOS: temporal_as_mfjson

Parameters ​

withBbox? ​

boolean = true

Include bounding box in the output (default true)

flags? ​

number = 3

Output flags (default 3)

precision? ​

number = 6

Coordinate decimal precision (default 6)

srs? ​

string | null

Spatial Reference System string, or null to omit

Returns ​

string

Inherited from ​

TBool.asMFJSON


at() ​

ts
at(b): TBool;

Defined in: core/types/basic/tbool/TBool.ts:215

Restrict to instants where the value equals b. MEOS: tbool_at_value

Parameters ​

b ​

boolean

Returns ​

TBool

Inherited from ​

TBool.at


atMax() ​

ts
atMax(): this;

Defined in: core/types/temporal/Temporal.ts:455

Restricts to instants where the value is the maximum. MEOS: temporal_at_max

Returns ​

this

Inherited from ​

TBool.atMax


atMin() ​

ts
atMin(): this;

Defined in: core/types/temporal/Temporal.ts:450

Restricts to instants where the value is the minimum. MEOS: temporal_at_min

Returns ​

this

Inherited from ​

TBool.atMin


atTsTzSet() ​

ts
atTsTzSet(s): this;

Defined in: core/types/temporal/Temporal.ts:474

Restricts to the given timestamp set. MEOS: temporal_at_tstzset

Parameters ​

s ​

number

Returns ​

this

Inherited from ​

TBool.atTsTzSet


atTsTzSpan() ​

ts
atTsTzSpan(s): this;

Defined in: core/types/temporal/Temporal.ts:479

Restricts to the given timestamp span. MEOS: temporal_at_tstzspan

Parameters ​

s ​

number

Returns ​

this

Inherited from ​

TBool.atTsTzSpan


atTsTzSpanSet() ​

ts
atTsTzSpanSet(ss): this;

Defined in: core/types/temporal/Temporal.ts:484

Restricts to the given timestamp span set. MEOS: temporal_at_tstzspanset

Parameters ​

ss ​

number

Returns ​

this

Inherited from ​

TBool.atTsTzSpanSet


copy() ​

ts
copy(): this;

Defined in: core/types/temporal/Temporal.ts:258

Returns a deep copy of this temporal value. MEOS: temporal_copy

Returns ​

this

Inherited from ​

TBool.copy


durationMs() ​

ts
durationMs(ignoreGaps?): number;

Defined in: core/types/temporal/Temporal.ts:433

Returns the total duration as a number of milliseconds, through the parts of the interval MEOS answers (interval_to_timedelta); an interval with months, which has no fixed length, is refused.

Pass ignoreGaps=true to sum only sequence durations, ignoring the time gaps between sequences in a SequenceSet.

MEOS: temporal_duration

Parameters ​

ignoreGaps? ​

boolean = false

Returns ​

number

Inherited from ​

TBool.durationMs


endInstant() ​

ts
endInstant(): this;

Defined in: core/types/temporal/Temporal.ts:349

Returns the last instant as a new instance of the same subtype. MEOS: temporal_end_instant

Returns ​

this

Inherited from ​

TBool.endInstant


endTimestamp() ​

ts
endTimestamp(): bigint;

Defined in: core/types/temporal/Temporal.ts:414

Returns the last timestamp as microseconds since 2000-01-01 UTC. MEOS: temporal_end_timestamptz

Returns ​

bigint

Inherited from ​

TBool.endTimestamp


endValue() ​

ts
endValue(): boolean;

Defined in: core/types/basic/tbool/TBool.ts:171

Ending value of the temporal. MEOS: tbool_end_value

Returns ​

boolean

Inherited from ​

TBool.endValue


equals() ​

ts
equals(other): boolean;

Defined in: core/types/temporal/Temporal.ts:636

Pointer-based identity check. For value equality, use the generated teq_* / temporal_eq functions.

Parameters ​

other ​

Temporal<boolean>

Returns ​

boolean

Inherited from ​

TBool.equals


everEq() ​

ts
everEq(b): boolean;

Defined in: core/types/basic/tbool/TBool.ts:239

Returns true if the value is ever equal to b.

MEOS ever/always functions return int (-1 on error, 0 for false, 1 for true). The > 0 conversion maps this to a boolean, treating errors as false.

MEOS: ever_eq_tbool_bool

Parameters ​

b ​

boolean

Returns ​

boolean

Inherited from ​

TBool.everEq


free() ​

ts
free(): void;

Defined in: core/types/temporal/Temporal.ts:242

Frees the underlying MEOS allocation.

After calling free(), the instance must not be used. Calls the hand-written meos_free wrapper from res/bindings_c_header.txt.

Returns ​

void

Inherited from ​

TBool.free


instantN() ​

ts
instantN(n): this;

Defined in: core/types/temporal/Temporal.ts:380

Returns the n-th instant (0-based index), MEOS's 1-based n + 1.

MEOS: temporal_instant_n

Parameters ​

n ​

number

Returns ​

this

Inherited from ​

TBool.instantN


interpolation() ​

ts
interpolation(): TInterpolation;

Defined in: core/types/temporal/Temporal.ts:311

Returns the interpolation mode of this temporal value. MEOS: temporal_interp

Returns ​

TInterpolation

Inherited from ​

TBool.interpolation


maxInstant() ​

ts
maxInstant(): this;

Defined in: core/types/temporal/Temporal.ts:369

Returns the instant with the maximum value. MEOS: temporal_max_instant

Returns ​

this

Inherited from ​

TBool.maxInstant


merge() ​

ts
merge(other): this;

Defined in: core/types/temporal/Temporal.ts:624

Merges this temporal with another, returning a new temporal. MEOS: temporal_merge

Parameters ​

other ​

this

Returns ​

this

Inherited from ​

TBool.merge


minInstant() ​

ts
minInstant(): this;

Defined in: core/types/temporal/Temporal.ts:359

Returns the instant with the minimum value. MEOS: temporal_min_instant

Returns ​

this

Inherited from ​

TBool.minInstant


minus() ​

ts
minus(b): TBool;

Defined in: core/types/basic/tbool/TBool.ts:223

Restrict to instants where the value differs from b. MEOS: tbool_minus_value

Parameters ​

b ​

boolean

Returns ​

TBool

Inherited from ​

TBool.minus


minusMax() ​

ts
minusMax(): this;

Defined in: core/types/temporal/Temporal.ts:465

Excludes instants where the value is the maximum. MEOS: temporal_minus_max

Returns ​

this

Inherited from ​

TBool.minusMax


minusMin() ​

ts
minusMin(): this;

Defined in: core/types/temporal/Temporal.ts:460

Excludes instants where the value is the minimum. MEOS: temporal_minus_min

Returns ​

this

Inherited from ​

TBool.minusMin


minusTsTzSet() ​

ts
minusTsTzSet(s): this;

Defined in: core/types/temporal/Temporal.ts:489

Excludes the given timestamp set. MEOS: temporal_minus_tstzset

Parameters ​

s ​

number

Returns ​

this

Inherited from ​

TBool.minusTsTzSet


minusTsTzSpan() ​

ts
minusTsTzSpan(s): this;

Defined in: core/types/temporal/Temporal.ts:494

Excludes the given timestamp span. MEOS: temporal_minus_tstzspan

Parameters ​

s ​

number

Returns ​

this

Inherited from ​

TBool.minusTsTzSpan


minusTsTzSpanSet() ​

ts
minusTsTzSpanSet(ss): this;

Defined in: core/types/temporal/Temporal.ts:499

Excludes the given timestamp span set. MEOS: temporal_minus_tstzspanset

Parameters ​

ss ​

number

Returns ​

this

Inherited from ​

TBool.minusTsTzSpanSet


neverEq() ​

ts
neverEq(b): boolean;

Defined in: core/types/basic/tbool/TBool.ts:258

Returns true if the value is never equal to b. Implemented as the logical complement of everEq.

Parameters ​

b ​

boolean

Returns ​

boolean

Inherited from ​

TBool.neverEq


not() ​

ts
not(): TBool;

Defined in: core/types/basic/tbool/TBool.ts:183

Temporal negation: returns a new TBool with all values flipped. MEOS: tnot_tbool

Returns ​

TBool

Inherited from ​

TBool.not


numInstants() ​

ts
numInstants(): number;

Defined in: core/types/temporal/Temporal.ts:326

Returns the number of distinct instants in this temporal value. MEOS: temporal_num_instants

Returns ​

number

Inherited from ​

TBool.numInstants


numTimestamps() ​

ts
numTimestamps(): number;

Defined in: core/types/temporal/Temporal.ts:388

Returns the number of distinct timestamps. MEOS: temporal_num_timestamps

Returns ​

number

Inherited from ​

TBool.numTimestamps


or() ​

ts
or(other): TBool;

Defined in: core/types/basic/tbool/TBool.ts:201

Temporal disjunction with another TBool or a constant boolean. MEOS: tor_tbool_tbool / tor_tbool_bool

Parameters ​

other ​

boolean | TBool

Returns ​

TBool

Inherited from ​

TBool.or


scaleTime() ​

ts
scaleTime(duration): this;

Defined in: core/types/temporal/Temporal.ts:526

Scales the temporal domain to last duration, a Postgres interval string (e.g. '10 minutes') or a raw interval Ptr. MEOS: temporal_scale_time

Parameters ​

duration ​

string | number

Returns ​

this

Inherited from ​

TBool.scaleTime


setInterp() ​

ts
setInterp(interp): this;

Defined in: core/types/temporal/Temporal.ts:556

Returns a new temporal with the interpolation changed to interp. Pass TInterpolation values as numbers: Discrete=0, Stepwise=1, Linear=2. MEOS: temporal_set_interp

Parameters ​

interp ​

TInterpolation

Returns ​

this

Inherited from ​

TBool.setInterp


shiftScaleTime() ​

ts
shiftScaleTime(shift, duration): this;

Defined in: core/types/temporal/Temporal.ts:540

Shifts then scales the temporal domain. shift and duration may each be a Postgres interval string (e.g. '1 hour', '10 minutes') or a raw Ptr. MEOS: temporal_shift_scale_time

Parameters ​

shift ​

string | number

duration ​

string | number

Returns ​

this

Inherited from ​

TBool.shiftScaleTime


shiftTime() ​

ts
shiftTime(shift): this;

Defined in: core/types/temporal/Temporal.ts:512

Shifts the temporal domain by shift, a Postgres interval string (e.g. '1 hour', '-30 minutes') or a raw interval Ptr. MEOS: temporal_shift_time

Parameters ​

shift ​

string | number

Returns ​

this

Inherited from ​

TBool.shiftTime


startInstant() ​

ts
startInstant(): this;

Defined in: core/types/temporal/Temporal.ts:339

Returns the first instant as a new instance of the same subtype. MEOS: temporal_start_instant

Returns ​

this

Inherited from ​

TBool.startInstant


startTimestamp() ​

ts
startTimestamp(): bigint;

Defined in: core/types/temporal/Temporal.ts:401

Returns the first timestamp as microseconds since 2000-01-01 UTC. MEOS: temporal_start_timestamptz

Returns ​

bigint

Inherited from ​

TBool.startTimestamp


startValue() ​

ts
startValue(): boolean;

Defined in: core/types/basic/tbool/TBool.ts:163

Starting value of the temporal. MEOS: tbool_start_value

Returns ​

boolean

Inherited from ​

TBool.startValue


temporalEq() ​

ts
temporalEq(b): TBool;

Defined in: core/types/basic/tbool/TBool.ts:270

Returns a TBool that is true at each instant where this equals b. MEOS: teq_tbool_bool

Parameters ​

b ​

boolean

Returns ​

TBool

Inherited from ​

TBool.temporalEq


temporalNe() ​

ts
temporalNe(b): TBool;

Defined in: core/types/basic/tbool/TBool.ts:278

Returns a TBool that is true at each instant where this differs from b. MEOS: tne_tbool_bool

Parameters ​

b ​

boolean

Returns ​

TBool

Inherited from ​

TBool.temporalNe


toInstant() ​

ts
toInstant(): this;

Defined in: core/types/temporal/Temporal.ts:567

Converts to TInstant (must already be an instant). MEOS: temporal_as_tinstant

Returns ​

this

Inherited from ​

TBool.toInstant


toSequence() ​

ts
toSequence(interp): this;

Defined in: core/types/temporal/Temporal.ts:572

Converts to TSequence with the given interpolation. MEOS: temporal_as_tsequence

Parameters ​

interp ​

TInterpolation

Returns ​

this

Inherited from ​

TBool.toSequence


toSequenceSet() ​

ts
toSequenceSet(interp): this;

Defined in: core/types/temporal/Temporal.ts:583

Converts to TSequenceSet with the given interpolation. MEOS: temporal_as_tsequenceset

Parameters ​

interp ​

TInterpolation

Returns ​

this

Inherited from ​

TBool.toSequenceSet


toString() ​

ts
toString(): string;

Defined in: core/types/basic/tbool/TBool.ts:155

WKT string representation. MEOS: temporal_out

Returns ​

string

Inherited from ​

TBool.toString


toTInt() ​

ts
toTInt(): number;

Defined in: core/types/basic/tbool/TBool.ts:344

Converts this TBool to a TInt (true → 1, false → 0) and returns the raw WASM pointer. Use new TInt(ptr) to obtain a typed object. MEOS: tbool_to_tint

Returns ​

number

Inherited from ​

TBool.toTInt


valueAtTimestamp() ​

ts
valueAtTimestamp(t): boolean | null;

Defined in: core/types/basic/tbool/TBool.ts:327

Evaluates the temporal at a specific timestamp. Returns null when the timestamp is outside the temporal's domain.

Parameters ​

t ​

bigint

Timestamp in microseconds since 2000-01-01 UTC.

Returns ​

boolean | null

Inherited from ​

TBool.valueAtTimestamp


valueN() ​

ts
valueN(n): boolean;

Defined in: core/types/basic/tbool/TBool.ts:314

Returns the n-th distinct value (0-based index) across all instants.

Parameters ​

n ​

number

0-based index (MEOS internally uses 1-based indexing). MEOS: tbool_value_n

Returns ​

boolean

Inherited from ​

TBool.valueN


whenFalse() ​

ts
whenFalse(): TsTzSpanSet;

Defined in: core/types/basic/tbool/TBool.ts:298

Returns the set of time periods where this temporal is false. MEOS: tnot_tbool + tbool_when_true

Returns ​

TsTzSpanSet

Inherited from ​

TBool.whenFalse


whenTrue() ​

ts
whenTrue(): TsTzSpanSet;

Defined in: core/types/basic/tbool/TBool.ts:290

Returns the set of time periods where this temporal is true. MEOS: tbool_when_true

Returns ​

TsTzSpanSet

Inherited from ​

TBool.whenTrue


fromBaseTemporal() ​

ts
static fromBaseTemporal(b, domain): TBool;

Defined in: core/types/basic/tbool/TBool.ts:107

Create a TBool with constant value b spanning the same domain as domain. MEOS: tbool_from_base_temp

Parameters ​

b ​

boolean

domain ​

TBool

Returns ​

TBool

Inherited from ​

TBool.fromBaseTemporal


fromBaseTime() ​

ts
static fromBaseTime(
   b, 
   time, 
   type): TBool;

Defined in: core/types/basic/tbool/TBool.ts:116

Create a TBool with constant value b over a time object. Accepts a raw Ptr to a TsTzSet, TsTzSpan, or TsTzSpanSet. MEOS: tboolseq_from_base_tstzset / tstzspan / tboolseqset_from_base_tstzspanset

Parameters ​

b ​

boolean

time ​

number

type ​

"tstzset" | "tstzspan" | "tstzspanset"

Returns ​

TBool

Inherited from ​

TBool.fromBaseTime


fromBinary() ​

ts
static fromBinary(wkb): TBool;

Defined in: core/types/basic/tbool/TBool.ts:99

Reads a TBool from its WKB bytes, as asBinary writes them. MEOS: temporal_from_wkb

Parameters ​

wkb ​

Uint8Array

Returns ​

TBool

Inherited from ​

TBool.fromBinary


fromHexWKB() ​

ts
static fromHexWKB(hexwkb): TBool;

Defined in: core/types/basic/tbool/TBool.ts:91

Reads a TBool from its hex-encoded WKB, as asHexWKB writes it. MEOS: temporal_from_hexwkb

Parameters ​

hexwkb ​

string

Returns ​

TBool

Inherited from ​

TBool.fromHexWKB


fromInstant() ​

ts
static fromInstant(value, timestamp): TBool;

Defined in: core/types/basic/tbool/TBool.ts:139

Create a TBoolInst from a boolean value and a timestamp.

Parameters ​

value ​

boolean

The boolean value.

timestamp ​

bigint

Microseconds since 2000-01-01 UTC (TimestampTz).

MEOS: tboolinst_make

Returns ​

TBool

Inherited from ​

TBool.fromInstant


fromInstants() ​

ts
static fromInstants(
   instants, 
   lowerInc?, 
   upperInc?, 
   normalize?): TBoolSeq;

Defined in: core/types/basic/tbool/TBoolSeq.ts:34

Builds a TBoolSeq from an array of temporal booleans (typically instants).

Parameters ​

instants ​

TBool[]

Ordered array of TBool values (must be instants).

lowerInc? ​

boolean = true

Whether the lower bound is inclusive (default true).

upperInc? ​

boolean = true

Whether the upper bound is inclusive (default true).

normalize? ​

boolean = true

Merge redundant instants (default true). MEOS: tsequence_make (Stepwise interpolation)

Returns ​

TBoolSeq


fromMFJSON() ​

ts
static fromMFJSON(mfjson): TBool;

Defined in: core/types/basic/tbool/TBool.ts:83

Parse a TBool from a MF-JSON string. MEOS: tbool_from_mfjson

Parameters ​

mfjson ​

string

Returns ​

TBool

Inherited from ​

TBool.fromMFJSON


fromString() ​

ts
static fromString(wkt): TBool;

Defined in: core/types/basic/tbool/TBool.ts:75

Parse a TBool from a WKT string.

Accepts all subtypes: Instant: "true@2001-01-01" Sequence: "[true@2001-01-01, false@2001-01-02]" SequenceSet: "{[true@2001-01-01, false@2001-01-02], [true@2001-01-03]}"

MEOS: tbool_in

Parameters ​

wkt ​

string

Returns ​

TBool

Inherited from ​

TBool.fromString