Files
effect/packages/sql-sqlite-node/CHANGELOG.md
T
github-actions[bot]andgithub-actions[bot] c1b9a8ff42 Version Packages (#2733)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-05-12 16:58:04 -07:00

14 KiB

@effect/sql-sqlite-node

0.2.6

Patch Changes

0.2.5

Patch Changes

0.2.4

Patch Changes

0.2.3

Patch Changes

0.2.2

Patch Changes

0.2.1

Patch Changes

0.2.0

Minor Changes

  • #2693 0724274 Thanks @tim-smart! - make @effect/sql dialect agnostic

    All of the client implementations now share the same Context.Tag. This means you can create services that support multiple SQL flavors.

    You can now use the @effect/sql package to access the client apis:

    import * as Sql from "@effect/sql";
    import { Effect } from "effect";
    
    Effect.gen(function* () {
      const sql = yield* Sql.client.Client;
      yield* sql`SELECT * FROM users`;
    });
    

    If you need a functionality that is specific to a implementation, you can use the tag from the implementation package:

    import * as Sqlite from "@effect/sql-sqlite-node";
    import { Effect } from "effect";
    
    Effect.gen(function* () {
      const sql = yield* Sqlite.client.SqliteClient;
      const dump = yield* sql.export;
    });
    

    If you need to run a different query depending on the dialect, you can use the sql.onDialect api:

    import * as Sql from "@effect/sql";
    import { Effect } from "effect";
    
    Effect.gen(function* () {
      const sql = yield* Sql.client.Client;
      yield* sql.onDialect({
        sqlite: () => sql`SELECT * FROM sqlite_master`,
        mysql: () => sql`SHOW TABLES`,
        mssql: () => sql`SELECT * FROM sys.tables`,
        pg: () => sql`SELECT * FROM pg_catalog.pg_tables`,
      });
    });
    

Patch Changes

0.1.17

Patch Changes

0.1.16

Patch Changes

0.1.15

Patch Changes

0.1.14

Patch Changes

0.1.13

Patch Changes

0.1.12

Patch Changes

0.1.11

Patch Changes

0.1.10

Patch Changes

0.1.9

Patch Changes

0.1.8

Patch Changes

0.1.7

Patch Changes

0.1.6

Patch Changes

0.1.5

Patch Changes

0.1.4

Patch Changes

0.1.3

Patch Changes

0.1.2

Patch Changes

0.1.1

Patch Changes

0.1.0

Minor Changes

Patch Changes