예제 #1
0
 def create_db(self):
     """Creates the database"""
     try:
         Engine.create_db(self)
     except:
         self.connection.rollback()
         pass
예제 #2
0
 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 ")
예제 #3
0
 def create_table(self):
     """PostgreSQL needs to commit operations individually."""
     Engine.create_table(self)
     self.connection.commit()
예제 #4
0
 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")
예제 #5
0
 def to_csv(self):
     Engine.to_csv(self)