File: Database.cs

package info (click to toggle)
xapian-bindings 1.4.29-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 21,436 kB
  • sloc: cpp: 379,853; python: 10,780; cs: 9,529; java: 6,949; sh: 4,629; perl: 4,435; makefile: 1,274; ruby: 1,028; php: 586; tcl: 246
file content (473 lines) | stat: -rw-r--r-- 19,891 bytes parent folder | download
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
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
//------------------------------------------------------------------------------
// <auto-generated />
//
// This file was automatically generated by SWIG (https://www.swig.org).
// Version 4.3.0
//
// Do not make changes to this file unless you know what you are doing - modify
// the SWIG interface file instead.
//------------------------------------------------------------------------------

namespace Xapian {

public class Database : global::System.IDisposable {
  private global::System.Runtime.InteropServices.HandleRef swigCPtr;
  protected bool swigCMemOwn;

  internal Database(global::System.IntPtr cPtr, bool cMemoryOwn) {
    swigCMemOwn = cMemoryOwn;
    swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
  }

  internal static global::System.Runtime.InteropServices.HandleRef getCPtr(Database obj) {
    return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr;
  }

  internal static global::System.Runtime.InteropServices.HandleRef swigRelease(Database obj) {
    if (obj != null) {
      if (!obj.swigCMemOwn)
        throw new global::System.ApplicationException("Cannot release ownership as memory is not owned");
      global::System.Runtime.InteropServices.HandleRef ptr = obj.swigCPtr;
      obj.swigCMemOwn = false;
      obj.Dispose();
      return ptr;
    } else {
      return new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
    }
  }

  ~Database() {
    Dispose(false);
  }

  public void Dispose() {
    Dispose(true);
    global::System.GC.SuppressFinalize(this);
  }

  protected virtual void Dispose(bool disposing) {
    lock(this) {
      if (swigCPtr.Handle != global::System.IntPtr.Zero) {
        if (swigCMemOwn) {
          swigCMemOwn = false;
          XapianPINVOKE.delete_Database(swigCPtr);
        }
        swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
      }
    }
  }

  public void AddDatabase(Database database) {
    XapianPINVOKE.Database_AddDatabase(swigCPtr, Database.getCPtr(database));
    if (XapianPINVOKE.SWIGPendingException.Pending) throw XapianPINVOKE.SWIGPendingException.Retrieve();
  }

  public uint Size() {
    uint ret = XapianPINVOKE.Database_Size(swigCPtr);
    if (XapianPINVOKE.SWIGPendingException.Pending) throw XapianPINVOKE.SWIGPendingException.Retrieve();
    return ret;
  }

  public Database() : this(XapianPINVOKE.new_Database__SWIG_0(), true) {
    if (XapianPINVOKE.SWIGPendingException.Pending) throw XapianPINVOKE.SWIGPendingException.Retrieve();
  }

  public Database(string path, int flags) : this(XapianPINVOKE.new_Database__SWIG_1(path, flags), true) {
    if (XapianPINVOKE.SWIGPendingException.Pending) throw XapianPINVOKE.SWIGPendingException.Retrieve();
  }

  public Database(string path) : this(XapianPINVOKE.new_Database__SWIG_2(path), true) {
    if (XapianPINVOKE.SWIGPendingException.Pending) throw XapianPINVOKE.SWIGPendingException.Retrieve();
  }

  public Database(int fd, int flags) : this(XapianPINVOKE.new_Database__SWIG_3(fd, flags), true) {
    if (XapianPINVOKE.SWIGPendingException.Pending) throw XapianPINVOKE.SWIGPendingException.Retrieve();
  }

  public Database(int fd) : this(XapianPINVOKE.new_Database__SWIG_4(fd), true) {
    if (XapianPINVOKE.SWIGPendingException.Pending) throw XapianPINVOKE.SWIGPendingException.Retrieve();
  }

  public bool Reopen() {
    bool ret = XapianPINVOKE.Database_Reopen(swigCPtr);
    if (XapianPINVOKE.SWIGPendingException.Pending) throw XapianPINVOKE.SWIGPendingException.Retrieve();
    return ret;
  }

  public virtual void Close() {
    XapianPINVOKE.Database_Close(swigCPtr);
    if (XapianPINVOKE.SWIGPendingException.Pending) throw XapianPINVOKE.SWIGPendingException.Retrieve();
  }

  public virtual string GetDescription() {
    string ret = XapianPINVOKE.Database_GetDescription(swigCPtr);
    if (XapianPINVOKE.SWIGPendingException.Pending) throw XapianPINVOKE.SWIGPendingException.Retrieve();
    return ret;
  }

  public PostingIterator PostListBegin(string tname) {
    PostingIterator ret = new PostingIterator(XapianPINVOKE.Database_PostListBegin(swigCPtr, tname), true);
    if (XapianPINVOKE.SWIGPendingException.Pending) throw XapianPINVOKE.SWIGPendingException.Retrieve();
    return ret;
  }

  public PostingIterator PostListEnd(string arg0) {
    PostingIterator ret = new PostingIterator(XapianPINVOKE.Database_PostListEnd(swigCPtr, arg0), true);
    if (XapianPINVOKE.SWIGPendingException.Pending) throw XapianPINVOKE.SWIGPendingException.Retrieve();
    return ret;
  }

  public TermIterator TermListBegin(uint did) {
    TermIterator ret = new TermIterator(XapianPINVOKE.Database_TermListBegin(swigCPtr, did), true);
    if (XapianPINVOKE.SWIGPendingException.Pending) throw XapianPINVOKE.SWIGPendingException.Retrieve();
    return ret;
  }

  public TermIterator TermListEnd(uint arg0) {
    TermIterator ret = new TermIterator(XapianPINVOKE.Database_TermListEnd(swigCPtr, arg0), true);
    if (XapianPINVOKE.SWIGPendingException.Pending) throw XapianPINVOKE.SWIGPendingException.Retrieve();
    return ret;
  }

  public bool HasPositions() {
    bool ret = XapianPINVOKE.Database_HasPositions(swigCPtr);
    if (XapianPINVOKE.SWIGPendingException.Pending) throw XapianPINVOKE.SWIGPendingException.Retrieve();
    return ret;
  }

  public PositionIterator PositionListBegin(uint did, string tname) {
    PositionIterator ret = new PositionIterator(XapianPINVOKE.Database_PositionListBegin(swigCPtr, did, tname), true);
    if (XapianPINVOKE.SWIGPendingException.Pending) throw XapianPINVOKE.SWIGPendingException.Retrieve();
    return ret;
  }

  public PositionIterator PositionListEnd(uint arg0, string arg1) {
    PositionIterator ret = new PositionIterator(XapianPINVOKE.Database_PositionListEnd(swigCPtr, arg0, arg1), true);
    if (XapianPINVOKE.SWIGPendingException.Pending) throw XapianPINVOKE.SWIGPendingException.Retrieve();
    return ret;
  }

  public TermIterator AllTermsBegin(string prefix) {
    TermIterator ret = new TermIterator(XapianPINVOKE.Database_AllTermsBegin__SWIG_0(swigCPtr, prefix), true);
    if (XapianPINVOKE.SWIGPendingException.Pending) throw XapianPINVOKE.SWIGPendingException.Retrieve();
    return ret;
  }

  public TermIterator AllTermsBegin() {
    TermIterator ret = new TermIterator(XapianPINVOKE.Database_AllTermsBegin__SWIG_1(swigCPtr), true);
    if (XapianPINVOKE.SWIGPendingException.Pending) throw XapianPINVOKE.SWIGPendingException.Retrieve();
    return ret;
  }

  public TermIterator AllTermsEnd(string arg0) {
    TermIterator ret = new TermIterator(XapianPINVOKE.Database_AllTermsEnd__SWIG_0(swigCPtr, arg0), true);
    if (XapianPINVOKE.SWIGPendingException.Pending) throw XapianPINVOKE.SWIGPendingException.Retrieve();
    return ret;
  }

  public TermIterator AllTermsEnd() {
    TermIterator ret = new TermIterator(XapianPINVOKE.Database_AllTermsEnd__SWIG_1(swigCPtr), true);
    if (XapianPINVOKE.SWIGPendingException.Pending) throw XapianPINVOKE.SWIGPendingException.Retrieve();
    return ret;
  }

  public uint GetDocCount() {
    uint ret = XapianPINVOKE.Database_GetDocCount(swigCPtr);
    if (XapianPINVOKE.SWIGPendingException.Pending) throw XapianPINVOKE.SWIGPendingException.Retrieve();
    return ret;
  }

  public uint GetLastDocId() {
    uint ret = XapianPINVOKE.Database_GetLastDocId(swigCPtr);
    if (XapianPINVOKE.SWIGPendingException.Pending) throw XapianPINVOKE.SWIGPendingException.Retrieve();
    return ret;
  }

  public double GetAvLength() {
    double ret = XapianPINVOKE.Database_GetAvLength(swigCPtr);
    if (XapianPINVOKE.SWIGPendingException.Pending) throw XapianPINVOKE.SWIGPendingException.Retrieve();
    return ret;
  }

  public double GetAverageLength() {
    double ret = XapianPINVOKE.Database_GetAverageLength(swigCPtr);
    if (XapianPINVOKE.SWIGPendingException.Pending) throw XapianPINVOKE.SWIGPendingException.Retrieve();
    return ret;
  }

  public uint GetTotalLength() {
    uint ret = XapianPINVOKE.Database_GetTotalLength(swigCPtr);
    if (XapianPINVOKE.SWIGPendingException.Pending) throw XapianPINVOKE.SWIGPendingException.Retrieve();
    return ret;
  }

  public uint GetTermFreq(string tname) {
    uint ret = XapianPINVOKE.Database_GetTermFreq(swigCPtr, tname);
    if (XapianPINVOKE.SWIGPendingException.Pending) throw XapianPINVOKE.SWIGPendingException.Retrieve();
    return ret;
  }

  public bool TermExists(string tname) {
    bool ret = XapianPINVOKE.Database_TermExists(swigCPtr, tname);
    if (XapianPINVOKE.SWIGPendingException.Pending) throw XapianPINVOKE.SWIGPendingException.Retrieve();
    return ret;
  }

  public uint GetCollectionFreq(string tname) {
    uint ret = XapianPINVOKE.Database_GetCollectionFreq(swigCPtr, tname);
    if (XapianPINVOKE.SWIGPendingException.Pending) throw XapianPINVOKE.SWIGPendingException.Retrieve();
    return ret;
  }

  public uint GetValueFreq(uint slot) {
    uint ret = XapianPINVOKE.Database_GetValueFreq(swigCPtr, slot);
    if (XapianPINVOKE.SWIGPendingException.Pending) throw XapianPINVOKE.SWIGPendingException.Retrieve();
    return ret;
  }

  public string GetValueLowerBound(uint slot) {
    string ret = XapianPINVOKE.Database_GetValueLowerBound(swigCPtr, slot);
    if (XapianPINVOKE.SWIGPendingException.Pending) throw XapianPINVOKE.SWIGPendingException.Retrieve();
    return ret;
  }

  public string GetValueUpperBound(uint slot) {
    string ret = XapianPINVOKE.Database_GetValueUpperBound(swigCPtr, slot);
    if (XapianPINVOKE.SWIGPendingException.Pending) throw XapianPINVOKE.SWIGPendingException.Retrieve();
    return ret;
  }

  public uint GetDoclengthLowerBound() {
    uint ret = XapianPINVOKE.Database_GetDoclengthLowerBound(swigCPtr);
    if (XapianPINVOKE.SWIGPendingException.Pending) throw XapianPINVOKE.SWIGPendingException.Retrieve();
    return ret;
  }

  public uint GetDoclengthUpperBound() {
    uint ret = XapianPINVOKE.Database_GetDoclengthUpperBound(swigCPtr);
    if (XapianPINVOKE.SWIGPendingException.Pending) throw XapianPINVOKE.SWIGPendingException.Retrieve();
    return ret;
  }

  public uint GetWdfUpperBound(string term) {
    uint ret = XapianPINVOKE.Database_GetWdfUpperBound(swigCPtr, term);
    if (XapianPINVOKE.SWIGPendingException.Pending) throw XapianPINVOKE.SWIGPendingException.Retrieve();
    return ret;
  }

  public ValueIterator ValuestreamBegin(uint slot) {
    ValueIterator ret = new ValueIterator(XapianPINVOKE.Database_ValuestreamBegin(swigCPtr, slot), true);
    if (XapianPINVOKE.SWIGPendingException.Pending) throw XapianPINVOKE.SWIGPendingException.Retrieve();
    return ret;
  }

  public ValueIterator ValuestreamEnd(uint arg0) {
    ValueIterator ret = new ValueIterator(XapianPINVOKE.Database_ValuestreamEnd(swigCPtr, arg0), true);
    if (XapianPINVOKE.SWIGPendingException.Pending) throw XapianPINVOKE.SWIGPendingException.Retrieve();
    return ret;
  }

  public uint GetDocLength(uint did) {
    uint ret = XapianPINVOKE.Database_GetDocLength(swigCPtr, did);
    if (XapianPINVOKE.SWIGPendingException.Pending) throw XapianPINVOKE.SWIGPendingException.Retrieve();
    return ret;
  }

  public uint GetUniqueTerms(uint did) {
    uint ret = XapianPINVOKE.Database_GetUniqueTerms(swigCPtr, did);
    if (XapianPINVOKE.SWIGPendingException.Pending) throw XapianPINVOKE.SWIGPendingException.Retrieve();
    return ret;
  }

  public void KeepAlive() {
    XapianPINVOKE.Database_KeepAlive(swigCPtr);
    if (XapianPINVOKE.SWIGPendingException.Pending) throw XapianPINVOKE.SWIGPendingException.Retrieve();
  }

  public Document GetDocument(uint did) {
    Document ret = new Document(XapianPINVOKE.Database_GetDocument__SWIG_0(swigCPtr, did), true);
    if (XapianPINVOKE.SWIGPendingException.Pending) throw XapianPINVOKE.SWIGPendingException.Retrieve();
    return ret;
  }

  public Document GetDocument(uint did, uint flags) {
    Document ret = new Document(XapianPINVOKE.Database_GetDocument__SWIG_1(swigCPtr, did, flags), true);
    if (XapianPINVOKE.SWIGPendingException.Pending) throw XapianPINVOKE.SWIGPendingException.Retrieve();
    return ret;
  }

  public string GetSpellingSuggestion(string word, uint max_edit_distance) {
    string ret = XapianPINVOKE.Database_GetSpellingSuggestion__SWIG_0(swigCPtr, word, max_edit_distance);
    if (XapianPINVOKE.SWIGPendingException.Pending) throw XapianPINVOKE.SWIGPendingException.Retrieve();
    return ret;
  }

  public string GetSpellingSuggestion(string word) {
    string ret = XapianPINVOKE.Database_GetSpellingSuggestion__SWIG_1(swigCPtr, word);
    if (XapianPINVOKE.SWIGPendingException.Pending) throw XapianPINVOKE.SWIGPendingException.Retrieve();
    return ret;
  }

  public TermIterator SpellingsBegin() {
    TermIterator ret = new TermIterator(XapianPINVOKE.Database_SpellingsBegin(swigCPtr), true);
    if (XapianPINVOKE.SWIGPendingException.Pending) throw XapianPINVOKE.SWIGPendingException.Retrieve();
    return ret;
  }

  public TermIterator SpellingsEnd() {
    TermIterator ret = new TermIterator(XapianPINVOKE.Database_SpellingsEnd(swigCPtr), true);
    if (XapianPINVOKE.SWIGPendingException.Pending) throw XapianPINVOKE.SWIGPendingException.Retrieve();
    return ret;
  }

  public TermIterator SynonymsBegin(string term) {
    TermIterator ret = new TermIterator(XapianPINVOKE.Database_SynonymsBegin(swigCPtr, term), true);
    if (XapianPINVOKE.SWIGPendingException.Pending) throw XapianPINVOKE.SWIGPendingException.Retrieve();
    return ret;
  }

  public TermIterator SynonymsEnd(string arg0) {
    TermIterator ret = new TermIterator(XapianPINVOKE.Database_SynonymsEnd(swigCPtr, arg0), true);
    if (XapianPINVOKE.SWIGPendingException.Pending) throw XapianPINVOKE.SWIGPendingException.Retrieve();
    return ret;
  }

  public TermIterator SynonymKeysBegin(string prefix) {
    TermIterator ret = new TermIterator(XapianPINVOKE.Database_SynonymKeysBegin__SWIG_0(swigCPtr, prefix), true);
    if (XapianPINVOKE.SWIGPendingException.Pending) throw XapianPINVOKE.SWIGPendingException.Retrieve();
    return ret;
  }

  public TermIterator SynonymKeysBegin() {
    TermIterator ret = new TermIterator(XapianPINVOKE.Database_SynonymKeysBegin__SWIG_1(swigCPtr), true);
    if (XapianPINVOKE.SWIGPendingException.Pending) throw XapianPINVOKE.SWIGPendingException.Retrieve();
    return ret;
  }

  public TermIterator SynonymKeysEnd(string arg0) {
    TermIterator ret = new TermIterator(XapianPINVOKE.Database_SynonymKeysEnd__SWIG_0(swigCPtr, arg0), true);
    if (XapianPINVOKE.SWIGPendingException.Pending) throw XapianPINVOKE.SWIGPendingException.Retrieve();
    return ret;
  }

  public TermIterator SynonymKeysEnd() {
    TermIterator ret = new TermIterator(XapianPINVOKE.Database_SynonymKeysEnd__SWIG_1(swigCPtr), true);
    if (XapianPINVOKE.SWIGPendingException.Pending) throw XapianPINVOKE.SWIGPendingException.Retrieve();
    return ret;
  }

  public string GetMetadata(string key) {
    string ret = XapianPINVOKE.Database_GetMetadata(swigCPtr, key);
    if (XapianPINVOKE.SWIGPendingException.Pending) throw XapianPINVOKE.SWIGPendingException.Retrieve();
    return ret;
  }

  public TermIterator MetadataKeysBegin(string prefix) {
    TermIterator ret = new TermIterator(XapianPINVOKE.Database_MetadataKeysBegin__SWIG_0(swigCPtr, prefix), true);
    if (XapianPINVOKE.SWIGPendingException.Pending) throw XapianPINVOKE.SWIGPendingException.Retrieve();
    return ret;
  }

  public TermIterator MetadataKeysBegin() {
    TermIterator ret = new TermIterator(XapianPINVOKE.Database_MetadataKeysBegin__SWIG_1(swigCPtr), true);
    if (XapianPINVOKE.SWIGPendingException.Pending) throw XapianPINVOKE.SWIGPendingException.Retrieve();
    return ret;
  }

  public TermIterator MetadataKeysEnd(string arg0) {
    TermIterator ret = new TermIterator(XapianPINVOKE.Database_MetadataKeysEnd__SWIG_0(swigCPtr, arg0), true);
    if (XapianPINVOKE.SWIGPendingException.Pending) throw XapianPINVOKE.SWIGPendingException.Retrieve();
    return ret;
  }

  public TermIterator MetadataKeysEnd() {
    TermIterator ret = new TermIterator(XapianPINVOKE.Database_MetadataKeysEnd__SWIG_1(swigCPtr), true);
    if (XapianPINVOKE.SWIGPendingException.Pending) throw XapianPINVOKE.SWIGPendingException.Retrieve();
    return ret;
  }

  public string GetUuid() {
    string ret = XapianPINVOKE.Database_GetUuid(swigCPtr);
    if (XapianPINVOKE.SWIGPendingException.Pending) throw XapianPINVOKE.SWIGPendingException.Retrieve();
    return ret;
  }

  public bool Locked() {
    bool ret = XapianPINVOKE.Database_Locked(swigCPtr);
    if (XapianPINVOKE.SWIGPendingException.Pending) throw XapianPINVOKE.SWIGPendingException.Retrieve();
    return ret;
  }

  public uint GetRevision() {
    uint ret = XapianPINVOKE.Database_GetRevision(swigCPtr);
    if (XapianPINVOKE.SWIGPendingException.Pending) throw XapianPINVOKE.SWIGPendingException.Retrieve();
    return ret;
  }

  public static uint Check(string path, int opts) {
    uint ret = XapianPINVOKE.Database_Check__SWIG_0(path, opts);
    if (XapianPINVOKE.SWIGPendingException.Pending) throw XapianPINVOKE.SWIGPendingException.Retrieve();
    return ret;
  }

  public static uint Check(string path) {
    uint ret = XapianPINVOKE.Database_Check__SWIG_1(path);
    if (XapianPINVOKE.SWIGPendingException.Pending) throw XapianPINVOKE.SWIGPendingException.Retrieve();
    return ret;
  }

  public static uint Check(int fd, int opts) {
    uint ret = XapianPINVOKE.Database_Check__SWIG_2(fd, opts);
    if (XapianPINVOKE.SWIGPendingException.Pending) throw XapianPINVOKE.SWIGPendingException.Retrieve();
    return ret;
  }

  public static uint Check(int fd) {
    uint ret = XapianPINVOKE.Database_Check__SWIG_3(fd);
    if (XapianPINVOKE.SWIGPendingException.Pending) throw XapianPINVOKE.SWIGPendingException.Retrieve();
    return ret;
  }

  public void Compact(string output, uint flags, int block_size) {
    XapianPINVOKE.Database_Compact__SWIG_0(swigCPtr, output, flags, block_size);
    if (XapianPINVOKE.SWIGPendingException.Pending) throw XapianPINVOKE.SWIGPendingException.Retrieve();
  }

  public void Compact(string output, uint flags) {
    XapianPINVOKE.Database_Compact__SWIG_1(swigCPtr, output, flags);
    if (XapianPINVOKE.SWIGPendingException.Pending) throw XapianPINVOKE.SWIGPendingException.Retrieve();
  }

  public void Compact(string output) {
    XapianPINVOKE.Database_Compact__SWIG_2(swigCPtr, output);
    if (XapianPINVOKE.SWIGPendingException.Pending) throw XapianPINVOKE.SWIGPendingException.Retrieve();
  }

  public void Compact(int fd, uint flags, int block_size) {
    XapianPINVOKE.Database_Compact__SWIG_3(swigCPtr, fd, flags, block_size);
    if (XapianPINVOKE.SWIGPendingException.Pending) throw XapianPINVOKE.SWIGPendingException.Retrieve();
  }

  public void Compact(int fd, uint flags) {
    XapianPINVOKE.Database_Compact__SWIG_4(swigCPtr, fd, flags);
    if (XapianPINVOKE.SWIGPendingException.Pending) throw XapianPINVOKE.SWIGPendingException.Retrieve();
  }

  public void Compact(int fd) {
    XapianPINVOKE.Database_Compact__SWIG_5(swigCPtr, fd);
    if (XapianPINVOKE.SWIGPendingException.Pending) throw XapianPINVOKE.SWIGPendingException.Retrieve();
  }

  public void Compact(string output, uint flags, int block_size, Compactor compactor) {
    XapianPINVOKE.Database_Compact__SWIG_6(swigCPtr, output, flags, block_size, Compactor.getCPtr(compactor));
    if (XapianPINVOKE.SWIGPendingException.Pending) throw XapianPINVOKE.SWIGPendingException.Retrieve();
  }

  public void Compact(int fd, uint flags, int block_size, Compactor compactor) {
    XapianPINVOKE.Database_Compact__SWIG_7(swigCPtr, fd, flags, block_size, Compactor.getCPtr(compactor));
    if (XapianPINVOKE.SWIGPendingException.Pending) throw XapianPINVOKE.SWIGPendingException.Retrieve();
  }

}

}