# ORM

A small typed layer over `Db` that reads rows into structs.

## Pages in this section

- [Schema](https://agentica-lang.github.io/agentica-db/orm/schema/index.md): Tie a struct to a table with Orm.schema, check it, and how fields map to columns.
- [Reads](https://agentica-lang.github.io/agentica-db/orm/reads/index.md): Read rows into structs with Orm.query, Orm.query_as and Orm.find.
- [Query builder](https://agentica-lang.github.io/agentica-db/orm/builder/index.md): Build a query with from, where_eq, where_in, order_by, limit and offset, and end it with all, one or count.
- [Writes](https://agentica-lang.github.io/agentica-db/orm/writes/index.md): Insert, update, delete and patch one row, and update_all and delete_all for many.
- [Errors](https://agentica-lang.github.io/agentica-db/orm/errors/index.md): Tell the failures of the Orm apart with Orm.classify, and map them to statuses.
