MCPcopy Create free account
hub / github.com/PyMySQL/PyMySQL / select_db

Method select_db

pymysql/connections.py:526–533  ·  view source on GitHub ↗

Set current db. :param db: The name of the db.

(self, db)

Source from the content-addressed store, hash-verified

524 return result.rows
525
526 def select_db(self, db):
527 """
528 Set current db.
529
530 :param db: The name of the db.
531 """
532 self._execute_command(COMMAND.COM_INIT_DB, db)
533 self._read_ok_packet()
534
535 def escape(self, obj, mapping=None) -> str:
536 """Escape whatever value is passed.

Callers 1

test_select_dbMethod · 0.80

Calls 2

_execute_commandMethod · 0.95
_read_ok_packetMethod · 0.95

Tested by 1

test_select_dbMethod · 0.64