# Merql > Merql is a pure PHP library for three-way merges of database state: snapshot MySQL or SQLite tables, merge two sets of changes and detect conflicts per column. ## Pages - [Home](https://merql.inline0.dev/) ## Documentation - [Introduction](https://merql.inline0.dev/docs.md): Pure PHP three-way database merge with column-level conflict resolution. Git-style merge semantics applied to relational data. - [Getting Started](https://merql.inline0.dev/docs/getting-started.md): Install merql, capture your first snapshot, compute a diff, and perform a three-way merge. - [Three-Way Merge](https://merql.inline0.dev/docs/merge/three-way.md): How merql computes changesets from three database states and merges them using git-style rules. - [Merge Plans](https://merql.inline0.dev/docs/merge/plans.md): Build UI-ready merge plans with stable operation IDs, change groups, selections, and JSON serialization. - [Column-Level Merge](https://merql.inline0.dev/docs/merge/column-level.md): How merql merges rows at the column level to avoid false conflicts when different columns are edited. - [Cell-Level Merge](https://merql.inline0.dev/docs/merge/cell-level.md): Merge within individual cells using text line-by-line diff and JSON key-by-key merge. - [Conflict Handling](https://merql.inline0.dev/docs/merge/conflicts.md): How merql detects, reports, and resolves merge conflicts at the column level. - [SQL Generation](https://merql.inline0.dev/docs/apply/sql-generation.md): How merql generates parameterized SQL from merge results, with foreign key ordering and NULL handling. - [Guarded Apply](https://merql.inline0.dev/docs/apply/guarded.md): Apply merge results with optimistic live-row preconditions so stale plans abort before partial writes. - [Rollback](https://merql.inline0.dev/docs/apply/rollback.md): Generate rollback plans from selected merge operations, validate drift, and apply inverse operations. - [Dry Run Preview](https://merql.inline0.dev/docs/apply/dry-run.md): Preview the SQL a merge would generate without executing it. - [Database Drivers](https://merql.inline0.dev/docs/apply/drivers.md): Pluggable driver system for MySQL, SQLite, and custom databases. - [Row Identity](https://merql.inline0.dev/docs/advanced/identity.md): How merql determines which rows are "the same" across snapshots using primary keys, natural keys, explicit rules, and content hashes. - [Filters](https://merql.inline0.dev/docs/advanced/filters.md): Exclude tables, ignore columns, and filter rows during snapshot capture. - [Schema Validation](https://merql.inline0.dev/docs/advanced/schema.md): How merql detects and reports schema differences between snapshots. - [Testing Strategy](https://merql.inline0.dev/docs/advanced/testing.md): Oracle-driven testing, scenario categories, and how to verify merge correctness. - [CLI](https://merql.inline0.dev/docs/cli.md): Full reference for the merql command-line interface. Snapshot, diff, and merge databases from the terminal. - [API](https://merql.inline0.dev/docs/api.md): Complete PHP API reference for merql. Covers the facade, snapshotter, differ, merge engine, applier, cell mergers, drivers, filters, and exceptions. ## Optional - [Full documentation](https://merql.inline0.dev/llms-full.txt): Markdown source of every documentation page in one file, 138 KB, about 35,000 tokens