File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -21,7 +21,7 @@ object City extends Table[City]
2121val 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
You can’t perform that action at this time.
0 commit comments