# -*- coding: iso-8859-1 -*-
#-----------------------------------------------------------------------------
# Modeling Framework: an Object-Relational Bridge for python
#
# Copyright (c) 2001-2004 Sbastien Bigaret <sbigaret@users.sourceforge.net>
# All rights reserved.
#
# This file is part of the Modeling Framework.
#
# This code is distributed under a "3-clause BSD"-style license;
# see the LICENSE file for details.
#-----------------------------------------------------------------------------
"""
MySQLAdaptorContext
CVS information
$Id: MySQLAdaptorContext.py 933 2004-08-02 19:58:54Z sbigaret $
"""
__version__='$Revision: 933 $'[11:-2]
from Modeling.logging import db_info,db_trace,db_debug,db_fatal
from Modeling.DatabaseAdaptors.AbstractDBAPI2AdaptorLayer.AbstractDBAPI2AdaptorContext import
import AbstractDBAPI2AdaptorContext
# MySQLAdaptorLayer
from MySQLAdaptorChannel import MySQLAdaptorChannel
class MySQLAdaptorContext(AbstractDBAPI2AdaptorContext):
"""
Concrete AdaptorContext for MySQL [module MySQLdb]
"""
def createAdaptorChannel(self):
"""
Returns a brand new instance of MySQLAdaptorChannel.
See also: Modeling.interfaces.AdaptorContext for details
"""
channel=MySQLAdaptorChannel(self)
db_trace('Creating MySQLAdaptorChannel %s'%repr(channel))
channel=MySQLAdaptorChannel(self)
self.__addChannel__(channel)
return channel
|