|
1 | 1 | // |
2 | 2 | // DISCLAIMER |
3 | 3 | // |
4 | | -// Copyright 2020-2023 ArangoDB GmbH, Cologne, Germany |
| 4 | +// Copyright 2020-2024 ArangoDB GmbH, Cologne, Germany |
5 | 5 | // |
6 | 6 | // Licensed under the Apache License, Version 2.0 (the "License"); |
7 | 7 | // you may not use this file except in compliance with the License. |
@@ -171,51 +171,51 @@ func (c *CollectionDocumentCreateOptions) modifyRequest(r connection.Request) er |
171 | 171 | } |
172 | 172 |
|
173 | 173 | if c.WithWaitForSync != nil { |
174 | | - r.AddQuery("waitForSync", boolToString(*c.WithWaitForSync)) |
| 174 | + r.AddQuery(QueryWaitForSync, boolToString(*c.WithWaitForSync)) |
175 | 175 | } |
176 | 176 |
|
177 | 177 | if c.Overwrite != nil { |
178 | | - r.AddQuery("overwrite", boolToString(*c.Overwrite)) |
| 178 | + r.AddQuery(QueryOverwrite, boolToString(*c.Overwrite)) |
179 | 179 | } |
180 | 180 |
|
181 | 181 | if c.OverwriteMode != nil { |
182 | | - r.AddQuery("overwriteMode", c.OverwriteMode.String()) |
| 182 | + r.AddQuery(QueryOverwriteMode, c.OverwriteMode.String()) |
183 | 183 | } |
184 | 184 |
|
185 | 185 | if c.Silent != nil { |
186 | | - r.AddQuery("silent", boolToString(*c.Silent)) |
| 186 | + r.AddQuery(QuerySilent, boolToString(*c.Silent)) |
187 | 187 | } |
188 | 188 |
|
189 | 189 | if c.NewObject != nil { |
190 | | - r.AddQuery("returnNew", "true") |
| 190 | + r.AddQuery(QueryReturnNew, "true") |
191 | 191 | } |
192 | 192 |
|
193 | 193 | if c.OldObject != nil { |
194 | | - r.AddQuery("returnOld", "true") |
| 194 | + r.AddQuery(QueryReturnOld, "true") |
195 | 195 | } |
196 | 196 |
|
197 | 197 | if c.RefillIndexCaches != nil { |
198 | | - r.AddQuery("refillIndexCaches", boolToString(*c.RefillIndexCaches)) |
| 198 | + r.AddQuery(QueryRefillIndexCaches, boolToString(*c.RefillIndexCaches)) |
199 | 199 | } |
200 | 200 |
|
201 | 201 | if c.KeepNull != nil { |
202 | | - r.AddQuery("keepNull", boolToString(*c.KeepNull)) |
| 202 | + r.AddQuery(QueryKeepNull, boolToString(*c.KeepNull)) |
203 | 203 | } |
204 | 204 |
|
205 | 205 | if c.MergeObjects != nil { |
206 | | - r.AddQuery("mergeObjects", boolToString(*c.MergeObjects)) |
| 206 | + r.AddQuery(QueryMergeObjects, boolToString(*c.MergeObjects)) |
207 | 207 | } |
208 | 208 |
|
209 | 209 | if c.IgnoreRevs != nil { |
210 | | - r.AddQuery("ignoreRevs", boolToString(*c.IgnoreRevs)) |
| 210 | + r.AddQuery(QueryIgnoreRevs, boolToString(*c.IgnoreRevs)) |
211 | 211 | } |
212 | 212 |
|
213 | 213 | if c.IsRestore != nil { |
214 | | - r.AddQuery("isRestore", boolToString(*c.IsRestore)) |
| 214 | + r.AddQuery(QueryIsRestore, boolToString(*c.IsRestore)) |
215 | 215 | } |
216 | 216 |
|
217 | 217 | if c.VersionAttribute != "" { |
218 | | - r.AddQuery("versionAttribute", c.VersionAttribute) |
| 218 | + r.AddQuery(QueryVersionAttribute, c.VersionAttribute) |
219 | 219 | } |
220 | 220 |
|
221 | 221 | return nil |
|
0 commit comments