File tree Expand file tree Collapse file tree 1 file changed +31
-0
lines changed Expand file tree Collapse file tree 1 file changed +31
-0
lines changed Original file line number Diff line number Diff line change @@ -63,6 +63,37 @@ func (i *insertStatement) ExcludedColumns() []string {
6363 return i .excludedColumns
6464}
6565
66+ type InsertSelectStatement interface {
67+ InsertStatement
68+
69+ SetSelect (stmt SelectStatement ) InsertSelectStatement
70+
71+ Select () SelectStatement
72+ }
73+
74+ func NewInsertSelect (entity Entity ) InsertSelectStatement {
75+ return & insertSelectStatement {
76+ insertStatement : insertStatement {
77+ entity : entity ,
78+ },
79+ }
80+ }
81+
82+ type insertSelectStatement struct {
83+ insertStatement
84+ selectStmt SelectStatement
85+ }
86+
87+ func (i * insertSelectStatement ) SetSelect (stmt SelectStatement ) InsertSelectStatement {
88+ i .selectStmt = stmt
89+
90+ return i
91+ }
92+
93+ func (i * insertSelectStatement ) Select () SelectStatement {
94+ return i .selectStmt
95+ }
96+
6697type SelectStatement interface {
6798 From (table string ) SelectStatement
6899
You can’t perform that action at this time.
0 commit comments