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 15, 2020. It is now read-only.
executable_query = cassandra.prepare("""INSERT INTO units (date, marks, user_id) VALUES (%s, %s, %s)""", (date,marks,user_id,))
await cassandra.execute_future(executable_query)
or this:
executable_query = cassandra.prepare("""INSERT INTO units (date, marks, user_id) VALUES (%s, %s, %s)""")
await cassandra.execute_future(executable_query, (date,marks,user_id,))
fails with the error:
cassandra.protocol.SyntaxException: <Error from server: code=2000 [Syntax error in CQL query] message="line 1:49 no viable alternative at character '%'">
The text was updated successfully, but these errors were encountered:
Nevermind, works by replacing %s with ?, the sync cassandra prepare syntax... kind of obvious in hindsight.
Still, would you mind adding a line exemplifying this in the README ? (for people like myself, who haven't used the sync library before, it might help a bit, since the docs of the sync library mention the %s syntax first and this one doesn't mention the subject of inserting values)
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Could you give some examples of insert queries ?
Something like this
or this:
fails with the error:
cassandra.protocol.SyntaxException: <Error from server: code=2000 [Syntax error in CQL query] message="line 1:49 no viable alternative at character '%'">
The text was updated successfully, but these errors were encountered: