Database adapters and query layer for Atscript — define your models once in .as files, get type-safe CRUD for any database.
| Package | Description |
|---|---|
@atscript/db |
Core database abstraction — tables, views, relations, schema sync, and validation |
@atscript/db-sql-tools |
Shared SQL builder utilities for SQL-based adapters |
@atscript/db-sqlite |
SQLite adapter (via better-sqlite3) |
@atscript/db-postgres |
PostgreSQL adapter (via pg, with pgvector support) |
@atscript/db-mysql |
MySQL adapter (via mysql2) |
@atscript/db-mongo |
MongoDB adapter |
@atscript/moost-db |
Moost framework integration — auto-generated REST CRUD controllers |
@atscript/db-client |
Browser-compatible HTTP client for moost-db REST endpoints |
@atscript/db ← core: tables, views, relations, schema sync
├── @atscript/db-sql-tools ← shared SQL builders (WHERE, SELECT, INSERT, etc.)
│ ├── @atscript/db-sqlite
│ ├── @atscript/db-postgres
│ └── @atscript/db-mysql
├── @atscript/db-mongo ← native MongoDB driver, no SQL layer
├── @atscript/moost-db ← Moost HTTP controllers wrapping db tables
└── @atscript/db-client ← browser/SSR HTTP client for moost-db
See the full documentation at atscript.dev/db.
# Install dependencies
vp install
# Format, lint, test, and build everything
pnpm run ready
# Build all packages
pnpm run build
# Run all tests
pnpm run test
# Release (bump version, build, test, publish)
pnpm run release # patch
pnpm run release:minor # minor
pnpm run release:major # majorMIT