January 2018
Intermediate to advanced
434 pages
14h 1m
English
If you have read and implemented the previous recipe, you must already have a customers table in your database. Follow the mentioned steps to understand the difference between parseSingle and parseOpt:
parseSingle(rowParser): T
btn_read.onClick { var c = database.use { select(Customer.TABLE_NAME) .whereArgs("(id = {userId})", "userId" to 1) .parseSingle(classParser<Customer>()) } debug(c.name + " (" + c.phone_num + ")")}
Read now
Unlock full access