commit | 2a84869c38b0d69bddf86021029e5c003c7e74f0 | [log] [tgz] |
---|---|---|
author | Sean Griffin <sean@seantheprogrammer.com> | Thu Jul 06 15:09:53 2017 -0400 |
committer | Sean Griffin <sean@seantheprogrammer.com> | Thu Jul 06 15:09:53 2017 -0400 |
tree | 47c1e58d8eae595fb6e209521b0b1da5241a9178 | |
parent | 51fb281c3fe85616ad6e83f134002172f6e4d8c6 [diff] |
Have `PgTypeMetadata` be an enum The big benefit of this change is that the signature of `TypeMetadata::metadata` doesn't need to change. We get to remove a lot of the random `_: &()`, which is nice. The only code that isn't PG specific that needs to change with this version is the signature of `ToSql`. However, I don't like this version, and I don't think I'm going to go forward with it. This implementation has a lot more coupling to the metadata lookup. Prior to this commit, the only time you have to know or care about the lookup is when you are doing a dynamic lookup (and that code has to care about the lookup either way). However, with this form, anyone who needs an OID *also* has to care aboute how exactly we go about getting it. I also don't like the idea that you can get metadata that is sometimes useless unless you also have another parameter. If we need the lookup to get the OID, we should enforce that we always have it when we need an OID.
Diesel gets rid of the boilerplate for database interaction and eliminates runtime errors, without sacrificing performance. It takes full advantage of Rust's type system to create a low overhead query builder that “feels like Rust”.
You can find an extensive Getting Started tutorial at http://diesel.rs/guides/getting-started. Guides on more specific features will be coming soon.
Anyone who interacts with Diesel in any space including but not limited to this GitHub repository is expected to follow our code of conduct
Licensed under either of
at your option.
Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.