Skip to content

Commit

Permalink
readme
Browse files Browse the repository at this point in the history
  • Loading branch information
lihaoyi committed Nov 26, 2023
1 parent 794a154 commit 304bd4c
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,8 @@ ivy"com.lihaoyi::scalasql:0.1.0"
| `for(f <- Foo.select; b <- Bar.join(_.id === _.fooId) yield (f, b)` | `SELECT * FROM foo JOIN bar ON foo.id = foo2.foo_id` | `Seq[(Foo[Id], Bar[Id])]` |

### Insert/Update/Delete
| ScalaSql | SQL | Return Type |
|---------------------------------------------------------------------|-----------------------------------------------------------------|-----------------------------|
| `Foo.insert.values(_.myStr := "hello", _.myInt := 123)` | `INSERT INTO foo (my_str, my_int) VALUES ("hello", 123)` | `1` |
| `Foo.insert.batched(_.myStr, _.myInt)(("a", 1), ("b", 2))` | `INSERT INTO foo (my_str, my_int) VALUES ("a", 1), ("b", 2)` | `2` |
| `Foo.update(_.myStr === "hello").set(_.myInt := 123)` | `UPDATE foo SET my_int = 123 WHERE foo.my_str = "hello"` | `Int` |
Expand Down

0 comments on commit 304bd4c

Please sign in to comment.