def __init__(self, connection, database='', table_prefix='', config=None):
        """
        :param connection: A dbapi connection instance
        :type connection: mixed

        :param database: The database name
        :type database: str

        :param table_prefix: The table prefix
        :type table_prefix: str

        :param config: The connection configuration
        :type config: dict
        """
        self._connection = connection
        self._cursor = None

        self._read_connection = None

        self._database = database

        self._table_prefix = table_prefix

        if config is None:
            config = {}

        self._config = config

        self._reconnector = None

        self._transactions = 0

        self._pretending = False

        self._logging_queries = config.get('log_queries', False)

        self._query_grammar = self.get_default_query_grammar()

        self._schema_grammar = None

        self._post_processor = self.get_default_post_processor()

        self.use_default_query_grammar()
def __init__ ( self , connection , database = '' , table_prefix = '' , config = None ) : self . _connection = connection self . _cursor = None self . _read_connection = None self . _database = database self . _table_prefix = table_prefix if config is None : config = { } self . _config = config self . _reconnector = None self . _transactions = 0 self . _pretending = False self . _logging_queries = config . get ( 'log_queries' , False ) self . _query_grammar = self . get_default_query_grammar ( ) self . _schema_grammar = None self . _post_processor = self . get_default_post_processor ( ) self . use_default_query_grammar ( )
:param connection: A dbapi connection instance
        :type connection: mixed

        :param database: The database name
        :type database: str

        :param table_prefix: The table prefix
        :type table_prefix: str

        :param config: The connection configuration
        :type config: dict