Example #1
0
 def delete_database(self, database):
     """Delete the specified database."""
     with LocalSqlClient(get_engine()) as client:
         mydb = models.ValidatedMySQLDatabase()
         mydb.deserialize(database)
         dd = sql_query.DropDatabase(mydb.name)
         t = text(str(dd))
         client.execute(t)
Example #2
0
 def delete_database(self, database):
     """Delete the specified database."""
     with self.local_sql_client(self.mysql_app.get_engine()) as client:
         mydb = models.MySQLSchema.deserialize(database)
         mydb.check_delete()
         dd = sql_query.DropDatabase(mydb.name)
         t = text(str(dd))
         client.execute(t)
Example #3
0
 def test_defaults(self):
     dd = sql_query.DropDatabase('foo')
     self.assertEqual("DROP DATABASE `foo`;", str(dd))