ecto_sql
ecto_sql copied to clipboard
Add `:constraint_handler` and `Ecto.Adapters.SQL.Constraint`
trafficstars
- [x] allows setting a
:constraint_handleroption in locations similar to:prefix- [x] config
- [x]
start_link - [x] per operation
- [x] adds
Ecto.Adapters.SQL.Constraintto replacec:Ecto.Adapters.SQL.Connection.to_constraints/2 - [ ] moves existing
to_constraints/2to new modules for the built-in adapters- [x]
Ecto.Adapters.MyXQL.Constraint - [ ]
Ecto.Adapters.Postgres.Constraint - [ ]
Ecto.Adapters.Tds.Constraint
- [x]
- still calls the connection's
to_constraints/2for the time being to allow downstream adapters to adopt - delegates the built-in adapter connections'
to_constraints/2to the new modules- e.g.
Ecto.Adapters.MyXQL.Connection.to_constraints/2->Ecto.Adapters.MyXQL.Constraint.to_constraints/2
- e.g.
- [ ] adds tests for the built-in adapters verifying custom constraint handlers work
- [x] MyXQL
- [ ]
Postgres - [ ]
Tds
- [ ] adds documentation of how and when this feature is useful and how to use it