Skip to content

Add support for UNION queries

Choose a tag to compare

@VaporBot VaporBot released this 06 Dec 07:35
· 47 commits to main since this release
d2027b4
This patch was authored by @finestructure and released by @gwynne.

Adds support for UNION SELECT queries:

try db.select()
     .column("id")
     .from("t1")
     .where("f1", .equal, "foo")
     .limit(1)
     .union({
         $0.column("id")
             .from("t2")
             .where("f2", .equal, "bar")
             .limit(2)
     }).union(all: {
         $0.column("id")
             .from("t3")
             .where("f3", .equal, "baz")
             .limit(3)
     })
     .run().wait()