Table Field Reference
Leapcell tables are essentially relational database tables, automatically generated based on collection names and fields.
A single entry in a collection is referred to as a record, equivalent to a row in an SQL table.
Overview
Field Meaning | Field Enum | Example Values | Use Cases | Description | Limit |
---|---|---|---|---|---|
Short Text | STR | "" , "example" | Name , Title , Sentence | Stored as String | At most 1023 characters |
Integer Number | INT | 0 , -1 , 1 | Number , Postal Code , Phone Number | Stored as Integer | int64 |
Decimal Number | FLOAT | 0.0 , -1.0 , 1.0 | Price , Latitude/Longitude , Currency | Stored as Float | float64 |
Time | TIME | 2021-01-01 00:00:00 | Date , Time , DateTime | DateTime , stored as UNIX timestamp | unixtime , in seconds |
Single Select | LABEL | "example" | Label , Category | Stored as String | At most 1023 characters |
Multiple Select | LABELS | ["example1", "example2"] | Label List , Category List | Stored as Array of Strings | A list of strings, each string at most 1023 characters, at most 60 labels in field |
Multiple Image | IMAGES | ["imageId1", "imageId2"] | Image List | Stored as Array of Strings , where each element is an image ID. CDN prefix can be added to retrieve images. | A list of strings, each string at most 1023 characters, at most 60 links in field |
Long Text | LONGTEXT | "" , "example" | Description , Content | String , stored as a database Long Text field | Long string, size should be less than 300KB |
STR Field
The STR field is used to store strings, suitable for scenarios such as:
- Name
- Title
- Sentences
Supported Operations:
eq
(equals)neq
(not equals)in
(in list)not_null
(not null)is_null
(is null)not_in
(not in list)
Limitations:
At most 1023 characters
INT Field
The INT field stores integers without decimal points, suitable for common applications like:
- Numbers
- Postal Codes
- Identifiers
Supported Operations:
gt
(greater than)gte
(greater than or equals)lt
(less than)lte
(less than or equals)eq
(equals)neq
(not equals)in
(in list)not_null
(not null)is_null
(is null)not_in
(not in list)
Limitations:
Less than 64 bits
FLOAT Field
The FLOAT field represents floating-point numbers, suitable for applications involving decimal points, such as:
- Prices
- Currency
Supported Operations:
gt
(greater than)gte
(greater than or equals)lt
(less than)lte
(less than or equals)eq
(equals)neq
(not equals)in
(in list)not_null
(not null)is_null
(is null)not_in
(not in list)
Limitations:
Less than 64 bits
TIME Field
The TIME field stores timestamp data in seconds, suitable for storing time-level information in scenarios like:
- Date
- Time
- DateTime
Supported Operations:
gt
(greater than)gte
(greater than or equals)lt
(less than)lte
(less than or equals)eq
(equals)neq
(not equals)in
(in list)not_null
(not null)is_null
(is null)not_in
(not in list)
LABEL Field
The LABEL field stores a single string and is commonly used for enumerable types, such as:
- Labels
- Categories
Supported Operations:
eq
(equals)neq
(not equals)in
(in list)not_null
(not null)is_null
(is null)not_in
(not in list)
Limitations:
At most 1023 characters
LABELS Field
The LABELS field stores a list of strings and is commonly used for enumerable types where a list is needed, such as:
- Label Lists
- Category Lists
Supported Operations:
is_null
(is null)- `not
_null` (not null)
contain
(contains)
Limitations:
- Each label at most 1023 characters
- At most 60 labels in the field
IMAGES Field
The IMAGES field stores a list of strings and is designed to work with file upload functionality. It is often used for managing images, with the images being uploaded to a CDN.
Supported Operations:
is_null
(is null)not_null
(not null)eq
(equals)
Limitations:
- Each image link at most 1023 characters
- At most 60 links in the field
- Image size should be less than 3MB
LONGTEXT Field
The LONGTEXT field stores a long string and supports more characters than the STR field. However, it consumes more storage. It is commonly used for:
- Descriptions
- Content
Supported Operations:
eq
(equals)neq
(not equals)not_null
(not null)is_null
(is null)
Limitations:
Data should be less than 300KB