add a missing create (Cities) statement in the two given examples to have the CITIES table created before inserting rows

This commit is contained in:
Pietro Di Bello
2018-05-31 22:38:14 +02:00
committed by Andrey.Tarashevskiy
parent b8190cf2ac
commit 3dc8ea2403

View File

@@ -89,6 +89,8 @@ fun main(args: Array<String>) {
// print sql to std-out
logger.addLogger(StdOutSqlLogger)
create (Cities)
// insert new city. SQL: INSERT INTO Cities (name) VALUES ('St. Petersburg')
val stPeteId = Cities.insert {
it[name] = "St. Petersburg"
@@ -118,6 +120,8 @@ fun main(args: Array<String>) {
// print sql to std-out
logger.addLogger(StdOutSqlLogger)
create (Cities)
// insert new city. SQL: INSERT INTO Cities (name) VALUES ('St. Petersburg')
val stPete = City.new {
name = "St. Petersburg"