@xata.io/drizzle 0.0.0-alpha.v8c82348 → 0.0.0-alpha.v93e5699
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/.turbo/turbo-build.log +2 -2
- package/CHANGELOG.md +3 -3
- package/README.md +2 -15
- package/package.json +2 -2
package/.turbo/turbo-build.log
CHANGED
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
[90mhttps://rollupjs.org/troubleshooting/#warning-treating-module-as-external-dependency[39m
|
|
9
9
|
[1mdrizzle-orm[22m (imported by "src/driver.ts", "src/session.ts" and "src/utils.ts")
|
|
10
10
|
[1mdrizzle-orm/pg-core[22m (imported by "src/driver.ts", "src/session.ts" and "src/generate.ts")
|
|
11
|
-
[32mcreated [1mdist/index.cjs, dist/index.mjs[22m in [
|
|
11
|
+
[32mcreated [1mdist/index.cjs, dist/index.mjs[22m in [1m683ms[22m[39m
|
|
12
12
|
[36m
|
|
13
13
|
[1msrc/index.ts[22m → [1mdist/index.d.ts[22m...[39m
|
|
14
|
-
[32mcreated [1mdist/index.d.ts[22m in [1m10.
|
|
14
|
+
[32mcreated [1mdist/index.d.ts[22m in [1m10.5s[22m[39m
|
package/CHANGELOG.md
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
# @xata.io/drizzle
|
|
2
2
|
|
|
3
|
-
## 0.0.0-alpha.
|
|
3
|
+
## 0.0.0-alpha.v93e5699
|
|
4
4
|
|
|
5
5
|
### Patch Changes
|
|
6
6
|
|
|
7
7
|
- [#1145](https://github.com/xataio/client-ts/pull/1145) [`6934686c`](https://github.com/xataio/client-ts/commit/6934686cd7102d09d29deaf948c497f27cfdda87) Thanks [@SferaDev](https://github.com/SferaDev)! - Initial release
|
|
8
8
|
|
|
9
|
-
- Updated dependencies [
|
|
10
|
-
- @xata.io/client@0.0.0-alpha.
|
|
9
|
+
- Updated dependencies []:
|
|
10
|
+
- @xata.io/client@0.0.0-alpha.v93e5699
|
package/README.md
CHANGED
|
@@ -21,7 +21,7 @@ npm install drizzle-orm @xata.io/drizzle @xata.io/client
|
|
|
21
21
|
|
|
22
22
|
## Usage
|
|
23
23
|
|
|
24
|
-
To work with drizzle you need to define your models and then create a drizzle instance with the models.
|
|
24
|
+
To work with drizzle you need to define your models and then create a drizzle instance with the models. In the future, we will offer a helper function to create the drizzle models from the Xata schema.
|
|
25
25
|
|
|
26
26
|
```ts
|
|
27
27
|
import { pgTable, text } from 'drizzle-orm/pg-core';
|
|
@@ -37,20 +37,7 @@ const drivers = pgTable('drivers', {
|
|
|
37
37
|
forename: text('forename')
|
|
38
38
|
});
|
|
39
39
|
|
|
40
|
-
const
|
|
41
|
-
```
|
|
42
|
-
|
|
43
|
-
## [Experimental] Model generation
|
|
44
|
-
|
|
45
|
-
We offer an experimental model generation helper that will generate the models for you from your `tables` array in your `xata.ts` file. Since it's a work in progress, we don't recommend using it in production yet, please build your models manually.
|
|
46
|
-
|
|
47
|
-
```ts
|
|
48
|
-
import { buildModels } from '@xata.io/drizzle';
|
|
49
|
-
import { tables } from './xata';
|
|
50
|
-
|
|
51
|
-
const { drivers } = buildModels(tables);
|
|
52
|
-
|
|
53
|
-
const result = await db.select().from(drivers).execute();
|
|
40
|
+
const drivers = await db.select().from(drivers).execute();
|
|
54
41
|
```
|
|
55
42
|
|
|
56
43
|
## Limitations
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@xata.io/drizzle",
|
|
3
|
-
"version": "0.0.0-alpha.
|
|
3
|
+
"version": "0.0.0-alpha.v93e5699",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "./dist/index.cjs",
|
|
6
6
|
"module": "./dist/index.mjs",
|
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
"url": "https://github.com/xataio/client-ts/issues"
|
|
19
19
|
},
|
|
20
20
|
"dependencies": {
|
|
21
|
-
"@xata.io/client": "0.0.0-alpha.
|
|
21
|
+
"@xata.io/client": "0.0.0-alpha.v93e5699"
|
|
22
22
|
},
|
|
23
23
|
"devDependencies": {
|
|
24
24
|
"drizzle-orm": "^0.28.5"
|