Skip to main content
Connic
Platform

Database

Every environment includes a managed, schemaless database. Data is stored in named collections, queried with expressive filters, and browsed in the dashboard, without migrations, schema setup, or external hosting.

Last updated
Collections
Group documents into named collections. Names must start with a letter and use only lowercase letters, digits, and underscores (max 50 chars).
Zero-setup, auto-creation
Collections are created on demand when db_insert or db_upsert first writes to them through database tools.
Expressive filters
Filter with $eq, $ne, $gt, $gte, $lt, $lte, $in, $nin, $and, $or, $nor, $not, $exists, $contains, $elemMatch, and $regex. Sort, paginate, project fields, or enumerate distinct values.

Data model

Each document is free-form with custom fields and no fixed schema. Every document gets three system-managed fields:

  • _id: auto-generated UUID, unique within the collection
  • _created_at: ISO 8601 timestamp set on insert
  • _updated_at: ISO 8601 timestamp set on every write
document-shape.py
# Every document has these system fields alongside custom data:
{
    "order_id": "ORD-001",
    "status":   "pending",
    "amount":   99.50,
    "_id":         "550e8400-e29b-41d4-a716-446655440000",  # auto-generated UUID
    "_created_at": "2026-01-15T10:30:00Z",
    "_updated_at": "2026-01-15T10:30:00Z",
}

Auto-creation

Collections do not require explicit creation. The first call to db_insert or db_upsert creates the collection.

tools/orders.py
# No setup needed - the collection "orders" is created automatically
# the first time db_insert or db_upsert writes to it
result = await db_insert("orders", {
    "order_id": "ORD-001",
    "customer": "alice@example.com",
    "amount":   99.50,
    "status":   "pending",
})

Collections can also be created manually from the Storage → Database tab in the dashboard.

Dashboard

The Storage → Database tab in the project dashboard supports:

  • View all collections with document counts and storage sizes
  • Browse documents with filter and sort controls
  • Generate filters and sort order from plain-language requests
  • Insert documents manually
  • View the inferred schema: field names, types, and fill rates
  • Create and delete collections
The Storage → Database tab in the dashboard: a Collections sidebar listing customers (3), incidents (2), and orders (3), beside the selected customers collection — 3 docs, 56.0 KB — with its Browse tab showing three documents in a table of id, name, tier, health, created_at, and updated_at columns.
The Database tab: collections with their document counts on the left, and the selected collection's documents on the right.
The Schema tab for the customers collection: an inferred field table listing health, id, name, and tier, each typed as string with a 100% fill-rate bar and example values such as enterprise, pro.
The Schema tab infers each field's type and fill rate from a sample of the collection's documents.