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
↓ 10,263 callers
Function
eq_
Assert a == b, with repr messaging on failure.
lib/sqlalchemy/testing/assertions.py:290
↓ 4,744 callers
Function
select
(__ent0: _TCCA[_T0], /)
lib/sqlalchemy/sql/_selectable_constructors.py:396
↓ 4,120 callers
Method
assert_compile
( self, clause, result, params=None, checkparams=None, for_exe
lib/sqlalchemy/testing/assertions.py:510
↓ 3,168 callers
Method
query
(*arg, **kw)
test/orm/test_query.py:7314
↓ 3,038 callers
Function
fixture_session
(**kw)
lib/sqlalchemy/testing/fixtures/orm.py:203
↓ 2,672 callers
Method
map_imperatively
r"""Map a class imperatively. In this form of mapping, the class is not scanned for any mapping information. Instead, all mapping co
lib/sqlalchemy/orm/decl_api.py:1869
↓ 2,362 callers
Method
execute
(field)
test/sql/test_functions.py:1661
↓ 2,254 callers
Function
column
Produce a :class:`.ColumnClause` object. The :class:`.ColumnClause` is a lightweight analogue to the :class:`_schema.Column` class. The :fun
lib/sqlalchemy/sql/_elements_constructors.py:1015
↓ 2,038 callers
Function
relationship
Provide a relationship between two mapped classes. This corresponds to a parent-child or associative table relationship. The constructed clas
lib/sqlalchemy/orm/_orm_constructors.py:1059
↓ 1,930 callers
Method
where
A synonym for :meth:`.Query.filter`. .. versionadded:: 1.4 .. seealso:: :meth:`_sql.Select.where` - v2 equivalent metho
lib/sqlalchemy/orm/query.py:1884
↓ 1,868 callers
Function
mapped_column
r"""declare a new ORM-mapped :class:`_schema.Column` construct for use within :ref:`Declarative Table <orm_declarative_table>` configuration.
lib/sqlalchemy/orm/_orm_constructors.py:99
↓ 1,753 callers
Method
all
Return the results represented by this :class:`_query.Query` as a list. This results in an execution of the underlying SQL statement.
lib/sqlalchemy/orm/query.py:2746
↓ 1,647 callers
Method
join
r"""Create a SQL JOIN against this :class:`_query.Query` object's criterion and apply generatively, returning the newly resulting
lib/sqlalchemy/orm/query.py:2272
↓ 1,409 callers
Method
order_by
Apply one or more ORDER BY criteria to the query and return the newly resulting :class:`_query.Query`. e.g.:: q = sessio
lib/sqlalchemy/orm/query.py:2027
↓ 1,292 callers
Method
filter
r"""Apply the given filtering criterion to a copy of this :class:`_query.Query`, using SQL expressions. e.g.:: session.q
lib/sqlalchemy/orm/query.py:1898
↓ 1,265 callers
Method
add
(self, item)
test/orm/test_collection.py:1172
↓ 1,223 callers
Method
insert
(self, index, item)
test/orm/test_collection.py:695
↓ 1,205 callers
Function
is_
Assert a is b, with repr messaging on failure.
lib/sqlalchemy/testing/assertions.py:325
↓ 1,067 callers
Method
select
( self: Join[HasRowPos[Unpack[_Ts]]], # type: ignore[type-var] )
lib/sqlalchemy/sql/selectable.py:1631
↓ 1,059 callers
Method
commit
Flush pending changes and commit the current transaction. When the COMMIT operation is complete, all objects are fully :term:`expired
lib/sqlalchemy/orm/session.py:2040
↓ 919 callers
Method
options
Return a new :class:`_query.Query` object, applying the given list of mapper options. Most supplied options regard changing h
lib/sqlalchemy/orm/query.py:1657
↓ 872 callers
Function
inspect
( subject: Type[_InspectableTypeProtocol[_IN]], raiseerr: bool = True )
lib/sqlalchemy/inspection.py:91
↓ 870 callers
Method
flush
(self)
test/base/test_tutorials.py:30
↓ 794 callers
Method
values
(self)
test/orm/test_collection.py:1632
↓ 741 callers
Method
assert_
(table)
test/engine/test_reflection.py:2201
↓ 734 callers
Function
assert_raises_message
(except_cls, msg, callable_, *args, **kwargs)
lib/sqlalchemy/testing/assertions.py:401
↓ 713 callers
Method
first
Return the first result of this ``Query`` or None if the result doesn't contain any row. first() applies a limit of one within the ge
lib/sqlalchemy/orm/query.py:2795
↓ 700 callers
Method
label
Provide a copy of this :class:`.Bundle` passing a new label.
lib/sqlalchemy/orm/util.py:1723
↓ 690 callers
Method
append
(self, obj, value, initiator)
test/orm/test_collection.py:72
↓ 633 callers
Function
aliased
( element: Type[_O], alias: Optional[FromClause] = None, name: Optional[str] = None, flat: boo
lib/sqlalchemy/orm/_orm_constructors.py:2372
↓ 607 callers
Method
alias
Return an :class:`_expression.Alias` of this :class:`_expression.CTE`. This method is a CTE-specific specialization of the :m
lib/sqlalchemy/sql/selectable.py:2273
↓ 606 callers
Function
table
Produce a new :class:`_expression.TableClause`. The object returned is an instance of :class:`_expression.TableClause`, which represents
lib/sqlalchemy/sql/_selectable_constructors.py:620
↓ 583 callers
Method
select_from
r"""Set the FROM clause of this :class:`.Query` explicitly. :meth:`.Query.select_from` is often used in conjunction with :meth:`.Quer
lib/sqlalchemy/orm/query.py:2544
↓ 552 callers
Method
create_all
Create all tables stored in this metadata. Conditional by default, will not attempt to recreate tables already present in the target
lib/sqlalchemy/sql/schema.py:6296
↓ 531 callers
Method
subquery
Return the full SELECT statement represented by this :class:`_query.Query`, embedded within an :class:`_expression.Alias`. Ea
lib/sqlalchemy/orm/query.py:629
↓ 520 callers
Method
exec_driver_sql
r"""Executes a string SQL statement on the DBAPI cursor directly, without any SQL compilation steps. This can be used to pass any str
lib/sqlalchemy/engine/base.py:1692
↓ 513 callers
Method
connect
(conn, conn_rec)
test/engine/test_pool.py:1704
↓ 506 callers
Function
expect_raises_message
(except_cls, msg, check_context=True)
lib/sqlalchemy/testing/assertions.py:505
↓ 501 callers
Method
get
(self, key, default=None)
test/sql/test_external_traversal.py:924
↓ 487 callers
Function
is_true
(a, msg=None)
lib/sqlalchemy/testing/assertions.py:317
↓ 467 callers
Method
scalar
(self, connection)
test/dialect/postgresql/test_types.py:1748
↓ 432 callers
Method
close
(self)
test/perf/compiled_extensions/result.py:361
↓ 425 callers
Method
assert_sql_count
(self, db, callable_, count)
lib/sqlalchemy/testing/assertions.py:948
↓ 397 callers
Function
bindparam
r"""Produce a "bound expression". The return value is an instance of :class:`.BindParameter`; this is a :class:`_expression.ColumnElement`
lib/sqlalchemy/sql/_elements_constructors.py:527
↓ 394 callers
Method
count
(query)
test/orm/test_events.py:4143
↓ 388 callers
Function
assert_raises
(except_cls, callable_, *args, **kw)
lib/sqlalchemy/testing/assertions.py:393
↓ 386 callers
Method
in_
Implement the ``in`` operator. In a column context, produces the clause ``column IN <other>``. The given parameter ``other`` may be:
lib/sqlalchemy/sql/operators.py:1044
↓ 381 callers
Function
joinedload
(*keys: _AttrType, **kw: Any)
lib/sqlalchemy/orm/strategy_options.py:2451
↓ 376 callers
Function
text
r"""Construct a new :class:`_expression.TextClause` clause, representing a textual SQL string directly. E.g.:: from sqlalchemy i
lib/sqlalchemy/sql/_elements_constructors.py:1761
↓ 375 callers
Function
literal
( value: Any, type_: _TypeEngineArgument[_T], literal_execute: bool = False, )
lib/sqlalchemy/sql/elements.py:142
↓ 373 callers
Method
dialect
(self)
lib/sqlalchemy/sql/_typing.py:110
↓ 373 callers
Method
update
(self, other)
test/orm/test_collection.py:1184
↓ 368 callers
Method
add_all
Add the given collection of instances to this :class:`_orm.Session`. See the documentation for :meth:`_orm.Session.add` for a general
lib/sqlalchemy/orm/session.py:3593
↓ 362 callers
Method
filter_by
r"""Apply the given filtering criterion to a copy of this :class:`_query.Query`, using keyword expressions. e.g.:: sessi
lib/sqlalchemy/orm/query.py:1985
↓ 358 callers
Function
Column
A schema.Column wrapper/hook for dialect-specific tweaks.
lib/sqlalchemy/testing/schema.py:43
↓ 355 callers
Method
append
(self, clause)
lib/sqlalchemy/sql/elements.py:3088
↓ 355 callers
Method
compile
Produce a string-compiled form of this :class:`.TypeEngine`. When called with no arguments, uses a "default" dialect to produce a str
lib/sqlalchemy/sql/type_api.py:1132
↓ 355 callers
Method
delete
r"""Perform a DELETE with an arbitrary WHERE clause. Deletes rows matched by this query from the database. E.g.:: sess.
lib/sqlalchemy/orm/query.py:3210
↓ 349 callers
Method
execute
(self, stmt, parameters=None, **kw)
lib/sqlalchemy/testing/engines.py:446
↓ 348 callers
Function
cast
(type_: Type[_T], value: Any, *, typecheck: bool = False)
lib/sqlalchemy/util/cython.py:62
↓ 342 callers
Method
begin
(connection)
test/engine/test_execute.py:1887
↓ 342 callers
Method
expunge_all
Remove all object instances from this ``Session``. This is equivalent to calling ``expunge(obj)`` on all objects in this ``Session``.
lib/sqlalchemy/orm/session.py:2694
↓ 334 callers
Method
scalars
(self, index=0)
test/perf/compiled_extensions/result.py:46
↓ 308 callers
Method
fetchall
(self)
test/perf/compiled_extensions/result.py:378
↓ 304 callers
Method
one
(ctx)
test/orm/test_events.py:638
↓ 296 callers
Method
listen
(**kw)
test/base/test_events.py:1002
↓ 292 callers
Method
execution_options
( self, *, compiled_cache: Optional[CompiledCacheType] = ..., logging_token: s
lib/sqlalchemy/orm/query.py:1723
↓ 284 callers
Function
call
()
test/base/_concurrency_fixtures.py:35
↓ 278 callers
Method
execute
( conn, clauseelement, multiparams, params, execution_options )
test/engine/test_execute.py:2279
↓ 276 callers
Method
returning
( self, __ent0: _TCCA[_T0], /, *, sort_by_paramete
lib/sqlalchemy/sql/dml.py:1377
↓ 267 callers
Method
of_type
( self, class_: _EntityType[Any] )
lib/sqlalchemy/orm/base.py:681
↓ 263 callers
Method
limit
Apply a ``LIMIT`` to the query and return the newly resulting ``Query``. .. seealso:: :meth:`_sql.Select.limit` - v2 equ
lib/sqlalchemy/orm/query.py:2650
↓ 257 callers
Method
set_label_style
Apply column labels to the return value of Query.statement. Indicates that this Query's `statement` accessor should return a SELECT s
lib/sqlalchemy/orm/query.py:943
↓ 256 callers
Method
keys
(duck)
test/base/test_utils.py:2314
↓ 255 callers
Method
cte
r"""Return the full SELECT statement represented by this :class:`_query.Query` represented as a common table expression (CTE). Parame
lib/sqlalchemy/orm/query.py:674
↓ 255 callers
Function
is_false
(a, msg=None)
lib/sqlalchemy/testing/assertions.py:321
↓ 253 callers
Method
add
Place an object into this :class:`_orm.Session`. Objects that are in the :term:`transient` state when passed to the :meth:`_orm.Sessi
lib/sqlalchemy/orm/session.py:3558
↓ 243 callers
Method
outerjoin
Create a left outer join against this ``Query`` object's criterion and apply generatively, returning the newly resulting ``Query``. U
lib/sqlalchemy/orm/query.py:2507
↓ 239 callers
Function
literal_column
r"""Produce a :class:`.ColumnClause` object that has the :paramref:`_expression.column.is_literal` flag set to True. :func:`_expression.liter
lib/sqlalchemy/sql/elements.py:202
↓ 238 callers
Method
get
Return an instance based on the given primary key identifier, or ``None`` if not found. E.g.:: my_user = session.query(U
lib/sqlalchemy/orm/query.py:1064
↓ 235 callers
Method
rollback
(self)
test/aaa_profiling/test_pool.py:14
↓ 232 callers
Function
and_
r"""Produce a conjunction of expressions joined by ``AND``. E.g.:: from sqlalchemy import and_ stmt = select(users_table).where
lib/sqlalchemy/sql/_elements_constructors.py:126
↓ 222 callers
Method
scalar_subquery
( self: Query[Tuple[_MAYBE_ENTITY]], )
lib/sqlalchemy/orm/query.py:781
↓ 221 callers
Method
match
Implements a database-specific 'match' operator. :meth:`_sql.ColumnOperators.match` attempts to resolve to a MATCH-like function or o
lib/sqlalchemy/sql/operators.py:1789
↓ 201 callers
Method
create
Issue a ``CREATE`` statement for this :class:`_schema.Table`, using the given :class:`.Connection` or :class:`.Engine` for con
lib/sqlalchemy/sql/schema.py:1534
↓ 189 callers
Method
pop
(cls, namespace)
lib/sqlalchemy/testing/config.py:409
↓ 183 callers
Method
expire
Expire the attributes on an instance. Marks the attributes of an instance as out of date. When an expired attribute is next accessed,
lib/sqlalchemy/orm/session.py:3333
↓ 183 callers
Method
joinedload
Indicate that the given attribute should be loaded using joined eager loading. This function is part of the :class:`_orm.Load` interf
lib/sqlalchemy/orm/strategy_options.py:239
↓ 173 callers
Method
insert
(self, i: SupportsIndex, x: _T)
lib/sqlalchemy/ext/mutable.py:952
↓ 173 callers
Method
mapper
(self)
lib/sqlalchemy/orm/util.py:1641
↓ 173 callers
Function
with_polymorphic
Produce an :class:`.AliasedClass` construct which specifies columns for descendant mappers of the given base. Using this method will ensure t
lib/sqlalchemy/orm/_orm_constructors.py:2523
↓ 172 callers
Function
Table
A schema.Table wrapper/hook for dialect-specific tweaks.
lib/sqlalchemy/testing/schema.py:26
↓ 172 callers
Method
_generate_cache_key
(self)
lib/sqlalchemy/sql/base.py:1088
↓ 171 callers
Method
sql_execution_asserter
(self, db=None)
lib/sqlalchemy/testing/assertions.py:923
↓ 168 callers
Function
creator
()
lib/sqlalchemy/ext/asyncio/engine.py:117
↓ 167 callers
Method
fail
(*arg, **kw)
test/orm/test_transaction.py:671
↓ 165 callers
Function
update
(fn)
lib/sqlalchemy/orm/collections.py:1294
↓ 165 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:3289
↓ 164 callers
Method
scalar
(q)
test/orm/inheritance/test_single.py:270
↓ 163 callers
Function
go
(*fns)
test/base/test_concurrency.py:37
next →
1–100 of 29,075, ranked by callers