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
- Fix [#158](https://github.com/drizzle-team/drizzle-orm/issues/158) issue. Method `.returning()` was working incorrectly with `.get()` method in sqlite dialect
2
+
- Fix SQLite Proxy driver mapping bug
3
+
- Add test cases for SQLite Proxy driver
4
+
- Add additional example for SQLite Proxy Server setup to handle `.get()` as well
Copy file name to clipboardExpand all lines: examples/sqlite-proxy/README.md
+22-14
Original file line number
Diff line number
Diff line change
@@ -9,7 +9,7 @@ Subscribe to our updates on [Twitter](https://twitter.com/DrizzleOrm) and [Disco
9
9
SQLite Proxy driver will do all the work except of 2 things, that you will be responsible for:
10
10
11
11
1. Calls to database, http servers or any other way to communicate with database
12
-
2. Mapping data from database to `{rows: string[][], ...additional db response params}` format. Only `row` field is required
12
+
2. Mapping data from database to `{rows: any[], ...additional db response params}` format. Only `rows` field is required. Rows should be a row array from database
13
13
14
14
</br>
15
15
This project has simple example of defining http proxy server, that will proxy all calls from drizzle orm to database and back. This example could perfectly fit for serverless applications
@@ -32,6 +32,8 @@ This project has simple example of defining http proxy server, that will proxy a
32
32
33
33
> **Warning**:
34
34
> You will be responsible for proper error handling in this part. Drizzle always waits for `{rows: string[][]}` so if any error was on http call(or any other call) - be sure, that you return at least empty array back
35
+
>
36
+
> For `get` method you should return `{rows: string[]}`
35
37
36
38
</br>
37
39
@@ -59,7 +61,7 @@ We have 3 params, that will be sent to server. It's your decision which of them
59
61
60
62
1.`sql` - SQL query (`SELECT * FROM users WHERE id = ?`)
61
63
2.`params` - params, that should be sent on database call (For query above it could be: `[1]`)
62
-
3.`method` - Method, that was executed (`run` | `all` | `values`). Hint for proxy server on which sqlite method to invoke
64
+
3.`method` - Method, that was executed (`run` | `all` | `values` | `get`). Hint for proxy server on which sqlite method to invoke
63
65
64
66
### Migrations using SQLite Proxy
65
67
@@ -78,15 +80,14 @@ In current SQLite Proxy version - drizzle don't handle transactions for migratio
0 commit comments