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 ? Programmation Python
Les fondamentaux
Voir le programme détaillé
Classe « URL »

Méthode sqlalchemy.URL.update_query_string

Signature de la méthode update_query_string

def update_query_string(self, query_string: 'str', append: 'bool' = False) -> 'URL' 

Description

help(URL.update_query_string)

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

E.g.::

    >>> from sqlalchemy.engine import make_url
    >>> url = make_url("postgresql+psycopg2://user:pass@host/dbname")
    >>> url = url.update_query_string(
    ...     "alt_host=host1&alt_host=host2&ssl_cipher=%2Fpath%2Fto%2Fcrt"
    ... )
    >>> str(url)
    'postgresql+psycopg2://user:pass@host/dbname?alt_host=host1&alt_host=host2&ssl_cipher=%2Fpath%2Fto%2Fcrt'

:param query_string: a URL escaped query string, not including the
 question mark.

: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_dict`



Vous êtes un professionnel et vous avez besoin d'une formation ? Coder avec une
Intelligence Artificielle
Voir le programme détaillé