plpipes.database.sqlext#
This module provides SQLAlchemy extensions for performing tasks not natively supported by the SQLAlchemy ORM. It includes constructs for creating and dropping tables and views, inserting data from queries, and handling subqueries.
AsSubquery
#
Bases: FromClause
Class for handling subqueries.
Source code in src\plpipes\database\sqlext.py
CreateTableAs
#
Bases: _CreateSomethingAs
Class for creating a table from a select statement.
Source code in src\plpipes\database\sqlext.py
CreateViewAs
#
Bases: _CreateSomethingAs
Class for creating a view from a select statement.
Source code in src\plpipes\database\sqlext.py
DropTable
#
Bases: _DropSomething
Class for dropping a table.
Source code in src\plpipes\database\sqlext.py
DropView
#
Bases: _DropSomething
Class for dropping a view.
Source code in src\plpipes\database\sqlext.py
InsertIntoTableFromQuery
#
Bases: Executable, ClauseElement
Class for inserting data into a table from a select statement.
Source code in src\plpipes\database\sqlext.py
__init__(table_name, select)
#
Initializes the insert operation.
:param table_name: Name of the table to insert into. :param select: Select statement providing data to insert.
Source code in src\plpipes\database\sqlext.py
Wrap(str_or_something)
#
Wraps a string or other expression into a SQLAlchemy text object.
:param str_or_something: The string or expression to wrap. :return: A SQLAlchemy text object or the original expression.