pqb 0.31.1 → 0.31.3
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/dist/index.d.ts +5 -4
- package/dist/index.js +6 -4
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +6 -4
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -46,6 +46,7 @@ declare class TransactionAdapter implements Adapter {
|
|
|
46
46
|
types: TypeParsers;
|
|
47
47
|
pool: Pool;
|
|
48
48
|
config: PoolConfig;
|
|
49
|
+
schema?: string;
|
|
49
50
|
constructor(adapter: Adapter, client: PoolClient, types: TypeParsers);
|
|
50
51
|
connect(): Promise<PoolClient>;
|
|
51
52
|
query<T extends QueryResultRow = any>(query: QueryInput, types?: TypeParsers): Promise<QueryResult<T>>;
|
|
@@ -4154,18 +4155,18 @@ declare class Create {
|
|
|
4154
4155
|
*
|
|
4155
4156
|
* // single column:
|
|
4156
4157
|
* // (this requires a composite primary key or unique index, see below)
|
|
4157
|
-
* db.table.create(data).
|
|
4158
|
+
* db.table.create(data).onConflict('email').merge();
|
|
4158
4159
|
*
|
|
4159
4160
|
* // array of columns:
|
|
4160
|
-
* db.table.create(data).
|
|
4161
|
+
* db.table.create(data).onConflict(['email', 'name']).merge();
|
|
4161
4162
|
*
|
|
4162
4163
|
* // constraint name
|
|
4163
|
-
* db.table.create(data).
|
|
4164
|
+
* db.table.create(data).onConflict({ constraint: 'unique_index_name' }).merge();
|
|
4164
4165
|
*
|
|
4165
4166
|
* // raw SQL expression:
|
|
4166
4167
|
* db.table
|
|
4167
4168
|
* .create(data)
|
|
4168
|
-
* .
|
|
4169
|
+
* .onConflict(sql`(email) where condition`)
|
|
4169
4170
|
* .merge();
|
|
4170
4171
|
* ```
|
|
4171
4172
|
*
|
package/dist/index.js
CHANGED
|
@@ -2996,6 +2996,7 @@ if (process.versions.bun) {
|
|
|
2996
2996
|
};
|
|
2997
2997
|
}
|
|
2998
2998
|
Object.defineProperty(Then.prototype, "then", {
|
|
2999
|
+
configurable: true,
|
|
2999
3000
|
get: getThen,
|
|
3000
3001
|
set(value) {
|
|
3001
3002
|
Object.defineProperty(this, "then", {
|
|
@@ -5361,6 +5362,7 @@ class TransactionAdapter {
|
|
|
5361
5362
|
this.types = types2;
|
|
5362
5363
|
this.pool = adapter.pool;
|
|
5363
5364
|
this.config = adapter.config;
|
|
5365
|
+
this.schema = adapter.schema;
|
|
5364
5366
|
}
|
|
5365
5367
|
connect() {
|
|
5366
5368
|
return Promise.resolve(this.client);
|
|
@@ -6607,18 +6609,18 @@ class Create {
|
|
|
6607
6609
|
*
|
|
6608
6610
|
* // single column:
|
|
6609
6611
|
* // (this requires a composite primary key or unique index, see below)
|
|
6610
|
-
* db.table.create(data).
|
|
6612
|
+
* db.table.create(data).onConflict('email').merge();
|
|
6611
6613
|
*
|
|
6612
6614
|
* // array of columns:
|
|
6613
|
-
* db.table.create(data).
|
|
6615
|
+
* db.table.create(data).onConflict(['email', 'name']).merge();
|
|
6614
6616
|
*
|
|
6615
6617
|
* // constraint name
|
|
6616
|
-
* db.table.create(data).
|
|
6618
|
+
* db.table.create(data).onConflict({ constraint: 'unique_index_name' }).merge();
|
|
6617
6619
|
*
|
|
6618
6620
|
* // raw SQL expression:
|
|
6619
6621
|
* db.table
|
|
6620
6622
|
* .create(data)
|
|
6621
|
-
* .
|
|
6623
|
+
* .onConflict(sql`(email) where condition`)
|
|
6622
6624
|
* .merge();
|
|
6623
6625
|
* ```
|
|
6624
6626
|
*
|