@ddd-ts-kit/drizzle 0.113.2 → 0.114.1

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.fr.md CHANGED
@@ -1,5 +1,5 @@
1
1
  [English](README.md) · **Français**
2
- <!-- translation-of: README.md sha256:0d30d02803f33ba1 -->
2
+ <!-- translation-of: README.md sha256:06973090f81ea39e -->
3
3
 
4
4
  # @ddd-ts-kit/drizzle
5
5
 
@@ -24,7 +24,7 @@ port de *repository* de son domaine ; l'adaptateur de ce port, dans `infrastruct
24
24
  ses instructions sur la `Database` du projet ; la plateforme construit l'unité de travail une
25
25
  fois et la lie.
26
26
 
27
- ![Un contexte délimité contient un gestionnaire, le port de repository du domaine et le repository drizzle qui l'implémente ; createDrizzleUnitOfWork donne un seul objet qui est à la fois le UnitOfWork dans lequel le bus de commandes exécute chaque commande et la Database dont l'executor() sert aux requêtes du repository et des stores ; il ouvre db.transaction() sur une base drizzle de n'importe quel pilote PostgreSQL, dont les migrations drizzle-kit créent les tables](https://raw.githubusercontent.com/gbourgeat/ddd-ts-kit/main/docs/assets/diagrams/drizzle-place-in-an-application.fr.svg)
27
+ ![Un contexte délimité contient un gestionnaire, le port de repository du domaine et le repository drizzle qui l'implémente ; createDrizzleUnitOfWork donne un seul objet qui est à la fois le UnitOfWork dans lequel le bus de commandes exécute chaque commande et la Database dont l'executor() sert aux requêtes du repository et des stores ; il ouvre db.transaction() sur une base drizzle de n'importe quel pilote PostgreSQL, dont les migrations drizzle-kit créent les tables](https://raw.githubusercontent.com/ddd-ts-kit/ddd-ts-kit/main/docs/assets/diagrams/drizzle-place-in-an-application.fr.svg)
28
28
 
29
29
  L'idée à retenir : **toute instruction passe par `executor()`**. Dans une unité de travail,
30
30
  c'est la transaction de cette unité de travail : la ligne de l'agrégat, l'enregistrement
@@ -637,7 +637,7 @@ pas recevoir.
637
637
 
638
638
  Ce que font les deux sortes de page quand une ligne est insérée entre deux lectures :
639
639
 
640
- ![Des factures triées par montant puis par id : une page 2 par offset lue après une insertion montre inv-f une seconde fois, tandis qu'une page par curseur qui commence après la position (120, inv-f) de la dernière ligne de la page 1 montre les mêmes lignes quoi qu'on ait inséré avant elle, et lit une ligne de plus que la limite pour savoir qu'une page suit](https://raw.githubusercontent.com/gbourgeat/ddd-ts-kit/main/docs/assets/diagrams/drizzle-keyset-pages.fr.svg)
640
+ ![Des factures triées par montant puis par id : une page 2 par offset lue après une insertion montre inv-f une seconde fois, tandis qu'une page par curseur qui commence après la position (120, inv-f) de la dernière ligne de la page 1 montre les mêmes lignes quoi qu'on ait inséré avant elle, et lit une ligne de plus que la limite pour savoir qu'une page suit](https://raw.githubusercontent.com/ddd-ts-kit/ddd-ts-kit/main/docs/assets/diagrams/drizzle-keyset-pages.fr.svg)
641
641
 
642
642
  Les règles que tiennent ces exemples, et que les tests de ce *package* vérifient sur une vraie
643
643
  base de données :
@@ -671,7 +671,7 @@ Deux stratégies sur drizzle, toutes deux prouvées par `tenantIsolationContract
671
671
  `@ddd-ts-kit/testing/contracts` ; le schéma par *tenant* et la base par *tenant* ne sont livrés
672
672
  que pour knex ([Multitenance](../../docs/concepts/multitenancy.fr.md) en donne le tableau).
673
673
 
674
- ![La portée d'exécution nomme le tenant du travail ; première ligne de défense, le repository le met dans chaque instruction avec tenantCondition, ownTenantCondition et tenantScopeOf ; seconde ligne, l'unité de travail commence chaque transaction par tenantSession, qui fixe le tenant pour cette transaction seulement, et les politiques déclarées avec la table ne la laissent voir et écrire que les lignes de ce seul tenant](https://raw.githubusercontent.com/gbourgeat/ddd-ts-kit/main/docs/assets/diagrams/drizzle-tenant-isolation.fr.svg)
674
+ ![La portée d'exécution nomme le tenant du travail ; première ligne de défense, le repository le met dans chaque instruction avec tenantCondition, ownTenantCondition et tenantScopeOf ; seconde ligne, l'unité de travail commence chaque transaction par tenantSession, qui fixe le tenant pour cette transaction seulement, et les politiques déclarées avec la table ne la laissent voir et écrire que les lignes de ce seul tenant](https://raw.githubusercontent.com/ddd-ts-kit/ddd-ts-kit/main/docs/assets/diagrams/drizzle-tenant-isolation.fr.svg)
675
675
 
676
676
  **Tables partagées.** Une colonne `tenant_id` (`tenantColumn()`) et la condition du kit dans
677
677
  chaque instruction, au lieu d'une condition écrite à la main :
package/README.md CHANGED
@@ -21,7 +21,7 @@ Nothing here is imported from `domain/` or `application/`. A handler depends on
21
21
  port of its domain; the adapter of that port, in `infrastructure/`, runs its statements on the
22
22
  `Database` of the project; the platform builds the unit of work once and binds it.
23
23
 
24
- ![A bounded context holds a handler, the repository port of the domain and the drizzle repository that implements it; createDrizzleUnitOfWork gives one object that is both the UnitOfWork the command bus runs each command in and the Database whose executor() the repository and the stores query through; it opens db.transaction() on a drizzle database of any PostgreSQL driver, whose tables drizzle-kit migrations create](https://raw.githubusercontent.com/gbourgeat/ddd-ts-kit/main/docs/assets/diagrams/drizzle-place-in-an-application.svg)
24
+ ![A bounded context holds a handler, the repository port of the domain and the drizzle repository that implements it; createDrizzleUnitOfWork gives one object that is both the UnitOfWork the command bus runs each command in and the Database whose executor() the repository and the stores query through; it opens db.transaction() on a drizzle database of any PostgreSQL driver, whose tables drizzle-kit migrations create](https://raw.githubusercontent.com/ddd-ts-kit/ddd-ts-kit/main/docs/assets/diagrams/drizzle-place-in-an-application.svg)
25
25
 
26
26
  The one idea to keep: **every statement goes through `executor()`**. Inside a unit of work it
27
27
  is the transaction of that unit of work, so the row of the aggregate, the outbox record of the
@@ -622,7 +622,7 @@ adapter, which a statement of the unit of work must not get.
622
622
 
623
623
  What the two kinds of page do when a row is inserted between two reads:
624
624
 
625
- ![Invoices sorted by amount then id: an offset page 2 read after an insertion shows inv-f a second time, while a cursor page that starts after the position (120, inv-f) of the last row of page 1 shows the same rows whatever was inserted before it, and fetches one row more than the limit to know that a page follows](https://raw.githubusercontent.com/gbourgeat/ddd-ts-kit/main/docs/assets/diagrams/drizzle-keyset-pages.svg)
625
+ ![Invoices sorted by amount then id: an offset page 2 read after an insertion shows inv-f a second time, while a cursor page that starts after the position (120, inv-f) of the last row of page 1 shows the same rows whatever was inserted before it, and fetches one row more than the limit to know that a page follows](https://raw.githubusercontent.com/ddd-ts-kit/ddd-ts-kit/main/docs/assets/diagrams/drizzle-keyset-pages.svg)
626
626
 
627
627
  The rules these examples hold, and that the tests of this package check on a real database:
628
628
 
@@ -652,7 +652,7 @@ Two strategies on drizzle, both proven by `tenantIsolationContract` of
652
652
  `@ddd-ts-kit/testing/contracts`; schema per tenant and database per tenant are shipped for knex
653
653
  only ([Multitenancy](../../docs/concepts/multitenancy.md) has the table).
654
654
 
655
- ![The execution scope names the tenant of the work; first line, the repository puts it in every statement with tenantCondition, ownTenantCondition and tenantScopeOf; second line, the unit of work begins each transaction with tenantSession, which sets the tenant for that transaction only, and the policies declared with the table let it see and write the rows of that tenant alone](https://raw.githubusercontent.com/gbourgeat/ddd-ts-kit/main/docs/assets/diagrams/drizzle-tenant-isolation.svg)
655
+ ![The execution scope names the tenant of the work; first line, the repository puts it in every statement with tenantCondition, ownTenantCondition and tenantScopeOf; second line, the unit of work begins each transaction with tenantSession, which sets the tenant for that transaction only, and the policies declared with the table let it see and write the rows of that tenant alone](https://raw.githubusercontent.com/ddd-ts-kit/ddd-ts-kit/main/docs/assets/diagrams/drizzle-tenant-isolation.svg)
656
656
 
657
657
  **Shared tables.** A `tenant_id` column (`tenantColumn()`) and the condition of the kit in every
658
658
  statement instead of one written by hand:
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ddd-ts-kit/drizzle",
3
- "version": "0.113.2",
3
+ "version": "0.114.1",
4
4
  "description": "Drizzle adapters for the kernel ports on PostgreSQL: unit of work, transactional outbox store, processed-event store, event store, background job store, process store, one schema per context.",
5
5
  "keywords": [
6
6
  "ddd",
@@ -18,11 +18,11 @@
18
18
  "license": "MIT",
19
19
  "repository": {
20
20
  "type": "git",
21
- "url": "git+https://github.com/gbourgeat/ddd-ts-kit.git",
21
+ "url": "git+https://github.com/ddd-ts-kit/ddd-ts-kit.git",
22
22
  "directory": "packages/drizzle"
23
23
  },
24
- "homepage": "https://gbourgeat.github.io/ddd-ts-kit/packages/drizzle/",
25
- "bugs": "https://github.com/gbourgeat/ddd-ts-kit/issues",
24
+ "homepage": "https://ddd-ts-kit.github.io/ddd-ts-kit/packages/drizzle/",
25
+ "bugs": "https://github.com/ddd-ts-kit/ddd-ts-kit/issues",
26
26
  "publishConfig": {
27
27
  "access": "public",
28
28
  "provenance": true
@@ -42,9 +42,9 @@
42
42
  "dist"
43
43
  ],
44
44
  "dependencies": {
45
- "@ddd-ts-kit/kernel": "0.113.2",
46
- "@ddd-ts-kit/events": "0.113.2",
47
- "@ddd-ts-kit/scheduling": "0.113.2"
45
+ "@ddd-ts-kit/kernel": "0.114.1",
46
+ "@ddd-ts-kit/events": "0.114.1",
47
+ "@ddd-ts-kit/scheduling": "0.114.1"
48
48
  },
49
49
  "peerDependencies": {
50
50
  "drizzle-orm": ">=0.40.0"
@@ -52,7 +52,7 @@
52
52
  "devDependencies": {
53
53
  "drizzle-orm": "latest",
54
54
  "@electric-sql/pglite": "0.5.16",
55
- "@ddd-ts-kit/testing": "0.113.2",
55
+ "@ddd-ts-kit/testing": "0.114.1",
56
56
  "pg": "^8.23.1",
57
57
  "@types/pg": "^8.23.1"
58
58
  }