I'm trying to get the literal query (with the binds inline) for a SQLite
connection per the docs:
http://docs.sqlalchemy.org/en/latest/faq.html#faq-sql-expression-string
Here is the statement:
print(stmt.compile(SQL_ENGINE,compile_kwargs={"literal_binds": True}))
I have a statement object, with parameters bound to it (INSERT in this
case) but when I print it it I don't see the binds "inline", just the :bind
variables printed. I had thought using this compile_kwargs dictionary I
would see my string and integer values in the query that was printed. Am I
misunderstanding this?
In case you are curious why I would need this I'm trying to use SQLAlchemy
to write queries to feed to pyodbc for a database that doesn't have a
dialect. The database in question is ANSI-99 compliant though so if I
could get SQLAlchemy to write my queries for me (with the binds inline) I
had hoped to simply execute them against the pyodbc driver.
--
You received this message because you are subscribed to the Google Groups
"sqlalchemy" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/sqlalchemy.
For more options, visit https://groups.google.com/d/optout.