pytd
pytd copied to clipboard
Does pytd have paramaterized query option?
I'm not seeing any option to pass parameterized query. This would be super helpful when you have None columns as null.
value = None
client.query("INSERT INTO table (column1) VALUES (%s)", (value)) --should insert record as null
Doesn't f string simply work?
column1 = None
client.query(f"INSERT INTO table (column1) VALUES ({column1 or 'NULL'})")
Yeah I guess that would work too. It just becomes a bit verbose and messy when dealing with huge insert statements. Whereas None is inherently handled with paramaterized sql.