Skip to content

Field Types

Thogits supports 7 field types. Each type defines how values are validated and stored. All fields are nullable — omitting a value or setting it to null is always valid.

Free-form text.

"title": "String"

Values must be JSON strings. Numbers, booleans, and other types are rejected.

64-bit floating point. Supports integers and decimals.

"score": "Number"

String representations of numbers (e.g., "42") are rejected.

True or false.

"active": "Boolean"

String representations ("true", "false") are rejected — use bare true or false.

Date or datetime as a string in YYYY-MM-DD or YYYY-MM-DDTHH:MM:SS format.

"due_date": "Date"

Date-only values are internally treated as midnight (T00:00:00) for comparison purposes.

A ULID string pointing to another thogit. This creates a relationship between two thogits.

"project": "Reference"

At write time, the system validates that the referenced thogit exists. Invalid ULIDs and dangling references are rejected. References enable traversal queries that filter across relationships.

Single selection from an ordered list of variants. Variants can optionally carry their own sub-fields.

"status": {
"type": "Select",
"variants": [
"Todo",
"InProgress",
"Done"
]
}

Key rules:

  • Must have at least one variant
  • Variant names must be unique within the Select
  • Sub-fields on variants follow the same typing rules as top-level fields
  • Sub-field values are only validated when their variant is the active selection

Multiple selections from an ordered list of variants. No sub-fields.

"priority": {
"type": "MultiSelect",
"variants": ["Low", "Medium", "High", "Critical"]
}

Key rules:

  • Must have at least one variant defined
  • Variant names must be unique
  • Values are arrays of variant name strings
  • Duplicate selections in a value are rejected
  • Variant order defines the ordinal for comparison operators
TypeSchema JSONValue JSON
String"String""hello"
Number"Number"42 or 3.14
Boolean"Boolean"true or false
Date"Date""2025-04-15" or "2025-04-15T14:30:00"
Reference"Reference""01JQXK6V9X..."
Select{"type":"Select","variants":["A",...]}{"variant":"A"}
MultiSelect{"type":"MultiSelect","variants":["A","B"]}["A","B"]