ObjectStackObjectStack

Enums

Enums protocol schemas

Aggregation functions used across query, data-engine, analytics, field

Source: packages/spec/src/shared/enums.zod.ts

TypeScript Usage

import { AggregationFunctionEnum, CacheStrategyEnum, IsolationLevelEnum, MutationEventEnum, SortDirectionEnum, SortItem } from '@objectstack/spec/shared';
import type { AggregationFunctionEnum, CacheStrategyEnum, IsolationLevelEnum, MutationEventEnum, SortDirectionEnum, SortItem } from '@objectstack/spec/shared';

// Validate data
const result = AggregationFunctionEnum.parse(data);

AggregationFunctionEnum

Standard aggregation functions

Allowed Values

  • count
  • sum
  • avg
  • min
  • max
  • count_distinct
  • percentile
  • median
  • stddev
  • variance

CacheStrategyEnum

Cache eviction strategy

Allowed Values

  • lru
  • lfu
  • ttl
  • fifo

IsolationLevelEnum

Transaction isolation levels (snake_case standard)

Allowed Values

  • read_uncommitted
  • read_committed
  • repeatable_read
  • serializable
  • snapshot

MutationEventEnum

Data mutation event types

Allowed Values

  • insert
  • update
  • delete
  • upsert

SortDirectionEnum

Sort order direction

Allowed Values

  • asc
  • desc

SortItem

Sort field and direction pair

Properties

PropertyTypeRequiredDescription
fieldstringField name to sort by
orderEnum<'asc' | 'desc'>Sort direction

On this page