You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Dec 3, 2019. It is now read-only.
prepared statement not working when in operator in statement with conjunction with Seq[String],
code:
defgetDemand(advertizerId: String, demandIds: Seq[String]):Future[Array[QueryResult]] = {
valargs=List(advertizerId, value)
valquery:String=s"""SELECT "demand_id" |from demand where "partner_id"=? and "demand_id" in (?);""".stripMargin
connection.sendPreparedStatement(query, args)
}
demand_id is a string field (character varying(32))
pg sql logs:
2017-08-01 16:23:35 IDT LOG: execute 1/1: SELECT "demand_id" from demand where "partner_id"=$1 and "demand_id" in ($2);
2017-08-01 16:23:35 IDT DETAIL: parameters: $1 = 'ea47ef7e8b4c4847894004198e7b9e56', $2 = '{"565f776a61db4ccdab36946116699622"}'
I couldn't figure out what todo, i tried to serialize to comma separated list myself but this didn't work as well, directly on the db its working obviously.
thanks.
The text was updated successfully, but these errors were encountered:
shachr
changed the title
prepared statement not working for in operation
prepared statement not working when in operator in statement with conjunction with Seq[String]
Aug 1, 2017
found a workaround (at least for postgre) one can write SELECT * from bar WHERE column = ANY(?) then pass an array or list. It should have the same results (see here)
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
prepared statement not working when in operator in statement with conjunction with Seq[String],
code:
demand_id is a string field (character varying(32))
pg sql logs:
I couldn't figure out what todo, i tried to serialize to comma separated list myself but this didn't work as well, directly on the db its working obviously.
thanks.
The text was updated successfully, but these errors were encountered: