You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
## Added `Gel` dialect support and `gel-js` client support
4
+
5
+
Drizzle is getting a new `Gel` dialect with its own types and Gel-specific logic. In this first iteration, almost all query-building features have been copied from the `PostgreSQL` dialect since Gel is fully PostgreSQL-compatible. The only change in this iteration is the data types. The Gel dialect has a different set of available data types, and all mappings for these types have been designed to avoid any extra conversions on Drizzle's side. This means you will insert and select exactly the same data as supported by the Gel protocol.
6
+
7
+
Drizzle + Gel integration will work only through `drizzle-kit pull`. Drizzle won't support `generate`, `migrate`, or `push` features in this case. Instead, drizzle-kit is used solely to pull the Drizzle schema from the Gel database, which can then be used in your `drizzle-orm` queries.
8
+
9
+
The Gel + Drizzle workflow:
10
+
11
+
1. Use the `gel` CLI to manage your schema.
12
+
2. Use the `gel` CLI to generate and apply migrations to the database.
13
+
3. Use drizzle-kit to pull the Gel database schema into a Drizzle schema.
14
+
4. Use drizzle-orm with gel-js to query the Gel database.
15
+
16
+
On the drizzle-kit side you can now use `dialect: "gel"`
17
+
18
+
```ts
19
+
// drizzle.config.ts
20
+
import { defineConfig } from'drizzle-kit';
21
+
22
+
exportdefaultdefineConfig({
23
+
dialect: 'gel',
24
+
});
25
+
```
26
+
27
+
For a complete Get Started tutorial you can use our new guides:
28
+
29
+
-[Get Started with Drizzle and Gel in a new project](https://orm.drizzle.team/docs/get-started/gel-new)
30
+
-[Get Started with Drizzle and Gel in a existing project](https://orm.drizzle.team/docs/get-started/gel-existing)
## Added `Gel` dialect support and `gel-js` client support
4
+
5
+
Drizzle is getting a new `Gel` dialect with its own types and Gel-specific logic. In this first iteration, almost all query-building features have been copied from the `PostgreSQL` dialect since Gel is fully PostgreSQL-compatible. The only change in this iteration is the data types. The Gel dialect has a different set of available data types, and all mappings for these types have been designed to avoid any extra conversions on Drizzle's side. This means you will insert and select exactly the same data as supported by the Gel protocol.
6
+
7
+
Drizzle + Gel integration will work only through `drizzle-kit pull`. Drizzle won't support `generate`, `migrate`, or `push` features in this case. Instead, drizzle-kit is used solely to pull the Drizzle schema from the Gel database, which can then be used in your `drizzle-orm` queries.
8
+
9
+
The Gel + Drizzle workflow:
10
+
11
+
1. Use the `gel` CLI to manage your schema.
12
+
2. Use the `gel` CLI to generate and apply migrations to the database.
13
+
3. Use drizzle-kit to pull the Gel database schema into a Drizzle schema.
14
+
4. Use drizzle-orm with gel-js to query the Gel database.
15
+
16
+
Here is a small example of how to connect to Gel using Drizzle:
17
+
18
+
```typescript copy
19
+
// Make sure to install the 'gel' package
20
+
import { drizzle } from"drizzle-orm/gel";
21
+
import { createClient } from"gel";
22
+
23
+
const gelClient =createClient();
24
+
const db =drizzle({ client: gelClient });
25
+
26
+
const result =awaitdb.execute('select 1');
27
+
```
28
+
29
+
On the drizzle-kit side you can now use `dialect: "gel"`
30
+
31
+
```ts
32
+
// drizzle.config.ts
33
+
import { defineConfig } from'drizzle-kit';
34
+
35
+
exportdefaultdefineConfig({
36
+
dialect: 'gel',
37
+
});
38
+
```
39
+
40
+
For a complete Get Started tutorial you can use our new guides:
41
+
42
+
-[Get Started with Drizzle and Gel in a new project](https://orm.drizzle.team/docs/get-started/gel-new)
43
+
-[Get Started with Drizzle and Gel in a existing project](https://orm.drizzle.team/docs/get-started/gel-existing)
0 commit comments