-
Notifications
You must be signed in to change notification settings - Fork 21
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
SQL parsing oddities (with json datatype in Postgres) #73
Comments
Correction: this 2nd INSERT might not be working... hang-on.. |
Yes, sorry, the INSERT above (with the ::json) is failing:
|
At least, when we switch the INSERT statement to using json(?v) instead of ?v::json, it fails the same way...
|
Was this a problem similar to #98, pushing a JSON Array in the JSONParams? If not, is it still an issue? |
I use json(?v) instead of ?v::json everywhere now. I'm not sure this was an issue, just an oddity. It is not #98. |
The use of Postgres fields is awesome, but Yada does not consistently parse the queries - I'm just making a not of this.
This fails:
UPDATE MAMBA_MAP
SET criteria = ?v::json add_uid = ?v
WHERE id= ?n and is_deleted=-1
This works:
UPDATE MAMBA_MAP
SET criteria = json(?v), add_uid = ?v
WHERE id= ?n and is_deleted=-1
and this works:
INSERT into INDATA_ISSUE(add_uid, resolution, status, add_ts, id, vendor, studyID, field, value, recommendations, is_severe, is_ok, first_seen_ts, last_seen_ts, samCount, earliestDT, latestDT, is_deleted)
SELECT ?v, ?v, ?v::json, now(), id, vendor, studyID, field, value, recommendations, is_severe, is_ok, first_seen_ts, last_seen_ts, samCount, earliestDT, latestDT, -1
FROM INDATA_ISSUE where is_deleted = 0 and id = ?n
The text was updated successfully, but these errors were encountered: