-
-
Notifications
You must be signed in to change notification settings - Fork 736
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 #166 from drizzle-team/bug-158
Fix .get mapping for sqlite
- Loading branch information
Showing
15 changed files
with
913 additions
and
76 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
- Fix [#158](https://github.com/drizzle-team/drizzle-orm/issues/158) issue. Method `.returning()` was working incorrectly with `.get()` method in sqlite dialect | ||
- Fix SQLite Proxy driver mapping bug | ||
- Add test cases for SQLite Proxy driver | ||
- Add additional example for SQLite Proxy Server setup to handle `.get()` as well |
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
This file was deleted.
Oops, something went wrong.
36 changes: 0 additions & 36 deletions
36
examples/sqlite-proxy/drizzle/20230202162455/snapshot.json
This file was deleted.
Oops, something went wrong.
11 changes: 11 additions & 0 deletions
11
examples/sqlite-proxy/drizzle/20230205140048/migration.sql
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,11 @@ | ||
CREATE TABLE cities ( | ||
`id` integer PRIMARY KEY NOT NULL, | ||
`name` text NOT NULL | ||
); | ||
|
||
CREATE TABLE users ( | ||
`id` integer PRIMARY KEY NOT NULL, | ||
`name` text NOT NULL, | ||
`email` text NOT NULL, | ||
`city_id` integer | ||
); |
64 changes: 64 additions & 0 deletions
64
examples/sqlite-proxy/drizzle/20230205140048/snapshot.json
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,64 @@ | ||
{ | ||
"version": "4", | ||
"dialect": "sqlite", | ||
"id": "71c97670-a6f8-42e0-9a15-4991f89e2134", | ||
"prevId": "00000000-0000-0000-0000-000000000000", | ||
"tables": { | ||
"cities": { | ||
"name": "cities", | ||
"columns": { | ||
"id": { | ||
"name": "id", | ||
"type": "integer", | ||
"primaryKey": true, | ||
"notNull": true, | ||
"autoincrement": false | ||
}, | ||
"name": { | ||
"name": "name", | ||
"type": "text", | ||
"primaryKey": false, | ||
"notNull": true | ||
} | ||
}, | ||
"indexes": {}, | ||
"foreignKeys": {}, | ||
"compositePrimaryKeys": {} | ||
}, | ||
"users": { | ||
"name": "users", | ||
"columns": { | ||
"id": { | ||
"name": "id", | ||
"type": "integer", | ||
"primaryKey": true, | ||
"notNull": true, | ||
"autoincrement": false | ||
}, | ||
"name": { | ||
"name": "name", | ||
"type": "text", | ||
"primaryKey": false, | ||
"notNull": true | ||
}, | ||
"email": { | ||
"name": "email", | ||
"type": "text", | ||
"primaryKey": false, | ||
"notNull": true | ||
}, | ||
"city_id": { | ||
"name": "city_id", | ||
"type": "integer", | ||
"primaryKey": false, | ||
"notNull": false, | ||
"autoincrement": false | ||
} | ||
}, | ||
"indexes": {}, | ||
"foreignKeys": {}, | ||
"compositePrimaryKeys": {} | ||
} | ||
}, | ||
"enums": {} | ||
} |
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 |
---|---|---|
@@ -1,7 +1,13 @@ | ||
import { int, sqliteTable, text } from "drizzle-orm/sqlite-core"; | ||
|
||
export const users = sqliteTable('users12', { | ||
export const users = sqliteTable('users', { | ||
id: int('id').primaryKey(), | ||
name: text('name').notNull(), | ||
email: text('email').notNull(), | ||
cityId: int('city_id'), | ||
}); | ||
|
||
export const cities = sqliteTable('cities', { | ||
id: int('id').primaryKey(), | ||
name: text('name').notNull(), | ||
}); |
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.