@atscript/db-sql-tools 0.1.38 → 0.1.39

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/README.md +43 -0
  2. package/package.json +2 -2
package/README.md ADDED
@@ -0,0 +1,43 @@
1
+ <p align="center">
2
+ <img src="https://atscript.moost.org/logo.svg" alt="Atscript" width="120" />
3
+ </p>
4
+
5
+ <h1 align="center">@atscript/db-sql-tools</h1>
6
+
7
+ <p align="center">
8
+ <strong>Define your models once</strong> — get TypeScript types, runtime validation, and DB metadata from a single <code>.as</code> model.
9
+ </p>
10
+
11
+ <p align="center">
12
+ <a href="https://atscript.moost.org">Documentation</a> · <a href="https://atscript.moost.org/db/adapters/">DB Adapters</a>
13
+ </p>
14
+
15
+ ---
16
+
17
+ Shared SQL builder utilities for Atscript's SQL-based database adapters (`db-sqlite`, `db-mysql`, `db-postgres`). Provides parameterized query generation, MongoDB-style filter translation, and dialect abstraction.
18
+
19
+ This is an internal package — not typically installed directly by end users.
20
+
21
+ ## Installation
22
+
23
+ ```bash
24
+ pnpm add @atscript/db-sql-tools
25
+ ```
26
+
27
+ ## Features
28
+
29
+ - `SqlDialect` interface abstracting identifier quoting, parameter placeholders, regex, and value serialization
30
+ - `buildWhere` — translates MongoDB-style filters (`$gt`, `$in`, `$or`, `$regex`, etc.) to parameterized SQL
31
+ - `buildInsert`, `buildSelect`, `buildUpdate`, `buildDelete` — full SQL statement builders
32
+ - `buildAggregateSelect`, `buildAggregateCount` — GROUP BY, HAVING, aggregate functions
33
+ - `buildCreateView` — CREATE VIEW with JOINs, filters, and GROUP BY from Atscript view plans
34
+ - DDL helpers: query expression → SQL, referential actions, default value literals
35
+
36
+ ## Documentation
37
+
38
+ - [DB Adapters Guide](https://atscript.moost.org/db/adapters/)
39
+ - [Full Documentation](https://atscript.moost.org)
40
+
41
+ ## License
42
+
43
+ MIT
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atscript/db-sql-tools",
3
- "version": "0.1.38",
3
+ "version": "0.1.39",
4
4
  "description": "Shared SQL builder utilities for @atscript database adapters.",
5
5
  "keywords": [
6
6
  "atscript",
@@ -37,7 +37,7 @@
37
37
  },
38
38
  "peerDependencies": {
39
39
  "@uniqu/core": "^0.1.2",
40
- "@atscript/db": "^0.1.38"
40
+ "@atscript/db": "^0.1.39"
41
41
  },
42
42
  "scripts": {
43
43
  "pub": "pnpm publish --access public",