with:支持GORM

时间:2024-04-09 10:57:19
【文件属性】:

文件名称:with:支持GORM

文件大小:6KB

文件格式:ZIP

更新时间:2024-04-09 10:57:19

Go

和 支持GORM 使用With子句 import "github.com/WinterYukky/with" with := with . New ( db ). Append ( "`apple_buyers` AS (SELECT `user_id` FROM `sales` WHERE product = ?)" , "apple" ). Append ( "`orange_buyers` AS (?)" , db . Model ( & Sale {}). Select ( "user_id" ). Where ( "product = ?" , "orange" )) db . Clauses ( with ). Where ( "users.id IN (?)" , db . Table ( "apple_buyers" )). Where (


【文件预览】:
with-main
----.github()
--------workflows()
----with_test.go(2KB)
----LICENSE(1KB)
----with.go(1KB)
----.devcontainer()
--------Dockerfile(980B)
--------devcontainer.json(1KB)
----go.sum(1KB)
----README.md(825B)
----go.mod(109B)

网友评论