A field can represent a simple column in a database or a more complex structure, such as one-to-many (1:N) or many-to-many (N:N) relationships.
This approach:
- Simplifies the learning and implementation of Rapidex for developers.
- Makes it easier for users of applications built with Rapidex to customize their solutions.
A text field with a maximum length of 250 characters.
| JSON Type | string |
| C# Type | string |
| SQL Type | nvarchar(250) |
| SQLite Type | --- |
| PostgreSQL Type | --- |
| Length | 250 |
| Lazy Loading | No |
An 8-bit integer field.
A 16-bit integer field.
A 32-bit integer field.
A 64-bit integer field.
A 64-bit floating-point number field.
A 128-bit decimal number field.
A date and time field.
| JSON Type | datetime, datetimeoffset, date, time |
| C# Type | DateTimeOffset |
| SQL Type | datetime2 |
| SQLite Type | --- |
| PostgreSQL Type | --- |
| Length | --- |
| Lazy Loading | No |
Date-only field.
Not yet implemented.
Time-only field.
Not yet implemented.
Time span field stored as Int64.
Not yet implemented.
A GUID field.
A logical value field.
| JSON Type | bool, boolean, yesno |
| C# Type | bool |
| SQL Type | bit |
| SQLite Type | --- |
| PostgreSQL Type | --- |
| Length | --- |
| Lazy Loading | No |
A binary/blob data field.
| JSON Type | binary, byte[] |
| C# Type | byte[] |
| SQL Type | varbinary(max) |
| SQLite Type | --- |
| PostgreSQL Type | --- |
| Length | Unlimited |
| Lazy Loading | No |
Not yet implemented.
See: Currency.cs
A currency field. This type automatically adds an extra text field named <FieldName>Currency (Eq: For Price field, it will add PriceCurrency type field) to store the ISO 4217 currency code.
| JSON Type | currency |
| C# Type | Currency |
| SQL Type | decimal |
| SQLite Type | --- |
| PostgreSQL Type | --- |
| Length | 24,8 |
| Lazy Loading | No |
| Extra Field | Yes: Adds <FieldName>Currency |
Stores percentage values
| JSON Type | percent |
| C# Type | Percent |
| SQL Type | short |
| SQLite Type | --- |
| PostgreSQL Type | --- |
| Length | 2 |
| Lazy Loading | No |
This field type is basic short type with a different name. For to be distinguishable on the UI side.
See: Phone.cs
| JSON Type | phone |
| C# Type | Phone |
| SQL Type | nvarchar(20) |
| SQLite Type | --- |
| PostgreSQL Type | --- |
| Length | 20 |
| Lazy Loading | No |
See: Email.cs
| JSON Type | |
| C# Type | |
| SQL Type | nvarchar(200) |
| SQLite Type | --- |
| PostgreSQL Type | --- |
| Length | 200 |
| Lazy Loading | No |
Not yet implemented.
Stores a color value as a hex string or color name.
Custom-defined for UI support (e.g., color picker).
| JSON Type | color |
| C# Type | Color |
| SQL Type | nvarchar(20) |
| SQLite Type | --- |
| PostgreSQL Type | --- |
| Length | 20 |
| Lazy Loading | No |
Represents a start and end date/time pair.
| JSON Type | datetimeStartEnd |
| C# Type | DatetimeStartEnd |
| SQL Type | Virtual field |
| SQLite Type | --- |
| PostgreSQL Type | --- |
| Length | --- |
| Lazy Loading | No |
| Extra Fields | Yes: Adds <FieldName>Start and <FieldName>End |
Note:
The datetimeStartEnd field is virtual and relies on two underlying fields: <FieldName>Start and <FieldName>End.
Eg: For EventPeriod field, it will add EventPeriodStart and EventPeriodEnd fields with type datetime.
A binary blob field for images.
| JSON Type | image |
| C# Type | Image |
| SQL Type | varbinary(max) |
| SQLite Type | --- |
| PostgreSQL Type | --- |
| Lazy Loading | Yes |
- Value is stored in a
BlobRecordentry and not loaded directly with the entity. - Use
GetContent()to retrieve the content.
Sample API response:
"FieldName": {
"value": "<BlobRecordId>",
"text": "picture",
"id": "<schemaName>.<OwnerEntityName>.<OwnerEntityId>.<FieldName>"
}See: abc
A one-to-one reference field.
| C# Type | Reference<> |
| JSON Type | reference (requires target entity name) |
| SQL Type | int64 |
| SQLite Type | --- |
| PostgreSQL Type | --- |
| Lazy Loading | Yes |
Note: Cross-schema usage is not yet implemented.
A tag field, used only with HasTags behavior.
| C# Type | Tags |
| JSON Type | tags |
| SQL Type | string |
| SQLite Type | --- |
| PostgreSQL Type | --- |
| Lazy Loading | No |
An unlimited-length text field (blob) with support for different content types (plain text, HTML, Markdown).
| C# Type | Text |
| JSON Type | text |
| SQL Type | nvarchar(max) |
| SQLite Type | --- |
| PostgreSQL Type | --- |
| Lazy Loading | No |
| Extra Field | Yes: Adds <FieldName>Type |
Type values:
| Value | Description |
|---|---|
null or text |
Plain text |
html |
HTML content |
markdown |
Markdown content |
See: abc
A text field with unlimited length. Practically, there is no difference from Text in the UI (for now).
| C# Type | Json |
| JSON Type | json |
| SQL Type | nvarchar(max) |
| SQLite Type | --- |
| PostgreSQL Type | --- |
| Lazy Loading | No |
A vector field for numerical data, commonly used for ML or embeddings.
| JSON Type | vector |
| C# Type | vector |
| SQL Type | vector |
| SQLite Type | --- |
| PostgreSQL Type | --- |
| Length | 1024 |
| Lazy Loading | No |
Not yet implemented.
vector:
type: vector
length: 1024A field for encrypted data with two-way encryption (encrypt/decrypt).
| C# Type | Password |
| JSON Type | password |
| SQL Type | nvarchar(200) |
| SQLite Type | --- |
| PostgreSQL Type | --- |
| Lazy Loading | No |
- Encrypted information is stored in the
Valueproperty ofPasswordobjects. - Use
Password.Decrypt()to decrypt values. - During JSON serialization, the actual password is hidden and replaced with
*****. - Encryption uses the schema name and entity ID. Copying encrypted data to another schema/entity will make it non-decryptable.
See: abc
A field for one-way encrypted (non-reversible) passwords (hash).
Use OneWayPassword.IsEqual() to compare input values.
| C# Type | OneWayPassword |
| JSON Type | oneWayPassword |
| SQL Type | nvarchar(200) |
| SQLite Type | --- |
| PostgreSQL Type | --- |
| Lazy Loading | No |
- Stores irreversible encrypted data.
- JSON serialization masks the content as
*****.
See: abc
Represents a One-to-Many relationship.
| C# Type | RelationOne2N |
| JSON Type | relationOne2N (requires target entity in reference) |
| SQL Type | int64 |
| SQLite Type | --- |
| PostgreSQL Type | --- |
| Lazy Loading | Yes |
- For concrete types: Implicit conversion to
DetailEntity[]. UseGetContent()for lazy fetch. - For dynamic/JSON: Use
ILazy.GetContent().
A Parent<ParentEntityName> field is added to the detail entity (e.g., ParentInvoice).
See: abc
{
"UpdType": "AddRelation",
"Relation": "<MasterEntityName>/<FieldName>",
"MasterId": <master entity Id (can be premature)>,
"DetailId": <detail entity Id (can be premature)>
}{
"UpdType": "RemoveRelation",
"Relation": "<MasterEntityName>/<FieldName>",
"MasterId": <master entity Id (can't be premature)>,
"DetailId": <detail entity Id (can't be premature)>
}Example:
{
"UpdType": "AddRelation",
"Relation": "Project/Tasks",
"MasterId": -1000,
"DetailId": -1001
}{
"UpdType": "RemoveRelation",
"Relation": "Project/Tasks",
"MasterId": 1000,
"DetailId": 1234
}Represents a Many-to-Many relationship.
| C# Type | RelationN2N |
| JSON Type | relationN2N (requires target entity in reference) |
| SQL Type | int64 |
| SQLite Type | --- |
| PostgreSQL Type | --- |
| Lazy Loading | Yes |
See: abc
- For concrete types: Implicit conversion to
OtherEntity[]. UseGetContent()for lazy fetch. - For dynamic/JSON: Not yet implemented.
A linking table will be created for N2N relationships (details pending).
| C# Type | Enumeration (T: C# Enum) |
| JSON Type | enum (requires entity name for values) |
| SQL Type | int32 |
| SQLite Type | --- |
| PostgreSQL Type | --- |
| Lazy Loading | No |
- Enum values are stored in the database as entities matching the C# enum name.
- JSON serialization is not yet implemented.