make_sql_literal¶
-
pyvo.registry.rtcons.
make_sql_literal
(value)[source]¶ makes a SQL literal from a python value.
This is not suitable as a device to ward against SQL injections; in what we produce, callers could produce arbitrary SQL anyway. The point of this function is to minimize surprises when building constraints.
- Parameters
- valueobject
Conceptually, the function should produces SQL literals for anything that might reasonably add up in a registry query. In reality, a ValueError will be raised for anything we do not know about.
- Returns
- str
A SQL literal.