MCPcopy Create free account
hub / github.com/webpy/webpy / _param_marker

Method _param_marker

web/db.py:725–735  ·  view source on GitHub ↗

Returns parameter marker based on paramstyle attribute if this database.

(self)

Source from the content-addressed store, hash-verified

723 return self.ctx.db.cursor()
724
725 def _param_marker(self):
726 """Returns parameter marker based on paramstyle attribute if this database."""
727 style = getattr(self, "paramstyle", "pyformat")
728
729 if style == "qmark":
730 return "?"
731 elif style == "numeric":
732 return ":1"
733 elif style in ["format", "pyformat"]:
734 return "%s"
735 raise UnknownParamstyle(style)
736
737 def _db_execute(self, cur, sql_query):
738 """executes an sql query"""

Callers

nothing calls this directly

Calls 1

UnknownParamstyleClass · 0.85

Tested by

no test coverage detected