Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.aiparlance.org/llms.txt

Use this file to discover all available pages before exploring further.

Database

Infra extensions on the entity model. Base: crm-reference.aip. Spec: Specification.

Supported databases (v0.1)

DatabaseLanguage (app)Transpiler v0.1
PostgreSQLpostgresPlanned (primary)
MySQLmysqlPlanned
SQLite, MariaDB, MongoDB, …Roadmap
You can declare database mysql in the spec today; DDL generation is not shipped yet (transpiler matrix).
app CRM @0.1 {
  database postgres
}

Migrations

Generated from entity with implicit fields in DDL.
CREATE TABLE users (
  id UUID PRIMARY KEY,
  name TEXT NOT NULL,
  email TEXT UNIQUE NOT NULL,
  created_at TIMESTAMPTZ NOT NULL,
  updated_at TIMESTAMPTZ NOT NULL
);

seed

seed User {
  name: "Administrator"
  email: "admin@example.com"
  role: admin
}

Indexes and constraints

index Lead {
  status
  created_at
}
ModifierSQL
requiredNOT NULL
uniqueUNIQUE
belongs_toREFERENCES …

Naming

EntityTableFK
Userusersuser_id
SalesOrdersales_orderssales_order_id
Rules: lowercase, snake_case, plural table names.

UUID and audit

  • id: uuid by default
  • timestamps: created_at, updated_at
  • soft_delete: nullable deleted_at

Semantic types → PostgreSQL

AI ParlancePostgreSQL
emailTEXT + app validation
jsonJSONB
datetimeTIMESTAMPTZ
phoneTEXT + normalization

Flow

entity / index / seed (.aip)

AST

Database Generator

DDL / migrations / ORM