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
↓ 48 callers
Method
_fixture
(self, uselist, useobject, active_history, **kw)
test/orm/test_attributes.py:1740
↓ 48 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:3193
↓ 48 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:3196
↓ 48 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:1586
↓ 48 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:2590
↓ 48 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:1240
↓ 48 callers
Method
one
()
test/sql/test_compare.py:931
↓ 48 callers
Method
warn
()
lib/sqlalchemy/orm/descriptor_props.py:916
↓ 47 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:2556
↓ 47 callers
Method
sub
(self)
test/perf/compiled_extensions.py:641
↓ 46 callers
Method
references
Return True if this Column references the given column via foreign key.
lib/sqlalchemy/sql/schema.py:2270
↓ 45 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:1431
↓ 45 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
↓ 45 callers
Method
get
Retrieve an object based on identity. Equivalent to :meth:`_query.Query.get`.
lib/sqlalchemy/ext/baked.py:491
↓ 45 callers
Method
setdefault
( self: MutableDict[_KT, Optional[_T]], key: _KT, value: None = None )
lib/sqlalchemy/ext/mutable.py:822
↓ 45 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:1938
↓ 44 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:2303
↓ 44 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:1255
↓ 44 callers
Function
eq_regex
(a, b, msg=None, flags=0)
lib/sqlalchemy/testing/assertions.py:280
↓ 43 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:1209
↓ 43 callers
Function
eq_ignore_whitespace
(a, b, msg=None)
lib/sqlalchemy/testing/assertions.py:355
↓ 43 callers
Function
expect_deprecated
(*messages, **kw)
lib/sqlalchemy/testing/assertions.py:86
↓ 43 callers
Method
extend
(self, cols: Iterable[Any])
lib/sqlalchemy/sql/base.py:2235
↓ 42 callers
Method
bakery
Construct a new bakery. :return: an instance of :class:`.Bakery`
lib/sqlalchemy/ext/baked.py:69
↓ 42 callers
Method
create
()
test/engine/test_pool.py:1226
↓ 42 callers
Function
null
Return a constant :class:`.Null` construct.
lib/sqlalchemy/sql/_elements_constructors.py:1316
↓ 42 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:831
↓ 41 callers
Method
_create_result_map
utility method used for unit tests only.
lib/sqlalchemy/sql/compiler.py:2238
↓ 41 callers
Method
clear
Clear all Table objects from this MetaData.
lib/sqlalchemy/sql/schema.py:5620
↓ 41 callers
Method
dialect_impl
Return a dialect-specific implementation for this :class:`.TypeEngine`.
lib/sqlalchemy/sql/type_api.py:875
↓ 41 callers
Method
max
( # noqa: A001 self, col: ColumnElement[_T], *args: _ColumnExpressionOrLi
lib/sqlalchemy/sql/functions.py:1134
↓ 40 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:749
↓ 40 callers
Function
in_
Assert a in b, with repr messaging on failure.
lib/sqlalchemy/testing/assertions.py:333
↓ 40 callers
Method
pop
(self)
test/perf/compiled_extensions.py:537
↓ 40 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:7799
↓ 39 callers
Function
assert_warns_message
legacy adapter function for functions that were previously using assert_raises with SAWarning or similar. has some workarounds to accommodate
lib/sqlalchemy/testing/assertions.py:414
↓ 39 callers
Method
foo
(ctx)
test/sql/test_insert.py:853
↓ 38 callers
Method
connect
(dbapi_conn, rec)
test/dialect/postgresql/test_query.py:1366
↓ 38 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:1242
↓ 38 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:1291
↓ 38 callers
Method
fetchone
(self)
test/sql/test_resultset.py:3561
↓ 38 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:5635
↓ 38 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:1735
↓ 38 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:2128
↓ 38 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:2175
↓ 38 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:651
↓ 37 callers
Method
_data_obj
return Range form of the same range
test/dialect/postgresql/test_types.py:4345
↓ 37 callers
Method
between
Produce a :func:`_expression.between` clause against the parent object, given the lower and upper range.
lib/sqlalchemy/sql/operators.py:1828
↓ 37 callers
Method
connect
(self, *args, **kwargs)
lib/sqlalchemy/testing/engines.py:250
↓ 37 callers
Method
fetchall
(self)
lib/sqlalchemy/testing/fixtures/sql.py:445
↓ 37 callers
Method
format_table
Prepare a quoted table and schema name.
lib/sqlalchemy/sql/compiler.py:7968
↓ 37 callers
Method
reflect
( self, bind: Engine, schema: Optional[str] = ..., views: bool = ...,
lib/sqlalchemy/sql/schema.py:5690
↓ 36 callers
Method
_operation_context
Return a context that optimizes for multiple operations on a single transaction. This essentially allows connect()/close() to be call
lib/sqlalchemy/engine/reflection.py:321
↓ 36 callers
Function
conditional_sane_rowcount_warnings
( update=False, delete=False, only_returning=False )
test/orm/test_versioning.py:47
↓ 36 callers
Function
contains_eager
(*keys: _AttrType, **kw: Any)
lib/sqlalchemy/orm/strategy_options.py:2443
↓ 36 callers
Method
get_property
return a MapperProperty associated with the given key.
lib/sqlalchemy/orm/mapper.py:2523
↓ 35 callers
Method
_fixture
(self)
test/sql/test_metadata.py:5088
↓ 35 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:2547
↓ 35 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:4247
↓ 35 callers
Method
process
(self, obj: Visitable, **kwargs: Any)
lib/sqlalchemy/sql/compiler.py:947
↓ 35 callers
Method
self_group
(self, against: Optional[OperatorType] = None)
lib/sqlalchemy/sql/elements.py:3295
↓ 35 callers
Method
sum
Return a collection of added + unchanged + deleted.
lib/sqlalchemy/orm/attributes.py:2360
↓ 35 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:238
↓ 35 callers
Method
update_type_annotation_map
update the :paramref:`_orm.registry.type_annotation_map` with new values.
lib/sqlalchemy/orm/decl_api.py:1228
↓ 34 callers
Method
_commit_someattr
(self, f)
test/orm/test_attributes.py:1785
↓ 34 callers
Method
bindparams
Establish the values and/or types of bound parameters within this :class:`_expression.TextClause` construct. Given a text construct s
lib/sqlalchemy/sql/elements.py:2324
↓ 34 callers
Method
coerce
(cls, key, value)
test/ext/test_mutable.py:104
↓ 34 callers
Function
composite
( _class_or_attr: _CompositeAttrType[Any], *attrs: _CompositeAttrType[Any], group: Optional[str] =
lib/sqlalchemy/orm/_orm_constructors.py:633
↓ 34 callers
Method
contains
(self)
test/perf/compiled_extensions.py:516
↓ 34 callers
Function
defer
( key: _AttrType, *addl_attrs: _AttrType, raiseload: bool = False )
lib/sqlalchemy/orm/strategy_options.py:2505
↓ 34 callers
Method
get
(cls)
test/ext/test_extendedattr.py:113
↓ 34 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:677
↓ 33 callers
Method
refresh
(target, ctx, attrs)
test/orm/test_events.py:2477
↓ 33 callers
Method
sql_count_
(self, count, fn)
lib/sqlalchemy/testing/fixtures/sql.py:183
↓ 32 callers
Method
_fixture
(self)
test/sql/test_compiler.py:7221
↓ 32 callers
Method
add
Add a column to this :class:`_sql.ColumnCollection`. .. note:: This method is **not normally used by user-facing code**, as the
lib/sqlalchemy/sql/base.py:1814
↓ 32 callers
Function
not_in
Assert a in not b, with repr messaging on failure.
lib/sqlalchemy/testing/assertions.py:338
↓ 31 callers
Method
_equivalent
(self, q_proxy, q_direct)
test/ext/test_associationproxy.py:1770
↓ 31 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:2444
↓ 31 callers
Function
against
(config, *queries)
lib/sqlalchemy/testing/exclusions.py:472
↓ 31 callers
Method
cursor
()
test/engine/test_reconnect.py:923
↓ 31 callers
Method
datetime
target dialect supports representation of Python datetime.datetime() objects.
test/requirements.py:1309
↓ 31 callers
Function
defaultload
(*keys: _AttrType)
lib/sqlalchemy/orm/strategy_options.py:2500
↓ 31 callers
Function
instance_state
(instance: _O)
lib/sqlalchemy/orm/base.py:326
↓ 31 callers
Method
regexp_replace
(self)
test/requirements.py:2040
↓ 31 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:327
↓ 31 callers
Method
update
Dictionary update() is not implemented for :class:`_sql.ColumnCollection`.
lib/sqlalchemy/sql/base.py:1792
↓ 30 callers
Method
data
(cls)
test/ext/mypy/plugin_files/mixin_two.py:78
↓ 30 callers
Function
declarative_base
(*arg, **kw)
lib/sqlalchemy/ext/declarative/__init__.py:26
↓ 30 callers
Function
desc
Produce a descending ``ORDER BY`` clause element. e.g.:: from sqlalchemy import desc stmt = select(users_table).order_by(desc(u
lib/sqlalchemy/sql/_elements_constructors.py:1069
↓ 30 callers
Function
insert
Construct a sqlite-specific variant :class:`_sqlite.Insert` construct. .. container:: inherited_member The :func:`sqlalchemy.dialect
lib/sqlalchemy/dialects/sqlite/dml.py:39
↓ 30 callers
Function
polymorphic_union
Create a ``UNION`` statement used by a polymorphic mapper. See :ref:`concrete_inheritance` for an example of how this is used. :param t
lib/sqlalchemy/orm/util.py:319
↓ 29 callers
Method
_run_cache_key_fixture
(self, fixture, compare_values)
lib/sqlalchemy/testing/fixtures/sql.py:339
↓ 29 callers
Method
append
(state, child, initiator)
test/orm/test_attributes.py:3439
↓ 29 callers
Method
changed
Subclasses should call this method whenever change events occur.
lib/sqlalchemy/ext/mutable.py:616
↓ 29 callers
Method
get_foreign_keys
Return information about foreign_keys in ``table_name``. Given a :class:`_engine.Connection`, a string ``table_name``, and an optiona
lib/sqlalchemy/engine/interfaces.py:1426
↓ 29 callers
Method
get_history
(self, key: str, passive: PassiveFlag)
lib/sqlalchemy/orm/state.py:599
↓ 29 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:1844
↓ 29 callers
Function
picklers
()
lib/sqlalchemy/testing/util.py:61
↓ 29 callers
Method
register
(self, cls, canary)
test/orm/test_instrumentation.py:33
← previous
next →
201–300 of 28,030, ranked by callers