Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
bb9f06d
Implement proper array-like SQL record/row compatible with 6b1
1st1 Dec 14, 2024
5492285
Merge Session & Options object into one
1st1 Dec 18, 2024
b538e10
IP
1st1 Jan 5, 2025
b0352fb
Drop protocol<v2 support from codecs
1st1 Jan 9, 2025
288043f
Kill legacy protocol (pre 1.0) support
1st1 Jan 9, 2025
99a6cd7
Implement withCodecs/decode support
1st1 Jan 9, 2025
c8066f2
Format code
1st1 Jan 9, 2025
4452c02
Lint/format
1st1 Jan 9, 2025
b30067f
Type safety (ftw) for user codec API
1st1 Jan 9, 2025
6952589
Implement withCodecs/encode support
1st1 Jan 9, 2025
f0aeed8
Add a test for most codecs & fix bugs
1st1 Jan 10, 2025
6868a62
Make it so Codecs.KnownCodecs is the source of truth
1st1 Jan 10, 2025
4e2b548
Kill CustomCodecSpec
1st1 Jan 10, 2025
271ec2c
Drop debug file
1st1 Jan 10, 2025
e0ea09e
Make bigint user codec receive bigint as opposed to string
1st1 Jan 10, 2025
66f5588
Rename encode/decode to toDatabase/fromDatabase
1st1 Jan 10, 2025
988c251
Implement CodecContext caching in the Options object.
1st1 Jan 10, 2025
fe25993
Add a test for cached CodecContext invalidation; fix code
1st1 Jan 11, 2025
18dee38
micro opts
1st1 Jan 11, 2025
c78d57c
Fix import after rebasing on top of remove-deno
1st1 Jan 11, 2025
21e6a27
Drop EdgeDB 2 from the CI mix
1st1 Jan 11, 2025
49abf2a
Kill JSONStringCodec
1st1 Jan 11, 2025
dfa0e1d
Drop an accidental extra character from ci yaml
1st1 Jan 11, 2025
944b6bc
ci: add v5, temporarily disable v3
1st1 Jan 11, 2025
3f3fd62
Exclude some tests to pass on <=v5
1st1 Jan 11, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 5 additions & 10 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,13 +25,13 @@ jobs:
edgedb-version: "nightly"
- os: ubuntu-latest
node-version: "20"
edgedb-version: "4"
- os: ubuntu-latest
node-version: "20"
edgedb-version: "3"
edgedb-version: "5"
- os: ubuntu-latest
node-version: "20"
edgedb-version: "2"
edgedb-version: "4"
# - os: ubuntu-latest
# node-version: "20"
# edgedb-version: "3"
# XXX: macOS is currently unsupported by setup-edgedb
# - os: macos-latest
# node-version: "20"
Expand Down Expand Up @@ -91,11 +91,6 @@ jobs:
run: |
yarn ci:test

- name: Run query builder integration tests legacy
if: ${{ matrix.edgedb-version == '2' }}
run: |
turbo run ci:integration-test --filter=@edgedb/integration-legacy

- name: Run query builder integration tests lts
if: ${{ matrix.edgedb-version == '3' || matrix.edgedb-version == '4' || matrix.edgedb-version == 'stable' || matrix.edgedb-version == 'nightly' }}
run: |
Expand Down
32 changes: 11 additions & 21 deletions packages/driver/src/baseClient.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
*/

import type { Duration } from "./datatypes/datetime";
import type { Codecs } from "./codecs/codecs";
import { CodecsRegistry } from "./codecs/registry";
import type {
ConnectArgumentsParser,
Expand All @@ -35,7 +36,6 @@ import {
} from "./ifaces";
import type {
RetryOptions,
Session,
SimpleRetryOptions,
SimpleTransactionOptions,
TransactionOptions,
Expand Down Expand Up @@ -190,7 +190,7 @@ export class ClientConnectionHolder {
args,
outputFormat,
expectedCardinality,
this.options.session,
this.options,
false /* privilegedMode */,
language,
);
Expand Down Expand Up @@ -581,34 +581,24 @@ export class Client implements Executor {
return new Client(this.pool, this.options.withRetryOptions(opts));
}

withSession(session: Session): Client {
return new Client(this.pool, this.options.withSession(session));
}

withModuleAliases(aliases: Record<string, string>) {
return new Client(
this.pool,
this.options.withSession(this.options.session.withModuleAliases(aliases)),
);
return new Client(this.pool, this.options.withModuleAliases(aliases));
}

withConfig(config: SimpleConfig): Client {
const newConfig = this.options.session.withConfig(config);
return new Client(this.pool, this.options.withSession(newConfig));
return new Client(this.pool, this.options.withConfig(config));
}

withCodecs(codecs: Codecs.CodecSpec): Client {
return new Client(this.pool, this.options.withCodecs(codecs));
}

withGlobals(globals: Record<string, any>): Client {
return new Client(
this.pool,
this.options.withSession(this.options.session.withGlobals(globals)),
);
return new Client(this.pool, this.options.withGlobals(globals));
}

withQueryTag(tag: string | null): Client {
return new Client(
this.pool,
this.options.withSession(this.options.session.withQueryTag(tag)),
);
return new Client(this.pool, this.options.withQueryTag(tag));
}

withWarningHandler(handler: WarningHandler): Client {
Expand Down Expand Up @@ -775,7 +765,7 @@ export class Client implements Executor {
query,
OutputFormat.BINARY,
Cardinality.MANY,
this.options.session,
this.options,
);
const cardinality = util.parseCardinality(result[0]);

Expand Down
Loading
Loading