MCPcopy Index your code
hub / github.com/webpy/webpy / sql_clauses

Method sql_clauses

web/db.py:906–918  ·  view source on GitHub ↗
(self, what, tables, where, group, order, limit, offset)

Source from the content-addressed store, hash-verified

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):

Callers 1

selectMethod · 0.95

Calls 3

sqllistFunction · 0.85
SQLParamClass · 0.85
sqlqueryMethod · 0.80

Tested by

no test coverage detected