tapac
10/13/2017, 1:01 PMfun withTables ( vararg tables: Table, statement: Transaction.() -> Unit) {
Database.connect()
transaction {
SchemaUtils.create(*tables)
try {
statement()
commit()
} finally {
SchemaUtils.drop (*tables)
}
}
}
}