Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/sqlalchemy/sqlalchemy
/ functions
Functions
28,030 in github.com/sqlalchemy/sqlalchemy
⨍
Functions
28,030
◇
Types & classes
6,670
↳
Endpoints
215
↓ 108 callers
Function
insert
(fn)
lib/sqlalchemy/orm/collections.py:1154
↓ 108 callers
Method
pop
(cls, namespace)
lib/sqlalchemy/testing/config.py:406
↓ 107 callers
Method
update
r"""Perform an UPDATE with an arbitrary WHERE clause. Updates rows matched by this query in the database. E.g.:: sess.q
lib/sqlalchemy/orm/query.py:3231
↓ 106 callers
Function
Column
A schema.Column wrapper/hook for dialect-specific tweaks.
lib/sqlalchemy/testing/schema.py:43
↓ 106 callers
Method
traverse
(self, obj: Literal[None])
lib/sqlalchemy/sql/util.py:1100
↓ 105 callers
Method
closed
Return ``True`` if this :class:`_engine.Result` was **hard closed** by explicitly calling the :meth:`close` method. The attribute is
lib/sqlalchemy/engine/result.py:1022
↓ 103 callers
Method
fail
(*arg, **kw)
test/orm/test_transaction.py:650
↓ 103 callers
Function
go
()
test/aaa_profiling/test_memusage.py:75
↓ 101 callers
Method
object
Return the mapped object represented by this :class:`.InstanceState`. Returns None if the object has been garbage collected
lib/sqlalchemy/orm/state.py:398
↓ 98 callers
Function
configure_mappers
Initialize the inter-mapper relationships of all mappers that have been constructed thus far across all :class:`_orm.registry` collections.
lib/sqlalchemy/orm/mapper.py:4129
↓ 98 callers
Method
listen
(self, attr)
test/orm/test_collection.py:65
↓ 97 callers
Method
values
(self)
test/orm/test_collection.py:1631
↓ 94 callers
Method
mapper
(self)
lib/sqlalchemy/orm/util.py:1622
↓ 93 callers
Method
query
(self, _entity: _EntityType[_O])
lib/sqlalchemy/orm/session.py:2859
↓ 93 callers
Method
remove
(self, obj, value, initiator)
test/orm/test_collection.py:83
↓ 89 callers
Method
append
(self, obj)
test/ext/test_associationproxy.py:60
↓ 89 callers
Method
compare
(self: CompareProtocol, other: CompareProtocol)
test/typing/plain_files/orm/declared_attr_three.py:25
↓ 89 callers
Function
greenlet_spawn
(fn, *args, **kw)
lib/sqlalchemy/util/concurrency.py:100
↓ 89 callers
Method
offset
Apply an ``OFFSET`` to the query and return the newly resulting ``Query``. .. seealso:: :meth:`_sql.Select.offset` - v2
lib/sqlalchemy/orm/query.py:2634
↓ 88 callers
Function
column_property
r"""Provide a column-level property for use with a mapping. With Declarative mappings, :func:`_orm.column_property` is used to map read-only
lib/sqlalchemy/orm/_orm_constructors.py:459
↓ 87 callers
Method
unique
Apply unique filtering to the objects returned by this :class:`_engine.Result`. When this filter is applied with no arguments, the ro
lib/sqlalchemy/engine/result.py:1093
↓ 86 callers
Method
columns
(self)
test/sql/test_metadata.py:4359
↓ 86 callers
Method
execute
( self, statement: TypedReturnsRows[_T], params: Optional[_CoreAnyExecuteParams] = Non
lib/sqlalchemy/orm/session.py:2290
↓ 86 callers
Function
only_on
(dbs, reason=None)
lib/sqlalchemy/testing/exclusions.py:460
↓ 86 callers
Method
scalar
Return the first element of the first result or None if no rows present. If multiple rows are returned, raises :class:`_exc.MultipleR
lib/sqlalchemy/orm/query.py:2817
↓ 86 callers
Method
scalar
(q)
test/orm/inheritance/test_single.py:264
↓ 84 callers
Function
go
(bind)
test/perf/many_table_reflection.py:202
↓ 82 callers
Function
skip_if
(predicate, reason=None)
lib/sqlalchemy/testing/exclusions.py:20
↓ 81 callers
Method
begin_nested
Begin a "nested" transaction on this Session, e.g. SAVEPOINT. The target database(s) and associated drivers must support SQL SAVEPOIN
lib/sqlalchemy/orm/session.py:1952
↓ 81 callers
Method
update
(self, other)
test/orm/test_collection.py:1183
↓ 80 callers
Method
group_by
Apply one or more GROUP BY criterion to the query and return the newly resulting :class:`_query.Query`. All existing GROUP BY setting
lib/sqlalchemy/orm/query.py:2050
↓ 80 callers
Function
insert
Construct a PostgreSQL-specific variant :class:`_postgresql.Insert` construct. .. container:: inherited_member The :func:`sqlalchemy
lib/sqlalchemy/dialects/postgresql/dml.py:41
↓ 79 callers
Method
and_
( self, *criteria: _ColumnExpressionArgument[bool] )
lib/sqlalchemy/orm/base.py:685
↓ 79 callers
Function
selectinload
( *keys: _AttrType, recursion_depth: Optional[int] = None )
lib/sqlalchemy/orm/strategy_options.py:2467
↓ 78 callers
Method
connect
(*args, **kwargs)
test/engine/test_execute.py:3304
↓ 78 callers
Method
like
r"""Implement the ``like`` operator. In a column context, produces the expression: .. sourcecode:: sql a LIKE other
lib/sqlalchemy/sql/operators.py:698
↓ 77 callers
Function
backref
When using the :paramref:`_orm.relationship.backref` parameter, provides specific parameters to be used when the new :func:`_orm.relationship`
lib/sqlalchemy/orm/_orm_constructors.py:2168
↓ 77 callers
Method
correlate
Return a :class:`.Query` construct which will correlate the given FROM clauses to that of an enclosing :class:`.Query` or :func:`~.exp
lib/sqlalchemy/orm/query.py:1169
↓ 76 callers
Method
dumps
(value)
test/dialect/postgresql/test_dialect.py:1590
↓ 76 callers
Method
merge
Copy the state of a given instance into a corresponding instance within this :class:`.Session`. :meth:`.Session.merge` examines the p
lib/sqlalchemy/orm/session.py:3891
↓ 76 callers
Method
on_conflict_do_update
r""" Specifies a DO UPDATE SET action for ON CONFLICT clause. :param index_elements: A sequence consisting of string column
lib/sqlalchemy/dialects/sqlite/dml.py:112
↓ 76 callers
Function
true
Return a constant :class:`.True_` construct. E.g.: .. sourcecode:: pycon+sql >>> from sqlalchemy import true >>> print(sele
lib/sqlalchemy/sql/_elements_constructors.py:1695
↓ 76 callers
Method
with_for_update
return a new :class:`_query.Query` with the specified options for the ``FOR UPDATE`` clause. The behavior of this method is i
lib/sqlalchemy/orm/query.py:1775
↓ 75 callers
Function
deferred
r"""Indicate a column-based mapped attribute that by default will not load unless accessed. When using :func:`_orm.mapped_column`, the same f
lib/sqlalchemy/orm/_orm_constructors.py:2192
↓ 73 callers
Method
append
Append an item to this :class:`_orm.AppenderQuery`. The given item will be persisted to the database in terms of the parent instance'
lib/sqlalchemy/orm/dynamic.py:273
↓ 73 callers
Method
await_
(coroutine: Awaitable[Any])
lib/sqlalchemy/util/queue.py:244
↓ 73 callers
Method
execute
(self, operation, args=(), stream=None)
lib/sqlalchemy/dialects/postgresql/pg8000.py:355
↓ 72 callers
Function
ne_
Assert a != b, with repr messaging on failure.
lib/sqlalchemy/testing/assertions.py:289
↓ 71 callers
Method
distinct
r"""Apply a ``DISTINCT`` to the query and return the newly resulting ``Query``. .. note:: The ORM-level :meth:`.distinc
lib/sqlalchemy/orm/query.py:2647
↓ 71 callers
Method
drop_all
Drop all tables stored in this metadata. Conditional by default, will not attempt to drop tables not present in the target database.
lib/sqlalchemy/sql/schema.py:5933
↓ 71 callers
Method
loads
(value)
test/dialect/postgresql/test_dialect.py:1585
↓ 70 callers
Method
append_constraint
Append a :class:`_schema.Constraint` to this :class:`_schema.Table`. This has the effect of the constraint being included in any
lib/sqlalchemy/sql/schema.py:1250
↓ 70 callers
Function
expect_raises
(except_cls, check_context=True)
lib/sqlalchemy/testing/assertions.py:495
↓ 70 callers
Function
union
( *selects: _TypedSelectable[_TP], )
lib/sqlalchemy/sql/_selectable_constructors.py:614
↓ 69 callers
Method
_annotate
(self, values: _AnnotationDict)
lib/sqlalchemy/sql/annotation.py:296
↓ 69 callers
Method
_generate_cache_key
(self)
lib/sqlalchemy/sql/base.py:1076
↓ 69 callers
Method
any
( # noqa: A001 self, criterion: Optional[_ColumnExpressionArgument[bool]] = None,
lib/sqlalchemy/orm/base.py:689
↓ 69 callers
Method
join
r"""Create a SQL JOIN against this :class:`_expression.Select` object's criterion and apply generatively, returning the newly resultin
lib/sqlalchemy/sql/selectable.py:5526
↓ 69 callers
Method
values
Return an iterator yielding result tuples corresponding to the given list of columns
lib/sqlalchemy/orm/query.py:1431
↓ 68 callers
Method
connection
(self)
test/dialect/postgresql/test_dialect.py:789
↓ 68 callers
Function
subqueryload
(*keys: _AttrType)
lib/sqlalchemy/orm/strategy_options.py:2462
↓ 67 callers
Function
or_
Produce a conjunction of expressions joined by ``OR``. E.g.:: from sqlalchemy import or_ stmt = select(users_table).where(
lib/sqlalchemy/sql/_elements_constructors.py:1412
↓ 63 callers
Method
_fixture
( self, extras=None, alt_row=None, num_rows=None, default_filters=None
test/base/test_result.py:271
↓ 63 callers
Method
_someattr_history
(self, f, **kw)
test/orm/test_attributes.py:1774
↓ 63 callers
Method
desc
(self)
test/orm/test_inspect.py:428
↓ 63 callers
Method
dispose
Dispose of this pool. This method leaves the possibility of checked-out connections remaining open, as it only affects connections th
lib/sqlalchemy/pool/base.py:425
↓ 62 callers
Method
get_columns
Return information about columns in ``table_name``. Given a :class:`_engine.Connection`, a string ``table_name``, and an optional str
lib/sqlalchemy/engine/interfaces.py:1329
↓ 62 callers
Function
is_not
Assert a is not b, with repr messaging on failure.
lib/sqlalchemy/testing/assertions.py:324
↓ 61 callers
Method
begin
Return a context manager delivering a :class:`_engine.Connection` with a :class:`.Transaction` established. E.g.:: with
lib/sqlalchemy/engine/base.py:3235
↓ 61 callers
Method
from_statement
Execute the given SELECT statement and return results. This method bypasses all internal statement compilation, and the statement is
lib/sqlalchemy/orm/query.py:2715
↓ 61 callers
Method
warn
(self, stmt_type="SELECT")
lib/sqlalchemy/sql/compiler.py:750
↓ 60 callers
Method
pop
( self, state: InstanceState[Any], dict_: _InstanceDict, value: Any, i
lib/sqlalchemy/orm/attributes.py:1157
↓ 60 callers
Method
return_defaults
Make use of a :term:`RETURNING` clause for the purpose of fetching server-side expressions and defaults, for supporting backends only.
lib/sqlalchemy/sql/dml.py:482
↓ 59 callers
Function
normalize_sequence
Normalize sequence parameters for dialect that don't start with 1 by default. The default implementation does nothing
lib/sqlalchemy/testing/provision.py:543
↓ 58 callers
Function
_register_attribute
(class_, key, **kw)
test/orm/test_attributes.py:41
↓ 58 callers
Method
corresponding_column
( self, column: KeyedColumnElement[Any], require_embedded: bool = False )
lib/sqlalchemy/sql/dml.py:835
↓ 58 callers
Method
expunge
Remove the `instance` from this ``Session``. This will free all internal references to the instance. Cascading will be applied accor
lib/sqlalchemy/orm/session.py:3305
↓ 57 callers
Method
op
Produce a generic operator function. e.g.:: somecolumn.op("*")(5) produces:: somecolumn * 5 This func
lib/sqlalchemy/sql/operators.py:207
↓ 56 callers
Method
from_select
Return a new :class:`_expression.Insert` construct which represents an ``INSERT...FROM SELECT`` statement. e.g.:: sel =
lib/sqlalchemy/sql/dml.py:1276
↓ 56 callers
Method
intersection
(self, other)
lib/sqlalchemy/testing/util.py:138
↓ 55 callers
Method
items
Return a view of key/value tuples for the elements in the underlying :class:`.Row`.
lib/sqlalchemy/engine/row.py:378
↓ 54 callers
Method
_compiler_dispatch
(self, visitor: Any, **kw: Any)
lib/sqlalchemy/sql/visitors.py:99
↓ 54 callers
Function
association_proxy
r"""Return a Python property implementing a view of a target attribute which references an attribute on members of the target. The return
lib/sqlalchemy/ext/associationproxy.py:85
↓ 54 callers
Method
get
given cursor.lastrowid value and the parameters used for INSERT, return a "row" that represents the primary key, either by usi
lib/sqlalchemy/sql/compiler.py:2309
↓ 53 callers
Method
against
(other: Any)
lib/sqlalchemy/sql/operators.py:309
↓ 53 callers
Method
has
( self, criterion: Optional[_ColumnExpressionArgument[bool]] = None, **kwa
lib/sqlalchemy/orm/base.py:695
↓ 53 callers
Method
items
(self)
lib/sqlalchemy/orm/identity.py:235
↓ 53 callers
Method
prepare
sample prepare method
test/orm/declarative/test_basic.py:1271
↓ 53 callers
Method
regexp_match
(self)
test/requirements.py:2036
↓ 52 callers
Method
connect
()
test/engine/test_reconnect.py:937
↓ 52 callers
Method
difference
(self, other)
lib/sqlalchemy/testing/util.py:135
↓ 52 callers
Method
fail
(*arg, **kw)
test/engine/test_transaction.py:385
↓ 52 callers
Method
operate
( self, op: OperatorType, *other: Any, **kwargs: Any )
lib/sqlalchemy/sql/operators.py:543
↓ 51 callers
Function
class_mapper
Given a class, return the primary :class:`_orm.Mapper` associated with the key. Raises :exc:`.UnmappedClassError` if no mapping is configured
lib/sqlalchemy/orm/base.py:540
↓ 51 callers
Method
flush
Flush all the object changes to the database. Writes out all pending object creations, deletions and modifications to the database as
lib/sqlalchemy/orm/session.py:4323
↓ 49 callers
Method
close
Close out the transactional resources and ORM objects used by this :class:`_orm.Session`. This expunges all ORM objects associated wi
lib/sqlalchemy/orm/session.py:2490
↓ 49 callers
Method
in_transaction
Return True if this :class:`_orm.Session` has begun a transaction. .. versionadded:: 1.4 .. seealso:: :attr:`_orm.Sessi
lib/sqlalchemy/orm/session.py:1822
↓ 49 callers
Method
insert
(self, index, item)
test/orm/test_collection.py:694
↓ 49 callers
Method
items
(*ids)
test/orm/test_lazy_relations.py:611
↓ 49 callers
Method
to_metadata
Return a copy of this :class:`_schema.Table` associated with a different :class:`_schema.MetaData`. E.g.:: m1 = MetaData
lib/sqlalchemy/sql/schema.py:1334
← previous
next →
101–200 of 28,030, ranked by callers