當前位置: 首頁>>代碼示例>>Python>>正文


Python _mysql.string_literal方法代碼示例

本文整理匯總了Python中_mysql.string_literal方法的典型用法代碼示例。如果您正苦於以下問題:Python _mysql.string_literal方法的具體用法?Python _mysql.string_literal怎麽用?Python _mysql.string_literal使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在_mysql的用法示例。


在下文中一共展示了_mysql.string_literal方法的6個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。

示例1: Set2Str

# 需要導入模塊: import _mysql [as 別名]
# 或者: from _mysql import string_literal [as 別名]
def Set2Str(s, d):
    return string_literal(','.join(s), d) 
開發者ID:yelongyu,項目名稱:chihu,代碼行數:4,代碼來源:converters.py

示例2: Thing2Literal

# 需要導入模塊: import _mysql [as 別名]
# 或者: from _mysql import string_literal [as 別名]
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, d) 
開發者ID:yelongyu,項目名稱:chihu,代碼行數:10,代碼來源:converters.py

示例3: DateTime2literal

# 需要導入模塊: import _mysql [as 別名]
# 或者: from _mysql import string_literal [as 別名]
def DateTime2literal(d, c):
    """Format a DateTime object as an ISO timestamp."""
    return string_literal(format_TIMESTAMP(d),c) 
開發者ID:yelongyu,項目名稱:chihu,代碼行數:5,代碼來源:times.py

示例4: DateTimeDelta2literal

# 需要導入模塊: import _mysql [as 別名]
# 或者: from _mysql import string_literal [as 別名]
def DateTimeDelta2literal(d, c):
    """Format a DateTimeDelta object as a time."""
    return string_literal(format_TIMEDELTA(d),c) 
開發者ID:yelongyu,項目名稱:chihu,代碼行數:5,代碼來源:times.py

示例5: Thing2Literal

# 需要導入模塊: import _mysql [as 別名]
# 或者: from _mysql import string_literal [as 別名]
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, d) 
開發者ID:Hexaflexagon,項目名稱:gtao-python-module,代碼行數:8,代碼來源:converters.py

示例6: DateTime2literal

# 需要導入模塊: import _mysql [as 別名]
# 或者: from _mysql import string_literal [as 別名]
def DateTime2literal(d, c):
    """Format a DateTime object as an ISO timestamp."""
    return string_literal(format_TIMESTAMP(d), c) 
開發者ID:Hexaflexagon,項目名稱:gtao-python-module,代碼行數:5,代碼來源:times.py


注:本文中的_mysql.string_literal方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。