Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.
Sign upClarify relationship between general SQL types and backend-specific types #225
Comments
This comment has been minimized.
|
You would always use |
sgrif
closed this
Feb 25, 2016
This comment has been minimized.
|
Thanks! I can make a PR to add some docs explaining this. Is there anything else actionable here? Maybe a way to name the |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
jimmycuadra commentedFeb 24, 2016
The backend-specific types, e.g.
diesel::data_types, contain some types that have seemingly identical counterparts indiesel::types. For example, there is bothdiesel::types::Timestampanddiesel::data_types::PgTimestamp. It's not clear why you would use one over the other. The docs for the backend-specific types say they are for cases where there is no native Rust type, and yet matching types appear in the generictypesmodule anyway. Are both of them user-facing types? Is one an implementation detail that happens to be public? If you're using Postgres and thetable!macro, which one do you use to declare a timestamp column? The docs should explain this. The module namestypesanddata_typesalso have no semantic distinction which adds to the confusion.