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


Python table.insert方法代碼示例

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


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

示例1: prefix_with

# 需要導入模塊: from sqlalchemy import table [as 別名]
# 或者: from sqlalchemy.table import insert [as 別名]
def prefix_with(self, *expr, **kw):
        """Add one or more expressions following the statement keyword, i.e.
        SELECT, INSERT, UPDATE, or DELETE. Generative.

        This is used to support backend-specific prefix keywords such as those
        provided by MySQL.

        E.g.::

            stmt = table.insert().prefix_with("LOW_PRIORITY", dialect="mysql")

        Multiple prefixes can be specified by multiple calls
        to :meth:`.prefix_with`.

        :param \*expr: textual or :class:`.ClauseElement` construct which
         will be rendered following the INSERT, UPDATE, or DELETE
         keyword.
        :param \**kw: A single keyword 'dialect' is accepted.  This is an
         optional string dialect name which will
         limit rendering of this prefix to only that dialect.

        """
        dialect = kw.pop('dialect', None)
        if kw:
            raise exc.ArgumentError("Unsupported argument(s): %s" %
                                    ",".join(kw))
        self._setup_prefixes(expr, dialect) 
開發者ID:sugarguo,項目名稱:Flask_Blog,代碼行數:29,代碼來源:selectable.py

示例2: insert

# 需要導入模塊: from sqlalchemy import table [as 別名]
# 或者: from sqlalchemy.table import insert [as 別名]
def insert(self, dml, values=None, inline=False, **kwargs):
        """Generate an :func:`.insert` construct against this
        :class:`.TableClause`.

        E.g.::

            table.insert().values(name='foo')

        See :func:`.insert` for argument and usage information.

        """

        return dml.Insert(self, values=values, inline=inline, **kwargs) 
開發者ID:sugarguo,項目名稱:Flask_Blog,代碼行數:15,代碼來源:selectable.py

示例3: prefix_with

# 需要導入模塊: from sqlalchemy import table [as 別名]
# 或者: from sqlalchemy.table import insert [as 別名]
def prefix_with(self, *expr, **kw):
        r"""Add one or more expressions following the statement keyword, i.e.
        SELECT, INSERT, UPDATE, or DELETE. Generative.

        This is used to support backend-specific prefix keywords such as those
        provided by MySQL.

        E.g.::

            stmt = table.insert().prefix_with("LOW_PRIORITY", dialect="mysql")

        Multiple prefixes can be specified by multiple calls
        to :meth:`.prefix_with`.

        :param \*expr: textual or :class:`.ClauseElement` construct which
         will be rendered following the INSERT, UPDATE, or DELETE
         keyword.
        :param \**kw: A single keyword 'dialect' is accepted.  This is an
         optional string dialect name which will
         limit rendering of this prefix to only that dialect.

        """
        dialect = kw.pop('dialect', None)
        if kw:
            raise exc.ArgumentError("Unsupported argument(s): %s" %
                                    ",".join(kw))
        self._setup_prefixes(expr, dialect) 
開發者ID:Agentscreech,項目名稱:ShelbySearch,代碼行數:29,代碼來源:selectable.py


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