Functions for Data Access
Learn how to implement functions to manipulate data and carry out main service.
We'll cover the following...
Loading a product
Press + to interact
override def loadProduct(id: ProductId) =sql"""SELECT products.id, names.lang_code, names.nameFROM productsJOIN names ON products.id = names.product_idWHERE products.id = $id""".query[(ProductId, LanguageCode, ProductName)].to[Seq].transact(tx)
Access this course and 1400+ top-rated courses and projects.