go-xorm / xorm

Simple and Powerful ORM for Go, support mysql,postgres,tidb,sqlite3,mssql,oracle, Moved to https://gitea.com/xorm/xorm
BSD 3-Clause "New" or "Revised" License
6.67k stars 757 forks source link

是否考虑支持 Union #1172

Closed axetroy closed 5 years ago

axetroy commented 5 years ago

需要手动拼接SQL很是痛苦,完了还得进行一遍解析

如果能有这样的API就很棒了

    if err = session.Union(table1, table2, table3).Get(&tableSlice); err != nil {
        return
    }

    fmt.Println(tableSlice)
BetaCat0 commented 5 years ago

Hi @axetroy , maybe you can take a look at https://github.com/go-xorm/builder

axetroy commented 5 years ago

@BetaCat0 Thanks for your help!

LGTM!