-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
"Identifier" column in table macro results in "Missing lifetime specifier" #1651
Comments
There is not much we can do about this. The The documentation of the |
The serde documentation does a good job of enumerating attributes:
https://serde.rs/
In general one problem I've run into has been understanding what the diesel API is. I've been using the generated documentation, and it seems to lack descriptive text for many things, eg load vs get_results.
… On Apr 20, 2018, at 02:54, Georg Semmler ***@***.***> wrote:
There is not much we can do about this. The table! macro is just a plain macro_rules macro that gives us no way to emit custom error messages.
The documentation of the table! macro already mentions #[sql_name="…"] so I'm quite unsure what else we could do to improve this. In my opinion the only improvement that could be done is to add more documentation on this. The questions is where and what.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub, or mute the thread.
|
Diesel has a much larger API surface than With all of that said, this was a poor interaction. The reason that this problem occurred is that we have an internal type called While we have 0 control over the error message in this case, we could probably avoid the error entirely by referencing |
I didn't realize there were that many derives - I've seen FromSql and ToSql, and I think there's a AsExpression trait that it looked like I had to use with them. However, in general, I've had to do a lot of digging through source code to understand how to do things, more digging than I would expect most people would do before they give up. There seems to be a sore deficit of application-related examples. In general, I'd try to keep an "interface" (whatever that may mean) as simple as possible, but if it has to be complex, I'd definitely expect to need a fair amount of documentation. In general I'd expect a larger API would require more specialized documentation, not less (that being one reason I'd try to keep it as small as possible ;) ). I understand you guys have limited time and probably aren't being paid, I'm just a little worried about the balance of functionality to documentation. There's a lot of functionality that exists, I suspect I can do pretty much everything I want with diesel, but it's often very difficult to figure out how. |
It's an ongoing project. You can always feel free to ask in gitter for help, that's often how we identify gaps in the documentation |
I was able to fix this using
#[sql_name=“...”]
but the error is not clear about what's really going on, and I found sql_name by searching through tickets, not through official documentation.This seems like the sort of thing someone could get stuck on.
It was Nullable type if relevant.
The text was updated successfully, but these errors were encountered: