-
-
Notifications
You must be signed in to change notification settings - Fork 683
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2048 from drizzle-team/enums-custom-schema
Enums custom schema
- Loading branch information
Showing
155 changed files
with
23,860 additions
and
20,676 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
- 🎉 Added raw query support (`db.execute(...)`) to batch API in Neon HTTP driver | ||
- 🐛 Fixed `@neondatabase/serverless` HTTP driver types issue (#1945, neondatabase/serverless#66) | ||
- 🐛 Fixed sqlite-proxy driver `.run()` result |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
## New Features | ||
|
||
### 🎉 xata-http driver support | ||
|
||
According their **[official website](https://xata.io)**, Xata is a Postgres data platform with a focus on reliability, scalability, and developer experience. The Xata Postgres service is currently in beta, please see the [Xata docs](https://xata.io/docs/postgres) on how to enable it in your account. | ||
|
||
Drizzle ORM natively supports both the `xata` driver with `drizzle-orm/xata` package and the **[`postgres`](#postgresjs)** or **[`pg`](#node-postgres)** drivers for accessing a Xata Postgres database. | ||
|
||
The following example use the Xata generated client, which you obtain by running the [xata init](https://xata.io/docs/getting-started/installation) CLI command. | ||
|
||
```bash | ||
pnpm add drizzle-orm @xata.io/client | ||
``` | ||
|
||
```ts | ||
import { drizzle } from 'drizzle-orm/xata-http'; | ||
import { getXataClient } from './xata'; // Generated client | ||
|
||
const xata = getXataClient(); | ||
const db = drizzle(xata); | ||
|
||
const result = await db.select().from(...); | ||
``` | ||
|
||
You can also connect to Xata using `pg` or `postgres.js` drivers |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
- 🎉 Added custom schema support to enums in Postgres: | ||
|
||
```ts | ||
import { pgSchema } from 'drizzle-orm/pg-core'; | ||
|
||
const mySchema = pgSchema('mySchema'); | ||
const colors = mySchema.enum('colors', ['red', 'green', 'blue']); | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.