diff options
-rw-r--r-- | README.md | 6 |
1 files changed, 5 insertions, 1 deletions
@@ -122,10 +122,14 @@ The primary operations available in `clojure-sql` are the following: :::clojure (s/join (-> (s/table :users) - (s/project [:id :username :person,id])) + (s/project {:id :id, :username :username, :person :person.id})) (-> (s/table :people) (s/project [:id :name]) (s/rename (s/as-subobject :person)))) + ;; => ["SELECT \"users2834\".\"id\" AS \"id\", \"users2834\".\"person\" AS \"person.id\", + \"table2836\".\"name\" AS \"person.name\", \"users2834\".\"username\" AS \"username\" + FROM (\"users\" AS \"users2834\" INNER JOIN \"people\" AS \"table2836\" + ON (\"users2834\".\"person\" = \"table2836\".\"id\"))"] With joins the composability of `clojure-sql` becomes much more useful: |