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 ? Machine Learning
avec Scikit-Learn
Voir le programme détaillé
Classe « URL »

Méthode sqlalchemy.URL.update_query_dict

Signature de la méthode update_query_dict

def update_query_dict(self, query_parameters: 'Mapping[str, Union[str, List[str]]]', append: 'bool' = False) -> 'URL' 

Description

help(URL.update_query_dict)

Return a new :class:`_engine.URL` object with the
:attr:`_engine.URL.query` parameter dictionary updated by the given
dictionary.

The dictionary typically contains string keys and string values.
In order to represent a query parameter that is expressed multiple
times, pass a sequence of string values.

E.g.::


    >>> from sqlalchemy.engine import make_url
    >>> url = make_url("postgresql+psycopg2://user:pass@host/dbname")
    >>> url = url.update_query_dict(
    ...     {"alt_host": ["host1", "host2"], "ssl_cipher": "/path/to/crt"}
    ... )
    >>> str(url)
    'postgresql+psycopg2://user:pass@host/dbname?alt_host=host1&alt_host=host2&ssl_cipher=%2Fpath%2Fto%2Fcrt'


:param query_parameters: A dictionary with string keys and values
 that are either strings, or sequences of strings.

:param append: if True, parameters in the existing query string will
 not be removed; new parameters will be in addition to those present.
 If left at its default of False, keys present in the given query
 parameters will replace those of the existing query string.


.. versionadded:: 1.4

.. seealso::

    :attr:`_engine.URL.query`

    :meth:`_engine.URL.update_query_string`

    :meth:`_engine.URL.update_query_pairs`

    :meth:`_engine.URL.difference_update_query`

    :meth:`_engine.URL.set`



Vous êtes un professionnel et vous avez besoin d'une formation ? Machine Learning
avec Scikit-Learn
Voir le programme détaillé