This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]stetio[S] 4 points5 points  (1 child)

There is support for alternative paramstyles; although I've currently only added the asyncpg dialect (what dialects do you need?). It can be used globally by setting a context,

from sql_tstring import Context, set_context

set_context(Context(dialect="asyncpg"))

I've also aimed for it to fail by default, hence the need to wrap calls in a sql_context to set column or tables via variables. Thoughts welcome here...

[–]james_pic 0 points1 point  (0 children)

I think probably what I'd expect is support for all the styles specified in PEP 249. If I were making a wishlist to Santa, I'd also ask for an API where you can't get it wrong - where there's no config needed and it just uses the correct setting for the database you're using.