show, don't tell
Here's the whole thing.
You author a single declarative schema. Rad generates the exact clients for your database. No ORMs. No query builders. No string-gluing.
tables:
- id: 1
name: users
columns:
- { id: 1, name: id, type: string, pk: true, default: uuid() }
- { id: 2, name: email, type: string, unique: true }
- id: 2
name: teams
columns:
- { id: 1, name: id, type: string, pk: true, default: uuid() }
- { id: 2, name: name, type: string }
- id: 3
name: boards
columns:
- { id: 1, name: id, type: string, pk: true, default: uuid() }
- { id: 2, name: team_id, type: string, ref: teams.id }
- { id: 3, name: name, type: string }
- id: 4
name: tasks
columns:
- { id: 1, name: id, type: string, pk: true, default: uuid() }
- { id: 2, name: board_id, type: string, ref: boards.id, index: true }
- { id: 3, name: title, type: string }
- { id: 4, name: status, type: string, default: todo }
- { id: 5, name: priority, type: int64, default: 2 }
- { id: 6, name: assignee_id, type: string, ref: users.id, nullable: true }
- { id: 7, name: estimate, type: float64, nullable: true }
indexes:
- { columns: [board_id, status] }