-
Notifications
You must be signed in to change notification settings - Fork 1
/
dbmock_gen.go
333 lines (298 loc) · 9.07 KB
/
dbmock_gen.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
/* This file is auto-generated. Do not edit it! */
package kivikmock
import (
kivik "github.com/go-kivik/kivik/v4"
"github.com/go-kivik/kivik/v4/driver"
)
var _ = kivik.EndKeySuffix // To ensure a reference to kivik package
var _ = &driver.Attachment{}
// ExpectCompact queues an expectation that DB.Compact will be called.
func (db *DB) ExpectCompact() *ExpectedCompact {
e := &ExpectedCompact{
commonExpectation: commonExpectation{db: db},
}
db.count++
db.client.expected = append(db.client.expected, e)
return e
}
// ExpectCompactView queues an expectation that DB.CompactView will be called.
func (db *DB) ExpectCompactView() *ExpectedCompactView {
e := &ExpectedCompactView{
commonExpectation: commonExpectation{db: db},
}
db.count++
db.client.expected = append(db.client.expected, e)
return e
}
// ExpectCopy queues an expectation that DB.Copy will be called.
func (db *DB) ExpectCopy() *ExpectedCopy {
e := &ExpectedCopy{
commonExpectation: commonExpectation{db: db},
}
db.count++
db.client.expected = append(db.client.expected, e)
return e
}
// ExpectCreateDoc queues an expectation that DB.CreateDoc will be called.
func (db *DB) ExpectCreateDoc() *ExpectedCreateDoc {
e := &ExpectedCreateDoc{
commonExpectation: commonExpectation{db: db},
}
db.count++
db.client.expected = append(db.client.expected, e)
return e
}
// ExpectCreateIndex queues an expectation that DB.CreateIndex will be called.
func (db *DB) ExpectCreateIndex() *ExpectedCreateIndex {
e := &ExpectedCreateIndex{
commonExpectation: commonExpectation{db: db},
}
db.count++
db.client.expected = append(db.client.expected, e)
return e
}
// ExpectDeleteIndex queues an expectation that DB.DeleteIndex will be called.
func (db *DB) ExpectDeleteIndex() *ExpectedDeleteIndex {
e := &ExpectedDeleteIndex{
commonExpectation: commonExpectation{db: db},
}
db.count++
db.client.expected = append(db.client.expected, e)
return e
}
// ExpectFlush queues an expectation that DB.Flush will be called.
func (db *DB) ExpectFlush() *ExpectedFlush {
e := &ExpectedFlush{
commonExpectation: commonExpectation{db: db},
}
db.count++
db.client.expected = append(db.client.expected, e)
return e
}
// ExpectGetRev queues an expectation that DB.GetRev will be called.
func (db *DB) ExpectGetRev() *ExpectedGetRev {
e := &ExpectedGetRev{
commonExpectation: commonExpectation{db: db},
}
db.count++
db.client.expected = append(db.client.expected, e)
return e
}
// ExpectPut queues an expectation that DB.Put will be called.
func (db *DB) ExpectPut() *ExpectedPut {
e := &ExpectedPut{
commonExpectation: commonExpectation{db: db},
}
db.count++
db.client.expected = append(db.client.expected, e)
return e
}
// ExpectViewCleanup queues an expectation that DB.ViewCleanup will be called.
func (db *DB) ExpectViewCleanup() *ExpectedViewCleanup {
e := &ExpectedViewCleanup{
commonExpectation: commonExpectation{db: db},
}
db.count++
db.client.expected = append(db.client.expected, e)
return e
}
// ExpectAllDocs queues an expectation that DB.AllDocs will be called.
func (db *DB) ExpectAllDocs() *ExpectedAllDocs {
e := &ExpectedAllDocs{
commonExpectation: commonExpectation{db: db},
}
db.count++
db.client.expected = append(db.client.expected, e)
return e
}
// ExpectBulkDocs queues an expectation that DB.BulkDocs will be called.
func (db *DB) ExpectBulkDocs() *ExpectedBulkDocs {
e := &ExpectedBulkDocs{
commonExpectation: commonExpectation{db: db},
}
db.count++
db.client.expected = append(db.client.expected, e)
return e
}
// ExpectBulkGet queues an expectation that DB.BulkGet will be called.
func (db *DB) ExpectBulkGet() *ExpectedBulkGet {
e := &ExpectedBulkGet{
commonExpectation: commonExpectation{db: db},
}
db.count++
db.client.expected = append(db.client.expected, e)
return e
}
// ExpectChanges queues an expectation that DB.Changes will be called.
func (db *DB) ExpectChanges() *ExpectedChanges {
e := &ExpectedChanges{
commonExpectation: commonExpectation{db: db},
}
db.count++
db.client.expected = append(db.client.expected, e)
return e
}
// ExpectDelete queues an expectation that DB.Delete will be called.
func (db *DB) ExpectDelete() *ExpectedDelete {
e := &ExpectedDelete{
commonExpectation: commonExpectation{db: db},
}
db.count++
db.client.expected = append(db.client.expected, e)
return e
}
// ExpectDeleteAttachment queues an expectation that DB.DeleteAttachment will be called.
func (db *DB) ExpectDeleteAttachment() *ExpectedDeleteAttachment {
e := &ExpectedDeleteAttachment{
commonExpectation: commonExpectation{db: db},
}
db.count++
db.client.expected = append(db.client.expected, e)
return e
}
// ExpectDesignDocs queues an expectation that DB.DesignDocs will be called.
func (db *DB) ExpectDesignDocs() *ExpectedDesignDocs {
e := &ExpectedDesignDocs{
commonExpectation: commonExpectation{db: db},
}
db.count++
db.client.expected = append(db.client.expected, e)
return e
}
// ExpectExplain queues an expectation that DB.Explain will be called.
func (db *DB) ExpectExplain() *ExpectedExplain {
e := &ExpectedExplain{
commonExpectation: commonExpectation{db: db},
ret0: &driver.QueryPlan{},
}
db.count++
db.client.expected = append(db.client.expected, e)
return e
}
// ExpectFind queues an expectation that DB.Find will be called.
func (db *DB) ExpectFind() *ExpectedFind {
e := &ExpectedFind{
commonExpectation: commonExpectation{db: db},
}
db.count++
db.client.expected = append(db.client.expected, e)
return e
}
// ExpectGet queues an expectation that DB.Get will be called.
func (db *DB) ExpectGet() *ExpectedGet {
e := &ExpectedGet{
commonExpectation: commonExpectation{db: db},
}
db.count++
db.client.expected = append(db.client.expected, e)
return e
}
// ExpectGetAttachment queues an expectation that DB.GetAttachment will be called.
func (db *DB) ExpectGetAttachment() *ExpectedGetAttachment {
e := &ExpectedGetAttachment{
commonExpectation: commonExpectation{db: db},
}
db.count++
db.client.expected = append(db.client.expected, e)
return e
}
// ExpectGetAttachmentMeta queues an expectation that DB.GetAttachmentMeta will be called.
func (db *DB) ExpectGetAttachmentMeta() *ExpectedGetAttachmentMeta {
e := &ExpectedGetAttachmentMeta{
commonExpectation: commonExpectation{db: db},
}
db.count++
db.client.expected = append(db.client.expected, e)
return e
}
// ExpectGetIndexes queues an expectation that DB.GetIndexes will be called.
func (db *DB) ExpectGetIndexes() *ExpectedGetIndexes {
e := &ExpectedGetIndexes{
commonExpectation: commonExpectation{db: db},
}
db.count++
db.client.expected = append(db.client.expected, e)
return e
}
// ExpectLocalDocs queues an expectation that DB.LocalDocs will be called.
func (db *DB) ExpectLocalDocs() *ExpectedLocalDocs {
e := &ExpectedLocalDocs{
commonExpectation: commonExpectation{db: db},
}
db.count++
db.client.expected = append(db.client.expected, e)
return e
}
// ExpectPartitionStats queues an expectation that DB.PartitionStats will be called.
func (db *DB) ExpectPartitionStats() *ExpectedPartitionStats {
e := &ExpectedPartitionStats{
commonExpectation: commonExpectation{db: db},
}
db.count++
db.client.expected = append(db.client.expected, e)
return e
}
// ExpectPurge queues an expectation that DB.Purge will be called.
func (db *DB) ExpectPurge() *ExpectedPurge {
e := &ExpectedPurge{
commonExpectation: commonExpectation{db: db},
ret0: &driver.PurgeResult{},
}
db.count++
db.client.expected = append(db.client.expected, e)
return e
}
// ExpectPutAttachment queues an expectation that DB.PutAttachment will be called.
func (db *DB) ExpectPutAttachment() *ExpectedPutAttachment {
e := &ExpectedPutAttachment{
commonExpectation: commonExpectation{db: db},
}
db.count++
db.client.expected = append(db.client.expected, e)
return e
}
// ExpectQuery queues an expectation that DB.Query will be called.
func (db *DB) ExpectQuery() *ExpectedQuery {
e := &ExpectedQuery{
commonExpectation: commonExpectation{db: db},
}
db.count++
db.client.expected = append(db.client.expected, e)
return e
}
// ExpectRevsDiff queues an expectation that DB.RevsDiff will be called.
func (db *DB) ExpectRevsDiff() *ExpectedRevsDiff {
e := &ExpectedRevsDiff{
commonExpectation: commonExpectation{db: db},
}
db.count++
db.client.expected = append(db.client.expected, e)
return e
}
// ExpectSecurity queues an expectation that DB.Security will be called.
func (db *DB) ExpectSecurity() *ExpectedSecurity {
e := &ExpectedSecurity{
commonExpectation: commonExpectation{db: db},
}
db.count++
db.client.expected = append(db.client.expected, e)
return e
}
// ExpectSetSecurity queues an expectation that DB.SetSecurity will be called.
func (db *DB) ExpectSetSecurity() *ExpectedSetSecurity {
e := &ExpectedSetSecurity{
commonExpectation: commonExpectation{db: db},
}
db.count++
db.client.expected = append(db.client.expected, e)
return e
}
// ExpectStats queues an expectation that DB.Stats will be called.
func (db *DB) ExpectStats() *ExpectedStats {
e := &ExpectedStats{
commonExpectation: commonExpectation{db: db},
}
db.count++
db.client.expected = append(db.client.expected, e)
return e
}