data-api-client 2.2.0 → 2.4.0
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/README.md +175 -70
- package/dist/compat/errors.d.ts +1 -0
- package/dist/compat/errors.d.ts.map +1 -1
- package/dist/compat/errors.js +37 -0
- package/dist/compat/index.d.ts +2 -0
- package/dist/compat/index.d.ts.map +1 -1
- package/dist/compat/index.js +7 -1
- package/dist/compat/knex.d.ts +4 -0
- package/dist/compat/knex.d.ts.map +1 -0
- package/dist/compat/knex.js +34 -0
- package/dist/compat/mysql2.d.ts.map +1 -1
- package/dist/compat/mysql2.js +58 -12
- package/dist/compat/pg.d.ts.map +1 -1
- package/dist/compat/pg.js +49 -37
- package/dist/compat/prisma-params.d.ts +24 -0
- package/dist/compat/prisma-params.d.ts.map +1 -0
- package/dist/compat/prisma-params.js +99 -0
- package/dist/compat/prisma-types.d.ts +34 -0
- package/dist/compat/prisma-types.d.ts.map +1 -0
- package/dist/compat/prisma-types.js +132 -0
- package/dist/compat/prisma.d.ts +53 -0
- package/dist/compat/prisma.d.ts.map +1 -0
- package/dist/compat/prisma.js +121 -0
- package/dist/compat/transaction-sql.d.ts +21 -0
- package/dist/compat/transaction-sql.d.ts.map +1 -0
- package/dist/compat/transaction-sql.js +33 -0
- package/dist/params.d.ts +1 -1
- package/dist/params.d.ts.map +1 -1
- package/dist/params.js +9 -7
- package/dist/results.js +3 -3
- package/dist/types.d.ts +1 -0
- package/dist/types.d.ts.map +1 -1
- package/package.json +38 -6
package/README.md
CHANGED
|
@@ -3,52 +3,51 @@
|
|
|
3
3
|
[](https://www.npmjs.com/package/data-api-client)
|
|
4
4
|
[](https://www.npmjs.com/package/data-api-client)
|
|
5
5
|
|
|
6
|
-
> **Note:** Version 2.1.0 introduces mysql2 and pg compatibility layers with full ORM support! We welcome your feedback and bug reports. Please [open an issue](https://github.com/jeremydaly/data-api-client/issues) if you encounter any problems or have suggestions for improvement.
|
|
7
|
-
>
|
|
8
6
|
> **Using v1.x?** See [README_v1.md](README_v1.md) for v1.x documentation.
|
|
9
7
|
|
|
10
|
-
The **Data API Client** is a lightweight wrapper that
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
For more information about the Aurora Serverless Data API, you can review the [official documentation](https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/data-api.html)
|
|
17
|
-
|
|
18
|
-
## What's New in v2.
|
|
19
|
-
|
|
20
|
-
- **
|
|
21
|
-
-
|
|
22
|
-
-
|
|
23
|
-
-
|
|
24
|
-
- **
|
|
25
|
-
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
- **
|
|
50
|
-
- **
|
|
51
|
-
-
|
|
8
|
+
The **Data API Client** is a lightweight wrapper that makes using the Amazon Aurora Serverless Data API with your favorite ORMs and query builders incredibly easy. It ships with drop-in **compatibility layers** for the `mysql2` and `pg` drivers, plus dedicated adapters for **Knex** and **Prisma**. Point **Drizzle**, **Kysely**, **Knex**, or **Prisma** at the Data API and keep writing the queries you already know, with no changes to your models or query code.
|
|
9
|
+
|
|
10
|
+
Prefer raw SQL? The client gives you a clean, [DocumentClient](https://docs.aws.amazon.com/AWSJavaScriptSDK/latest/AWS/DynamoDB/DocumentClient.html)-style interface and handles the tedious part for you. The Data API makes you annotate every field value with its type, both going in and coming back, which gets old fast. This library maps native JavaScript types to the Data API's format and back automatically.
|
|
11
|
+
|
|
12
|
+
Either way, you get clean **transactions** and **automatic retry logic** for scale-to-zero clusters built in.
|
|
13
|
+
|
|
14
|
+
For more information about the Aurora Serverless Data API, you can review the [official documentation](https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/data-api.html).
|
|
15
|
+
|
|
16
|
+
## What's New in v2.4
|
|
17
|
+
|
|
18
|
+
- **Prisma support**: the `data-api-client/compat/prisma` adapter lets Prisma Client run on the Data API for both PostgreSQL and MySQL.
|
|
19
|
+
- `createPrismaPgAdapter()` and `createPrismaMySQLAdapter()` return a Prisma 7 driver adapter you hand straight to `new PrismaClient({ adapter })`
|
|
20
|
+
- The full Prisma Client query API is covered for both engines: CRUD, aggregation and `groupBy`, the filter operators, pagination and cursors, `select`/`include`/`omit`, nested writes, relation filters, atomic number updates, JSON, `Decimal`/`BigInt`/`DateTime`, PostgreSQL scalar arrays, raw queries, and transactions
|
|
21
|
+
- **Transactions** map to the native Data API lifecycle; nested savepoints are rejected, same as the other layers
|
|
22
|
+
- **Migrations** run through Prisma's schema engine, which needs a direct connection the Data API doesn't provide. Point it at your Aurora cluster endpoint (the same split Neon and PlanetScale use) or generate the SQL offline. See the Prisma section for details.
|
|
23
|
+
- `@prisma/driver-adapter-utils` is an optional peer dependency
|
|
24
|
+
|
|
25
|
+
See the [Prisma section](#prisma) for usage.
|
|
26
|
+
|
|
27
|
+
## Changelog
|
|
28
|
+
|
|
29
|
+
### v2.3
|
|
30
|
+
|
|
31
|
+
- **Knex support**: `data-api-client/compat/knex` (`createKnexMySQLClient()` / `createKnexPgClient()`) runs Knex on the Data API for MySQL and PostgreSQL, including transactions (nested transactions rejected, since the Data API has no `SAVEPOINT` primitive). `knex` is an optional peer dependency. See the [Knex section](#knex-query-builder).
|
|
32
|
+
- Fixed two latent compatibility-layer bugs that also affected non-Knex callers: pg parameter binding via the config-object callback form, and mysql2 callback parsing
|
|
33
|
+
|
|
34
|
+
### v2.2
|
|
35
|
+
|
|
36
|
+
- Dependency updates, including a raised `@aws-sdk/client-rds-data` peer dependency floor
|
|
37
|
+
|
|
38
|
+
### v2.1
|
|
39
|
+
|
|
40
|
+
- **mysql2** and **pg** compatibility layers: drop-in replacements for those drivers, with connection pools, transactions, and both Promise and callback APIs
|
|
41
|
+
- **Automatic retry logic** for Aurora Serverless scale-to-zero wake-ups (`DatabaseResumingException` and transient connection errors), configurable and enabled by default
|
|
42
|
+
- Verified ORM support for **Drizzle** and **Kysely**
|
|
43
|
+
|
|
44
|
+
### v2.0
|
|
45
|
+
|
|
46
|
+
- Migrated to **AWS SDK v3** for smaller bundles and better tree-shaking
|
|
47
|
+
- Full **TypeScript** implementation with comprehensive type definitions
|
|
48
|
+
- **PostgreSQL array** results automatically converted to native JavaScript arrays
|
|
49
|
+
- Comprehensive PostgreSQL data type coverage: numeric, string, boolean, date/time, `BYTEA`, JSON/JSONB, UUID, network (INET/CIDR), range, and arrays of all supported types
|
|
50
|
+
- Inline (`::type`) and parameter-based type casting, with more informative error messages
|
|
52
51
|
|
|
53
52
|
## Simple Examples
|
|
54
53
|
|
|
@@ -197,7 +196,7 @@ The AWS Data API offers a [built-in JSON format option](https://docs.aws.amazon.
|
|
|
197
196
|
|
|
198
197
|
**No Additional Limitations:** AWS's JSON support requires unique column names and has a 10MB response limit. The Data API Client works with any column configuration and imposes no additional size restrictions.
|
|
199
198
|
|
|
200
|
-
|
|
199
|
+
AWS's JSON support is a basic convenience feature. The **Data API Client** provides true type intelligence, format flexibility, and seamless handling of complex PostgreSQL features that the native Data API doesn't support well.
|
|
201
200
|
|
|
202
201
|
## Installation and Setup
|
|
203
202
|
|
|
@@ -232,7 +231,7 @@ Below is a table containing all of the possible configuration options for the `d
|
|
|
232
231
|
|
|
233
232
|
### Automatic Retry Logic
|
|
234
233
|
|
|
235
|
-
Version 2.1
|
|
234
|
+
Version 2.1 introduced built-in retry logic to handle Aurora Serverless scale-to-zero cluster wake-ups automatically. When your cluster is paused and needs to resume, the client will automatically retry your queries with optimized delays.
|
|
236
235
|
|
|
237
236
|
**Features:**
|
|
238
237
|
|
|
@@ -584,7 +583,7 @@ const data = dataApiClient({
|
|
|
584
583
|
|
|
585
584
|
## mysql2 and pg Compatibility Layers
|
|
586
585
|
|
|
587
|
-
Version 2.1
|
|
586
|
+
Version 2.1 introduced compatibility layers that allow you to use the Data API Client as a drop-in replacement for popular database libraries. This makes it easy to migrate existing applications or use ORMs without modification.
|
|
588
587
|
|
|
589
588
|
### mysql2 Compatibility
|
|
590
589
|
|
|
@@ -855,10 +854,120 @@ const db = new Kysely<Database>({
|
|
|
855
854
|
const users = await db.selectFrom('users').selectAll().where('id', '=', 123).execute()
|
|
856
855
|
```
|
|
857
856
|
|
|
857
|
+
#### Knex Query Builder
|
|
858
|
+
|
|
859
|
+
Knex doesn't accept an injected pool like Drizzle and Kysely. It constructs its own
|
|
860
|
+
driver internally, so the `data-api-client/compat/knex` helpers return a custom Knex
|
|
861
|
+
`client` class wired to the Data API, which you pass as `client`:
|
|
862
|
+
|
|
863
|
+
**MySQL with Knex:**
|
|
864
|
+
|
|
865
|
+
```typescript
|
|
866
|
+
import knex from 'knex'
|
|
867
|
+
import { createKnexMySQLClient } from 'data-api-client/compat/knex'
|
|
868
|
+
|
|
869
|
+
const db = knex({
|
|
870
|
+
client: createKnexMySQLClient({
|
|
871
|
+
resourceArn: 'arn:...',
|
|
872
|
+
secretArn: 'arn:...',
|
|
873
|
+
database: 'myDatabase'
|
|
874
|
+
}),
|
|
875
|
+
connection: {}
|
|
876
|
+
})
|
|
877
|
+
|
|
878
|
+
// Use Knex normally
|
|
879
|
+
const users = await db('users').where('id', 123).select('*')
|
|
880
|
+
```
|
|
881
|
+
|
|
882
|
+
**PostgreSQL with Knex:**
|
|
883
|
+
|
|
884
|
+
```typescript
|
|
885
|
+
import knex from 'knex'
|
|
886
|
+
import { createKnexPgClient } from 'data-api-client/compat/knex'
|
|
887
|
+
|
|
888
|
+
const db = knex({
|
|
889
|
+
client: createKnexPgClient({
|
|
890
|
+
resourceArn: 'arn:...',
|
|
891
|
+
secretArn: 'arn:...',
|
|
892
|
+
database: 'myDatabase'
|
|
893
|
+
}),
|
|
894
|
+
connection: {}
|
|
895
|
+
})
|
|
896
|
+
|
|
897
|
+
// Use Knex normally
|
|
898
|
+
const id = await db('users').insert({ name: 'Alice' }).returning('id')
|
|
899
|
+
```
|
|
900
|
+
|
|
901
|
+
> **Note:** `knex` is an optional peer dependency. Install it alongside `data-api-client`
|
|
902
|
+
> to use these helpers.
|
|
903
|
+
|
|
904
|
+
Knex transactions work. The compat layer intercepts the `BEGIN`/`COMMIT`/`ROLLBACK`
|
|
905
|
+
SQL that Knex issues and maps it to the Data API transaction lifecycle:
|
|
906
|
+
|
|
907
|
+
```typescript
|
|
908
|
+
await db.transaction(async (trx) => {
|
|
909
|
+
const [userId] = await trx('users').insert({ name: 'Alice' }).returning('id')
|
|
910
|
+
await trx('posts').insert({ user_id: userId, title: 'Hello' })
|
|
911
|
+
}) // commits on success, rolls back if the callback throws
|
|
912
|
+
```
|
|
913
|
+
|
|
914
|
+
> **Nested transactions are not supported.** They require SQL `SAVEPOINT`s, which the RDS
|
|
915
|
+
> Data API has no primitive for, so a nested `trx.transaction(...)` throws. A single
|
|
916
|
+
> top-level transaction works as shown above.
|
|
917
|
+
|
|
918
|
+
The common query-builder syntax is covered by integration tests for both engines:
|
|
919
|
+
selects/`distinct`/`pluck`/`first`, the `where` family (`whereIn`, `whereNull`,
|
|
920
|
+
`whereBetween`, `whereExists`, `whereRaw`, and so on), joins, `groupBy`/`having`/aggregates,
|
|
921
|
+
`orderBy`/`limit`/`offset`, unions, subqueries, CTEs (`with`), `insert`/`update`/`del`,
|
|
922
|
+
`returning` (PostgreSQL), `increment`/`decrement`, and `onConflict().merge()` upserts.
|
|
923
|
+
Streaming via `.stream()` is not supported, since the Data API has no cursor API.
|
|
924
|
+
|
|
925
|
+
#### Prisma
|
|
926
|
+
|
|
927
|
+
A drop-in Prisma 7 driver adapter so Prisma Client runs over the Aurora Data API, for both PostgreSQL and MySQL.
|
|
928
|
+
|
|
929
|
+
**Install:**
|
|
930
|
+
|
|
931
|
+
You need `@prisma/client` and `prisma` installed in your project. The adapter uses `@prisma/driver-adapter-utils`, which is an optional peer dependency of `data-api-client`. Install it alongside:
|
|
932
|
+
|
|
933
|
+
```bash
|
|
934
|
+
npm install @prisma/client prisma @prisma/driver-adapter-utils
|
|
935
|
+
```
|
|
936
|
+
|
|
937
|
+
**Usage (PostgreSQL):**
|
|
938
|
+
|
|
939
|
+
```typescript
|
|
940
|
+
import { PrismaClient } from '@prisma/client'
|
|
941
|
+
import { createPrismaPgAdapter } from 'data-api-client/compat/prisma'
|
|
942
|
+
|
|
943
|
+
const adapter = createPrismaPgAdapter({
|
|
944
|
+
secretArn: process.env.SECRET_ARN,
|
|
945
|
+
resourceArn: process.env.RESOURCE_ARN,
|
|
946
|
+
database: 'mydb'
|
|
947
|
+
})
|
|
948
|
+
|
|
949
|
+
const prisma = new PrismaClient({ adapter })
|
|
950
|
+
```
|
|
951
|
+
|
|
952
|
+
Use `createPrismaMySQLAdapter` for MySQL. It takes the same config shape.
|
|
953
|
+
|
|
954
|
+
**Limitations:**
|
|
955
|
+
|
|
956
|
+
- **Nested transactions** are not supported. They require SQL `SAVEPOINT`s, which the RDS Data API has no primitive for. Top-level interactive transactions (via `prisma.$transaction()`) work correctly.
|
|
957
|
+
- **Array parameters**: the Data API cannot bind array parameters directly. The Prisma adapter handles this for PostgreSQL native array columns by rewriting array values to `ARRAY[...]` constructor syntax automatically. The underlying Data API constraint remains; the rewrite happens in the adapter before the query reaches the wire.
|
|
958
|
+
|
|
959
|
+
**Migrations:**
|
|
960
|
+
|
|
961
|
+
Prisma driver adapters cover the **runtime query path only**. Prisma's Schema Engine (`prisma migrate`, `db push`, `db pull`) requires a direct database connection URL, which the Data API does not provide. This is the same split every serverless driver has. Neon uses a `directUrl`, PlanetScale uses a connection string, and driver adapters handle runtime while schema operations need a real connection.
|
|
962
|
+
|
|
963
|
+
The recommended approach: Aurora Serverless v2 also exposes a standard PostgreSQL/MySQL cluster endpoint. Point Prisma's migration `url` in `prisma.config.ts` at that direct Aurora endpoint, exactly like Neon's `directUrl` pattern, and use the Data API adapter at runtime only. This requires network access to the cluster endpoint (in-VPC CI, a bastion/tunnel/VPN, or a publicly accessible dev cluster).
|
|
964
|
+
|
|
965
|
+
If direct endpoint access is not available: generate migration SQL offline with `prisma migrate diff` (no live database connection needed; use schema-to-schema diffs to avoid the shadow-database requirement) and apply it over the Data API adapter.
|
|
966
|
+
|
|
858
967
|
**Benefits of Compatibility Layers:**
|
|
859
968
|
|
|
860
969
|
- **Zero code changes** when migrating from mysql2 or pg
|
|
861
|
-
- **Full ORM support** (Drizzle, Kysely)
|
|
970
|
+
- **Full ORM support** (Drizzle, Kysely, Knex, Prisma)
|
|
862
971
|
- **Automatic retry logic** for cluster wake-ups
|
|
863
972
|
- **Connection pooling simulation** (getConnection, release)
|
|
864
973
|
- **Both Promise and callback APIs** supported
|
|
@@ -919,11 +1028,11 @@ await data.query('INSERT INTO products (tags) VALUES (ARRAY[:tag1, :tag2, :tag3]
|
|
|
919
1028
|
})
|
|
920
1029
|
```
|
|
921
1030
|
|
|
922
|
-
Despite these input limitations, **all array results are automatically converted to native JavaScript arrays**, making it easy to work with PostgreSQL array data in your application. `NULL` elements inside arrays round-trip correctly
|
|
1031
|
+
Despite these input limitations, **all array results are automatically converted to native JavaScript arrays**, making it easy to work with PostgreSQL array data in your application. `NULL` elements inside arrays round-trip correctly. For example, `'{1,NULL,3}'::int[]` deserializes to `[1, null, 3]`.
|
|
923
1032
|
|
|
924
1033
|
## PostgreSQL Data Type Support
|
|
925
1034
|
|
|
926
|
-
Version 2.0
|
|
1035
|
+
Version 2.0 introduced comprehensive support for PostgreSQL data types:
|
|
927
1036
|
|
|
928
1037
|
### Numeric Types
|
|
929
1038
|
|
|
@@ -1049,7 +1158,7 @@ await data.query('INSERT INTO bookings (date_range) VALUES (:range::INT4RANGE)',
|
|
|
1049
1158
|
|
|
1050
1159
|
## TypeScript Support
|
|
1051
1160
|
|
|
1052
|
-
Version 2.
|
|
1161
|
+
Version 2.x is written in TypeScript and provides comprehensive type definitions:
|
|
1053
1162
|
|
|
1054
1163
|
```typescript
|
|
1055
1164
|
import dataApiClient from 'data-api-client'
|
|
@@ -1086,6 +1195,12 @@ The RDS Data API does **not support binding array parameters** directly. Attempt
|
|
|
1086
1195
|
|
|
1087
1196
|
Despite parameter limitations, array **results** work great! The Data API Client automatically converts PostgreSQL arrays in query results to native JavaScript arrays.
|
|
1088
1197
|
|
|
1198
|
+
### Large result sets are capped at ~1 MB
|
|
1199
|
+
|
|
1200
|
+
The Data API returns at most about 1 MB of data per statement, and it has no server-side pagination. There's no cursor or `nextToken` to fetch the next chunk, so a single query that returns more than ~1 MB fails instead of paging.
|
|
1201
|
+
|
|
1202
|
+
The fix is to page the query yourself. Add a `LIMIT` and walk through the rows, and prefer keyset pagination (a `WHERE id > :lastId ORDER BY id LIMIT :pageSize` style) over `OFFSET`, which gets slow on deep pages. If you're using one of the ORM or query-builder layers, you already have this: Drizzle, Kysely, Knex, and Prisma all expose `take`/`skip`/`cursor`, so page the way you normally would and you won't hit the cap.
|
|
1203
|
+
|
|
1089
1204
|
### Some Advanced Types Have Limitations
|
|
1090
1205
|
|
|
1091
1206
|
- **MACADDR**: Not supported by the Data API
|
|
@@ -1098,27 +1213,19 @@ Batch operations don't return `numberOfRecordsUpdated` for UPDATE/DELETE stateme
|
|
|
1098
1213
|
|
|
1099
1214
|
## Enabling Data API
|
|
1100
1215
|
|
|
1101
|
-
|
|
1102
|
-
|
|
1103
|
-
### Enable Data API on your Aurora Cluster
|
|
1104
|
-
|
|
1105
|
-

|
|
1106
|
-
|
|
1107
|
-
You need to modify your Aurora cluster by clicking "ACTIONS" and then "Modify Cluster". Check the Data API box in the _Network & Security_ section and you're good to go. This works for Aurora Serverless v1, Aurora Serverless v2, and Aurora provisioned clusters.
|
|
1108
|
-
|
|
1109
|
-
### Set up a secret in the Secrets Manager
|
|
1110
|
-
|
|
1111
|
-
Next you need to set up a secret in the Secrets Manager. This is actually quite straightforward. User name, password, encryption key (the default is probably fine for you), and select the database you want to access with the secret.
|
|
1112
|
-
|
|
1113
|
-

|
|
1216
|
+
To use the Data API you need three things:
|
|
1114
1217
|
|
|
1115
|
-
|
|
1218
|
+
1. **The Data API enabled on your Aurora cluster.** It's supported on Aurora Serverless v2 and Aurora provisioned clusters (Aurora Serverless v1 uses the original Data API). You can enable it when you create the cluster or by modifying an existing one.
|
|
1219
|
+
2. **A Secrets Manager secret** with the database credentials. The Data API reads the secret instead of you passing credentials on every call.
|
|
1220
|
+
3. **IAM permissions** for your execution environment (covered below).
|
|
1116
1221
|
|
|
1117
|
-
|
|
1222
|
+
The AWS console and the list of supported engines change often, so rather than walk through a screenshot tour that goes stale, follow the official docs. They stay current:
|
|
1118
1223
|
|
|
1119
|
-
|
|
1224
|
+
- [Enabling the RDS Data API](https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/data-api.enabling.html)
|
|
1225
|
+
- [Authorizing access to the Data API](https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/data-api.access.html) (storing credentials in Secrets Manager and the IAM setup)
|
|
1226
|
+
- [Region and version availability](https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/data-api.regions.html)
|
|
1120
1227
|
|
|
1121
|
-
|
|
1228
|
+
You'll need your cluster's ARN and the secret's ARN to configure the client. See [Configuration Options](#configuration-options).
|
|
1122
1229
|
|
|
1123
1230
|
### Required Permissions
|
|
1124
1231
|
|
|
@@ -1130,7 +1237,6 @@ In order to use the Data API, your execution environment requires several IAM pe
|
|
|
1130
1237
|
Statement:
|
|
1131
1238
|
- Effect: 'Allow'
|
|
1132
1239
|
Action:
|
|
1133
|
-
- 'rds-data:ExecuteSql'
|
|
1134
1240
|
- 'rds-data:ExecuteStatement'
|
|
1135
1241
|
- 'rds-data:BatchExecuteStatement'
|
|
1136
1242
|
- 'rds-data:BeginTransaction'
|
|
@@ -1150,7 +1256,6 @@ Statement:
|
|
|
1150
1256
|
{
|
|
1151
1257
|
"Effect": "Allow",
|
|
1152
1258
|
"Action": [
|
|
1153
|
-
"rds-data:ExecuteSql",
|
|
1154
1259
|
"rds-data:ExecuteStatement",
|
|
1155
1260
|
"rds-data:BatchExecuteStatement",
|
|
1156
1261
|
"rds-data:BeginTransaction",
|
package/dist/compat/errors.d.ts
CHANGED
|
@@ -25,4 +25,5 @@ export interface MySQLError extends Error {
|
|
|
25
25
|
}
|
|
26
26
|
export declare function mapToPostgresError(error: any): PostgresError;
|
|
27
27
|
export declare function mapToMySQLError(error: any): MySQLError;
|
|
28
|
+
export declare function mapToPrismaError(error: any, engine: 'pg' | 'mysql'): Error;
|
|
28
29
|
//# sourceMappingURL=errors.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"errors.d.ts","sourceRoot":"","sources":["../../src/compat/errors.ts"],"names":[],"mappings":"AAWA,MAAM,WAAW,aAAc,SAAQ,KAAK;IAC1C,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,gBAAgB,CAAC,EAAE,MAAM,CAAA;IACzB,aAAa,CAAC,EAAE,MAAM,CAAA;IACtB,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,OAAO,CAAC,EAAE,MAAM,CAAA;CACjB;AAKD,MAAM,WAAW,UAAW,SAAQ,KAAK;IACvC,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,KAAK,CAA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AG,GAAG,aAAa,CAgE5D;AAKD,wBAAgB,eAAe,CAAC,KAAK,EAAE,GAAG,GAAG,UAAU,CA+GtD;AAOD,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,GAAG,EAAE,MAAM,EAAE,IAAI,GAAG,OAAO,GAAG,KAAK,CA+B1E"}
|
package/dist/compat/errors.js
CHANGED
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.mapToPostgresError = mapToPostgresError;
|
|
4
4
|
exports.mapToMySQLError = mapToMySQLError;
|
|
5
|
+
exports.mapToPrismaError = mapToPrismaError;
|
|
5
6
|
function extractConstraintName(message) {
|
|
6
7
|
const match = message.match(/constraint "([^"]+)"/);
|
|
7
8
|
return match ? match[1] : undefined;
|
|
@@ -161,3 +162,39 @@ function mapToMySQLError(error) {
|
|
|
161
162
|
}
|
|
162
163
|
return mysqlError;
|
|
163
164
|
}
|
|
165
|
+
function mapToPrismaError(error, engine) {
|
|
166
|
+
const message = (error === null || error === void 0 ? void 0 : error.message) || String(error);
|
|
167
|
+
const lower = message.toLowerCase();
|
|
168
|
+
let kind;
|
|
169
|
+
if (lower.includes('unique constraint') || lower.includes('duplicate')) {
|
|
170
|
+
kind = { kind: 'UniqueConstraintViolation' };
|
|
171
|
+
}
|
|
172
|
+
else if (lower.includes('foreign key')) {
|
|
173
|
+
kind = { kind: 'ForeignKeyConstraintViolation' };
|
|
174
|
+
}
|
|
175
|
+
else if (lower.includes('not-null') || lower.includes('null value') || lower.includes('cannot be null')) {
|
|
176
|
+
kind = { kind: 'NullConstraintViolation' };
|
|
177
|
+
}
|
|
178
|
+
else if ((lower.includes('relation') || lower.includes('table')) && lower.includes('does not exist')) {
|
|
179
|
+
kind = { kind: 'TableDoesNotExist' };
|
|
180
|
+
}
|
|
181
|
+
else if (lower.includes('column') && lower.includes('does not exist')) {
|
|
182
|
+
kind = { kind: 'ColumnNotFound' };
|
|
183
|
+
}
|
|
184
|
+
else if (engine === 'pg') {
|
|
185
|
+
kind = { kind: 'postgres', code: (error === null || error === void 0 ? void 0 : error.code) || '', severity: 'ERROR', message, detail: undefined, column: undefined, hint: undefined };
|
|
186
|
+
}
|
|
187
|
+
else {
|
|
188
|
+
kind = { kind: 'mysql', code: Number(error === null || error === void 0 ? void 0 : error.code) || 0, message, state: '' };
|
|
189
|
+
}
|
|
190
|
+
try {
|
|
191
|
+
const { DriverAdapterError } = require('@prisma/driver-adapter-utils');
|
|
192
|
+
return new DriverAdapterError(kind);
|
|
193
|
+
}
|
|
194
|
+
catch (_a) {
|
|
195
|
+
const fallback = new Error(message);
|
|
196
|
+
fallback.name = 'DriverAdapterError';
|
|
197
|
+
fallback.cause = kind;
|
|
198
|
+
return fallback;
|
|
199
|
+
}
|
|
200
|
+
}
|
package/dist/compat/index.d.ts
CHANGED
|
@@ -2,6 +2,8 @@ export { createPgClient, createPgPool } from './pg';
|
|
|
2
2
|
export type { PgCompatClient, PgCompatPool, PgQueryResult } from './pg';
|
|
3
3
|
export { createMySQLConnection, createMySQLPool } from './mysql2';
|
|
4
4
|
export type { Connection, Pool, PoolConnection, MySQL2QueryResult } from './mysql2';
|
|
5
|
+
export { createKnexMySQLClient, createKnexPgClient } from './knex';
|
|
6
|
+
export { createPrismaPgAdapter, createPrismaMySQLAdapter } from './prisma';
|
|
5
7
|
export { mapToPostgresError, mapToMySQLError } from './errors';
|
|
6
8
|
export type { PostgresError, MySQLError } from './errors';
|
|
7
9
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/compat/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/compat/index.ts"],"names":[],"mappings":"AAWA,OAAO,EAAE,cAAc,EAAE,YAAY,EAAE,MAAM,MAAM,CAAA;AACnD,YAAY,EAAE,cAAc,EAAE,YAAY,EAAE,aAAa,EAAE,MAAM,MAAM,CAAA;AAEvE,OAAO,EAAE,qBAAqB,EAAE,eAAe,EAAE,MAAM,UAAU,CAAA;AACjE,YAAY,EAAE,UAAU,EAAE,IAAI,EAAE,cAAc,EAAE,iBAAiB,EAAE,MAAM,UAAU,CAAA;AAEnF,OAAO,EAAE,qBAAqB,EAAE,kBAAkB,EAAE,MAAM,QAAQ,CAAA;AAClE,OAAO,EAAE,qBAAqB,EAAE,wBAAwB,EAAE,MAAM,UAAU,CAAA;AAE1E,OAAO,EAAE,kBAAkB,EAAE,eAAe,EAAE,MAAM,UAAU,CAAA;AAC9D,YAAY,EAAE,aAAa,EAAE,UAAU,EAAE,MAAM,UAAU,CAAA"}
|
package/dist/compat/index.js
CHANGED
|
@@ -1,12 +1,18 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.mapToMySQLError = exports.mapToPostgresError = exports.createMySQLPool = exports.createMySQLConnection = exports.createPgPool = exports.createPgClient = void 0;
|
|
3
|
+
exports.mapToMySQLError = exports.mapToPostgresError = exports.createPrismaMySQLAdapter = exports.createPrismaPgAdapter = exports.createKnexPgClient = exports.createKnexMySQLClient = exports.createMySQLPool = exports.createMySQLConnection = exports.createPgPool = exports.createPgClient = void 0;
|
|
4
4
|
var pg_1 = require("./pg");
|
|
5
5
|
Object.defineProperty(exports, "createPgClient", { enumerable: true, get: function () { return pg_1.createPgClient; } });
|
|
6
6
|
Object.defineProperty(exports, "createPgPool", { enumerable: true, get: function () { return pg_1.createPgPool; } });
|
|
7
7
|
var mysql2_1 = require("./mysql2");
|
|
8
8
|
Object.defineProperty(exports, "createMySQLConnection", { enumerable: true, get: function () { return mysql2_1.createMySQLConnection; } });
|
|
9
9
|
Object.defineProperty(exports, "createMySQLPool", { enumerable: true, get: function () { return mysql2_1.createMySQLPool; } });
|
|
10
|
+
var knex_1 = require("./knex");
|
|
11
|
+
Object.defineProperty(exports, "createKnexMySQLClient", { enumerable: true, get: function () { return knex_1.createKnexMySQLClient; } });
|
|
12
|
+
Object.defineProperty(exports, "createKnexPgClient", { enumerable: true, get: function () { return knex_1.createKnexPgClient; } });
|
|
13
|
+
var prisma_1 = require("./prisma");
|
|
14
|
+
Object.defineProperty(exports, "createPrismaPgAdapter", { enumerable: true, get: function () { return prisma_1.createPrismaPgAdapter; } });
|
|
15
|
+
Object.defineProperty(exports, "createPrismaMySQLAdapter", { enumerable: true, get: function () { return prisma_1.createPrismaMySQLAdapter; } });
|
|
10
16
|
var errors_1 = require("./errors");
|
|
11
17
|
Object.defineProperty(exports, "mapToPostgresError", { enumerable: true, get: function () { return errors_1.mapToPostgresError; } });
|
|
12
18
|
Object.defineProperty(exports, "mapToMySQLError", { enumerable: true, get: function () { return errors_1.mapToMySQLError; } });
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"knex.d.ts","sourceRoot":"","sources":["../../src/compat/knex.ts"],"names":[],"mappings":"AAgCA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,UAAU,CAAA;AAMnD,wBAAgB,qBAAqB,CAAC,MAAM,EAAE,mBAAmB,GAAG,OAAO,CAyB1E;AAMD,wBAAgB,kBAAkB,CAAC,MAAM,EAAE,mBAAmB,GAAG,OAAO,CAmBvE"}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.createKnexMySQLClient = createKnexMySQLClient;
|
|
4
|
+
exports.createKnexPgClient = createKnexPgClient;
|
|
5
|
+
const mysql2_1 = require("./mysql2");
|
|
6
|
+
const pg_1 = require("./pg");
|
|
7
|
+
function createKnexMySQLClient(config) {
|
|
8
|
+
const Client_MySQL2 = require('knex/lib/dialects/mysql2');
|
|
9
|
+
return class DataApiKnexMySQLClient extends Client_MySQL2 {
|
|
10
|
+
_driver() {
|
|
11
|
+
return {
|
|
12
|
+
createConnection: () => {
|
|
13
|
+
const conn = (0, mysql2_1.createMySQLConnection)(config);
|
|
14
|
+
if (!conn.stream) {
|
|
15
|
+
conn.stream = { destroyed: false };
|
|
16
|
+
}
|
|
17
|
+
return conn;
|
|
18
|
+
}
|
|
19
|
+
};
|
|
20
|
+
}
|
|
21
|
+
};
|
|
22
|
+
}
|
|
23
|
+
function createKnexPgClient(config) {
|
|
24
|
+
const Client_PG = require('knex/lib/dialects/postgres');
|
|
25
|
+
return class DataApiKnexPgClient extends Client_PG {
|
|
26
|
+
_driver() {
|
|
27
|
+
return {
|
|
28
|
+
Client: function DataApiPgClient() {
|
|
29
|
+
return (0, pg_1.createPgClient)(config);
|
|
30
|
+
}
|
|
31
|
+
};
|
|
32
|
+
}
|
|
33
|
+
};
|
|
34
|
+
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mysql2.d.ts","sourceRoot":"","sources":["../../src/compat/mysql2.ts"],"names":[],"mappings":"AAUA,OAAO,EAAE,YAAY,EAAE,MAAM,QAAQ,CAAA;AAGrC,OAAO,KAAK,EAAE,mBAAmB,EAAoD,MAAM,UAAU,CAAA;
|
|
1
|
+
{"version":3,"file":"mysql2.d.ts","sourceRoot":"","sources":["../../src/compat/mysql2.ts"],"names":[],"mappings":"AAUA,OAAO,EAAE,YAAY,EAAE,MAAM,QAAQ,CAAA;AAGrC,OAAO,KAAK,EAAE,mBAAmB,EAAoD,MAAM,UAAU,CAAA;AAQrG,MAAM,WAAW,cAAe,SAAQ,UAAU;IAChD,OAAO,CAAC,EAAE,MAAM,IAAI,CAAA;CACrB;AAED,MAAM,WAAW,UAAW,SAAQ,YAAY;IAC9C,OAAO,CAAC,QAAQ,CAAC,EAAE,CAAC,GAAG,EAAE,KAAK,GAAG,IAAI,KAAK,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAAA;IAC9D,GAAG,CAAC,QAAQ,CAAC,EAAE,CAAC,GAAG,CAAC,EAAE,KAAK,KAAK,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CA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