Hello!
I'm pretty new to Slick, and I am trying to figure out what would be the best way to combine SELECT and INSERT actions w/o an external execution context, to resemble this:
- SELECT something FROM table1 JOIN table 2 .....
- if there is a record - then return the wrapped case class
- if there is no record - then create a new case class instance and insert it into the database, then return the newly created object
I guess that I can implement that with the map/flatMap and collect, but those require the execution context passed from external, and I don't really want to pollute my DAO metods with the context, I need to return just an instance of Future[X]
Thanks!