def _ddl_command(self, query, params=None): config = self.config.superuser_dbinfo().copy() del(config['database']) db = Connect(**config) cursor = db.cursor() cursor.execute(query, params) db.commit() db.close()
def execute_instruction(self, query, data=None): """ Yet another wrapper around execute """ db = Connect(**self.config.superuser_dbinfo().copy()) cursor = db.cursor() cursor.execute(query, data) db.commit() db.close() return cursor