def create_db(self): """Creates the database""" try: Engine.create_db(self) except: self.connection.rollback() pass
def drop_statement(self, objecttype, objectname): """In PostgreSQL, the equivalent of a SQL database is a schema.""" statement = Engine.drop_statement(self, objecttype, objectname) statement += " CASCADE;" return statement.replace(" DATABASE ", " SCHEMA ")
def create_table(self): """PostgreSQL needs to commit operations individually.""" Engine.create_table(self) self.connection.commit()
def create_db_statement(self): """In PostgreSQL, the equivalent of a SQL database is a schema.""" return Engine.create_db_statement(self).replace("DATABASE", "SCHEMA")
def to_csv(self): Engine.to_csv(self)