mairbek/finagle-postgres — pull request #26 by jyeo (2013-07-26 01:01:04+00:00)
Title: getOption[A] for NULL values

get[A] doesn't support NULLs (and probably shouldn't) -- same idea as List.head and List.headOption. So if you have:

create table foo (bar text);

You should (since you might get NULL):

query <- client.prepare("select bar from foo")
foo <- query.select() { row =>
val bar = row.getOption[String]("bar")
...
}

Also make None usage symmetrical so you can:

query <- client.prepare("insert into foo values ($1)")
foo <- query.exec(None)