docs: add table of contents to all Ecto pattern files

This commit is contained in:
2026-05-01 20:55:15 -07:00
parent d28b9c8844
commit 49a006dd18
5 changed files with 55 additions and 0 deletions
+13
View File
@@ -2,6 +2,19 @@
Patterns extracted from Ecto's source code for building safe, composable data pipelines.
## Contents
1. [`cast/4` — The External/Internal Data Boundary](#1-cast4--the-externalinternal-data-boundary)
2. [`change/2` — Internal-Only Modifications](#2-change2--internal-only-modifications)
3. [Validation Pipeline — Composable Validators](#3-validation-pipeline--composable-validators)
4. [`validate_change/3` — Custom Validators](#4-validate_change3--custom-validators)
5. [`add_error/4` — Manual Error Injection](#5-add_error4--manual-error-injection)
6. [`put_change/3` vs `force_change/3` — Tracked vs Forced Changes](#6-put_change3-vs-force_change3--tracked-vs-forced-changes)
7. [Constraints vs Validations — DB-level Safety](#7-constraints-vs-validations--db-level-safety)
8. [`prepare_changes/2` — Last-Mile DB-Aware Transforms](#8-prepare_changes2--last-mile-db-aware-transforms)
9. [`apply_action/2` — Schemaless Validation](#9-apply_action2--schemaless-validation)
10. [`cast_assoc/3` vs `put_assoc/4` — External vs Internal Association Changes](#10-cast_assoc3-vs-put_assoc4--external-vs-internal-association-changes)
---
## 1. `cast/4` — The External/Internal Data Boundary