'Initialize a TableAdapter object.'

def __init__(self, table, uri=None):

    self._imdbpySchema = table
    self._imdbpyName = table.name
    self.connectionURI = uri
    self.colMap = {}
    columns = []
    for col in table.cols:
        params = {'nullable': True}
        params.update(col.params)
        if (col.name == 'id'):
            params['primary_key'] = True
        if ('notNone' in params):
            params['nullable'] = (not params['notNone'])
            del params['notNone']
        cname = _renameColumn(col.name)
        self.colMap[col.name] = cname
        colClass = MAP_COLS[col.kind]
        colKindParams = {}
        if ('length' in params):
            colKindParams['length'] = params['length']
            del params['length']
        elif ((colClass is UnicodeText) and col.index):
            colClass = Unicode
            length = 511
            if self.connectionURI:
                if self.connectionURI.startswith('mysql'):
                    length = 255
            colKindParams['length'] = length
        elif ((self._imdbpyName == 'PersonInfo') and (col.name == 'info')):
            if self.connectionURI:
                if self.connectionURI.startswith('ibm'):
                    colClass = CLOB
                    colKindParams['length'] = (68 * 1024)
        colKind = colClass(**colKindParams)
        if ('alternateID' in params):
            del params['alternateID']
        colObj = Column(cname, colKind, **params)
        columns.append(colObj)
    self.tableName = _renameTable(table.name)
    self.table = Table(self.tableName, metadata, *columns)
    self._ta_insert = self.table.insert()
    self._ta_select = self.table.select
    self.q = QAdapter(self.table, colMap=self.colMap)
    self.sqlmeta = SQLMetaAdapter(self.table, colMap=self.colMap)
