@atscript/db-mysql 0.1.39 → 0.1.41
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.
- package/README.md +9 -9
- package/dist/index-B1N7X623.d.mts +6 -0
- package/dist/index-O193LJVT.d.cts +6 -0
- package/dist/index.cjs +266 -307
- package/dist/index.d.cts +272 -0
- package/dist/index.d.mts +272 -0
- package/dist/index.mjs +240 -258
- package/dist/plugin-3jLlPI4f.mjs +93 -0
- package/dist/plugin-C53PKZHf.cjs +98 -0
- package/dist/plugin.cjs +3 -111
- package/dist/plugin.d.cts +2 -0
- package/dist/plugin.d.mts +2 -0
- package/dist/plugin.mjs +2 -87
- package/package.json +23 -33
- package/LICENSE +0 -21
- package/dist/index.d.ts +0 -271
- package/dist/plugin.d.ts +0 -5
package/README.md
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<p align="center">
|
|
2
|
-
<img src="https://atscript.
|
|
2
|
+
<img src="https://db.atscript.dev/logo.svg" alt="Atscript" width="120" />
|
|
3
3
|
</p>
|
|
4
4
|
|
|
5
5
|
<h1 align="center">@atscript/db-mysql</h1>
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
</p>
|
|
10
10
|
|
|
11
11
|
<p align="center">
|
|
12
|
-
<a href="https://atscript.
|
|
12
|
+
<a href="https://db.atscript.dev">Documentation</a> · <a href="https://db.atscript.dev/adapters/mysql">MySQL Adapter</a>
|
|
13
13
|
</p>
|
|
14
14
|
|
|
15
15
|
---
|
|
@@ -27,13 +27,13 @@ pnpm add @atscript/db-mysql mysql2
|
|
|
27
27
|
## Quick Start
|
|
28
28
|
|
|
29
29
|
```typescript
|
|
30
|
-
import { DbSpace } from
|
|
31
|
-
import { createAdapter } from
|
|
30
|
+
import { DbSpace } from "@atscript/db";
|
|
31
|
+
import { createAdapter } from "@atscript/db-mysql";
|
|
32
32
|
|
|
33
|
-
const db = createAdapter(
|
|
34
|
-
const users = db.getTable(UsersType)
|
|
33
|
+
const db = createAdapter("mysql://root@localhost:3306/mydb");
|
|
34
|
+
const users = db.getTable(UsersType);
|
|
35
35
|
|
|
36
|
-
await users.insertOne({ name:
|
|
36
|
+
await users.insertOne({ name: "Alice", email: "alice@example.com" });
|
|
37
37
|
```
|
|
38
38
|
|
|
39
39
|
## Features
|
|
@@ -50,8 +50,8 @@ await users.insertOne({ name: 'Alice', email: 'alice@example.com' })
|
|
|
50
50
|
|
|
51
51
|
## Documentation
|
|
52
52
|
|
|
53
|
-
- [MySQL Adapter Guide](https://atscript.
|
|
54
|
-
- [Full Documentation](https://atscript.
|
|
53
|
+
- [MySQL Adapter Guide](https://db.atscript.dev/adapters/mysql)
|
|
54
|
+
- [Full Documentation](https://db.atscript.dev)
|
|
55
55
|
|
|
56
56
|
## License
|
|
57
57
|
|