Skip to content

Commit 044808f

Browse files
committed
fix-readme
1 parent 5916844 commit 044808f

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

readme.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ object City extends Table[City]
2121
val dbClient = new scalasql.DbClient.Connection(
2222
connection = java.sql.DriverManager.getConnection("jdbc:sqlite::memory:"),
2323
config = new Config {
24-
override def nameMapper(v: String) = v.toLowerCase() // Override default snake_case mapping
24+
override def nameMapper(v: String) = v.toLowerCase() // Override default snake_case mapper
2525
override def logSql(sql: String, file: String, line: Int) = println(s"$file:$line $sql")
2626
}
2727
)
@@ -33,9 +33,9 @@ dbClient.transaction{ db =>
3333
db.updateRaw(os.read(os.Path("scalasql/test/resources/world-data.sql", os.pwd)))
3434

3535
// Adding up population of all cities in China
36-
val populationSum = db.run(City.select.filter(_.countryCode === "CHN").map(_.population).sum)
36+
val citiesPop = db.run(City.select.filter(_.countryCode === "CHN").map(_.population).sum)
3737
// SELECT SUM(city0.population) AS res FROM city city0 WHERE city0.countrycode = ?
38-
println(populationSum)
38+
println(citiesPop)
3939
// 175953614
4040

4141
// Finding the 5-8th largest cities by population

0 commit comments

Comments
 (0)