@pgxsinkit/pgwasm 0.6.1 → 0.6.2
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 +8 -0
- package/dist/{chunk-jnmd6w7f.js → chunk-4eb2pcfr.js} +18 -3
- package/dist/chunk-4eb2pcfr.js.map +10 -0
- package/dist/{chunk-garmxqte.js → chunk-82r7js5b.js} +101 -21
- package/dist/chunk-82r7js5b.js.map +16 -0
- package/dist/{chunk-c06zjbcj.js → chunk-cgt5pdan.js} +2 -290
- package/dist/chunk-cgt5pdan.js.map +13 -0
- package/dist/{chunk-cpsnmzrf.js → chunk-jwz46twh.js} +14 -2
- package/dist/chunk-jwz46twh.js.map +10 -0
- package/dist/{chunk-d2kpv98r.js → chunk-rqykg4gj.js} +1 -1
- package/dist/{chunk-10ebj4re.js → chunk-rsenqaz0.js} +2 -2
- package/dist/chunk-ryjxx1c8.js +303 -0
- package/dist/chunk-ryjxx1c8.js.map +10 -0
- package/dist/core/pgwasm.d.ts.map +1 -1
- package/dist/drizzle/index.js +2 -2
- package/dist/errors.d.ts +5 -1
- package/dist/errors.d.ts.map +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +7 -5
- package/dist/index.js.map +1 -1
- package/dist/interface.d.ts +4 -1
- package/dist/interface.d.ts.map +1 -1
- package/dist/live/format-query.d.ts.map +1 -1
- package/dist/live/index.js +5 -5
- package/dist/live/index.js.map +3 -3
- package/dist/opfs/index.js +3 -3
- package/dist/protocol/index.js +6 -4
- package/dist/protocol/index.js.map +2 -2
- package/dist/templating.d.ts.map +1 -1
- package/dist/types.d.ts +2 -1
- package/dist/types.d.ts.map +1 -1
- package/package.json +1 -1
- package/skills/opfs/SKILL.md +1 -1
- package/src/core/pgwasm.ts +101 -14
- package/src/errors.ts +10 -1
- package/src/index.ts +1 -0
- package/src/interface.ts +4 -1
- package/src/live/format-query.ts +2 -1
- package/src/templating.ts +3 -1
- package/src/types.ts +15 -1
- package/dist/chunk-c06zjbcj.js.map +0 -14
- package/dist/chunk-cpsnmzrf.js.map +0 -10
- package/dist/chunk-garmxqte.js.map +0 -16
- package/dist/chunk-jnmd6w7f.js.map +0 -10
- package/dist/chunk-kb3rsr7n.js +0 -19
- package/dist/chunk-kb3rsr7n.js.map +0 -9
- /package/dist/{chunk-d2kpv98r.js.map → chunk-rqykg4gj.js.map} +0 -0
- /package/dist/{chunk-10ebj4re.js.map → chunk-rsenqaz0.js.map} +0 -0
|
@@ -0,0 +1,303 @@
|
|
|
1
|
+
// @bun
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __returnValue = (v) => v;
|
|
4
|
+
function __exportSetter(name, newValue) {
|
|
5
|
+
this[name] = __returnValue.bind(null, newValue);
|
|
6
|
+
}
|
|
7
|
+
var __export = (target, all) => {
|
|
8
|
+
for (var name in all)
|
|
9
|
+
__defProp(target, name, {
|
|
10
|
+
get: all[name],
|
|
11
|
+
enumerable: true,
|
|
12
|
+
configurable: true,
|
|
13
|
+
set: __exportSetter.bind(all, name)
|
|
14
|
+
});
|
|
15
|
+
};
|
|
16
|
+
|
|
17
|
+
// packages/pgwasm/src/protocol/wire/messages.ts
|
|
18
|
+
var exports_messages = {};
|
|
19
|
+
__export(exports_messages, {
|
|
20
|
+
AuthenticationCleartextPassword: () => AuthenticationCleartextPassword,
|
|
21
|
+
AuthenticationMD5Password: () => AuthenticationMD5Password,
|
|
22
|
+
AuthenticationOk: () => AuthenticationOk,
|
|
23
|
+
AuthenticationSASL: () => AuthenticationSASL,
|
|
24
|
+
AuthenticationSASLContinue: () => AuthenticationSASLContinue,
|
|
25
|
+
AuthenticationSASLFinal: () => AuthenticationSASLFinal,
|
|
26
|
+
BackendKeyDataMessage: () => BackendKeyDataMessage,
|
|
27
|
+
CommandCompleteMessage: () => CommandCompleteMessage,
|
|
28
|
+
CopyDataMessage: () => CopyDataMessage,
|
|
29
|
+
CopyResponse: () => CopyResponse,
|
|
30
|
+
DataRowMessage: () => DataRowMessage,
|
|
31
|
+
DatabaseError: () => DatabaseError2,
|
|
32
|
+
Field: () => Field,
|
|
33
|
+
NoticeMessage: () => NoticeMessage,
|
|
34
|
+
NotificationResponseMessage: () => NotificationResponseMessage,
|
|
35
|
+
ParameterDescriptionMessage: () => ParameterDescriptionMessage,
|
|
36
|
+
ParameterStatusMessage: () => ParameterStatusMessage,
|
|
37
|
+
ReadyForQueryMessage: () => ReadyForQueryMessage,
|
|
38
|
+
RowDescriptionMessage: () => RowDescriptionMessage,
|
|
39
|
+
bindComplete: () => bindComplete,
|
|
40
|
+
closeComplete: () => closeComplete,
|
|
41
|
+
copyDone: () => copyDone,
|
|
42
|
+
emptyQuery: () => emptyQuery,
|
|
43
|
+
noData: () => noData,
|
|
44
|
+
parseComplete: () => parseComplete,
|
|
45
|
+
portalSuspended: () => portalSuspended,
|
|
46
|
+
replicationStart: () => replicationStart
|
|
47
|
+
});
|
|
48
|
+
var parseComplete = { name: "parseComplete", length: 5 };
|
|
49
|
+
var bindComplete = { name: "bindComplete", length: 5 };
|
|
50
|
+
var closeComplete = { name: "closeComplete", length: 5 };
|
|
51
|
+
var noData = { name: "noData", length: 5 };
|
|
52
|
+
var portalSuspended = { name: "portalSuspended", length: 5 };
|
|
53
|
+
var replicationStart = { name: "replicationStart", length: 4 };
|
|
54
|
+
var emptyQuery = { name: "emptyQuery", length: 4 };
|
|
55
|
+
var copyDone = { name: "copyDone", length: 4 };
|
|
56
|
+
|
|
57
|
+
class AuthenticationOk {
|
|
58
|
+
name = "authenticationOk";
|
|
59
|
+
length;
|
|
60
|
+
constructor(length) {
|
|
61
|
+
this.length = length;
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
class AuthenticationCleartextPassword {
|
|
66
|
+
name = "authenticationCleartextPassword";
|
|
67
|
+
length;
|
|
68
|
+
constructor(length) {
|
|
69
|
+
this.length = length;
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
class AuthenticationMD5Password {
|
|
74
|
+
name = "authenticationMD5Password";
|
|
75
|
+
length;
|
|
76
|
+
salt;
|
|
77
|
+
constructor(length, salt) {
|
|
78
|
+
this.length = length;
|
|
79
|
+
this.salt = salt;
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
class AuthenticationSASL {
|
|
84
|
+
name = "authenticationSASL";
|
|
85
|
+
length;
|
|
86
|
+
mechanisms;
|
|
87
|
+
constructor(length, mechanisms) {
|
|
88
|
+
this.length = length;
|
|
89
|
+
this.mechanisms = mechanisms;
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
class AuthenticationSASLContinue {
|
|
94
|
+
name = "authenticationSASLContinue";
|
|
95
|
+
length;
|
|
96
|
+
data;
|
|
97
|
+
constructor(length, data) {
|
|
98
|
+
this.length = length;
|
|
99
|
+
this.data = data;
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
class AuthenticationSASLFinal {
|
|
104
|
+
name = "authenticationSASLFinal";
|
|
105
|
+
length;
|
|
106
|
+
data;
|
|
107
|
+
constructor(length, data) {
|
|
108
|
+
this.length = length;
|
|
109
|
+
this.data = data;
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
class DatabaseError2 extends Error {
|
|
114
|
+
severity;
|
|
115
|
+
code;
|
|
116
|
+
detail;
|
|
117
|
+
hint;
|
|
118
|
+
position;
|
|
119
|
+
internalPosition;
|
|
120
|
+
internalQuery;
|
|
121
|
+
where;
|
|
122
|
+
schema;
|
|
123
|
+
table;
|
|
124
|
+
column;
|
|
125
|
+
dataType;
|
|
126
|
+
constraint;
|
|
127
|
+
file;
|
|
128
|
+
line;
|
|
129
|
+
routine;
|
|
130
|
+
length;
|
|
131
|
+
name;
|
|
132
|
+
constructor(message, length, name) {
|
|
133
|
+
super(message);
|
|
134
|
+
this.length = length;
|
|
135
|
+
this.name = name;
|
|
136
|
+
}
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
class CopyDataMessage {
|
|
140
|
+
name = "copyData";
|
|
141
|
+
length;
|
|
142
|
+
chunk;
|
|
143
|
+
constructor(length, chunk) {
|
|
144
|
+
this.length = length;
|
|
145
|
+
this.chunk = chunk;
|
|
146
|
+
}
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
class CopyResponse {
|
|
150
|
+
length;
|
|
151
|
+
name;
|
|
152
|
+
binary;
|
|
153
|
+
columnTypes;
|
|
154
|
+
constructor(length, name, binary, columnCount) {
|
|
155
|
+
this.length = length;
|
|
156
|
+
this.name = name;
|
|
157
|
+
this.binary = binary;
|
|
158
|
+
this.columnTypes = Array.from({ length: columnCount }, () => 0);
|
|
159
|
+
}
|
|
160
|
+
}
|
|
161
|
+
|
|
162
|
+
class Field {
|
|
163
|
+
name;
|
|
164
|
+
tableID;
|
|
165
|
+
columnID;
|
|
166
|
+
dataTypeID;
|
|
167
|
+
dataTypeSize;
|
|
168
|
+
dataTypeModifier;
|
|
169
|
+
format;
|
|
170
|
+
constructor(name, tableID, columnID, dataTypeID, dataTypeSize, dataTypeModifier, format) {
|
|
171
|
+
this.name = name;
|
|
172
|
+
this.tableID = tableID;
|
|
173
|
+
this.columnID = columnID;
|
|
174
|
+
this.dataTypeID = dataTypeID;
|
|
175
|
+
this.dataTypeSize = dataTypeSize;
|
|
176
|
+
this.dataTypeModifier = dataTypeModifier;
|
|
177
|
+
this.format = format;
|
|
178
|
+
}
|
|
179
|
+
}
|
|
180
|
+
|
|
181
|
+
class RowDescriptionMessage {
|
|
182
|
+
name = "rowDescription";
|
|
183
|
+
length;
|
|
184
|
+
fieldCount;
|
|
185
|
+
fields;
|
|
186
|
+
constructor(length, fields) {
|
|
187
|
+
this.length = length;
|
|
188
|
+
this.fieldCount = fields.length;
|
|
189
|
+
this.fields = fields;
|
|
190
|
+
}
|
|
191
|
+
}
|
|
192
|
+
|
|
193
|
+
class ParameterDescriptionMessage {
|
|
194
|
+
name = "parameterDescription";
|
|
195
|
+
length;
|
|
196
|
+
parameterCount;
|
|
197
|
+
dataTypeIDs;
|
|
198
|
+
constructor(length, dataTypeIDs) {
|
|
199
|
+
this.length = length;
|
|
200
|
+
this.parameterCount = dataTypeIDs.length;
|
|
201
|
+
this.dataTypeIDs = dataTypeIDs;
|
|
202
|
+
}
|
|
203
|
+
}
|
|
204
|
+
|
|
205
|
+
class ParameterStatusMessage {
|
|
206
|
+
name = "parameterStatus";
|
|
207
|
+
length;
|
|
208
|
+
parameterName;
|
|
209
|
+
parameterValue;
|
|
210
|
+
constructor(length, parameterName, parameterValue) {
|
|
211
|
+
this.length = length;
|
|
212
|
+
this.parameterName = parameterName;
|
|
213
|
+
this.parameterValue = parameterValue;
|
|
214
|
+
}
|
|
215
|
+
}
|
|
216
|
+
|
|
217
|
+
class BackendKeyDataMessage {
|
|
218
|
+
name = "backendKeyData";
|
|
219
|
+
length;
|
|
220
|
+
processID;
|
|
221
|
+
secretKey;
|
|
222
|
+
constructor(length, processID, secretKey) {
|
|
223
|
+
this.length = length;
|
|
224
|
+
this.processID = processID;
|
|
225
|
+
this.secretKey = secretKey;
|
|
226
|
+
}
|
|
227
|
+
}
|
|
228
|
+
|
|
229
|
+
class NotificationResponseMessage {
|
|
230
|
+
name = "notification";
|
|
231
|
+
length;
|
|
232
|
+
processId;
|
|
233
|
+
channel;
|
|
234
|
+
payload;
|
|
235
|
+
constructor(length, processId, channel, payload) {
|
|
236
|
+
this.length = length;
|
|
237
|
+
this.processId = processId;
|
|
238
|
+
this.channel = channel;
|
|
239
|
+
this.payload = payload;
|
|
240
|
+
}
|
|
241
|
+
}
|
|
242
|
+
|
|
243
|
+
class ReadyForQueryMessage {
|
|
244
|
+
name = "readyForQuery";
|
|
245
|
+
length;
|
|
246
|
+
status;
|
|
247
|
+
constructor(length, status) {
|
|
248
|
+
this.length = length;
|
|
249
|
+
this.status = status;
|
|
250
|
+
}
|
|
251
|
+
}
|
|
252
|
+
|
|
253
|
+
class CommandCompleteMessage {
|
|
254
|
+
name = "commandComplete";
|
|
255
|
+
length;
|
|
256
|
+
text;
|
|
257
|
+
constructor(length, text) {
|
|
258
|
+
this.length = length;
|
|
259
|
+
this.text = text;
|
|
260
|
+
}
|
|
261
|
+
}
|
|
262
|
+
|
|
263
|
+
class DataRowMessage {
|
|
264
|
+
name = "dataRow";
|
|
265
|
+
length;
|
|
266
|
+
fieldCount;
|
|
267
|
+
fields;
|
|
268
|
+
constructor(length, fields) {
|
|
269
|
+
this.length = length;
|
|
270
|
+
this.fields = fields;
|
|
271
|
+
this.fieldCount = fields.length;
|
|
272
|
+
}
|
|
273
|
+
}
|
|
274
|
+
|
|
275
|
+
class NoticeMessage {
|
|
276
|
+
name = "notice";
|
|
277
|
+
length;
|
|
278
|
+
message;
|
|
279
|
+
severity;
|
|
280
|
+
code;
|
|
281
|
+
detail;
|
|
282
|
+
hint;
|
|
283
|
+
position;
|
|
284
|
+
internalPosition;
|
|
285
|
+
internalQuery;
|
|
286
|
+
where;
|
|
287
|
+
schema;
|
|
288
|
+
table;
|
|
289
|
+
column;
|
|
290
|
+
dataType;
|
|
291
|
+
constraint;
|
|
292
|
+
file;
|
|
293
|
+
line;
|
|
294
|
+
routine;
|
|
295
|
+
constructor(length, message) {
|
|
296
|
+
this.length = length;
|
|
297
|
+
this.message = message;
|
|
298
|
+
}
|
|
299
|
+
}
|
|
300
|
+
|
|
301
|
+
export { __export, parseComplete, bindComplete, closeComplete, noData, portalSuspended, replicationStart, emptyQuery, copyDone, AuthenticationOk, AuthenticationCleartextPassword, AuthenticationMD5Password, AuthenticationSASL, AuthenticationSASLContinue, AuthenticationSASLFinal, DatabaseError2, CopyDataMessage, CopyResponse, Field, RowDescriptionMessage, ParameterDescriptionMessage, ParameterStatusMessage, BackendKeyDataMessage, NotificationResponseMessage, ReadyForQueryMessage, CommandCompleteMessage, DataRowMessage, NoticeMessage, exports_messages };
|
|
302
|
+
|
|
303
|
+
//# debugId=A5A4F0EC518641BE64756E2164756E21
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../src/protocol/wire/messages.ts"],
|
|
4
|
+
"sourcesContent": [
|
|
5
|
+
"// Began as a copy of `@electric-sql/pg-protocol`, itself adapted from node-postgres' `pg-protocol`\n// (MIT, © Brian Carlson; ElectricSQL's changes taken under the PostgreSQL License — see NOTICE).\n// Owned outright (ADR-0062); compatibility with PGlite is an anti-goal — evolve freely.\n\nimport type { Mode } from \"./types\";\n\nexport type MessageName =\n | \"parseComplete\"\n | \"bindComplete\"\n | \"closeComplete\"\n | \"noData\"\n | \"portalSuspended\"\n | \"replicationStart\"\n | \"emptyQuery\"\n | \"copyDone\"\n | \"copyData\"\n | \"rowDescription\"\n | \"parameterDescription\"\n | \"parameterStatus\"\n | \"backendKeyData\"\n | \"notification\"\n | \"readyForQuery\"\n | \"commandComplete\"\n | \"dataRow\"\n | \"copyInResponse\"\n | \"copyOutResponse\"\n | \"authenticationOk\"\n | \"authenticationMD5Password\"\n | \"authenticationCleartextPassword\"\n | \"authenticationSASL\"\n | \"authenticationSASLContinue\"\n | \"authenticationSASLFinal\"\n | \"error\"\n | \"notice\";\n\n/** Every backend message: its name and the length its header declared (excluding the type byte). */\nexport interface BackendMessage {\n readonly name: MessageName;\n readonly length: number;\n}\n\nexport const parseComplete: BackendMessage = { name: \"parseComplete\", length: 5 };\nexport const bindComplete: BackendMessage = { name: \"bindComplete\", length: 5 };\nexport const closeComplete: BackendMessage = { name: \"closeComplete\", length: 5 };\nexport const noData: BackendMessage = { name: \"noData\", length: 5 };\nexport const portalSuspended: BackendMessage = { name: \"portalSuspended\", length: 5 };\nexport const replicationStart: BackendMessage = { name: \"replicationStart\", length: 4 };\nexport const emptyQuery: BackendMessage = { name: \"emptyQuery\", length: 4 };\nexport const copyDone: BackendMessage = { name: \"copyDone\", length: 4 };\n\nexport class AuthenticationOk implements BackendMessage {\n readonly name = \"authenticationOk\";\n readonly length: number;\n constructor(length: number) {\n this.length = length;\n }\n}\n\nexport class AuthenticationCleartextPassword implements BackendMessage {\n readonly name = \"authenticationCleartextPassword\";\n readonly length: number;\n constructor(length: number) {\n this.length = length;\n }\n}\n\nexport class AuthenticationMD5Password implements BackendMessage {\n readonly name = \"authenticationMD5Password\";\n readonly length: number;\n readonly salt: Uint8Array;\n constructor(length: number, salt: Uint8Array) {\n this.length = length;\n this.salt = salt;\n }\n}\n\nexport class AuthenticationSASL implements BackendMessage {\n readonly name = \"authenticationSASL\";\n readonly length: number;\n readonly mechanisms: string[];\n constructor(length: number, mechanisms: string[]) {\n this.length = length;\n this.mechanisms = mechanisms;\n }\n}\n\nexport class AuthenticationSASLContinue implements BackendMessage {\n readonly name = \"authenticationSASLContinue\";\n readonly length: number;\n readonly data: string;\n constructor(length: number, data: string) {\n this.length = length;\n this.data = data;\n }\n}\n\nexport class AuthenticationSASLFinal implements BackendMessage {\n readonly name = \"authenticationSASLFinal\";\n readonly length: number;\n readonly data: string;\n constructor(length: number, data: string) {\n this.length = length;\n this.data = data;\n }\n}\n\nexport type AuthenticationMessage =\n | AuthenticationOk\n | AuthenticationCleartextPassword\n | AuthenticationMD5Password\n | AuthenticationSASL\n | AuthenticationSASLContinue\n | AuthenticationSASLFinal;\n\n/** The fields an ErrorResponse and a NoticeResponse share. */\nexport interface NoticeOrError {\n message: string | undefined;\n severity: string | undefined;\n code: string | undefined;\n detail: string | undefined;\n hint: string | undefined;\n position: string | undefined;\n internalPosition: string | undefined;\n internalQuery: string | undefined;\n where: string | undefined;\n schema: string | undefined;\n table: string | undefined;\n column: string | undefined;\n dataType: string | undefined;\n constraint: string | undefined;\n file: string | undefined;\n line: string | undefined;\n routine: string | undefined;\n}\n\n/** An ErrorResponse from Postgres: an SQL error. `code` is the SQLSTATE. */\nexport class DatabaseError extends Error implements NoticeOrError {\n severity: string | undefined;\n code: string | undefined;\n detail: string | undefined;\n hint: string | undefined;\n position: string | undefined;\n internalPosition: string | undefined;\n internalQuery: string | undefined;\n where: string | undefined;\n schema: string | undefined;\n table: string | undefined;\n column: string | undefined;\n dataType: string | undefined;\n constraint: string | undefined;\n file: string | undefined;\n line: string | undefined;\n routine: string | undefined;\n readonly length: number;\n override readonly name: MessageName;\n constructor(message: string, length: number, name: MessageName) {\n super(message);\n this.length = length;\n this.name = name;\n }\n}\n\nexport class CopyDataMessage implements BackendMessage {\n readonly name = \"copyData\";\n readonly length: number;\n readonly chunk: Uint8Array;\n constructor(length: number, chunk: Uint8Array) {\n this.length = length;\n this.chunk = chunk;\n }\n}\n\nexport class CopyResponse implements BackendMessage {\n readonly length: number;\n readonly name: MessageName;\n readonly binary: boolean;\n readonly columnTypes: number[];\n constructor(length: number, name: MessageName, binary: boolean, columnCount: number) {\n this.length = length;\n this.name = name;\n this.binary = binary;\n this.columnTypes = Array.from({ length: columnCount }, () => 0);\n }\n}\n\nexport class Field {\n readonly name: string;\n readonly tableID: number;\n readonly columnID: number;\n readonly dataTypeID: number;\n readonly dataTypeSize: number;\n readonly dataTypeModifier: number;\n readonly format: Mode;\n constructor(\n name: string,\n tableID: number,\n columnID: number,\n dataTypeID: number,\n dataTypeSize: number,\n dataTypeModifier: number,\n format: Mode,\n ) {\n this.name = name;\n this.tableID = tableID;\n this.columnID = columnID;\n this.dataTypeID = dataTypeID;\n this.dataTypeSize = dataTypeSize;\n this.dataTypeModifier = dataTypeModifier;\n this.format = format;\n }\n}\n\nexport class RowDescriptionMessage implements BackendMessage {\n readonly name: MessageName = \"rowDescription\";\n readonly length: number;\n readonly fieldCount: number;\n readonly fields: Field[];\n constructor(length: number, fields: Field[]) {\n this.length = length;\n this.fieldCount = fields.length;\n this.fields = fields;\n }\n}\n\nexport class ParameterDescriptionMessage implements BackendMessage {\n readonly name: MessageName = \"parameterDescription\";\n readonly length: number;\n readonly parameterCount: number;\n readonly dataTypeIDs: number[];\n constructor(length: number, dataTypeIDs: number[]) {\n this.length = length;\n this.parameterCount = dataTypeIDs.length;\n this.dataTypeIDs = dataTypeIDs;\n }\n}\n\nexport class ParameterStatusMessage implements BackendMessage {\n readonly name: MessageName = \"parameterStatus\";\n readonly length: number;\n readonly parameterName: string;\n readonly parameterValue: string;\n constructor(length: number, parameterName: string, parameterValue: string) {\n this.length = length;\n this.parameterName = parameterName;\n this.parameterValue = parameterValue;\n }\n}\n\nexport class BackendKeyDataMessage implements BackendMessage {\n readonly name: MessageName = \"backendKeyData\";\n readonly length: number;\n readonly processID: number;\n readonly secretKey: number;\n constructor(length: number, processID: number, secretKey: number) {\n this.length = length;\n this.processID = processID;\n this.secretKey = secretKey;\n }\n}\n\nexport class NotificationResponseMessage implements BackendMessage {\n readonly name: MessageName = \"notification\";\n readonly length: number;\n readonly processId: number;\n readonly channel: string;\n readonly payload: string;\n constructor(length: number, processId: number, channel: string, payload: string) {\n this.length = length;\n this.processId = processId;\n this.channel = channel;\n this.payload = payload;\n }\n}\n\nexport class ReadyForQueryMessage implements BackendMessage {\n readonly name: MessageName = \"readyForQuery\";\n readonly length: number;\n /** `I` idle, `T` in a transaction block, `E` in a failed transaction block. */\n readonly status: string;\n constructor(length: number, status: string) {\n this.length = length;\n this.status = status;\n }\n}\n\nexport class CommandCompleteMessage implements BackendMessage {\n readonly name: MessageName = \"commandComplete\";\n readonly length: number;\n readonly text: string;\n constructor(length: number, text: string) {\n this.length = length;\n this.text = text;\n }\n}\n\nexport class DataRowMessage implements BackendMessage {\n readonly name: MessageName = \"dataRow\";\n readonly length: number;\n readonly fieldCount: number;\n readonly fields: (string | null)[];\n constructor(length: number, fields: (string | null)[]) {\n this.length = length;\n this.fields = fields;\n this.fieldCount = fields.length;\n }\n}\n\nexport class NoticeMessage implements BackendMessage, NoticeOrError {\n readonly name = \"notice\";\n readonly length: number;\n readonly message: string | undefined;\n severity: string | undefined;\n code: string | undefined;\n detail: string | undefined;\n hint: string | undefined;\n position: string | undefined;\n internalPosition: string | undefined;\n internalQuery: string | undefined;\n where: string | undefined;\n schema: string | undefined;\n table: string | undefined;\n column: string | undefined;\n dataType: string | undefined;\n constraint: string | undefined;\n file: string | undefined;\n line: string | undefined;\n routine: string | undefined;\n constructor(length: number, message: string | undefined) {\n this.length = length;\n this.message = message;\n }\n}\n"
|
|
6
|
+
],
|
|
7
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAyCO,IAAM,gBAAgC,EAAE,MAAM,iBAAiB,QAAQ,EAAE;AACzE,IAAM,eAA+B,EAAE,MAAM,gBAAgB,QAAQ,EAAE;AACvE,IAAM,gBAAgC,EAAE,MAAM,iBAAiB,QAAQ,EAAE;AACzE,IAAM,SAAyB,EAAE,MAAM,UAAU,QAAQ,EAAE;AAC3D,IAAM,kBAAkC,EAAE,MAAM,mBAAmB,QAAQ,EAAE;AAC7E,IAAM,mBAAmC,EAAE,MAAM,oBAAoB,QAAQ,EAAE;AAC/E,IAAM,aAA6B,EAAE,MAAM,cAAc,QAAQ,EAAE;AACnE,IAAM,WAA2B,EAAE,MAAM,YAAY,QAAQ,EAAE;AAAA;AAE/D,MAAM,iBAA2C;AAAA,EAC7C,OAAO;AAAA,EACP;AAAA,EACT,WAAW,CAAC,QAAgB;AAAA,IAC1B,KAAK,SAAS;AAAA;AAElB;AAAA;AAEO,MAAM,gCAA0D;AAAA,EAC5D,OAAO;AAAA,EACP;AAAA,EACT,WAAW,CAAC,QAAgB;AAAA,IAC1B,KAAK,SAAS;AAAA;AAElB;AAAA;AAEO,MAAM,0BAAoD;AAAA,EACtD,OAAO;AAAA,EACP;AAAA,EACA;AAAA,EACT,WAAW,CAAC,QAAgB,MAAkB;AAAA,IAC5C,KAAK,SAAS;AAAA,IACd,KAAK,OAAO;AAAA;AAEhB;AAAA;AAEO,MAAM,mBAA6C;AAAA,EAC/C,OAAO;AAAA,EACP;AAAA,EACA;AAAA,EACT,WAAW,CAAC,QAAgB,YAAsB;AAAA,IAChD,KAAK,SAAS;AAAA,IACd,KAAK,aAAa;AAAA;AAEt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AK,SAAS;AAAA,IACd,KAAK,YAAY;AAAA,IACjB,KAAK,UAAU;AAAA,IACf,KAAK,UAAU;AAAA;AAEnB;AAAA;AAEO,MAAM,qBAA+C;AAAA,EACjD,OAAoB;AAAA,EACpB;AAAA,EAEA;AAAA,EACT,WAAW,CAAC,QAAgB,QAAgB;AAAA,IAC1C,KAAK,SAAS;AAAA,IACd,KAAK,SAAS;AAAA;AAElB;AAAA;AAEO,MAAM,uBAAiD;AAAA,EACnD,OAAoB;AAAA,EACpB;AAAA,EACA;AAAA,EACT,WAAW,CAAC,QAAgB,MAAc;AAAA,IACxC,KAAK,SAAS;AAAA,IACd,KAAK,OAAO;AAAA;AAEhB;AAAA;AAEO,MAAM,eAAyC;AAAA,EAC3C,OAAoB;AAAA,EACpB;AAAA,EACA;AAAA,EACA;AAAA,EACT,WAAW,CAAC,QAAgB,QAA2B;AAAA,IACrD,KAAK,SAAS;AAAA,IACd,KAAK,SAAS;AAAA,IACd,KAAK,aAAa,OAAO;AAAA;AAE7B;AAAA;AAEO,MAAM,cAAuD;AAAA,EACzD,OAAO;AAAA,EACP;AAAA,EACA;AAAA,EACT;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA,WAAW,CAAC,QAAgB,SAA6B;AAAA,IACvD,KAAK,SAAS;AAAA,IACd,KAAK,UAAU;AAAA;AAEnB;",
|
|
8
|
+
"debugId": "A5A4F0EC518641BE64756E2164756E21",
|
|
9
|
+
"names": []
|
|
10
|
+
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pgwasm.d.ts","sources":["../../src/core/pgwasm.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAEV,aAAa,EACb,YAAY,EACZ,UAAU,EACV,aAAa,EAEb,eAAe,EACf,cAAc,EA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K,MAAM,CACV,OAAO,EAAE,MAAM,EACf,QAAQ,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,IAAI,EACnC,EAAE,CAAC,EAAE,WAAW,GACf,OAAO,CAAC,CAAC,EAAE,CAAC,EAAE,WAAW,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC,CAE9C;IAEK,QAAQ,CAAC,OAAO,EAAE,MAAM,EAAE,QAAQ,CAAC,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,IAAI,EAAE,EAAE,CAAC,EAAE,WAAW,GAAG,OAAO,CAAC,IAAI,CAAC,CAErG;IAyDD,cAAc,CAAC,QAAQ,EAAE,CAAC,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,KAAK,IAAI,GAAG,MAAM,IAAI,CAK/E;IAID;;;OAGG;IACG,WAAW,CAAC,WAAW,CAAC,EAAE,eAAe,GAAG,OAAO,CAAC,IAAI,CAAC,CAS9D;IAIK,KAAK,IAAI,OAAO,CAAC,IAAI,CAAC,CAwD3B;IAEK,CAAC,MAAM,CAAC,YAAY,CAAC,IAAI,OAAO,CAAC,IAAI,CAAC,CAE3C;CACF"}
|
package/dist/drizzle/index.js
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
// @bun
|
|
2
2
|
import {
|
|
3
3
|
PgwasmError2
|
|
4
|
-
} from "../chunk-
|
|
4
|
+
} from "../chunk-jwz46twh.js";
|
|
5
5
|
import {
|
|
6
6
|
DATE,
|
|
7
7
|
TIMESTAMP,
|
|
8
8
|
TIMESTAMPTZ,
|
|
9
9
|
INTERVAL,
|
|
10
10
|
arrayParser
|
|
11
|
-
} from "../chunk-
|
|
11
|
+
} from "../chunk-4eb2pcfr.js";
|
|
12
12
|
|
|
13
13
|
// packages/pgwasm/src/drizzle/driver.ts
|
|
14
14
|
import { entityKind as entityKind2 } from "drizzle-orm/entity";
|
package/dist/errors.d.ts
CHANGED
|
@@ -1,6 +1,10 @@
|
|
|
1
1
|
import type { BuildIdentity, FilesystemKind } from "./build/seam";
|
|
2
2
|
import type { QueryOptions } from "./interface";
|
|
3
|
-
import
|
|
3
|
+
import { DatabaseError } from "./protocol/wire/messages";
|
|
4
|
+
/** COMMIT ended an aborted transaction with ROLLBACK instead of committing its writes. */
|
|
5
|
+
export declare class TransactionAbortedError extends DatabaseError {
|
|
6
|
+
constructor();
|
|
7
|
+
}
|
|
4
8
|
/** The base of every error pgwasm itself raises (SQL errors are {@link DatabaseError}). */
|
|
5
9
|
export declare class PgwasmError extends Error {
|
|
6
10
|
name: string;
|
package/dist/errors.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"errors.d.ts","sources":["../src/errors.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,aAAa,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AAClE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAChD,OAAO,
|
|
1
|
+
{"version":3,"file":"errors.d.ts","sources":["../src/errors.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,aAAa,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AAClE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAChD,OAAO,EAAE,aAAa,EAAE,MAAM,0BAA0B,CAAC;AAEzD,0FAA0F;AAC1F,qBAAa,uBAAwB,SAAQ,aAAa;IACxD,cAIC;CACF;AAED,2FAA2F;AAC3F,qBAAa,WAAY,SAAQ,KAAK;IAC3B,IAAI,SAAiB;CAC/B;AAED,kGAAkG;AAClG,qBAAa,uBAAwB,SAAQ,WAAW;IAC7C,IAAI,SAA6B;IAC1C,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IAEzB,YAAY,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAG1C;CACF;AAED,+EAA+E;AAC/E,qBAAa,mBAAoB,SAAQ,uBAAuB;IACrD,IAAI,SAAyB;IACtC,sCAAsC;IACtC,Q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C,KAAK,EAAE,aAAa,CAAC;IACrB,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,SAAS,OAAO,EAAE,GAAG,SAAS,CAAC;IACvC,OAAO,EAAE,YAAY,GAAG,SAAS,CAAC;CACnC,GAAG,UAAU,CAEb"}
|
package/dist/index.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
export { createPgwasm } from "./create";
|
|
2
2
|
export type { DebugLevel, DumpCompression, Extension, ExtensionNamespaces, ExtensionSetupResult, Extensions, FilesystemKind, ParserOptions, Pgwasm, PgwasmOptions, PgwasmWithExtensions, QueryOptions, Results, Row, RowMode, SerializerOptions, StorageDescription, Transaction, } from "./interface";
|
|
3
3
|
export type { BuildIdentity, PostgresBuild, ServerExtension } from "./build/seam";
|
|
4
|
-
export { BackupFormatError, BuildMarkerUnreadableError, BuildMismatchError, CrossOriginIsolationRequiredError, DataDirExistsError, DataFormatMismatchError, ExtensionBuildMismatchError, OpfsAhpRemovedError, PgwasmClosedError, PgwasmError, PgwasmFailedError, StorageInUseError, UnsupportedDataDirError, UnsupportedFeatureError, UnsupportedFilesystemError, type QueryError, type RecordedBuild, } from "./errors";
|
|
4
|
+
export { BackupFormatError, BuildMarkerUnreadableError, BuildMismatchError, CrossOriginIsolationRequiredError, DataDirExistsError, DataFormatMismatchError, ExtensionBuildMismatchError, OpfsAhpRemovedError, PgwasmClosedError, PgwasmError, PgwasmFailedError, StorageInUseError, TransactionAbortedError, UnsupportedDataDirError, UnsupportedFeatureError, UnsupportedFilesystemError, type QueryError, type RecordedBuild, } from "./errors";
|
|
5
5
|
export { DatabaseError } from "./protocol/wire/messages";
|
|
6
6
|
export { identifier, raw } from "./templating";
|
|
7
7
|
export * as types from "./types";
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AACxC,YAAY,EACV,UAAU,EACV,eAAe,EACf,SAAS,EACT,mBAAmB,EACnB,oBAAoB,EACpB,UAAU,EACV,cAAc,EACd,aAAa,EACb,MAAM,EACN,aAAa,EACb,oBAAoB,EACpB,YAAY,EACZ,OAAO,EACP,GAAG,EACH,OAAO,EACP,iBAAiB,EACjB,kBAAkB,EAClB,WAAW,GACZ,MAAM,aAAa,CAAC;AACrB,YAAY,EAAE,aAAa,EAAE,aAAa,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC;AAClF,OAAO,EACL,iBAAiB,EACjB,0BAA0B,EAC1B,kBAAkB,EAClB,iCAAiC,EACjC,kBAAkB,EAClB,uBAAuB,EACvB,2BAA2B,EAC3B,mBAAmB,EACnB,iBAAiB,EACjB,WAAW,EACX,iBAAiB,EACjB,iBAAiB,EACjB,uBAAuB,EACvB,uBAAuB,EACvB,0BAA0B,EAC1B,KAAK,UAAU,EACf,KAAK,aAAa,GACnB,MAAM,UAAU,CAAC;AAClB,OAAO,EAAE,aAAa,EAAE,MAAM,0BAA0B,CAAC;AACzD,OAAO,EAAE,UAAU,EAAE,GAAG,EAAE,MAAM,cAAc,CAAC;AAC/C,OAAO,KAAK,KAAK,MAAM,SAAS,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AACxC,YAAY,EACV,UAAU,EACV,eAAe,EACf,SAAS,EACT,mBAAmB,EACnB,oBAAoB,EACpB,UAAU,EACV,cAAc,EACd,aAAa,EACb,MAAM,EACN,aAAa,EACb,oBAAoB,EACpB,YAAY,EACZ,OAAO,EACP,GAAG,EACH,OAAO,EACP,iBAAiB,EACjB,kBAAkB,EAClB,WAAW,GACZ,MAAM,aAAa,CAAC;AACrB,YAAY,EAAE,aAAa,EAAE,aAAa,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC;AAClF,OAAO,EACL,iBAAiB,EACjB,0BAA0B,EAC1B,kBAAkB,EAClB,iCAAiC,EACjC,kBAAkB,EAClB,uBAAuB,EACvB,2BAA2B,EAC3B,mBAAmB,EACnB,iBAAiB,EACjB,WAAW,EACX,iBAAiB,EACjB,iBAAiB,EACjB,uBAAuB,EACvB,uBAAuB,EACvB,uBAAuB,EACvB,0BAA0B,EAC1B,KAAK,UAAU,EACf,KAAK,aAAa,GACnB,MAAM,UAAU,CAAC;AAClB,OAAO,EAAE,aAAa,EAAE,MAAM,0BAA0B,CAAC;AACzD,OAAO,EAAE,UAAU,EAAE,GAAG,EAAE,MAAM,cAAc,CAAC;AAC/C,OAAO,KAAK,KAAK,MAAM,SAAS,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -3,8 +3,9 @@ import {
|
|
|
3
3
|
identifier2,
|
|
4
4
|
raw2,
|
|
5
5
|
createPgwasm2
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-82r7js5b.js";
|
|
7
7
|
import {
|
|
8
|
+
TransactionAbortedError2,
|
|
8
9
|
PgwasmError2,
|
|
9
10
|
UnsupportedDataDirError2,
|
|
10
11
|
OpfsAhpRemovedError2,
|
|
@@ -20,13 +21,13 @@ import {
|
|
|
20
21
|
PgwasmClosedError2,
|
|
21
22
|
PgwasmFailedError2,
|
|
22
23
|
UnsupportedFeatureError2
|
|
23
|
-
} from "./chunk-
|
|
24
|
+
} from "./chunk-jwz46twh.js";
|
|
24
25
|
import {
|
|
25
26
|
exports_types
|
|
26
|
-
} from "./chunk-
|
|
27
|
+
} from "./chunk-4eb2pcfr.js";
|
|
27
28
|
import {
|
|
28
29
|
DatabaseError2
|
|
29
|
-
} from "./chunk-
|
|
30
|
+
} from "./chunk-ryjxx1c8.js";
|
|
30
31
|
export {
|
|
31
32
|
BackupFormatError2 as BackupFormatError,
|
|
32
33
|
BuildMarkerUnreadableError2 as BuildMarkerUnreadableError,
|
|
@@ -41,6 +42,7 @@ export {
|
|
|
41
42
|
PgwasmError2 as PgwasmError,
|
|
42
43
|
PgwasmFailedError2 as PgwasmFailedError,
|
|
43
44
|
StorageInUseError2 as StorageInUseError,
|
|
45
|
+
TransactionAbortedError2 as TransactionAbortedError,
|
|
44
46
|
UnsupportedDataDirError2 as UnsupportedDataDirError,
|
|
45
47
|
UnsupportedFeatureError2 as UnsupportedFeatureError,
|
|
46
48
|
UnsupportedFilesystemError2 as UnsupportedFilesystemError,
|
|
@@ -50,4 +52,4 @@ export {
|
|
|
50
52
|
exports_types as types
|
|
51
53
|
};
|
|
52
54
|
|
|
53
|
-
//# debugId=
|
|
55
|
+
//# debugId=89437D4CC0EB3B5D64756E2164756E21
|
package/dist/index.js.map
CHANGED
package/dist/interface.d.ts
CHANGED
|
@@ -143,7 +143,10 @@ export interface Pgwasm extends AsyncDisposable {
|
|
|
143
143
|
sql<T = Row>(sqlStrings: TemplateStringsArray, ...params: unknown[]): Promise<Results<T>>;
|
|
144
144
|
/** Any number of statements, through the simple protocol, without parameters. */
|
|
145
145
|
exec(sql: string, options?: QueryOptions): Promise<Results[]>;
|
|
146
|
-
/**
|
|
146
|
+
/**
|
|
147
|
+
* Run `callback` in a transaction: COMMIT when it resolves, ROLLBACK when it throws.
|
|
148
|
+
* Rejects with TransactionAbortedError if COMMIT rolls back an aborted transaction.
|
|
149
|
+
*/
|
|
147
150
|
transaction<T>(callback: (tx: Transaction) => Promise<T>): Promise<T>;
|
|
148
151
|
/** Run `fn` while no query or transaction runs. */
|
|
149
152
|
runExclusive<T>(fn: () => Promise<T>): Promise<T>;
|
package/dist/interface.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"interface.d.ts","sources":["../src/interface.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,aAAa,EAAE,UAAU,EAAE,cAAc,EAAE,aAAa,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC;AAC9G,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AAC3D,OAAO,KAAK,EAAE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}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"format-query.d.ts","sources":["../../src/live/format-query.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAKxD;;;;GAIG;AACH,wBAAsB,WAAW,CAC/B,EAAE,EAAE,MAAM,EACV,KAAK,EAAE,MAAM,EACb,MAAM,CAAC,EAAE,SAAS,OAAO,EAAE,GAAG,IAAI,EAClC,EAAE,CAAC,EAAE,WAAW,GAAG,MAAM,GACxB,OAAO,CAAC,MAAM,CAAC,
|
|
1
|
+
{"version":3,"file":"format-query.d.ts","sources":["../../src/live/format-query.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAKxD;;;;GAIG;AACH,wBAAsB,WAAW,CAC/B,EAAE,EAAE,MAAM,EACV,KAAK,EAAE,MAAM,EACb,MAAM,CAAC,EAAE,SAAS,OAAO,EAAE,GAAG,IAAI,EAClC,EAAE,CAAC,EAAE,WAAW,GAAG,MAAM,GACxB,OAAO,CAAC,MAAM,CAAC,CA2BjB"}
|
package/dist/live/index.js
CHANGED
|
@@ -2,14 +2,14 @@
|
|
|
2
2
|
import {
|
|
3
3
|
randomId,
|
|
4
4
|
parseDescribeStatementResults
|
|
5
|
-
} from "../chunk-
|
|
5
|
+
} from "../chunk-rsenqaz0.js";
|
|
6
6
|
import {
|
|
7
7
|
TEXT
|
|
8
|
-
} from "../chunk-
|
|
8
|
+
} from "../chunk-4eb2pcfr.js";
|
|
9
9
|
import {
|
|
10
10
|
serialize2,
|
|
11
11
|
protocolAccessOf
|
|
12
|
-
} from "../chunk-
|
|
12
|
+
} from "../chunk-cgt5pdan.js";
|
|
13
13
|
|
|
14
14
|
// packages/pgwasm/src/live/debounce-mutex.ts
|
|
15
15
|
function debounceMutex(fn) {
|
|
@@ -56,7 +56,7 @@ async function formatQuery(pg, query, params, tx) {
|
|
|
56
56
|
messages.push(...(await wire.execProtocol(serialize2.sync(), { persist: false })).messages);
|
|
57
57
|
}
|
|
58
58
|
const dataTypeIDs = parseDescribeStatementResults(messages);
|
|
59
|
-
const subbedQuery = query.replace(/\$([0-9]+)/g, (_, num) => `%${num}$L`);
|
|
59
|
+
const subbedQuery = query.replaceAll("%", "%%").replace(/\$([0-9]+)/g, (_, num) => `%${num}$L`);
|
|
60
60
|
const runner = tx ?? pg;
|
|
61
61
|
const result = await runner.query(`SELECT format($1, ${params.map((_, i) => `$${i + 2}`).join(", ")}) as query`, [subbedQuery, ...params], { paramTypes: [TEXT, ...dataTypeIDs] });
|
|
62
62
|
const formatted = result.rows[0]?.query;
|
|
@@ -599,4 +599,4 @@ export {
|
|
|
599
599
|
live
|
|
600
600
|
};
|
|
601
601
|
|
|
602
|
-
//# debugId=
|
|
602
|
+
//# debugId=CF058559117257CC64756E2164756E21
|