Skip to main content

Overview

Columns define the structure and data types of your tables. The Boltic Tables SDK provides comprehensive support for creating, reading, updating, and deleting columns with a wide variety of data types and constraints.

System Columns

When you create a table, Boltic automatically adds three system columns:

  • id - Primary key (auto-generated UUID)
  • created_at - Timestamp when record was created
  • updated_at - Timestamp when record was last modified

These columns cannot be deleted or modified and are automatically managed by the system.

Available Operations

Creating Columns

  • Create Column - Add single or multiple columns to a table
  • Field Types - Complete reference of all supported data types

Reading Columns

  • List Columns - Retrieve all columns with filtering and pagination
  • Get Column - Fetch specific column by name or ID

Modifying Columns

Basic Usage

import { createClient } from "@boltic/sdk";

const client = createClient("your-api-key");

// Create a text column
await client.columns.create("products", {
name: "title",
type: "text",
is_nullable: false,
description: "Product title",
});

// List all columns
const { data: columns } = await client.columns.findAll("products");

// Get specific column
const { data: column } = await client.columns.findOne("products", "title");

// Update column
await client.columns.update("products", "title", {
description: "Updated product title",
});

Supported Field Types

Boltic Tables supports 13 different field types:

Text Fields

  • text - Basic text strings
  • long-text - Extended text content
  • email - Email addresses with validation
  • phone-number - Phone numbers with formatting
  • link - URLs and web links

Numeric Fields

  • number - General numeric values
  • currency - Monetary values with currency formatting

Other Types

  • checkbox - Boolean true/false values
  • dropdown - Single or multiple selection from predefined options
  • date-time - Date and time values
  • json - Structured JSON data
  • vector - Full precision vectors for AI/ML
  • halfvec - Half precision vectors
  • sparsevec - Sparse vectors

Each field type has specific properties and validation rules. See the Field Types Reference for complete details.

Key Concepts

Column Properties

All columns support universal properties:

  • Name - Unique identifier within the table
  • Type - Data type determining storage and validation
  • Nullable - Whether null values are allowed
  • Unique - Enforce uniqueness constraint
  • Indexed - Create database index for performance
  • Default Value - Value for new records

Type-Specific Properties

Different field types have additional properties:

  • Number: decimals
  • Currency: currency_format, decimals
  • Phone: phone_format
  • Dropdown: selectable_items, multiple_selections
  • Date-time: date_format, time_format
  • Vector types: vector_dimension

Constraints and Validation

  • Column names must be alphanumeric
  • Type conversions have compatibility rules

Next Steps