Skip to content

Commit 0af49c6

Browse files
committed
Implement conjunction for VALUES clause
1 parent 69d142f commit 0af49c6

File tree

2 files changed

+11
-1
lines changed

2 files changed

+11
-1
lines changed

query.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@ func (q Query) conj(cl Clause) string {
125125
return " " + v.conjunction + " "
126126
case unionClause:
127127
return " " + cl.Kind().String() + " "
128-
case setClause:
128+
case setClause, valuesClause:
129129
return ", "
130130
default:
131131
return " "

query_test.go

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -192,6 +192,16 @@ func Test_Query(t *testing.T) {
192192
OrWhere("root_id", "IN", List(1)),
193193
),
194194
},
195+
{
196+
"INSERT INTO notes (title, comment) VALUES ($1, $2), ($3, $4), ($5, $6)",
197+
Insert(
198+
"notes",
199+
Columns("title", "comment"),
200+
Values("note 1", "some comment"),
201+
Values("note 2", "some other comment"),
202+
Values("note 3", "another comment"),
203+
),
204+
},
195205
}
196206

197207
for i, test := range tests {

0 commit comments

Comments
 (0)