MCPcopy
hub / github.com/sqlalchemy/sqlalchemy / get_driver_name

Method get_driver_name

lib/sqlalchemy/engine/url.py:719–735  ·  lib/sqlalchemy/engine/url.py::URL.get_driver_name

Return the backend name. This is the name that corresponds to the DBAPI driver in use, and is the portion of the :attr:`_engine.URL.drivername` that is to the right of the plus sign. If the :attr:`_engine.URL.drivername` does not include a plus sign, then th

(self)

Source from the content-addressed store, hash-verified

717 return self.drivername.split(class="st">"+")[0]
718
719 def get_driver_name(self) -> str:
720 class="st">"""Return the backend name.
721
722 This is the name that corresponds to the DBAPI driver in
723 use, and is the portion of the :attr:`_engine.URL.drivername`
724 that is to the right of the plus sign.
725
726 If the :attr:`_engine.URL.drivername` does not include a plus sign,
727 then the default :class:`_engine.Dialect` for this :class:`_engine.URL`
728 is imported in order to get the driver name.
729
730 class="st">"""
731
732 if class="st">"+" not in self.drivername:
733 return self.get_dialect().driver
734 else:
735 return self.drivername.split(class="st">"+")[1]
736
737 def _instantiate_plugins(
738 self, kwargs: Mapping[str, Any]

Callers 7

_update_db_optsFunction · 0.80
generate_driver_urlFunction · 0.80
_format_urlFunction · 0.80
generate_db_urlsFunction · 0.80
_generate_driver_urlsFunction · 0.80
_format_descriptionMethod · 0.80
mysql_url_mariadbMethod · 0.80

Calls 2

get_dialectMethod · 0.95
splitMethod · 0.80

Tested by 1

mysql_url_mariadbMethod · 0.64