@atscript/db-mysql 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 +58 -0
  2. package/package.json +5 -5
package/README.md ADDED
@@ -0,0 +1,58 @@
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-mysql</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/mysql">MySQL Adapter</a>
13
+ </p>
14
+
15
+ ---
16
+
17
+ MySQL adapter for `@atscript/db` using the `mysql2` driver. Supports native FULLTEXT search, VECTOR columns (MySQL 9.0+), AUTO_INCREMENT, batched multi-row inserts, and full schema sync.
18
+
19
+ Includes `MysqlPlugin` for `@db.mysql.*` annotations (engine, charset, collation, unsigned, type overrides, ON UPDATE).
20
+
21
+ ## Installation
22
+
23
+ ```bash
24
+ pnpm add @atscript/db-mysql mysql2
25
+ ```
26
+
27
+ ## Quick Start
28
+
29
+ ```typescript
30
+ import { DbSpace } from '@atscript/db'
31
+ import { createAdapter } from '@atscript/db-mysql'
32
+
33
+ const db = createAdapter('mysql://root@localhost:3306/mydb')
34
+ const users = db.getTable(UsersType)
35
+
36
+ await users.insertOne({ name: 'Alice', email: 'alice@example.com' })
37
+ ```
38
+
39
+ ## Features
40
+
41
+ - Full CRUD with batched multi-row INSERT (auto-chunking)
42
+ - Native FULLTEXT search via `MATCH ... AGAINST`
43
+ - VECTOR(N) column type on MySQL 9.0+ with distance functions
44
+ - AUTO_INCREMENT with configurable start value
45
+ - Storage engine selection (InnoDB, MyISAM, etc.)
46
+ - Character set and collation control
47
+ - UNSIGNED integer columns, native type overrides, ON UPDATE expressions
48
+ - Foreign key constraints with referential actions
49
+ - Full schema sync: CREATE, ALTER, DROP, indexes, views
50
+
51
+ ## Documentation
52
+
53
+ - [MySQL Adapter Guide](https://atscript.moost.org/db/adapters/mysql)
54
+ - [Full Documentation](https://atscript.moost.org)
55
+
56
+ ## License
57
+
58
+ MIT
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atscript/db-mysql",
3
- "version": "0.1.38",
3
+ "version": "0.1.39",
4
4
  "description": "MySQL adapter for @atscript/db with mysql2 driver support.",
5
5
  "keywords": [
6
6
  "atscript",
@@ -54,10 +54,10 @@
54
54
  "peerDependencies": {
55
55
  "@uniqu/core": "^0.1.2",
56
56
  "mysql2": ">=3.0.0",
57
- "@atscript/core": "^0.1.38",
58
- "@atscript/typescript": "^0.1.38",
59
- "@atscript/db": "^0.1.38",
60
- "@atscript/db-sql-tools": "^0.1.38"
57
+ "@atscript/core": "^0.1.39",
58
+ "@atscript/typescript": "^0.1.39",
59
+ "@atscript/db-sql-tools": "^0.1.39",
60
+ "@atscript/db": "^0.1.39"
61
61
  },
62
62
  "peerDependenciesMeta": {
63
63
  "mysql2": {