Skip to content

Repository files navigation

Atscript

Atscript DB

Database adapters and query layer for Atscript — define your models once in .as files, get type-safe CRUD for any database.

Packages

PackageDescription
@atscript/dbCore database abstraction — tables, views, relations, schema sync, and validation
@atscript/db-sql-toolsShared SQL builder utilities for SQL-based adapters
@atscript/db-sqliteSQLite adapter (via better-sqlite3)
@atscript/db-postgresPostgreSQL adapter (via pg, with pgvector support)
@atscript/db-mysqlMySQL adapter (via mysql2)
@atscript/db-mongoMongoDB adapter
@atscript/moost-dbMoost framework integration — auto-generated REST CRUD controllers
@atscript/db-clientBrowser-compatible HTTP client for moost-db REST endpoints

Architecture

@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

Documentation

See the full documentation at atscript.dev/db.

Development

# 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 # major

License

MIT

About

AtScript database adapters and Moost DB integration

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages