You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Would be great if README.md documented how to run DDLs; it would help running an example code quickly on a H2 in-memory database. I only found database.executeUpdate() but I have no idea which SqlExpression to use for a DDL statement.
The text was updated successfully, but these errors were encountered:
funmain() {
val database =Database.connect("jdbc:h2:mem:test;DB_CLOSE_DELAY=-1", user ="root", password ="***")
database.useTransaction {
it.connection.prepareStatement("""create table t_employee( id int not null primary key auto_increment, name varchar(128) not null, job varchar(128) not null, manager_id int null, hire_date date not null, salary bigint not null, department_id int not null);""").executeUpdate()
}
for (row in database.from(Employees).select()) {
println(row[Employees.name])
}
}
Would be great if README.md documented how to run DDLs; it would help running an example code quickly on a H2 in-memory database. I only found
database.executeUpdate()
but I have no idea whichSqlExpression
to use for a DDL statement.The text was updated successfully, but these errors were encountered: