From 304bd4c06296f3203f46e6aee3c9e38a78ba5850 Mon Sep 17 00:00:00 2001 From: Li Haoyi Date: Sun, 26 Nov 2023 08:42:57 +0800 Subject: [PATCH] readme --- readme.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/readme.md b/readme.md index 36eaff32..8c86b5ef 100644 --- a/readme.md +++ b/readme.md @@ -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` |