I am trying to build a parameterized query for sqlite, and I know I can do this:
cur.execute('INSERT INTO test ("name", "age") VALUES (:some_name, :some_age);',
{"some_name": "Joe", "some_age":45})
However, I have a dictionary that has spaces in the keys. I can't find any information on the legal tokens for the named parameters, and can't seem to come up with any combination that works. Am I out of luck -- no spaces in the named parameters and no way to escape them?
Aucun commentaire:
Enregistrer un commentaire