当前位置: 首页>>代码示例>>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;未经允许,请勿转载。