Participer au site avec un Tip
Rechercher
 

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 :

Vous êtes un professionnel et vous avez besoin d'une formation ? RAG (Retrieval-Augmented Generation)
et Fine Tuning d'un LLM
Voir le programme détaillé
Module « sqlalchemy »

Fonction literal - module sqlalchemy

Signature de la fonction literal

def literal(value: 'Any', type_: 'Optional[_TypeEngineArgument[Any]]' = None, literal_execute: 'bool' = False) -> 'BindParameter[Any]' 

Description

help(sqlalchemy.literal)

Return a literal clause, bound to a bind parameter.

Literal clauses are created automatically when non-
:class:`_expression.ClauseElement` objects (such as strings, ints, dates,
etc.) are
used in a comparison operation with a :class:`_expression.ColumnElement`
subclass,
such as a :class:`~sqlalchemy.schema.Column` object.  Use this function
to force the generation of a literal clause, which will be created as a
:class:`BindParameter` with a bound value.

:param value: the value to be bound. Can be any Python object supported by
 the underlying DB-API, or is translatable via the given type argument.

:param type\_: an optional :class:`~sqlalchemy.types.TypeEngine` which will
 provide bind-parameter translation for this literal.

:param literal_execute: optional bool, when True, the SQL engine will
 attempt to render the bound value directly in the SQL statement at
 execution time rather than providing as a parameter value.

 .. versionadded:: 2.0



Vous êtes un professionnel et vous avez besoin d'une formation ? Programmation Python
Les fondamentaux
Voir le programme détaillé