Package trac :: Package db :: Module api

Module api

source code

Classes
  DbContextManager
Database Context Manager
  TransactionContextManager
Transactioned Database Context Manager for retrieving a ~trac.db.util.ConnectionWrapper.
  QueryContextManager
Database Context Manager for retrieving a read-only ~trac.db.util.ConnectionWrapper.
  ConnectionBase
Abstract base class for database connection classes.
  IDatabaseConnector
Extension point interface for components that support the connection to relational databases.
  DatabaseManager
Component used to manage the IDatabaseConnector implementations.
Functions
 
get_column_names(cursor)
Retrieve column names from a cursor, if possible.
source code
 
parse_connection_uri(db_str)
Parse the database connection string.
source code
Variables
  __package__ = 'trac.db'

Imports: importlib, os, time, urllib, ABCMeta, abstractmethod, db_default, IEnvironmentSetupParticipant, ISystemInfoProvider, BoolOption, ConfigurationError, IntOption, Option, ConnectionPool, Table, ConnectionWrapper, ThreadLocal, tag, unicode_passwd, _, tag_, Component, ExtensionPoint, Interface, TracBaseError, TracError, TracValueError, implements


Function Details

parse_connection_uri(db_str)

source code 

Parse the database connection string.

The database connection string for an environment is specified through the database option in the [trac] section of trac.ini.

Returns:
a tuple containing the scheme and a dictionary of attributes: user, password, host, port, path, params.

Since: 1.1.3