| 904 | ) |
| 905 | |
| 906 | def sql_clauses(self, what, tables, where, group, order, limit, offset): |
| 907 | return ( |
| 908 | ("SELECT", what), |
| 909 | ("FROM", sqllist(tables)), |
| 910 | ("WHERE", where), |
| 911 | ("GROUP BY", group), |
| 912 | ("ORDER BY", order), |
| 913 | # The limit and offset could be the values provided by |
| 914 | # the end-user and are potentially unsafe. |
| 915 | # Using them as parameters to avoid any risk. |
| 916 | ("LIMIT", limit and SQLParam(limit).sqlquery()), |
| 917 | ("OFFSET", offset and SQLParam(offset).sqlquery()), |
| 918 | ) |
| 919 | |
| 920 | def gen_clause(self, sql, val, vars): |
| 921 | if isinstance(val, int): |