trac.db.mysql_backend
¶
-
class
trac.db.mysql_backend.
MySQLConnection
(path, log, user=None, password=None, host=None, port=None, params={})¶ Bases:
trac.db.api.ConnectionBase
,trac.db.util.ConnectionWrapper
Connection wrapper for MySQL.
-
class
trac.db.mysql_backend.
MySQLConnector
¶ Bases:
trac.core.Component
Database connector for MySQL version 4.1 and greater.
Database URLs should be of the form:
{{{ mysql://user[:password]@host[:port]/database[?param1=value¶m2=value] }}}
- The following parameters are supported:
compress
: Enable compression (0 or 1)init_command
: Command to run once the connection is creatednamed_pipe
: Use a named pipe to connect on Windows (0 or 1)read_default_file
: Read default client values from the given fileread_default_group
: Configuration group to use from the default fileunix_socket
: Use a Unix socket at the given path to connect
-
alter_column_types
(table, columns)¶ Yield SQL statements altering the type of one or more columns of a table.
Type changes are specified as a
columns
dict mapping column names to(from, to)
SQL type tuples.
-
mysqldump_path
¶ Location of mysqldump for MySQL database backups