API reference / @evolu/common / local-first / SystemColumns

Variable: SystemColumns

const SystemColumns: ObjectType<{
  createdAt: BrandType<
    Type<"String", string, string, StringError, string, StringError>,
    "DateIso",
    DateIsoError,
    StringError
  >;
  isDeleted: UnionType<
    [
      Type<"Null", null, null, NullError, null, NullError>,
      UnionType<[LiteralType<0>, LiteralType<1>]>,
    ]
  >;
  ownerId: BrandType<
    BrandType<
      Type<"String", string, string, StringError, string, StringError>,
      "Id",
      IdError,
      StringError
    >,
    "OwnerId",
    BrandWithoutRefineError<"OwnerId", StringError | IdError>,
    never
  >;
  updatedAt: BrandType<
    Type<"String", string, string, StringError, string, StringError>,
    "DateIso",
    DateIsoError,
    StringError
  >;
}>;

Defined in: packages/common/src/local-first/Schema.ts:239

System columns that are implicitly defined by Evolu.

  • createdAt: Set by Evolu on row creation, derived from Timestamp.
  • updatedAt: Set by Evolu on every row change, derived from Timestamp.
  • isDeleted: Soft delete flag created by Evolu and used by the developer to mark rows as deleted.
  • ownerId: Represents ownership and logically partitions the database.

Was this page helpful?