platypush/plugins/db/__init__.py
def execute(self, statement, engine=None, *args, **kwargs):
        """
        Executes a raw SQL statement.

        .. warning::
            Avoid calling this method directly if possible.  Use ``insert``,
            ``update`` and ``delete`` methods instead if possible.  Don't use this
            method if you need to select records, use the ``select`` method
            instead, as this method is mostly meant to execute raw SQL without
            returning anything.

        :param statement: SQL to be executed
        :type statement: str
        :param engine: Engine to be used (default: default class engine)
        :type engine: str
        :param args: Extra arguments that will be passed to ``sqlalchemy.create_engine`` (see https://docs.sqlalchemy.org/en/latest/core/engines.html)
        :param kwargs: Extra kwargs that will be passed to ``sqlalchemy.create_engine`` (seehttps:///docs.sqlalchemy.org/en/latest/core/engines.html)
        """

        engine = self._get_engine(engine, *args, **kwargs)

        with engine.connect() as connection:
            connection.execute(statement)

        Executes a raw SQL statement.

        .. warning::
            Avoid calling this method directly if possible.  Use ``insert``,
            ``update`` and ``delete`` methods instead if possible.  Don't use this
            method if you need to select records, use the ``select`` method
            instead, as this method is mostly meant to execute raw SQL without
            returning anything.

        :param statement: SQL to be executed
        :type statement: str
        :param engine: Engine to be used (default: default class engine)
        :type engine: str
        :param args: Extra arguments that will be passed to ``sqlalchemy.create_engine`` (see https://docs.sqlalchemy.org/en/latest/core/engines.html)
        :param kwargs: Extra kwargs that will be passed to ``sqlalchemy.create_engine`` (seehttps:///docs.sqlalchemy.org/en/latest/core/engines.html)
        
Executes a raw SQL statement.
warning::
Avoid calling this method directly if possible.
Executes a raw SQL statement . warning :: Avoid calling this method directly if possible .
def execute(self, statement, engine=None, *args, **kwargs):
        engine = self._get_engine(engine, *args, **kwargs)
        with engine.connect() as connection:
            connection.execute(statement)
def execute ( self , statement , engine = None , * args , ** kwargs ) : engine = self . _get_engine ( engine , * args , ** kwargs ) with engine . connect ( ) as connection : connection . execute ( statement )
Executes a raw SQL statement.
Executes a raw SQL statement .
"""
        Executes a raw SQL statement.

        .. warning::
            Avoid calling this method directly if possible.  Use ``insert``,
            ``update`` and ``delete`` methods instead if possible.  Don't use this
            method if you need to select records, use the ``select`` method
            instead, as this method is mostly meant to execute raw SQL without
            returning anything.

        :param statement: SQL to be executed
        :type statement: str
        :param engine: Engine to be used (default: default class engine)
        :type engine: str
        :param args: Extra arguments that will be passed to ``sqlalchemy.create_engine`` (see https://docs.sqlalchemy.org/en/latest/core/engines.html)
        :param kwargs: Extra kwargs that will be passed to ``sqlalchemy.create_engine`` (seehttps:///docs.sqlalchemy.org/en/latest/core/engines.html)
        """
self
statement
SQL to be executed
SQL to be executed
engine
Engine to be used (default: default class engine)
Engine to be used ( default : default class engine )
args
Extra arguments that will be passed to ``sqlalchemy.create_engine``
Extra arguments that will be passed to ` ` sqlalchemy . create_engine ` `
kwargs
Extra kwargs that will be passed to ``sqlalchemy.create_engine``
Extra kwargs that will be passed to ` ` sqlalchemy . create_engine ` `