def createStatements(self):
        statements = []
        columnSQLStmts = []
        for slot in POSITION_LIST:
            if self.columnNames[slot]:
                columnSQLStmts.append("\t%s\t%s not NULL" %
                  (self.columnNames[slot], self._hashFieldType))
                if self.termEnumerations[slot]:
                    if self.declareEnums:
                        # This is disabled until PostgreSQL grows enums (8.3)
                        if False:
                          enumName = '%s_enum' % (self.columnNames[slot],)
                          statements.append(
                            'CREATE TYPE %s AS ENUM (%s)' %
                            (enumName,
                             ','.join(["'%s'" % tType for tType in
                                        self.termEnumerations[slot]])))
                        enumName = 'char'
                        columnSQLStmts.append("\t%s_term %s not NULL" %
                          (self.columnNames[slot], enumName))
                    else:
                        columnSQLStmts.append("\t%s_term enum(%s) not NULL" %
                          (self.columnNames[slot],
                           ','.join(["'%s'" % tType for tType in
                                              self.termEnumerations[slot]])))
        
        if len(self.columnNames) > 4:
            for otherSlot in range(4, len(self.columnNames)):
                colMD = self.columnNames[otherSlot]
                if isinstance(colMD, tuple):
                    colName, colType, indexStr = colMD
                    columnSQLStmts.append("\t%s %s" % (colName, colType))
                else:
                    columnSQLStmts.append("\t%s %s unsigned not NULL" %
                                          (self._hashFieldType, colMD))
        
        statements.append(CREATE_BRP_TABLE % (
            self,
            ',\n'.join(columnSQLStmts),
            self._engine))
        return statements
Generate SQL to transform existing foreign tables
dataset/ETHPy150Open RDFLib/rdfextras/rdfextras/store/FOPLRelationalModel/BinaryRelationPartition.py/BinaryRelationPartition.createStatements--crossover with--dataset/ETHPy150Open perseas/Pyrseas/pyrseas/dbobject/foreign.py/ForeignTableDict.diff_map