Skip to content
This repository has been archived by the owner on Jan 17, 2022. It is now read-only.

Embedding example would be helpful #4

Open
mslinn opened this issue Oct 11, 2012 · 1 comment
Open

Embedding example would be helpful #4

mslinn opened this issue Oct 11, 2012 · 1 comment
Assignees

Comments

@mslinn
Copy link

mslinn commented Oct 11, 2012

How about an example along these lines?

    @table("COFFEES") case class Coffee(
    @column("COF_NAME") name: String,
    @column("SUP_ID") supID: Int,
    @column("PRICE") price: Double
    )
    val coffees = Queryable[Coffee]

    // for inserts use lifted embedding or SQL

    val l = for {
    c <- coffees if c.supID == 101
    // ^ comparing Int to Int!
    } yield (c.name, c.price)

    backend.result( l, session )
    .foreach { case (n, p) => println(n + ": " + p) }
@ghost ghost assigned cvogt Oct 12, 2012
@szeiger
Copy link
Member

szeiger commented Oct 12, 2012

Agreed. Assigning Chris to this.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants