relstorage.adapters.mysql.adapter – MySQL adapter for RelStorage#

MySQL adapter for RelStorage.

Connection parameters supported by MySQLdb:

host

string, host to connect

user

string, user to connect as

passwd

string, password to use

db

string, database to use

port

integer, TCP/IP port to connect to

unix_socket

string, location of unix_socket (UNIX-ish only)

conv

mapping, maps MySQL FIELD_TYPE.* to Python functions which convert a string to the appropriate Python type

connect_timeout

number of seconds to wait before the connection attempt fails.

compress

if set, gzip compression is enabled

named_pipe

if set, connect to server via named pipe (Windows only)

init_command

command which is run once the connection is created

read_default_file

see the MySQL documentation for mysql_options()

read_default_group

see the MySQL documentation for mysql_options()

client_flag

client flags from MySQLdb.constants.CLIENT

load_infile

int, non-zero enables LOAD LOCAL INFILE, zero disables

class MySQLAdapter(options=None, oidallocator=None, version_detector=None, connmanager=None, locker=None, mover=None, **params)[source]#

Bases: AbstractAdapter

MySQL adapter for RelStorage.

driver_options: IDBDriverOptions = <module 'relstorage.adapters.mysql.drivers' from '/home/docs/checkouts/readthedocs.org/user_builds/relstorage/envs/latest/lib/python3.11/site-packages/relstorage/adapters/mysql/drivers/__init__.py'>#
iteritems()#

D.items() -> a set-like object providing a view on D’s items