Closed jayvdb closed 1 year ago
@Electron100 , I have stubbed out an implementation for his at https://github.com/jayvdb/butane/tree/json . If this is roughly how you expect it would be done, I will continue with it as time allows.
Thanks! This looks great. Two minor suggestions
fwiw, diesel also doesnt automatically support JSON in the models - it only provides the backend fields able to be put into the schema.rs
. Something like https://github.com/terry90/diesel_as_jsonb is needed to avoid lots of boilerplate code.
@Electron100 I think I have basic support for JSON working with both pg and sqlite at https://github.com/Electron100/butane/pull/38 , with some tests.
Most databases support JSON natively, and if they dont butane can convert
serde_json::Value
to and from a Text type on the transparently.