MCPcopy Create free account

hub / github.com/sqlalchemy/sqlalchemy / functions

Functions28,030 in github.com/sqlalchemy/sqlalchemy

↓ 5,036 callersFunctioneq_
Assert a == b, with repr messaging on failure.
lib/sqlalchemy/testing/assertions.py:284
↓ 2,849 callersMethodassert_compile
( self, clause, result, params=None, checkparams=None, for_exe
lib/sqlalchemy/testing/assertions.py:504
↓ 2,844 callersFunctionfixture_session
(**kw)
lib/sqlalchemy/testing/fixtures/orm.py:203
↓ 2,625 callersFunctionselect
(__ent0: _TCCA[_T0])
lib/sqlalchemy/sql/_selectable_constructors.py:389
↓ 2,068 callersMethodquery
(*arg, **kw)
test/orm/test_query.py:7839
↓ 1,333 callersFunctionrelationship
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:1030
↓ 1,329 callersMethodmap_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:1827
↓ 1,169 callersMethodexecute
(field)
test/sql/test_functions.py:1326
↓ 1,152 callersMethodwhere
A synonym for :meth:`.Query.filter`. .. versionadded:: 1.4 .. seealso:: :meth:`_sql.Select.where` - v2 equivalent metho
lib/sqlalchemy/orm/query.py:1864
↓ 1,074 callersMethodall
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:2689
↓ 983 callersMethodjoin
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:2242
↓ 963 callersMethodorder_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:1999
↓ 934 callersFunctioncolumn
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:970
↓ 842 callersMethodadd
(self, item)
test/orm/test_collection.py:1171
↓ 799 callersMethodfilter
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:1878
↓ 755 callersMethodcommit
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:1999
↓ 751 callersMethodinsert
(self)
test/perf/compiled_extensions.py:782
↓ 731 callersMethodselect
r"""Create a :class:`_expression.Select` from this :class:`_expression.Join`. E.g.:: stmt = table_a.join(table_b, table_
lib/sqlalchemy/sql/selectable.py:1593
↓ 634 callersFunctionassert_raises_message
(except_cls, msg, callable_, *args, **kwargs)
lib/sqlalchemy/testing/assertions.py:395
↓ 616 callersMethodflush
(self)
test/base/test_tutorials.py:28
↓ 610 callersMethodoptions
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:1636
↓ 590 callersFunctionis_
Assert a is b, with repr messaging on failure.
lib/sqlalchemy/testing/assertions.py:319
↓ 572 callersMethodfirst
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:2738
↓ 550 callersFunctioninspect
( subject: Type[_InspectableTypeProtocol[_IN]], raiseerr: bool = True )
lib/sqlalchemy/inspection.py:91
↓ 503 callersMethodcreate_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:5905
↓ 445 callersMethodvalues
(self)
test/perf/compiled_extensions.py:216
↓ 442 callersFunctionmapped_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:98
↓ 439 callersFunctiontable
Produce a new :class:`_expression.TableClause`. The object returned is an instance of :class:`_expression.TableClause`, which represents
lib/sqlalchemy/sql/_selectable_constructors.py:541
↓ 431 callersFunctionaliased
( element: Type[_O], alias: Optional[FromClause] = None, name: Optional[str] = None, flat: boo
lib/sqlalchemy/orm/_orm_constructors.py:2339
↓ 424 callersMethodalias
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:2221
↓ 399 callersMethodselect_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:2514
↓ 389 callersMethodsubquery
Return the full SELECT statement represented by this :class:`_query.Query`, embedded within an :class:`_expression.Alias`. Ea
lib/sqlalchemy/orm/query.py:609
↓ 369 callersMethodlabel
Provide a copy of this :class:`.Bundle` passing a new label.
lib/sqlalchemy/orm/util.py:1704
↓ 368 callersMethodappend
(self, obj, value, initiator)
test/orm/test_collection.py:71
↓ 355 callersFunctionexpect_raises_message
(except_cls, msg, check_context=True)
lib/sqlalchemy/testing/assertions.py:499
↓ 341 callersMethodadd_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:3491
↓ 335 callersMethodconnect
(conn, conn_rec)
test/engine/test_pool.py:1706
↓ 327 callersMethodassert_sql_count
(self, db, callable_, count)
lib/sqlalchemy/testing/assertions.py:935
↓ 326 callersMethodclose
(self)
test/aaa_profiling/test_pool.py:17
↓ 316 callersMethodfetchall
(self)
test/sql/test_resultset.py:3567
↓ 316 callersMethodget
(self)
test/perf/compiled_extensions.py:196
↓ 308 callersFunctioncast
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:868
↓ 307 callersMethoddialect
(self)
lib/sqlalchemy/sql/_typing.py:106
↓ 304 callersMethodscalar
(self, connection)
test/dialect/postgresql/test_types.py:1552
↓ 301 callersMethodin_
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:844
↓ 291 callersMethodbegin
(connection)
test/engine/test_execute.py:1827
↓ 285 callersMethodscalars
( self, statement: TypedReturnsRows[Tuple[_T]], params: Optional[_CoreAnyExecuteParams
lib/sqlalchemy/orm/session.py:2431
↓ 276 callersFunctiontext
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:1616
↓ 275 callersFunctionassert_raises
(except_cls, callable_, *args, **kw)
lib/sqlalchemy/testing/assertions.py:387
↓ 274 callersMethodexpunge_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:2600
↓ 271 callersMethodexec_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:1716
↓ 271 callersFunctionis_true
(a, msg=None)
lib/sqlalchemy/testing/assertions.py:311
↓ 263 callersMethoddelete
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:3156
↓ 254 callersMethodassert_
(table)
test/engine/test_reflection.py:2201
↓ 251 callersMethodcompile
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:1077
↓ 248 callersMethodcount
(query)
test/orm/test_events.py:3877
↓ 241 callersMethodone
(ctx)
test/orm/test_events.py:587
↓ 232 callersMethodfilter_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:1965
↓ 232 callersFunctionjoinedload
(*keys: _AttrType, **kw: Any)
lib/sqlalchemy/orm/strategy_options.py:2457
↓ 219 callersFunctionliteral
( value: Any, type_: _TypeEngineArgument[_T], literal_execute: bool = False, )
lib/sqlalchemy/sql/elements.py:135
↓ 216 callersMethodreturning
( self, __ent0: _TCCA[_T0], *, sort_by_parameter_order: bool = False )
lib/sqlalchemy/sql/dml.py:1337
↓ 215 callersFunctionbindparam
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:477
↓ 213 callersMethodexecution_options
( self, *, compiled_cache: Optional[CompiledCacheType] = ..., logging_token: s
lib/sqlalchemy/orm/query.py:1704
↓ 197 callersMethodset_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:925
↓ 188 callersMethodrollback
(self)
test/aaa_profiling/test_pool.py:14
↓ 185 callersMethodexecute
(self, stmt, parameters=None, **kw)
lib/sqlalchemy/testing/engines.py:446
↓ 184 callersMethodadd
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:3456
↓ 179 callersMethodlimit
Apply a ``LIMIT`` to the query and return the newly resulting ``Query``. .. seealso:: :meth:`_sql.Select.limit` - v2 equ
lib/sqlalchemy/orm/query.py:2620
↓ 175 callersMethodupdate
(self)
test/perf/compiled_extensions.py:623
↓ 172 callersMethodof_type
( self, class_: _EntityType[Any] )
lib/sqlalchemy/orm/base.py:681
↓ 171 callersMethodappend
(self, clause)
lib/sqlalchemy/sql/elements.py:2805
↓ 171 callersMethodcreate
Issue a ``CREATE`` statement for this :class:`_schema.Table`, using the given :class:`.Connection` or :class:`.Engine` for con
lib/sqlalchemy/sql/schema.py:1277
↓ 170 callersMethodget
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:1046
↓ 170 callersMethodscalar_subquery
( self: Query[Tuple[_MAYBE_ENTITY]], )
lib/sqlalchemy/orm/query.py:761
↓ 163 callersMethodcte
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:654
↓ 163 callersFunctionliteral_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:195
↓ 159 callersMethodlisten
(**kw)
test/base/test_events.py:1002
↓ 150 callersMethodexecute
( conn, clauseelement, multiparams, params, execution_options )
test/engine/test_execute.py:2223
↓ 143 callersFunctionand_
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:123
↓ 139 callersMethodadd
(self)
test/perf/compiled_extensions.py:509
↓ 138 callersMethodexpire
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:3231
↓ 138 callersMethodmatch
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:1599
↓ 138 callersMethodstartswith
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:1077
↓ 135 callersMethodlower
(s: str)
lib/sqlalchemy/dialects/mysql/base.py:3429
↓ 134 callersMethodouterjoin
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:2477
↓ 133 callersMethodsql_execution_asserter
(self, db=None)
lib/sqlalchemy/testing/assertions.py:910
↓ 131 callersFunctionis_false
(a, msg=None)
lib/sqlalchemy/testing/assertions.py:315
↓ 127 callersMethodinsert
(self, i: SupportsIndex, x: _T)
lib/sqlalchemy/ext/mutable.py:956
↓ 127 callersFunctionwith_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:2490
↓ 125 callersFunctioncreate_engine
( url: Union[str, URL], *, connect_args: Dict[Any, Any] = ..., convert_unicode: bool = ...,
lib/sqlalchemy/engine/create.py:49
↓ 125 callersFunctionexpect_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
↓ 122 callersMethodkeys
(self)
test/perf/compiled_extensions.py:206
↓ 118 callersMethodassert_sql_execution
(self, db, callable_, *rules)
lib/sqlalchemy/testing/assertions.py:916
↓ 118 callersFunctionupdate
(source, source_mapper, dest, old_prefix, synchronize_pairs)
lib/sqlalchemy/orm/sync.py:99
↓ 117 callersMethodunion
(self)
test/perf/compiled_extensions.py:613
↓ 116 callersFunctiontesting_engine
( url: Optional[URL] = ..., options: Optional[Dict[str, Any]] = ..., *, asyncio: Literal[False
lib/sqlalchemy/testing/engines.py:305
↓ 114 callersFunctionTable
A schema.Table wrapper/hook for dialect-specific tweaks.
lib/sqlalchemy/testing/schema.py:26
↓ 114 callersMethodtesting_engine
(self)
lib/sqlalchemy/testing/fixtures/base.py:169
↓ 111 callersFunctiondeclarative_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:994
↓ 109 callersMethodjoinedload
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:238
next →1–100 of 28,030, ranked by callers