This repository has been archived by the owner on Sep 3, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 29
Postgresql type casting (ex: column::datatype) creates an exception #15
Comments
I think I wrote the code responsible, so I can take a look this weekend. :) |
Ran into this one myself. It was rather curious, because the regex responsible for this in the anoaql code looks like this:
I thought it was rather curious, as I wasn't sure what it's purpose was for. The only time I've ever seen a single colon used in Postgres is for array slicing. |
taidan19
added a commit
to taidan19/anosql
that referenced
this issue
Jan 26, 2018
Proposed fix for bug found in honza#15.
taidan19
added a commit
to taidan19/anosql
that referenced
this issue
Jan 26, 2018
Proposed fix for bug found in honza#15.
If I remember correctly, using a colon before a name is an anosql convention for parameters (maybe adopted from yesql?) that are being inserted from Python. E.g., |
I merged the fix. Would you mind testing it? |
We should check this against the big regex PR I had merged #25 |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
using the following query :
will give the following exception:
TypeError: tuple indices must be integers or slices, not str
because anosql will internally change the sql to :
The text was updated successfully, but these errors were encountered: