@@ -57,7 +57,7 @@ object HelloSlick extends App {
5757 /* Filtering / Where */
5858
5959 // Construct a query where the price of Coffees is > 9.0
60- val filterQuery : Query [Coffees , (String , Int , Double , Int , Int )] =
60+ val filterQuery : Query [Coffees , (String , Int , Double , Int , Int ), Seq ] =
6161 coffees.filter(_.price > 9.0 )
6262
6363 println(" Generated SQL for filter query:\n " + filterQuery.selectStatement)
@@ -69,7 +69,7 @@ object HelloSlick extends App {
6969 /* Update */
7070
7171 // Construct an update query with the sales column being the one to update
72- val updateQuery : Query [Column [Int ], Int ] = coffees.map(_.sales)
72+ val updateQuery : Query [Column [Int ], Int , Seq ] = coffees.map(_.sales)
7373
7474 // Print the SQL for the Coffees update query
7575 println(" Generated SQL for Coffees update:\n " + updateQuery.updateStatement)
@@ -83,7 +83,7 @@ object HelloSlick extends App {
8383 /* Delete */
8484
8585 // Construct a delete query that deletes coffees with a price less than 8.0
86- val deleteQuery : Query [Coffees ,(String , Int , Double , Int , Int )] =
86+ val deleteQuery : Query [Coffees ,(String , Int , Double , Int , Int ), Seq ] =
8787 coffees.filter(_.price < 8.0 )
8888
8989 // Print the SQL for the Coffees delete query
@@ -98,7 +98,7 @@ object HelloSlick extends App {
9898 /* Selecting Specific Columns */
9999
100100 // Construct a new coffees query that just selects the name
101- val justNameQuery : Query [Column [String ], String ] = coffees.map(_.name)
101+ val justNameQuery : Query [Column [String ], String , Seq ] = coffees.map(_.name)
102102
103103 println(" Generated SQL for query returning just the name:\n " +
104104 justNameQuery.selectStatement)
@@ -109,7 +109,7 @@ object HelloSlick extends App {
109109
110110 /* Sorting / Order By */
111111
112- val sortByPriceQuery : Query [Coffees , (String , Int , Double , Int , Int )] =
112+ val sortByPriceQuery : Query [Coffees , (String , Int , Double , Int , Int ), Seq ] =
113113 coffees.sortBy(_.price)
114114
115115 println(" Generated SQL for query sorted by price:\n " +
@@ -121,7 +121,7 @@ object HelloSlick extends App {
121121
122122 /* Query Composition */
123123
124- val composedQuery : Query [Column [String ], String ] =
124+ val composedQuery : Query [Column [String ], String , Seq ] =
125125 coffees.sortBy(_.name).take(3 ).filter(_.price > 9.0 ).map(_.name)
126126
127127 println(" Generated SQL for composed query:\n " +
@@ -134,7 +134,7 @@ object HelloSlick extends App {
134134 /* Joins */
135135
136136 // Join the tables using the relationship defined in the Coffees table
137- val joinQuery : Query [(Column [String ], Column [String ]), (String , String )] = for {
137+ val joinQuery : Query [(Column [String ], Column [String ]), (String , String ), Seq ] = for {
138138 c <- coffees if c.price > 9.0
139139 s <- c.supplier
140140 } yield (c.name, s.name)
0 commit comments