Exemplo n.º 1
0
def DateTimeDelta2literal(d, c):
    """Format a DateTimeDelta object as a time."""
    return string_literal(format_TIMEDELTA(d))
Exemplo n.º 2
0
def Thing2Literal(o, d):
    """Convert something into a SQL string literal.  If using
    MySQL-3.23 or newer, string_literal() is a method of the
    _mysql.MYSQL object, and this function will be overridden with
    that method when the connection is created."""
    return string_literal(o)
Exemplo n.º 3
0
def DateTime2literal(d, c):
    """Format a DateTime object as an ISO timestamp."""
    return string_literal(format_TIMESTAMP(d))
Exemplo n.º 4
0
def Set2Str(s, d):
    # Only support ascii string.  Not tested.
    return string_literal(','.join(s))