__enter__(self: '_S') -> '_S' |
|
__exit__(self, type_: 'Any', value: 'Any', traceback: 'Any') -> 'None' |
|
__iter__(self) -> 'Iterator[object]' |
Iterate over all pending or persistent instances within this [extrait de __iter__.__doc__] |
add(self, instance: 'object', _warn: 'bool' = True) -> 'None' |
Place an object into this :class:`_orm.Session`. [extrait de add.__doc__] |
add_all(self, instances: 'Iterable[object]') -> 'None' |
Add the given collection of instances to this :class:`_orm.Session`. [extrait de add_all.__doc__] |
begin(self, nested: 'bool' = False) -> 'SessionTransaction' |
Begin a transaction, or nested transaction, [extrait de begin.__doc__] |
begin_nested(self) -> 'SessionTransaction' |
Begin a "nested" transaction on this Session, e.g. SAVEPOINT. [extrait de begin_nested.__doc__] |
bind_mapper(self, mapper: '_EntityBindKey[_O]', bind: '_SessionBind') -> 'None' |
Associate a :class:`_orm.Mapper` or arbitrary Python class with a [extrait de bind_mapper.__doc__] |
bind_table(self, table: 'TableClause', bind: '_SessionBind') -> 'None' |
Associate a :class:`_schema.Table` with a "bind", e.g. an [extrait de bind_table.__doc__] |
bulk_insert_mappings(self, mapper: 'Mapper[Any]', mappings: 'Iterable[Dict[str, Any]]', return_defaults: 'bool' = False, render_nulls: 'bool' = False) -> 'None' |
Perform a bulk insert of the given list of mapping dictionaries. [extrait de bulk_insert_mappings.__doc__] |
bulk_save_objects(self, objects: 'Iterable[object]', return_defaults: 'bool' = False, update_changed_only: 'bool' = True, preserve_order: 'bool' = True) -> 'None' |
Perform a bulk save of the given list of objects. [extrait de bulk_save_objects.__doc__] |
bulk_update_mappings(self, mapper: 'Mapper[Any]', mappings: 'Iterable[Dict[str, Any]]') -> 'None' |
Perform a bulk update of the given list of mapping dictionaries. [extrait de bulk_update_mappings.__doc__] |
close(self) -> 'None' |
Close out the transactional resources and ORM objects used by this [extrait de close.__doc__] |
commit(self) -> 'None' |
Flush pending changes and commit the current transaction. [extrait de commit.__doc__] |
connection(self, bind_arguments: 'Optional[_BindArguments]' = None, execution_options: 'Optional[CoreExecuteOptionsParameter]' = None) -> 'Connection' |
Return a :class:`_engine.Connection` object corresponding to this [extrait de connection.__doc__] |
delete(self, instance: 'object') -> 'None' |
Mark an instance as deleted. [extrait de delete.__doc__] |
enable_relationship_loading(self, obj: 'object') -> 'None' |
Associate an object with this :class:`.Session` for related [extrait de enable_relationship_loading.__doc__] |
execute(self, statement: 'Executable', params: 'Optional[_CoreAnyExecuteParams]' = None, *, execution_options: 'OrmExecuteOptionsParameter' = immutabledict({}), bind_arguments: 'Optional[_BindArguments]' = None, _parent_execute_state: 'Optional[Any]' = None, _add_event: 'Optional[Any]' = None) -> 'Result[Any]' |
Execute a SQL expression construct. [extrait de execute.__doc__] |
expire(self, instance: 'object', attribute_names: 'Optional[Iterable[str]]' = None) -> 'None' |
Expire the attributes on an instance. [extrait de expire.__doc__] |
expire_all(self) -> 'None' |
Expires all persistent instances within this Session. [extrait de expire_all.__doc__] |
expunge(self, instance: 'object') -> 'None' |
Remove the `instance` from this ``Session``. [extrait de expunge.__doc__] |
expunge_all(self) -> 'None' |
Remove all object instances from this ``Session``. [extrait de expunge_all.__doc__] |
flush(self, objects: 'Optional[Sequence[Any]]' = None) -> 'None' |
Flush all the object changes to the database. [extrait de flush.__doc__] |
get(self, entity: '_EntityBindKey[_O]', ident: '_PKIdentityArgument', *, options: 'Optional[Sequence[ORMOption]]' = None, populate_existing: 'bool' = False, with_for_update: 'ForUpdateParameter' = None, identity_token: 'Optional[Any]' = None, execution_options: 'OrmExecuteOptionsParameter' = immutabledict({}), bind_arguments: 'Optional[_BindArguments]' = None) -> 'Optional[_O]' |
Return an instance based on the given primary key identifier, [extrait de get.__doc__] |
get_bind(self, mapper: 'Optional[_EntityBindKey[_O]]' = None, *, clause: 'Optional[ClauseElement]' = None, bind: 'Optional[_SessionBind]' = None, _sa_skip_events: 'Optional[bool]' = None, _sa_skip_for_implicit_returning: 'bool' = False, **kw: 'Any') -> 'Union[Engine, Connection]' |
Return a "bind" to which this :class:`.Session` is bound. [extrait de get_bind.__doc__] |
get_nested_transaction(self) -> 'Optional[SessionTransaction]' |
Return the current nested transaction in progress, if any. [extrait de get_nested_transaction.__doc__] |
get_one(self, entity: '_EntityBindKey[_O]', ident: '_PKIdentityArgument', *, options: 'Optional[Sequence[ORMOption]]' = None, populate_existing: 'bool' = False, with_for_update: 'ForUpdateParameter' = None, identity_token: 'Optional[Any]' = None, execution_options: 'OrmExecuteOptionsParameter' = immutabledict({}), bind_arguments: 'Optional[_BindArguments]' = None) -> '_O' |
Return exactly one instance based on the given primary key [extrait de get_one.__doc__] |
get_transaction(self) -> 'Optional[SessionTransaction]' |
Return the current root transaction in progress, if any. [extrait de get_transaction.__doc__] |
in_nested_transaction(self) -> 'bool' |
Return True if this :class:`_orm.Session` has begun a nested [extrait de in_nested_transaction.__doc__] |
in_transaction(self) -> 'bool' |
Return True if this :class:`_orm.Session` has begun a transaction. [extrait de in_transaction.__doc__] |
invalidate(self) -> 'None' |
Close this Session, using connection invalidation. [extrait de invalidate.__doc__] |
is_modified(self, instance: 'object', include_collections: 'bool' = True) -> 'bool' |
Return ``True`` if the given instance has locally [extrait de is_modified.__doc__] |
merge(self, instance: '_O', *, load: 'bool' = True, options: 'Optional[Sequence[ORMOption]]' = None) -> '_O' |
Copy the state of a given instance into a corresponding instance [extrait de merge.__doc__] |
prepare(self) -> 'None' |
Prepare the current transaction in progress for two phase commit. [extrait de prepare.__doc__] |
query(self, *entities: '_ColumnsClauseArgument[Any]', **kwargs: 'Any') -> 'Query[Any]' |
Return a new :class:`_query.Query` object corresponding to this [extrait de query.__doc__] |
refresh(self, instance: 'object', attribute_names: 'Optional[Iterable[str]]' = None, with_for_update: 'ForUpdateParameter' = None) -> 'None' |
Expire and refresh attributes on the given instance. [extrait de refresh.__doc__] |
reset(self) -> 'None' |
Close out the transactional resources and ORM objects used by this [extrait de reset.__doc__] |
rollback(self) -> 'None' |
Rollback the current transaction in progress. [extrait de rollback.__doc__] |
scalar(self, statement: 'Executable', params: 'Optional[_CoreSingleExecuteParams]' = None, *, execution_options: 'OrmExecuteOptionsParameter' = immutabledict({}), bind_arguments: 'Optional[_BindArguments]' = None, **kw: 'Any') -> 'Any' |
Execute a statement and return a scalar result. [extrait de scalar.__doc__] |
scalars(self, statement: 'Executable', params: 'Optional[_CoreAnyExecuteParams]' = None, *, execution_options: 'OrmExecuteOptionsParameter' = immutabledict({}), bind_arguments: 'Optional[_BindArguments]' = None, **kw: 'Any') -> 'ScalarResult[Any]' |
Execute a statement and return the results as scalars. [extrait de scalars.__doc__] |
Améliorations / Corrections
Vous avez des améliorations (ou des corrections) à proposer pour ce document : je vous remerçie par avance de m'en faire part, cela m'aide à améliorer le site.
Emplacement :
Description des améliorations :