Attempt to bump to diesel 2.0#3
Conversation
This mainly involves the following: - Hstore now derive(SqlType) which removes the need to manually implement some traits. - We now have to implement trait Expression because it is no longer possible to use Bound in trait AsExpression. - LoadQuery requires trait QueryFragment - Minor fixes to respect trait signatures. - Minor fixes in tests and doctests.
Optionally derive Serialize and Deserialize for Hstore.
Use diesel test transactions to keep the database clean.
There are a few limitations to the current implementation: - Multi-dimensional arrays are not implemented, so the conversion to a (key, value) tuple array is not implemented. - The has_key, remove_key and get operators should be implemented as generics, but have not done so yet. - The replacement '#=' operator is not implemented.
Most functions are prefixed with hstore_ or otherwise renamed to avoid name collisions. Some functions are not implemented: - The populate_record and hstore(record) are not implemented - The json and tuple array conversion functions are not implemented
The dsl and functions implementations are conceptually independent, so split them out. The main hstore implementation is also separated.
|
Ideally, it would be nice to have something like a |
|
@qwattash why aren’t you merging it into diesel.rs instead of this dead repo? |
|
@Omicronlawful I was under the impression that diesel.rs was choosing to support jsonb instead of hstore, but my impression is based on an old thread on the diesel issue tracker. I also do not own the code in this repo, if @lholden is fine with that I can try to upstream it properly, although I do not have much time on my hands right now. |
|
@qwattash You are welcome to use whatever code you want from this repo to do something upstream. :) |
Suggestions and reviews are very welcome as I'm just getting started with Rust and probably not writing very rusty code.