Re:Show HN: SQL-tString a t-string SQL builder in Python
by throwaway127482 on Saturday May 17, 2025 @10:42AM
(#44014673)
The columns feature seems somewhat dangerous at first glance. What if I wanted different sets of allowed columns for different parts of the query? Would I have to provide the superset of columns supported in both subqueries / tables?
[ Parent
| on HN ]
Re:Show HN: SQL-tString a t-string SQL builder in Python
by pgjones on Saturday May 17, 2025 @04:22PM
(#44016725)
The `sql_context` feature is meant to protect against SQL injection. I think for your usecase you would need to supply all columns, but you could used nested t-strings included based on whatever logic you need.