preaction / Yancy

The Best Web Framework Deserves the Best Content Management System
http://preaction.me/yancy/
Other
54 stars 21 forks source link

Unify rdbms backends #54

Closed mohawk2 closed 5 years ago

mohawk2 commented 5 years ago

Intended to help implement relations between collections. The common code, using at least the DBI method foreign_key_info for read_schema, will be able to go in the various roles.

The unifying has also had a slight tidying effect, e.g. the Pg code wasn't doing normalize.

mohawk2 commented 5 years ago

This is breaking on Travis, not (for once) through my fault, but because M::Plugin::OpenAPI has broken us again. See https://github.com/jhthorsen/mojolicious-plugin-openapi/issues/107 for more.

mohawk2 commented 5 years ago

(You can see for yourself by trying locally with M::P::OAPI 2.09 (should work), 2.10 (should fail))

mohawk2 commented 5 years ago

While we wait for the fix to be merged, @preaction are there any issues with this PR that I can look at fixing concurrently? :-)

preaction commented 5 years ago

No issues, nope. Though I think in the long run we'll end up making that role into two base classes (one for all backends that handles constructor (not connection) and dealing with JSON schema lookups and one for the Mojo::* backends that has all those methods in them).

Thanks!