Skip to content

Instantly share code, notes, and snippets.

@sheki
Created October 13, 2011 16:55
Show Gist options
  • Select an option

  • Save sheki/1284782 to your computer and use it in GitHub Desktop.

Select an option

Save sheki/1284782 to your computer and use it in GitHub Desktop.
def _allHostNames(template: SimpleJdbcTemplate): List[String] = {
val dbResult = template.queryForList("select name from host")
dbResult.flatMap(db => db.getOrElse("name", "").toString)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment