-
-
Notifications
You must be signed in to change notification settings - Fork 10
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
Field name problem #5
Comments
I think the issue is that you haven't prefixed
|
You are right. Is it possible to generate a better error message?
tor. 26. sep. 2019 kl. 18.10 skrev Bogdan Popa <[email protected]>:
I think the issue is that you haven't prefixed github-id with gu in your
query. This works:
(lookup db (~> (from github-user #:as gu)
(where (= gu.github-id 123))))
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#5?email_source=notifications&email_token=AADQXRLWEQXP2XKWU2FUALTQLTNHVA5CNFSM4I24AFUKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD7WD35Q#issuecomment-535576054>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AADQXRLZKFVOZFITJYN5AKLQLTNHVANCNFSM4I24AFUA>
.
--
--
Jens Axel Søgaard
|
Yes, I think we can detect cases like this, where the identifier contains a dash. However, I don't think this can be detected in general. |
Actually for the
That is, it works even when I don't write |
I would say it's the reverse. (= id ,id) IMO, this and any use of an unqualified column name should error out, but it doesn't because the parser for query expressions is not smart enough to distinguish between cases where an identifier refers to the name of a column and cases where an identifier refers to some other identifiers within the database. I could make the parser error out whenever a bare identifier is found anywhere except in function name position, but then stuff like
would also fail to parse (on The easiest solution would be to have things continue working as they do now and just replace |
I spoke too soon and didn't take... well... I think we might be stuck with this behavior for the time being. I'll have to make a list of all the situations in which bare identifiers can be used and then see if I can't come up with a better solution. |
The following program provokes an error:
; prepare: no such column: GITHUB
I suspect that (somewhere) there an "deta field name to sql fieldname" conversion missing.
the full error:
The text was updated successfully, but these errors were encountered: