I work with 23 fields here, after all. I usually raised my hands up, trying to count them after cutting from a table with 31 fields using a foreign key.
All good links
A fundamental explanation of how to read and understand the Slick schema code provided by one very good Fise.
By 22 + parameters ...
Stefan Zeigar was extremely helpful in the sample code he wrote in this discussion , and is also more directly related to here on Github
Good Stefan Zeigar also posted here for simple SQL queries.
What is this message about
I think the above is enough to get me to go into working refactoring my application so that CRUD is feasible. I will update this question or ask new questions if something comes and stalls me. The fact is that...
I skip using to understand requests. I am talking about Slick Query Templates
The problem that I encounter when I use for understanding is that the table ... probably has
object Monsters extends Table[Int]("monster_table"){ // lots of column definitions def * = id /* for a Table[Int] despite having 21 other columns I'm not describing in this projection/ColumnBase/??? */ }
and the projection * will not describe everything that I want to return in the request.
A typical Slick template that is easy to understand will look something like this:
def someQueryTemplate = for { m <- Monsters } yield m
and m will be Int instead of the whole object that I want, because I declared that the table is Table[Int] , because I canβt build the projection from 22 parameters because of all the code that needs to be generated to support the class generation compiler for each tuple and arbitrariness
So ... in a nutshell:
Can I use Query Templates in Slick with 22+ columns?
sql database scala tuples slick
Meredith
source share