Пример #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)