Skip to main content

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

PropertyTypeRequiredAllowed ValuesDescription
namestringAlphanumeric + underscoreColumn identifier
typeFieldTypeSee Field TypesData type
descriptionstringAny stringHuman-readable description
is_nullablebooleantrue, falseAllow null (default: true) values
is_uniquebooleantrue, falseEnforce unique constraint (default: false)
is_indexedbooleantrue, falseCreate database index (default: false)
default_valueanyType-appropriate valueDefault to null

System Properties (Read-Only)

PropertyTypeDescription
idstringAuto-generated unique identifier
table_idstringParent table identifier
is_primary_keybooleanPrimary key flag (system only)
created_atstringCreation timestamp (ISO 8601)
updated_atstringLast modification timestamp (ISO 8601)

Field Types

All supported column data types:

Field TypeValueDescription
Text"text"Basic text strings
Long Text"long-text"Extended text content
Email"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

PropertyTypeApplies ToDescription
date_formatstringdate-timeDate display format
time_formatstringdate-timeTime display format

Date Formats

Format NameValueDisplay 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 NameValueDisplay 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

PropertyTypeApplies ToAllowed Values
decimalsstringnumber, currencySee decimal formats below
FormatValueDescription
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

PropertyTypeApplies ToDescription
currency_formatstringcurrencyISO 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

PropertyTypeApplies ToAllowed Values
selectable_itemsstring[]dropdownArray of strings
multiple_selectionsbooleandropdowntrue, 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

PropertyTypeApplies ToAllowed Values
phone_formatstringphone-numberPredefined formats or custom

Predefined Phone Formats

Format NameValueExample
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

PropertyTypeApplies ToDescription
vector_dimensionnumbervector, halfvec, sparsevecVector 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, or updated_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,
}