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
↓ 72 callers
Function
synonym
Denote an attribute name as a synonym to a mapped property, in that the attribute will mirror the value and expression behavior of another att
lib/sqlalchemy/orm/_orm_constructors.py:1973
↓ 71 callers
Method
connect
()
test/engine/test_reconnect.py:939
↓ 71 callers
Method
sub
(self)
test/perf/compiled_extensions/collections_.py:353
↓ 70 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:2677
↓ 70 callers
Function
expect_deprecated
(*messages, **kw)
lib/sqlalchemy/testing/assertions.py:86
↓ 70 callers
Method
warn
(self, stmt_type="SELECT")
lib/sqlalchemy/sql/compiler.py:784
↓ 69 callers
Function
contains_eager
(*keys: _AttrType, **kw: Any)
lib/sqlalchemy/orm/strategy_options.py:2437
↓ 68 callers
Function
composite
( _class_or_attr: _CompositeAttrType[Any], /, *attrs: _CompositeAttrType[Any], group: Optional
lib/sqlalchemy/orm/_orm_constructors.py:635
↓ 68 callers
Method
process
(self, obj: Visitable, **kwargs: Any)
lib/sqlalchemy/sql/compiler.py:971
↓ 67 callers
Method
_fixture
( self, extras=None, alt_row=None, num_rows=None, default_filters=None
test/base/test_result.py:293
↓ 67 callers
Method
prepare
sample prepare method
test/orm/declarative/test_basic.py:1343
↓ 66 callers
Method
add
( # type: ignore[override] self, column: _NAMEDCOL, key: Optional[str] = None,
lib/sqlalchemy/sql/base.py:2316
↓ 66 callers
Method
append_column
Append a :class:`_schema.Column` to this :class:`_schema.Table`. The "key" of the newly added :class:`_schema.Column`, i.e. the value
lib/sqlalchemy/sql/schema.py:1473
↓ 65 callers
Method
coerce
(cls, key, value)
test/ext/test_mutable.py:104
↓ 65 callers
Method
has_table
For internal dialect use, check the existence of a particular table or view in the database. Given a :class:`_engine.Connection` obje
lib/sqlalchemy/engine/interfaces.py:1875
↓ 65 callers
Method
items
(self)
lib/sqlalchemy/orm/identity.py:235
↓ 65 callers
Method
one
()
test/sql/test_compare.py:1011
↓ 64 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:2584
↓ 64 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:3407
↓ 64 callers
Method
extend
(self, cols: Iterable[Any])
lib/sqlalchemy/sql/base.py:2571
↓ 64 callers
Method
fetch
r"""Return a new selectable with the given FETCH FIRST criterion applied. This is a numeric value which usually renders as ``FETCH {F
lib/sqlalchemy/sql/selectable.py:4362
↓ 63 callers
Method
contains_column
(self, col: ColumnClause[Any])
lib/sqlalchemy/sql/base.py:2568
↓ 63 callers
Method
ext
Applies a SQL syntax extension to this statement. .. seealso:: :ref:`examples_syntax_extensions` :func:`_mysql.limi
lib/sqlalchemy/orm/query.py:2727
↓ 63 callers
Method
items
(*ids)
test/orm/test_lazy_relations.py:611
↓ 63 callers
Method
with_variant
r"""Produce a copy of this type object that will utilize the given type when applied to the dialect of the given name. e.g.::
lib/sqlalchemy/sql/type_api.py:706
↓ 62 callers
Method
date
target dialect supports representation of Python datetime.date() objects.
test/requirements.py:1491
↓ 61 callers
Method
array
Text array expression. Returns array of alternating keys and values.
lib/sqlalchemy/dialects/postgresql/hstore.py:201
↓ 61 callers
Function
eq_regex
(a, b, msg=None, flags=0)
lib/sqlalchemy/testing/assertions.py:286
↓ 61 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:1316
↓ 61 callers
Function
tstring
r"""Construct a new :class:`_expression.TString` clause, representing a SQL template string using Python 3.14+ t-strings. .. versionadded:: 2
lib/sqlalchemy/sql/_elements_constructors.py:1840
↓ 60 callers
Method
contains
(self)
test/perf/compiled_extensions/row.py:303
↓ 59 callers
Method
foo
(ctx)
test/sql/test_insert.py:869
↓ 58 callers
Method
_create_result_map
utility method used for unit tests only.
lib/sqlalchemy/sql/compiler.py:2298
↓ 58 callers
Method
configure
Configure all as-yet unconfigured mappers in this :class:`_orm.registry`. The configure step is used to reconcile and initialize the
lib/sqlalchemy/orm/decl_api.py:1477
↓ 58 callers
Method
create
()
test/engine/test_pool.py:1224
↓ 58 callers
Method
reflect
( self, bind: Engine, schema: Optional[str] = ..., views: bool = ...,
lib/sqlalchemy/sql/schema.py:6083
↓ 58 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:1600
↓ 57 callers
Function
delete
r"""Construct :class:`_expression.Delete` object. E.g.:: from sqlalchemy import delete stmt = delete(user_table).where(user_tab
lib/sqlalchemy/sql/_dml_constructors.py:111
↓ 57 callers
Method
process
(value: Sequence[typing_Any])
lib/sqlalchemy/dialects/postgresql/array.py:432
↓ 57 callers
Method
regexp_match
(self)
test/requirements.py:2106
↓ 57 callers
Function
with_loader_criteria
Add additional WHERE criteria to the load for all occurrences of a particular entity. .. versionadded:: 1.4 The :func:`_orm.with_loader_
lib/sqlalchemy/orm/_orm_constructors.py:860
↓ 56 callers
Method
process
(value: Optional[Iterable[int]])
lib/sqlalchemy/dialects/mysql/types.py:455
↓ 55 callers
Function
case
r"""Produce a ``CASE`` expression. The ``CASE`` construct in SQL is a conditional object that acts somewhat analogously to an "if/then" const
lib/sqlalchemy/sql/_elements_constructors.py:794
↓ 55 callers
Function
defaultload
(*keys: _AttrType)
lib/sqlalchemy/orm/strategy_options.py:2499
↓ 55 callers
Method
join_from
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:5890
↓ 55 callers
Method
update
Generate an :func:`_expression.update` construct against this :class:`_expression.TableClause`. E.g.:: table.update().wh
lib/sqlalchemy/sql/selectable.py:3295
↓ 54 callers
Method
endswith
r"""Implement the 'endswith' operator. Produces a LIKE expression that tests against a match for the end of a string value:
lib/sqlalchemy/sql/operators.py:1445
↓ 54 callers
Method
get_transaction
Return the current root transaction in progress, if any. .. versionadded:: 1.4
lib/sqlalchemy/orm/session.py:1885
↓ 54 callers
Method
quote
Conditionally quote an identifier. The identifier is quoted if it is a reserved word, contains quote-necessary characters, or is an i
lib/sqlalchemy/sql/compiler.py:8060
↓ 54 callers
Method
subqueryload
Indicate that the given attribute should be loaded using subquery eager loading. This function is part of the :class:`_orm.Load` inte
lib/sqlalchemy/orm/strategy_options.py:328
↓ 53 callers
Method
_test
(self, clause, expected, entity=None, checkparams=None)
test/orm/test_query.py:1565
↓ 53 callers
Method
drop
Issue a ``DROP`` statement for this :class:`_schema.Table`, using the given :class:`.Connection` or :class:`.Engine` for connectivity.
lib/sqlalchemy/sql/schema.py:1553
↓ 53 callers
Method
mappings
Apply a mappings filter to returned rows, returning an instance of :class:`_engine.MappingResult`. When this filter is applied, fetch
lib/sqlalchemy/engine/result.py:774
↓ 53 callers
Method
params
r"""Add values for bind parameters which may have been specified in filter(). Parameters may be specified using \**kwargs, or optiona
lib/sqlalchemy/orm/query.py:1867
↓ 53 callers
Method
warn
()
lib/sqlalchemy/orm/descriptor_props.py:972
↓ 52 callers
Method
_data_obj
return Range form of the same range
test/dialect/postgresql/test_types.py:4766
↓ 52 callers
Method
fetchall
(self)
lib/sqlalchemy/testing/fixtures/sql.py:478
↓ 52 callers
Method
get_indexes
Return information about indexes in ``table_name``. Given a :class:`_engine.Connection`, a string ``table_name`` and an optional stri
lib/sqlalchemy/engine/interfaces.py:1619
↓ 51 callers
Method
add_cte
r"""Add one or more :class:`_sql.CTE` constructs to this statement. This method will associate the given :class:`_sql.CTE` constructs with
lib/sqlalchemy/sql/selectable.py:2607
↓ 51 callers
Method
dialect_impl
Return a dialect-specific implementation for this :class:`.TypeEngine`.
lib/sqlalchemy/sql/type_api.py:930
↓ 51 callers
Method
expire_all
Expires all persistent instances within this Session. When any attributes on a persistent instance is next accessed, a query will be
lib/sqlalchemy/orm/session.py:3298
↓ 51 callers
Method
get_property
return a MapperProperty associated with the given key.
lib/sqlalchemy/orm/mapper.py:2448
↓ 50 callers
Method
between
Produce a :func:`_expression.between` clause against the parent object, given the lower and upper range.
lib/sqlalchemy/sql/operators.py:1972
↓ 50 callers
Method
max
( # noqa: A001 self, col: ColumnElement[_T], *args: _ColumnExpressionOrLi
lib/sqlalchemy/sql/functions.py:1183
↓ 50 callers
Method
operate
( self, op: OperatorType, *other: Any, **kwargs: Any )
lib/sqlalchemy/sql/operators.py:707
↓ 50 callers
Method
union_all
Produce a UNION ALL of this Query against one or more queries. Works the same way as :meth:`~sqlalchemy.orm.query.Query.union`. See t
lib/sqlalchemy/orm/query.py:2205
↓ 49 callers
Method
bakery
Construct a new bakery. :return: an instance of :class:`.Bakery`
lib/sqlalchemy/ext/baked.py:66
↓ 49 callers
Method
invalidate
Close this Session, using connection invalidation. This is a variant of :meth:`.Session.close` that will additionally ensure that the
lib/sqlalchemy/orm/session.py:2650
↓ 49 callers
Function
tuple_
Return a :class:`.Tuple`. Main usage is to produce a composite IN construct using :meth:`.ColumnOperators.in_` :: from sqlalchemy im
lib/sqlalchemy/sql/_elements_constructors.py:1960
↓ 49 callers
Method
union
Produce a UNION of this Query against one or more queries. e.g.:: q1 = sess.query(SomeClass).filter(SomeClass.foo == "bar")
lib/sqlalchemy/orm/query.py:2158
↓ 48 callers
Method
_fixture
(self, uselist, useobject, active_history, **kw)
test/orm/test_attributes.py:1740
↓ 48 callers
Method
append
(state, child, initiator)
test/orm/test_attributes.py:3439
↓ 48 callers
Method
event_one
(self, x, y)
test/base/test_events.py:214
↓ 48 callers
Method
query
(names)
test/orm/test_cache_key.py:881
↓ 48 callers
Method
sum
Return a collection of added + unchanged + deleted.
lib/sqlalchemy/orm/attributes.py:2387
↓ 47 callers
Method
add_property
Add an individual MapperProperty to this mapper. If the mapper has not been configured yet, just adds the property to the initial pro
lib/sqlalchemy/orm/mapper.py:2371
↓ 47 callers
Method
table_valued
r"""Return a :class:`_sql.TableValuedAlias` representation of this :class:`_functions.FunctionElement` with table-valued expressions added.
lib/sqlalchemy/sql/functions.py:247
↓ 47 callers
Function
values
r"""Construct a :class:`_expression.Values` construct representing the SQL ``VALUES`` clause. The column expressions and the actual data for
lib/sqlalchemy/sql/_selectable_constructors.py:754
↓ 46 callers
Function
clear_mappers
Remove all mappers from all classes. .. versionchanged:: 1.4 This function now locates all :class:`_orm.registry` objects and calls upon
lib/sqlalchemy/orm/_orm_constructors.py:2336
↓ 46 callers
Function
conditional_sane_rowcount_warnings
( update=False, delete=False, only_returning=False )
test/orm/test_versioning.py:47
↓ 46 callers
Function
eq_ignore_whitespace
(a, b, msg=None)
lib/sqlalchemy/testing/assertions.py:361
↓ 46 callers
Method
execute
(self, stmt, parameters=None, **kw)
test/engine/test_reconnect.py:1040
↓ 46 callers
Function
exists
()
lib/sqlalchemy/sql/operators.py:2154
↓ 46 callers
Method
normalize_name
convert the given name to lowercase if it is detected as case insensitive. This method is only used if the dialect defines re
lib/sqlalchemy/engine/interfaces.py:1855
↓ 46 callers
Function
op
(a: Any, opstring: str, b: Any)
lib/sqlalchemy/sql/operators.py:2238
↓ 46 callers
Method
register
(self, cls, canary)
test/orm/test_instrumentation.py:33
↓ 45 callers
Method
connect
(dbapi_conn, rec)
test/dialect/postgresql/test_query.py:1436
↓ 45 callers
Function
defer
(key: _AttrType, *, raiseload: bool = False)
lib/sqlalchemy/orm/strategy_options.py:2504
↓ 45 callers
Method
get
(cls)
test/ext/test_extendedattr.py:112
↓ 45 callers
Method
process
(value)
lib/sqlalchemy/dialects/mssql/base.py:1290
↓ 45 callers
Method
refresh
(target, ctx, attrs)
test/orm/test_events.py:2741
↓ 45 callers
Method
self_group
(self, against: Optional[OperatorType] = None)
lib/sqlalchemy/sql/elements.py:3578
↓ 44 callers
Method
extend
(self)
test/orm/test_collection.py:701
↓ 44 callers
Method
format_table
Prepare a quoted table and schema name.
lib/sqlalchemy/sql/compiler.py:8205
↓ 43 callers
Method
connect
(self, *args, **kwargs)
lib/sqlalchemy/testing/engines.py:250
↓ 43 callers
Method
create_connect_args
Build DB-API compatible connection arguments. Given a :class:`.URL` object, returns a tuple consisting of a ``(*args, **kwargs)`` sui
lib/sqlalchemy/engine/interfaces.py:1275
↓ 43 callers
Method
cursor
()
test/engine/test_reconnect.py:925
↓ 43 callers
Method
listen
(self, *args: Any, **kw: Any)
lib/sqlalchemy/event/registry.py:285
↓ 43 callers
Method
strip
Returns a copy of the BitString with both leading and trailing characters removed. If omitted or None, ``'char'`` defaults to ``"0"``:
lib/sqlalchemy/dialects/postgresql/bitstring.py:155
↓ 42 callers
Method
bindparams
Not supported for TString constructs. TString constructs do not support .bindparams(). Bind parameters are automatically created from
lib/sqlalchemy/sql/elements.py:2797
← previous
next →
201–300 of 29,075, ranked by callers