graphddb 0.2.5 → 0.3.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.md CHANGED
@@ -657,7 +657,12 @@ Relation traversal は、Entity 上に定義されたアクセスパスのみを
657
657
  (`entityWrites`: 参照整合性、一意性、edge effect、派生カウンタ、outbox event、冪等性)を
658
658
  一度宣言すると、`mutation` が1つ以上の write fragment を合成し、コンパイラがそれらを単一の
659
659
  atomic な `TransactWriteItems` にマージする。すべての書き込みパスは1つの共有された
660
- `commitTransaction` オーケストレーションを経由する。
660
+ `commitTransaction` オーケストレーションを経由する。**リレーション維持アクセスパス**
661
+ (Epic #118)はこれを拡張する: リレーションの `write.maintainedOn` やスカラ `@aggregate`
662
+ フィールドが、source エンティティのライフサイクルに同期して *別の* 行を維持する —— 射影された
663
+ **snapshot**(`SET`)、上限付き **collection**(`list_append`)、スカラ **counter**
664
+ (`@aggregate` `count()` → atomic `ADD ±1`)—— を source write と同一の atomic transaction に
665
+ 合成する([aggregate-counter](./examples/aggregate-counter/) 例を参照)。
661
666
  - **[Opt-in class hydration](./docs/class-hydration.md)** —— `options.hydrate` ファクトリを
662
667
  渡すと、read 結果をデフォルトの Typed Plain Object ではなく、ホスト言語のドメインオブジェクトに
663
668
  ロードできる。ホスト専用で、bridge SSoT にシリアライズされることはない。Phase 1
@@ -675,6 +680,7 @@ Relation traversal は、Entity 上に定義されたアクセスパスのみを
675
680
  | ドキュメント | 内容 |
676
681
  |----------|-------------|
677
682
  | [Specification](./docs/spec.md) | コア API: entity、structured keys/GSIs、query/filter、relation、batch/transaction、design rule、runtime の挙動。 |
683
+ | [Design patterns](./docs/design-patterns.md) | DynamoDB の代表的な 10 設計パターン(RFC #118 §1)を graphddb の機能にマッピング: same-partition / embedded snapshot / edge / materialized view / sparse view / aggregate counter / versioned / reverse lookup / external projection。各パターンの用途・宣言方法(`pattern` / `defineView` / `defineVersioned` / `defineProjection` / `@aggregate`)・read & write 維持の挙動・Phase 別の対応状況。 |
678
684
  | [CQRS contract layer](./docs/cqrs-contract.md) | public な Query/Command contract、cardinality matrix、N+1 安全性、contract をまたぐ合成、context 境界。 |
679
685
  | [Mutation → command derivation](./docs/mutation-command-derivation.md) | Command IF の背後にある内部的な write-plan 合成 DSL: モデルの write セマンティクス(`entityWrites`)、fragment 合成、atomic な `TransactWriteItems` の導出。 |
680
686
  | [Class hydration](./docs/class-hydration.md) | read 結果をホスト言語のオブジェクトにロードする opt-in な `options.hydrate` ファクトリ(Phase 1: `query` トップレベル; Phase 2–3 は今後)。 |
@@ -689,6 +695,8 @@ Relation traversal は、Entity 上に定義されたアクセスパスのみを
689
695
  |---------|-------------|
690
696
  | [user-permissions](./examples/user-permissions/) | Single Table Design でユーザー・グループ・パーミッションを管理する。隣接リスト、転置インデックス、relation traversal、`explain` を含む。 |
691
697
  | [aggregate-tree-pattern](./examples/aggregate-tree-pattern/) | CDC emulator で駆動される差分的なツリー集計(`siteScoreAverage`): dirty 伝播、throttle 付き sweep、再計算。 |
698
+ | [embedded-snapshot-pattern](./examples/embedded-snapshot-pattern/) | リレーションを **維持アクセスパス** として扱う(Epic #118): `pattern: 'embeddedSnapshot'` のリレーションが、source write と同一の atomic transaction で、非正規化された collection / snapshot を owner 行に同期維持する。 |
699
+ | [aggregate-counter](./examples/aggregate-counter/) | RFC §5.2 の `@aggregate` **counter**: `ThreadPost.created`/`removed` のライフサイクルが、source write と同一の `TransactWriteItems` 内で atomic な `ADD ±1` により `ThreadCounter.postCount` を同期維持する。 |
692
700
 
693
701
  ## ✨ Features
694
702
 
@@ -703,6 +711,7 @@ Relation traversal は、Entity 上に定義されたアクセスパスのみを
703
711
  - 構造化 segment キー(`k` タグ): partial key は segment 境界で `begins_with` にコンパイルされる
704
712
  - 説明可能な実行計画
705
713
  - Relation(hasMany, belongsTo, hasOne, depth 制限, traversal)
714
+ - 維持アクセスパス(Epic #118): `pattern: 'embeddedSnapshot'` のリレーションが非正規化された collection / 単一行 snapshot を owner 行に同期維持し、`@aggregate` `count()` カウンタが atomic な `ADD ±1` で同期する。いずれも source write の atomic transaction に合成される(`maintainedOn` cross-entity トリガ、関数形 `projection`)。同期(`updateMode: 'mutation'`)の維持は TS / Python 両方で動作(conformance 検証済み)。stream / trim / `max()` / `materializedView` / `sparseView` は後続フェーズ
706
715
  - BatchGet 最適化
707
716
  - 並列 relation 実行(独立したサブクエリ、BatchGet チャンク、ネストした解決を上限付きの
708
717
  並列度で同時にディスパッチ)