News for hackers. Stuff that matters.
Re:Simple SQL in Python by bokwoon on Thursday August 13, 2020 @04:10PM (#24148074)
Don't query builders already let you do that? By making the WHERE clause map to a data structure, you can just duplicate the data structure to duplicate the WHERE clause e.g. https://bokwoon95.github.io/sq/query-building/reusing-where.... (full disclosure: I'm the author).
Re:Simple SQL in Python by stdohm on Thursday August 13, 2020 @07:45PM (#24151307)
Total agree and I use query builders all the time. (Yours definitely looks nice.) I was curious though how others might of handled these issues when using libraries like the one posted here which is just raw sql.
Re:Simple SQL in Python by nackjicholson on Friday August 14, 2020 @12:16AM (#24153300)
+1 for query builders being an excellent choice for a lot of applications and uses. Keeping things DRY being one. We haven't solved the repetition in SQL with aiosql. We also haven't tried. :)