Column Properties
This page provides a comprehensive reference of all column properties and their allowed values in the Boltic Tables SDK.
Universal Properties
These properties are available for all column types.
Basic Properties
Property | Type | Required | Allowed Values | Description |
---|---|---|---|---|
name | string | ✅ | Alphanumeric + underscore | Column identifier |
type | FieldType | ✅ | See Field Types | Data type |
description | string | ❌ | Any string | Human-readable description |
is_nullable | boolean | ❌ | true , false | Allow null (default: true ) values |
is_unique | boolean | ❌ | true , false | Enforce unique constraint (default: false ) |
is_indexed | boolean | ❌ | true , false | Create database index (default: false ) |
default_value | any | ❌ | Type-appropriate value | Default to null |
System Properties (Read-Only)
Property | Type | Description |
---|---|---|
id | string | Auto-generated unique identifier |
table_id | string | Parent table identifier |
is_primary_key | boolean | Primary key flag (system only) |
created_at | string | Creation timestamp (ISO 8601) |
updated_at | string | Last modification timestamp (ISO 8601) |
Field Types
All supported column data types:
Field Type | Value | Description |
---|---|---|
Text | "text" | Basic text strings |
Long Text | "long-text" | Extended text content |
"email" | Email addresses with validation | |
Phone Number | "phone-number" | Phone numbers with formatting |
Link | "link" | URLs and web links |
Number | "number" | Numeric values |
Currency | "currency" | Monetary values |
Checkbox | "checkbox" | Boolean true/false |
Dropdown | "dropdown" | Selection from predefined options |
Date-Time | "date-time" | Date and time values |
JSON | "json" | Structured JSON data |
Vector | "vector" | Full precision vectors |
Half Vector | "halfvec" | Half precision vectors |
Sparse Vector | "sparsevec" | Sparse vectors |
// Usage examples
const fieldTypes = {
TEXT: "text",
LONG_TEXT: "long-text",
DATE_TIME: "date-time",
NUMBER: "number",
CURRENCY: "currency",
CHECKBOX: "checkbox",
DROPDOWN: "dropdown",
EMAIL: "email",
PHONE_NUMBER: "phone-number",
LINK: "link",
JSON: "json",
BUTTON: "button",
VECTOR: "vector",
SPARSEVECTOR: "sparsevec",
HALFVECTOR: "halfvec",
};
Type-Specific Properties
Date-Time Properties
Property | Type | Applies To | Description |
---|---|---|---|
date_format | string | date-time | Date display format |
time_format | string | date-time | Time display format |
Date Formats
Format Name | Value | Display Example |
---|---|---|
MM/DD/YY | "%m/%d/%y" | 12/31/24 |
MM/DD/YYYY | "%m/%d/%Y" | 12/31/2024 |
MM-DD-YYYY | "%m-%d-%Y" | 12-31-2024 |
DD-MM-YYYY | "%d-%m-%Y" | 31-12-2024 |
DD/MM/YYYY | "%d/%m/%Y" | 31/12/2024 |
DD/MM/YY | "%d/%m/%y" | 31/12/24 |
YYYY-MM-DD | "%Y-%m-%d" | 2024-12-31 |
Month DD, YYYY | "%B %d %Y" | December 31, 2024 |
Mon DD, YYYY | "%b %d %Y" | Dec 31, 2024 |
Day Mon DD, YYYY | "%a %b %d %Y" | Tue Dec 31, 2024 |
Time Formats
Format Name | Value | Display Example |
---|---|---|
24-hour | "%H:%M:%S" | 14:30:45 |
24-hour with timezone | "%H:%M:%SZ" | 14:30:45Z |
24-hour with milliseconds | "%H:%M:%S.%f" | 14:30:45.123 |
24-hour with timezone name | "%H:%M:%S %Z" | 14:30:45 UTC |
12-hour | "%I:%M %p" | 02:30 PM |
12-hour with seconds | "%I:%M:%S %p" | 02:30:45 PM |
Numeric Properties
Decimal Precision
Property | Type | Applies To | Allowed Values |
---|---|---|---|
decimals | string | number , currency | See decimal formats below |
Format | Value | Description |
---|---|---|
Whole numbers | "00" | No decimal places |
1 decimal | "0.0" | One decimal place |
2 decimals | "0.00" | Two decimal places |
3 decimals | "0.000" | Three decimal places |
4 decimals | "0.0000" | Four decimal places |
5 decimals | "0.00000" | Five decimal places |
6 decimals | "0.000000" | Six decimal places |
Currency Format
Property | Type | Applies To | Description |
---|---|---|---|
currency_format | string | currency | ISO 4217 currency code |
Refer to Currency Codes for complete list of supported currency codes.
// Common currency codes
const currencies = [
"USD", // US Dollar
"EUR", // Euro
"GBP", // British Pound
"JPY", // Japanese Yen
"CAD", // Canadian Dollar
"AUD", // Australian Dollar
"CNY", // Chinese Yuan
"INR", // Indian Rupee
"KRW", // South Korean Won
];
// Example usage
{
name: "price",
type: "currency",
currency_format: "USD",
decimals: "0.00"
}
Selection Properties
Property | Type | Applies To | Allowed Values |
---|---|---|---|
selectable_items | string[] | dropdown | Array of strings |
multiple_selections | boolean | dropdown | true , false |
// Example dropdown configuration
{
name: "status",
type: "dropdown",
selectable_items: ["active", "inactive", "pending"],
multiple_selections: false,
default_value: ["pending"]
}
// Multiple selection example
{
name: "tags",
type: "dropdown",
selectable_items: ["urgent", "feature", "bug", "enhancement"],
multiple_selections: true,
default_value: ["feature"]
}
Phone Number Properties
Property | Type | Applies To | Allowed Values |
---|---|---|---|
phone_format | string | phone-number | Predefined formats or custom |
Predefined Phone Formats
Format Name | Value | Example |
---|---|---|
International +91 | "+91 123 456 7890" | +91 123 456 7890 |
US Standard | "(123) 456-7890" | (123) 456-7890 |
US International | "+1 (123) 456-7890" | +1 (123) 456-7890 |
International +91 Alt | "+91 12 3456 7890" | +91 12 3456 7890 |
// Phone format options
const phoneFormats = {
INDIA: "+91 123 456 7890",
US: "(123) 456-7890",
US_INTL: "+1 (123) 456-7890",
INDIA_ALT: "+91 12 3456 7890"
};
// Example usage
{
name: "mobile",
type: "phone-number",
phone_format: "+1 (123) 456-7890",
is_nullable: true
}
// Custom format example
{
name: "landline",
type: "phone-number",
phone_format: "+44 20 1234 5678", // UK format
is_nullable: true
}
Vector Properties
Property | Type | Applies To | Description |
---|---|---|---|
vector_dimension | number | vector , halfvec , sparsevec | Vector dimension size |
// Common vector dimensions
const vectorDimensions = {
OPENAI_ADA_002: 1536, // OpenAI text-embedding-ada-002
OPENAI_3_SMALL: 1536, // OpenAI text-embedding-3-small
OPENAI_3_LARGE: 3072, // OpenAI text-embedding-3-large
SENTENCE_BERT: 768, // Sentence-BERT models
WORD2VEC: 300, // Word2Vec
GLOVE: 100, // GloVe (various sizes)
CUSTOM_SMALL: 128, // Custom small vectors
CUSTOM_LARGE: 2048 // Custom large vectors
};
// Example usage
{
name: "embeddings",
type: "vector",
vector_dimension: 1536,
is_indexed: true,
description: "OpenAI embeddings for similarity search"
}
// Half precision for storage efficiency
{
name: "compressed_embeddings",
type: "halfvec",
vector_dimension: 768,
is_indexed: true
}
// Sparse vector for specific use cases
{
name: "sparse_features",
type: "sparsevec",
vector_dimension: 10000,
description: "Sparse feature vector"
}
Validation Rules
Column Names
Column names must follow these rules:
- Characters: Only letters (a-z, A-Z), numbers (0-9), and underscores (_)
- Start: Must start with a letter or underscore
- Length: 1-50 characters
- Reserved: Cannot be
id
,created_at
, orupdated_at
- Case: Case-sensitive
Default Value Validation
Default values must match the column type:
// Valid default values by type
const validDefaults = {
text: "Default text",
"long-text": "Longer default text...",
email: "[email protected]",
"phone-number": "+1 (555) 123-4567",
link: "https://example.com",
number: 42,
currency: 99.99,
checkbox: true,
dropdown: "option1", // Must be in selectable_items
"date-time": "2024-01-01T00:00:00Z",
json: { key: "value" },
vector: [0.1, 0.2, 0.3], // Array matching vector_dimension
halfvec: [0.1, 0.2, 0.3],
sparsevec: "{1:1,3:2,5:3}/5", // Sparse format
};
// Invalid default values
const invalidDefaults = {
number: "not a number",
currency: "invalid",
checkbox: "yes", // Should be boolean
email: "invalid-email",
"date-time": "not a date",
vector: [1, 2], // Wrong dimension count
};
Constraint Combinations
Some property combinations have special rules:
// ✅ Valid constraint combinations
const validConstraints = [
{
is_unique: true,
is_indexed: true, // Unique implies indexed
is_nullable: false, // Recommended for unique fields
},
{
is_nullable: false,
default_value: "required", // Non-nullable with default
},
{
is_indexed: true, // Can index nullable fields
is_nullable: true,
},
];
Complete Examples
Basic Text Column
{
name: "product_title",
type: "text",
description: "Product title for display",
is_nullable: false,
is_unique: true,
is_indexed: true,
default_value: "Untitled Product",
}
Advanced Currency Column
{
name: "price_eur",
type: "currency",
description: "Product price in Euros",
currency_format: "EUR",
decimals: "0.00",
is_nullable: false,
is_indexed: true,
default_value: 0.00
}
Complex Dropdown Column
{
name: "product_categories",
type: "dropdown",
description: "Product categories (multi-select)",
selectable_items: [
"Electronics",
"Clothing",
"Books",
"Home & Garden",
"Sports & Outdoors"
],
multiple_selections: true,
is_nullable: true,
default_value: ["Electronics"]
}
International Date-Time Column
{
name: "event_datetime",
type: "date-time",
description: "Event date and time",
date_format: "%d/%m/%Y", // British format
time_format: "%H:%M:%S", // 24-hour format
is_nullable: true,
is_indexed: true
}
AI/ML Vector Column
{
name: "document_embeddings",
type: "vector",
description: "Document embeddings for semantic search",
vector_dimension: 1536,
is_nullable: true,
is_indexed: true,
}
Related Pages
- Create Column - Create columns using these properties
- Update Column - Modify existing column properties
- Field Types - Detailed field type documentation
- Quick Reference - Common property patterns