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