Skip to content

Commit c37d317

Browse files
committed
Added Drizzle tests
1 parent d3f7502 commit c37d317

18 files changed

+3864
-3219
lines changed

dist/dts/_extracted.d.ts

Lines changed: 70 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,33 @@
11
/// <reference types="node" />
22

3+
import { BindConfig } from 'pg';
34
import { Client as Client_2 } from 'pg';
5+
import { ClientConfig } from 'pg';
46
import { Connection } from 'pg';
7+
import { ConnectionConfig } from 'pg';
8+
import { CustomTypesConfig } from 'pg';
9+
import { Defaults } from 'pg';
10+
import { defaults } from 'pg';
511
import { EventEmitter } from 'events';
6-
import type { FieldDef } from 'pg';
12+
import { Events } from 'pg';
13+
import { ExecuteConfig } from 'pg';
14+
import { FieldDef } from 'pg';
15+
import { MessageConfig } from 'pg';
16+
import { Notification } from 'pg';
717
import { Pool as Pool_2 } from 'pg';
8-
import type { QueryArrayConfig } from 'pg';
9-
import type { QueryArrayResult } from 'pg';
10-
import type { QueryConfig } from 'pg';
18+
import { PoolConfig } from 'pg';
19+
import { Query } from 'pg';
20+
import { QueryArrayConfig } from 'pg';
21+
import { QueryArrayResult } from 'pg';
22+
import { QueryConfig } from 'pg';
1123
import type { QueryConfigValues } from 'pg';
12-
import type { QueryResult } from 'pg';
13-
import type { QueryResultRow } from 'pg';
24+
import { QueryParse } from 'pg';
25+
import { QueryResult } from 'pg';
26+
import { QueryResultBase } from 'pg';
27+
import { QueryResultRow } from 'pg';
28+
import { ResultBuilder } from 'pg';
1429
import type { Socket } from 'net';
15-
import type { Submittable } from 'pg';
30+
import { Submittable } from 'pg';
1631
import { types } from 'pg';
1732

1833
declare const allKeyUsages: readonly ["digitalSignature", "nonRepudiation", "keyEncipherment", "dataEncipherment", "keyAgreement", "keyCertSign", "cRLSign", "encipherOnly", "decipherOnly"];
@@ -29,6 +44,8 @@ declare class ASN1Bytes extends Bytes {
2944

3045
declare function base64Decode(input: string, charCodes?: typeof stdCharCodes, autoPad?: boolean): Uint8Array<ArrayBuffer>;
3146

47+
export { BindConfig }
48+
3249
declare class Bytes {
3350
offset: number;
3451
dataView: DataView;
@@ -187,17 +204,35 @@ export declare class Client extends Client_2 {
187204
_handleAuthSASLContinue(msg: any): Promise<void>;
188205
}
189206

207+
export { ClientConfig }
208+
209+
export { Connection }
210+
211+
export { ConnectionConfig }
212+
213+
export { CustomTypesConfig }
214+
190215
declare interface DataRequest {
191216
bytes: number;
192217
resolve: (data: Uint8Array | undefined) => void;
193218
}
194219

220+
export { Defaults }
221+
222+
export { defaults }
223+
195224
declare type DistinguishedName = Record<string, string | string[]>;
196225

226+
export { Events }
227+
228+
export { ExecuteConfig }
229+
197230
export declare interface FetchEndpointOptions {
198231
jwtAuth?: boolean;
199232
}
200233

234+
export { FieldDef }
235+
201236
export declare interface FullQueryResults<ArrayMode extends boolean> {
202237
fields: FieldDef[];
203238
command: string;
@@ -255,6 +290,8 @@ export declare interface HTTPTransactionOptions<ArrayMode extends boolean, FullR
255290
deferrable?: boolean;
256291
}
257292

293+
export { MessageConfig }
294+
258295
/**
259296
* This function returns an async tagged-template function that runs a single
260297
* SQL query (no session or transactions) with low latency over https. Support
@@ -570,6 +607,8 @@ export declare interface NeonQueryPromise<ArrayMode extends boolean, FullResults
570607
opts?: HTTPQueryOptions<ArrayMode, FullResults>;
571608
}
572609

610+
export { Notification }
611+
573612
declare type OID = string;
574613

575614
export declare interface ParameterizedQuery {
@@ -595,6 +634,8 @@ export declare class Pool extends Pool_2 {
595634
query<R extends QueryResultRow = any, I = any[]>(queryText: string, values: QueryConfigValues<I>, callback: (err: Error, result: QueryResult<R>) => void): void;
596635
}
597636

637+
export { PoolConfig }
638+
598639
export declare interface ProcessQueryResultOptions {
599640
arrayMode: boolean;
600641
fullResults: boolean;
@@ -603,6 +644,22 @@ export declare interface ProcessQueryResultOptions {
603644
types?: typeof types;
604645
}
605646

647+
export { Query }
648+
649+
export { QueryArrayConfig }
650+
651+
export { QueryArrayResult }
652+
653+
export { QueryConfig }
654+
655+
export { QueryParse }
656+
657+
export { QueryResult }
658+
659+
export { QueryResultBase }
660+
661+
export { QueryResultRow }
662+
606663
export declare type QueryRows<ArrayMode extends boolean> = ArrayMode extends true ? any[][] : Record<string, any>[];
607664

608665
declare abstract class ReadQueue {
@@ -616,6 +673,8 @@ declare abstract class ReadQueue {
616673
read(bytes: number): Promise<Uint8Array<ArrayBufferLike> | undefined>;
617674
}
618675

676+
export { ResultBuilder }
677+
619678
declare type RootCertsData = Uint8Array;
620679

621680
declare interface RootCertsDatabase {
@@ -663,6 +722,8 @@ declare function startTls(host: string, rootCertsDatabase: RootCertsDatabase | s
663722

664723
declare function stdCharCodes(charCode: number): number | void;
665724

725+
export { Submittable }
726+
666727
declare namespace subtls {
667728
export {
668729
base64Decode,
@@ -695,6 +756,8 @@ declare class TrustedCert extends Cert {
695756
static findInDatabase(subjectOrSubjectKeyId: DistinguishedName | string, db: RootCertsDatabase): TrustedCert | undefined;
696757
}
697758

759+
export { types }
760+
698761
declare function u8FromHex(hex: string): Uint8Array<ArrayBuffer>;
699762

700763
export declare interface WebSocketConstructor {
@@ -714,6 +777,3 @@ declare class WebSocketReadQueue extends ReadQueue {
714777
socketIsNotClosed(): boolean;
715778
}
716779

717-
718-
export * from "pg";
719-

dist/dts/_extracted.d.ts.orig

Lines changed: 70 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,33 @@
11
/// <reference types="node" />
22

3+
import { BindConfig } from 'pg';
34
import { Client as Client_2 } from 'pg';
5+
import { ClientConfig } from 'pg';
46
import { Connection } from 'pg';
7+
import { ConnectionConfig } from 'pg';
8+
import { CustomTypesConfig } from 'pg';
9+
import { Defaults } from 'pg';
10+
import { defaults } from 'pg';
511
import { EventEmitter } from 'events';
6-
import type { FieldDef } from 'pg';
12+
import { Events } from 'pg';
13+
import { ExecuteConfig } from 'pg';
14+
import { FieldDef } from 'pg';
15+
import { MessageConfig } from 'pg';
16+
import { Notification } from 'pg';
717
import { Pool as Pool_2 } from 'pg';
8-
import type { QueryArrayConfig } from 'pg';
9-
import type { QueryArrayResult } from 'pg';
10-
import type { QueryConfig } from 'pg';
18+
import { PoolConfig } from 'pg';
19+
import { Query } from 'pg';
20+
import { QueryArrayConfig } from 'pg';
21+
import { QueryArrayResult } from 'pg';
22+
import { QueryConfig } from 'pg';
1123
import type { QueryConfigValues } from 'pg';
12-
import type { QueryResult } from 'pg';
13-
import type { QueryResultRow } from 'pg';
24+
import { QueryParse } from 'pg';
25+
import { QueryResult } from 'pg';
26+
import { QueryResultBase } from 'pg';
27+
import { QueryResultRow } from 'pg';
28+
import { ResultBuilder } from 'pg';
1429
import type { Socket } from 'net';
15-
import type { Submittable } from 'pg';
30+
import { Submittable } from 'pg';
1631
import { types } from 'pg';
1732

1833
declare const allKeyUsages: readonly ["digitalSignature", "nonRepudiation", "keyEncipherment", "dataEncipherment", "keyAgreement", "keyCertSign", "cRLSign", "encipherOnly", "decipherOnly"];
@@ -29,6 +44,8 @@ declare class ASN1Bytes extends Bytes {
2944

3045
declare function base64Decode(input: string, charCodes?: typeof stdCharCodes, autoPad?: boolean): Uint8Array<ArrayBuffer>;
3146

47+
export { BindConfig }
48+
3249
declare class Bytes {
3350
offset: number;
3451
dataView: DataView;
@@ -187,17 +204,35 @@ export declare class Client extends Client_2 {
187204
_handleAuthSASLContinue(msg: any): Promise<void>;
188205
}
189206

207+
export { ClientConfig }
208+
209+
export { Connection }
210+
211+
export { ConnectionConfig }
212+
213+
export { CustomTypesConfig }
214+
190215
declare interface DataRequest {
191216
bytes: number;
192217
resolve: (data: Uint8Array | undefined) => void;
193218
}
194219

220+
export { Defaults }
221+
222+
export { defaults }
223+
195224
declare type DistinguishedName = Record<string, string | string[]>;
196225

226+
export { Events }
227+
228+
export { ExecuteConfig }
229+
197230
export declare interface FetchEndpointOptions {
198231
jwtAuth?: boolean;
199232
}
200233

234+
export { FieldDef }
235+
201236
export declare interface FullQueryResults<ArrayMode extends boolean> {
202237
fields: FieldDef[];
203238
command: string;
@@ -255,6 +290,8 @@ export declare interface HTTPTransactionOptions<ArrayMode extends boolean, FullR
255290
deferrable?: boolean;
256291
}
257292

293+
export { MessageConfig }
294+
258295
/**
259296
* This function returns an async tagged-template function that runs a single
260297
* SQL query (no session or transactions) with low latency over https. Support
@@ -576,6 +613,8 @@ export declare interface NeonQueryPromise<ArrayMode extends boolean, FullResults
576613
opts?: HTTPQueryOptions<ArrayMode, FullResults>;
577614
}
578615

616+
export { Notification }
617+
579618
declare type OID = string;
580619

581620
export declare interface ParameterizedQuery {
@@ -601,6 +640,8 @@ export declare class Pool extends Pool_2 {
601640
query<R extends QueryResultRow = any, I = any[]>(queryText: string, values: QueryConfigValues<I>, callback: (err: Error, result: QueryResult<R>) => void): void;
602641
}
603642

643+
export { PoolConfig }
644+
604645
export declare interface ProcessQueryResultOptions {
605646
arrayMode: boolean;
606647
fullResults: boolean;
@@ -609,6 +650,22 @@ export declare interface ProcessQueryResultOptions {
609650
types?: typeof types;
610651
}
611652

653+
export { Query }
654+
655+
export { QueryArrayConfig }
656+
657+
export { QueryArrayResult }
658+
659+
export { QueryConfig }
660+
661+
export { QueryParse }
662+
663+
export { QueryResult }
664+
665+
export { QueryResultBase }
666+
667+
export { QueryResultRow }
668+
612669
export declare type QueryRows<ArrayMode extends boolean> = ArrayMode extends true ? any[][] : Record<string, any>[];
613670

614671
declare abstract class ReadQueue {
@@ -622,6 +679,8 @@ declare abstract class ReadQueue {
622679
read(bytes: number): Promise<Uint8Array<ArrayBufferLike> | undefined>;
623680
}
624681

682+
export { ResultBuilder }
683+
625684
declare type RootCertsData = Uint8Array;
626685

627686
declare interface RootCertsDatabase {
@@ -670,6 +729,8 @@ declare function startTls(host: string, rootCertsDatabase: RootCertsDatabase | s
670729

671730
declare function stdCharCodes(charCode: number): number | void;
672731

732+
export { Submittable }
733+
673734
declare namespace subtls {
674735
export {
675736
base64Decode,
@@ -702,6 +763,8 @@ declare class TrustedCert extends Cert {
702763
static findInDatabase(subjectOrSubjectKeyId: DistinguishedName | string, db: RootCertsDatabase): TrustedCert | undefined;
703764
}
704765

766+
export { types }
767+
705768
declare function u8FromHex(hex: string): Uint8Array<ArrayBuffer>;
706769

707770
export declare interface WebSocketConstructor {
@@ -722,7 +785,4 @@ declare class WebSocketReadQueue extends ReadQueue {
722785
socketIsNotClosed(): boolean;
723786
}
724787

725-
726-
export * from "pg";
727-
728788
export { }

dist/dts/export/index.d.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,8 @@ declare class NeonPool extends Pool {
4343
query<R extends QueryResultRow = any, I = any[]>(queryTextOrConfig: string | QueryConfig<I>, callback: (err: Error, result: QueryResult<R>) => void): void;
4444
query<R extends QueryResultRow = any, I = any[]>(queryText: string, values: QueryConfigValues<I>, callback: (err: Error, result: QueryResult<R>) => void): void;
4545
}
46-
export * from 'pg';
46+
export { defaults, types } from 'pg';
47+
export type { BindConfig, ClientConfig, Connection, ConnectionConfig, CustomTypesConfig, Defaults, Events, ExecuteConfig, FieldDef, MessageConfig, Notification, PoolConfig, Query, QueryArrayConfig, QueryArrayResult, QueryConfig, QueryParse, QueryResult, QueryResultBase, QueryResultRow, ResultBuilder, Submittable, } from 'pg';
4748
export * from './httpQuery';
4849
export { Socket as neonConfig, NeonPool as Pool, NeonClient as Client, neon, NeonDbError, };
4950
export type { SocketDefaults, FetchEndpointOptions, WebSocketConstructor, WebSocketLike, subtls, } from '../shims/net';

0 commit comments

Comments
 (0)