Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/sqlalchemy/sqlalchemy
/ functions
Functions
29,075 in github.com/sqlalchemy/sqlalchemy
⨍
Functions
29,075
◇
Types & classes
6,901
↳
Endpoints
247
↓ 163 callers
Method
startswith
r"""Implement the ``startswith`` operator. Produces a LIKE expression that tests against a match for the start of a string value:
lib/sqlalchemy/sql/operators.py:1267
↓ 162 callers
Method
listen
(self, attr)
test/orm/test_collection.py:66
↓ 161 callers
Method
lower
(s: str)
lib/sqlalchemy/dialects/mysql/base.py:3378
↓ 151 callers
Function
insert
(fn)
lib/sqlalchemy/orm/collections.py:1102
↓ 149 callers
Method
corresponding_column
( self, column: KeyedColumnElement[Any], require_embedded: bool = False )
lib/sqlalchemy/sql/dml.py:853
↓ 148 callers
Method
union
(self)
test/perf/compiled_extensions/collections_.py:327
↓ 146 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:1795
↓ 145 callers
Method
assert_sql_execution
(self, db, callable_, *rules)
lib/sqlalchemy/testing/assertions.py:929
↓ 143 callers
Method
append
(self, obj)
test/ext/test_associationproxy.py:62
↓ 142 callers
Function
expect_warnings
Context manager which expects one or more warnings. With no arguments, squelches all SAWarning emitted via sqlalchemy.util.warn and sqlalchem
lib/sqlalchemy/testing/assertions.py:37
↓ 140 callers
Method
_annotate
(self, values: _AnnotationDict)
lib/sqlalchemy/sql/annotation.py:299
↓ 140 callers
Method
traverse
(self, obj: Literal[None])
lib/sqlalchemy/sql/util.py:1112
↓ 139 callers
Method
compare
(self: CompareProtocol, other: CompareProtocol)
test/typing/plain_files/orm/declared_attr_three.py:25
↓ 139 callers
Function
testing_engine
( url: Optional[URL] = ..., options: Optional[Dict[str, Any]] = ..., *, asyncio: Literal[False
lib/sqlalchemy/testing/engines.py:305
↓ 133 callers
Function
create_engine
( url: Union[str, URL], *, connect_args: Dict[Any, Any] = ..., convert_unicode: bool = ...,
lib/sqlalchemy/engine/create.py:50
↓ 129 callers
Method
query
(self, _entity: _EntityType[_O])
lib/sqlalchemy/orm/session.py:2953
↓ 128 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:2664
↓ 128 callers
Function
union
( *selects: _TypedSelectable[Unpack[_Ts]], )
lib/sqlalchemy/sql/_selectable_constructors.py:691
↓ 126 callers
Method
execute
( self, statement: TypedReturnsRows[Unpack[_Ts]], params: Optional[_CoreAnyExecutePara
lib/sqlalchemy/orm/session.py:2364
↓ 126 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:399
↓ 124 callers
Function
selectinload
( *keys: _AttrType, recursion_depth: Optional[int] = None, chunksize: Optional[int] = None, )
lib/sqlalchemy/orm/strategy_options.py:2461
↓ 123 callers
Method
and_
( self, *criteria: _ColumnExpressionArgument[bool] )
lib/sqlalchemy/orm/base.py:685
↓ 123 callers
Method
columns
(self)
test/sql/test_metadata.py:4561
↓ 123 callers
Method
testing_engine
(self)
lib/sqlalchemy/testing/fixtures/base.py:171
↓ 122 callers
Method
fetchall
(self)
test/sql/test_resultset.py:3654
↓ 120 callers
Method
column
Return the target :class:`_schema.Column` referenced by this :class:`_schema.ForeignKey`. If no target column has been established, a
lib/sqlalchemy/sql/schema.py:3496
↓ 120 callers
Function
expect_raises
(except_cls, check_context=True)
lib/sqlalchemy/testing/assertions.py:501
↓ 119 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:4017
↓ 118 callers
Method
split
( self, sep: str | None = None, maxsplit: SupportsIndex = -1, )
lib/sqlalchemy/dialects/postgresql/bitstring.py:182
↓ 117 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:2079
↓ 116 callers
Method
append
Receive a collection append event. The append event is invoked for each element as it is appended to the collection. This occurs for
lib/sqlalchemy/orm/events.py:2546
↓ 112 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:556
↓ 112 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:461
↓ 112 callers
Function
declarative_base
r"""Construct a base class for declarative class definitions. The new base class will be given a metaclass that produces appropriate :class:`
lib/sqlalchemy/orm/decl_api.py:1042
↓ 111 callers
Method
remove
(self, obj, value, initiator)
test/orm/test_collection.py:84
↓ 111 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:627
↓ 110 callers
Function
_register_attribute
(class_, key, **kw)
test/orm/test_attributes.py:41
↓ 110 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:898
↓ 109 callers
Method
connection
(self)
test/dialect/postgresql/test_dialect.py:787
↓ 107 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:4101
↓ 107 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:2227
↓ 106 callers
Method
connect
(*args, **kwargs)
test/engine/test_execute.py:3592
↓ 106 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:1920
↓ 105 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:1993
↓ 105 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:5781
↓ 104 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:1863
↓ 103 callers
Function
go
()
test/aaa_profiling/test_memusage.py:75
↓ 103 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:2874
↓ 100 callers
Function
greenlet_spawn
Runs a sync function ``fn`` in a new greenlet. The sync function can then use :func:`await_` to wait for async functions. :param fn: The
lib/sqlalchemy/util/concurrency.py:177
↓ 99 callers
Function
insert
Construct a PostgreSQL-specific variant :class:`_postgresql.Insert` construct. .. container:: inherited_member The :func:`sqlalchemy
lib/sqlalchemy/dialects/postgresql/dml.py:44
↓ 99 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:1511
↓ 99 callers
Method
scalars
( self, statement: TypedReturnsRows[_T], params: Optional[_CoreAnyExecuteParams] = Non
lib/sqlalchemy/orm/session.py:2525
↓ 98 callers
Method
desc
(self)
test/orm/test_inspect.py:428
↓ 98 callers
Method
fail
(*arg, **kw)
test/engine/test_transaction.py:385
↓ 98 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:114
↓ 98 callers
Method
pop
(self)
test/orm/test_collection.py:1181
↓ 96 callers
Method
over
Produce an OVER clause against this filtered function. Used against aggregate or so-called "window" functions, for database backends
lib/sqlalchemy/sql/elements.py:4958
↓ 95 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:2772
↓ 95 callers
Function
only_on
(dbs, reason=None)
lib/sqlalchemy/testing/exclusions.py:460
↓ 94 callers
Method
execute
(self, operation, args=(), stream=None)
lib/sqlalchemy/dialects/postgresql/pg8000.py:352
↓ 93 callers
Function
ne_
Assert a != b, with repr messaging on failure.
lib/sqlalchemy/testing/assertions.py:295
↓ 92 callers
Function
is_not
Assert a is not b, with repr messaging on failure.
lib/sqlalchemy/testing/assertions.py:330
↓ 91 callers
Function
in_
Assert a in b, with repr messaging on failure.
lib/sqlalchemy/testing/assertions.py:339
↓ 91 callers
Function
skip_if
(predicate, reason=None)
lib/sqlalchemy/testing/exclusions.py:20
↓ 90 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:1181
↓ 90 callers
Method
dumps
(value)
test/dialect/postgresql/test_dialect.py:1576
↓ 90 callers
Function
subqueryload
(*keys: _AttrType)
lib/sqlalchemy/orm/strategy_options.py:2456
↓ 89 callers
Method
any
( # noqa: A001 self, criterion: Optional[_ColumnExpressionArgument[bool]] = None,
lib/sqlalchemy/orm/base.py:689
↓ 89 callers
Method
op
Produce a generic operator function. e.g.:: somecolumn.op("*")(5) produces:: somecolumn * 5 This func
lib/sqlalchemy/sql/operators.py:271
↓ 88 callers
Method
_compiler_dispatch
(self, visitor: Any, **kw: Any)
lib/sqlalchemy/sql/visitors.py:89
↓ 88 callers
Method
loads
(value)
test/dialect/postgresql/test_dialect.py:1571
↓ 86 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:86
↓ 86 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:2203
↓ 83 callers
Method
against
(other: Any)
lib/sqlalchemy/sql/operators.py:395
↓ 83 callers
Function
await_
Awaits an async function in a sync method. The sync method must be inside a :func:`greenlet_spawn` context. :func:`await_` calls cannot be ne
lib/sqlalchemy/util/concurrency.py:147
↓ 82 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:544
↓ 81 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:4479
↓ 81 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:2369
↓ 80 callers
Function
cast
r"""Produce a ``CAST`` expression. :func:`.cast` returns an instance of :class:`.Cast`. E.g.:: from sqlalchemy import cast, Numeric
lib/sqlalchemy/sql/_elements_constructors.py:913
↓ 80 callers
Method
get
Retrieve an object based on identity. Equivalent to :meth:`_query.Query.get`.
lib/sqlalchemy/ext/baked.py:480
↓ 80 callers
Method
has
( self, criterion: Optional[_ColumnExpressionArgument[bool]] = None, **kwa
lib/sqlalchemy/orm/base.py:695
↓ 80 callers
Method
values
Return an iterator yielding result tuples corresponding to the given list of columns
lib/sqlalchemy/orm/query.py:1444
↓ 79 callers
Method
datetime
target dialect supports representation of Python datetime.datetime() objects.
test/requirements.py:1384
↓ 79 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:6324
↓ 79 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:1362
↓ 79 callers
Method
intersection
(self, other)
lib/sqlalchemy/testing/util.py:97
↓ 79 callers
Method
pop
( self, state: InstanceState[Any], dict_: _InstanceDict, value: Any, i
lib/sqlalchemy/orm/attributes.py:1152
↓ 78 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:1507
↓ 77 callers
Method
setdefault
( self: MutableDict[_KT, Optional[_T]], key: _KT, value: None = None )
lib/sqlalchemy/ext/mutable.py:818
↓ 76 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:423
↓ 76 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:542
↓ 76 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:500
↓ 75 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:3200
↓ 75 callers
Function
not_in
Assert a in not b, with repr messaging on failure.
lib/sqlalchemy/testing/assertions.py:344
↓ 74 callers
Method
items
Return a view of key/value tuples for the elements in the underlying :class:`.Row`.
lib/sqlalchemy/engine/row.py:375
↓ 74 callers
Function
join
r"""Produce an inner join between left and right clauses. :func:`_orm.join` is an extension to the core join interface provided by :func:`_ex
lib/sqlalchemy/orm/_orm_constructors.py:2623
↓ 73 callers
Method
difference
(self, other)
lib/sqlalchemy/testing/util.py:94
↓ 73 callers
Function
null
Return a constant :class:`.Null` construct.
lib/sqlalchemy/sql/_elements_constructors.py:1381
↓ 73 callers
Method
references
Return True if this Column references the given column via foreign key.
lib/sqlalchemy/sql/schema.py:2544
↓ 72 callers
Method
_someattr_history
(self, f, **kw)
test/orm/test_attributes.py:1774
← previous
next →
101–200 of 29,075, ranked by callers