1 /* ----------------------------------------------------------------------------
2  * This file was automatically generated by SWIG (http://www.swig.org).
3  * Version 2.0.4
4  *
5  * Do not make changes to this file unless you know what you are doing--modify
6  * the SWIG interface file instead.
7  * ----------------------------------------------------------------------------- */
8 
9 namespace BerkeleyDB.Internal {
10 
11 using System;
12 using System.Runtime.InteropServices;
13 
14 internal class DB : IDisposable {
15   private HandleRef swigCPtr;
16   protected bool swigCMemOwn;
17 
DB(IntPtr cPtr, bool cMemoryOwn)18   internal DB(IntPtr cPtr, bool cMemoryOwn) {
19     swigCMemOwn = cMemoryOwn;
20     swigCPtr = new HandleRef(this, cPtr);
21   }
22 
getCPtr(DB obj)23   internal static HandleRef getCPtr(DB obj) {
24     return (obj == null) ? new HandleRef(null, IntPtr.Zero) : obj.swigCPtr;
25   }
26 
Dispose()27   public virtual void Dispose()  {
28     lock(this) {
29       if(swigCPtr.Handle != IntPtr.Zero && swigCMemOwn) {
30         swigCMemOwn = false;
31       }
32       swigCPtr = new HandleRef(null, IntPtr.Zero);
33       GC.SuppressFinalize(this);
34     }
35 }
36 
cursor(DB_TXN txn, uint flags)37 	internal DBC cursor(DB_TXN txn, uint flags) {
38 		int err = 0;
39 		DBC ret = cursor(txn, flags, ref err);
40 		DatabaseException.ThrowException(err);
41 		return ret;
42 	}
43 
join(IntPtr[] curslist, uint flags)44 	internal DBC join(IntPtr[] curslist, uint flags) {
45 		int err = 0;
46 		DBC ret = join(curslist, flags, ref err);
47 		DatabaseException.ThrowException(err);
48 		return ret;
49 	}
50 
stat_bt(DB_TXN txn, uint flags)51 	internal BTreeStatStruct stat_bt(DB_TXN txn, uint flags) {
52 		int err = 0;
53 		IntPtr ptr = stat(txn, flags, ref err);
54 		DatabaseException.ThrowException(err);
55 		BTreeStatStruct ret = (BTreeStatStruct)Marshal.PtrToStructure(ptr, typeof(BTreeStatStruct));
56 		libdb_csharp.__os_ufree(null, ptr);
57 		return ret;
58 	}
stat_hash(DB_TXN txn, uint flags)59 	internal HashStatStruct stat_hash(DB_TXN txn, uint flags) {
60 		int err = 0;
61 		IntPtr ptr = stat(txn, flags, ref err);
62 		DatabaseException.ThrowException(err);
63 		HashStatStruct ret = (HashStatStruct)Marshal.PtrToStructure(ptr, typeof(HashStatStruct));
64 		libdb_csharp.__os_ufree(null, ptr);
65 		return ret;
66 	}
stat_heap(DB_TXN txn, uint flags)67 	internal HeapStatStruct stat_heap(DB_TXN txn, uint flags) {
68 		int err = 0;
69 		IntPtr ptr = stat(txn, flags, ref err);
70 		DatabaseException.ThrowException(err);
71 		HeapStatStruct ret = (HeapStatStruct)Marshal.PtrToStructure(ptr, typeof(HeapStatStruct));
72 		libdb_csharp.__os_ufree(null, ptr);
73 		return ret;
74 	}
stat_qam(DB_TXN txn, uint flags)75 	internal QueueStatStruct stat_qam(DB_TXN txn, uint flags) {
76 		int err = 0;
77 		IntPtr ptr = stat(txn, flags, ref err);
78 		DatabaseException.ThrowException(err);
79 		QueueStatStruct ret = (QueueStatStruct)Marshal.PtrToStructure(ptr, typeof(QueueStatStruct));
80 		libdb_csharp.__os_ufree(null, ptr);
81 		return ret;
82 	}
83 
get_dbname(out string filenamep, out string dbnamep)84 	internal int get_dbname(out string filenamep, out string dbnamep) {
85 		int ret;
86 		IntPtr fp, dp;
87 		filenamep = dbnamep = null;
88 		ret = get_dbname(out fp, out dp);
89 		filenamep = Marshal.PtrToStringAnsi(fp);
90 		dbnamep = Marshal.PtrToStringAnsi(dp);
91 		return ret;
92 	}
93 
get_re_source(out string source)94 	internal int get_re_source(out string source) {
95 		int ret;
96 		IntPtr sp;
97 		ret = get_re_source(out sp);
98 		source = Marshal.PtrToStringAnsi(sp);
99 		return ret;
100 	}
101 
102   internal BaseDatabase api_internal {
103     set {
104       libdb_csharpPINVOKE.DB_api_internal_set(swigCPtr, value);
105     }
106 		get { return libdb_csharpPINVOKE.DB_api_internal_get(swigCPtr); }
107 
108   }
109 
set_usercopy(DBTCopyDelegate dbt_usercopy)110   internal int set_usercopy(DBTCopyDelegate dbt_usercopy) {
111 		int ret;
112 		ret = libdb_csharpPINVOKE.DB_set_usercopy(swigCPtr, dbt_usercopy);
113 		DatabaseException.ThrowException(ret);
114 		return ret;
115 }
116 
DB(DB_ENV env, uint flags)117   internal DB(DB_ENV env, uint flags) : this(libdb_csharpPINVOKE.new_DB(DB_ENV.getCPtr(env), flags), true) {
118   }
119 
associate(DB_TXN txn, DB sec, BDB_AssociateDelegate callback, uint flags)120   internal int associate(DB_TXN txn, DB sec, BDB_AssociateDelegate callback, uint flags) {
121 		int ret;
122 		ret = libdb_csharpPINVOKE.DB_associate(swigCPtr, DB_TXN.getCPtr(txn), DB.getCPtr(sec), callback, flags);
123 		DatabaseException.ThrowException(ret);
124 		return ret;
125 }
126 
associate_foreign(DB dbp, BDB_AssociateForeignDelegate callback, uint flags)127   internal int associate_foreign(DB dbp, BDB_AssociateForeignDelegate callback, uint flags) {
128 		int ret;
129 		ret = libdb_csharpPINVOKE.DB_associate_foreign(swigCPtr, DB.getCPtr(dbp), callback, flags);
130 		DatabaseException.ThrowException(ret);
131 		return ret;
132 }
133 
close(uint flags)134   internal int close(uint flags) {
135 		int ret = libdb_csharpPINVOKE.DB_close(swigCPtr, flags);
136 		if (ret == 0)
137 			/* Close is a db handle destructor.  Reflect that in the wrapper class. */
138 			swigCPtr = new HandleRef(null, IntPtr.Zero);
139 		else
140 			DatabaseException.ThrowException(ret);
141 		return ret;
142 }
143 
compact(DB_TXN txn, DatabaseEntry start, DatabaseEntry stop, DB_COMPACT cdata, uint flags, DatabaseEntry end)144   internal int compact(DB_TXN txn, DatabaseEntry start, DatabaseEntry stop, DB_COMPACT cdata, uint flags, DatabaseEntry end) {
145     try {
146 		int ret;
147 		ret = libdb_csharpPINVOKE.DB_compact(swigCPtr, DB_TXN.getCPtr(txn), DBT.getCPtr(DatabaseEntry.getDBT(start)), DBT.getCPtr(DatabaseEntry.getDBT(stop)), DB_COMPACT.getCPtr(cdata), flags, DBT.getCPtr(DatabaseEntry.getDBT(end)));
148 		DatabaseException.ThrowException(ret);
149 		return ret;
150 } finally {
151       GC.KeepAlive(start);
152       GC.KeepAlive(stop);
153       GC.KeepAlive(end);
154     }
155   }
156 
cursor(DB_TXN txn, uint flags, ref int err)157   private DBC cursor(DB_TXN txn, uint flags, ref int err) {
158     IntPtr cPtr = libdb_csharpPINVOKE.DB_cursor(swigCPtr, DB_TXN.getCPtr(txn), flags, ref err);
159     DBC ret = (cPtr == IntPtr.Zero) ? null : new DBC(cPtr, false);
160     return ret;
161   }
162 
del(DB_TXN txn, DatabaseEntry key, uint flags)163   internal int del(DB_TXN txn, DatabaseEntry key, uint flags) {
164     try {
165 		int ret;
166 		ret = libdb_csharpPINVOKE.DB_del(swigCPtr, DB_TXN.getCPtr(txn), DBT.getCPtr(DatabaseEntry.getDBT(key)), flags);
167 		DatabaseException.ThrowException(ret);
168 		return ret;
169 } finally {
170       GC.KeepAlive(key);
171     }
172   }
173 
env()174   internal DB_ENV env() {
175     IntPtr cPtr = libdb_csharpPINVOKE.DB_env(swigCPtr);
176     DB_ENV ret = (cPtr == IntPtr.Zero) ? null : new DB_ENV(cPtr, false);
177     return ret;
178   }
179 
exists(DB_TXN txn, DatabaseEntry key, uint flags)180   internal int exists(DB_TXN txn, DatabaseEntry key, uint flags) {
181     try {
182 		int ret;
183 		ret = libdb_csharpPINVOKE.DB_exists(swigCPtr, DB_TXN.getCPtr(txn), DBT.getCPtr(DatabaseEntry.getDBT(key)), flags);
184 		DatabaseException.ThrowException(ret);
185 		return ret;
186 } finally {
187       GC.KeepAlive(key);
188     }
189   }
190 
get(DB_TXN txn, DatabaseEntry key, DatabaseEntry data, uint flags)191   internal int get(DB_TXN txn, DatabaseEntry key, DatabaseEntry data, uint flags) {
192     try {
193 		int ret;
194 		ret = libdb_csharpPINVOKE.DB_get(swigCPtr, DB_TXN.getCPtr(txn), DBT.getCPtr(DatabaseEntry.getDBT(key)), DBT.getCPtr(DatabaseEntry.getDBT(data)), flags);
195 		DatabaseException.ThrowException(ret);
196 		return ret;
197 } finally {
198       GC.KeepAlive(key);
199       GC.KeepAlive(data);
200     }
201   }
202 
get_byteswapped(ref int isswapped)203   internal int get_byteswapped(ref int isswapped) {
204 		int ret;
205 		ret = libdb_csharpPINVOKE.DB_get_byteswapped(swigCPtr, ref isswapped);
206 		DatabaseException.ThrowException(ret);
207 		return ret;
208 }
209 
get_dbname(out IntPtr filenamep, out IntPtr dbnamep)210   internal int get_dbname(out IntPtr filenamep, out IntPtr dbnamep) {
211 		int ret;
212 		ret = libdb_csharpPINVOKE.DB_get_dbname(swigCPtr, out filenamep, out dbnamep);
213 		DatabaseException.ThrowException(ret);
214 		return ret;
215 }
216 
get_multiple()217   internal int get_multiple() {
218 		return libdb_csharpPINVOKE.DB_get_multiple(swigCPtr);
219 }
220 
get_open_flags(ref uint flags)221   internal int get_open_flags(ref uint flags) {
222 		int ret;
223 		ret = libdb_csharpPINVOKE.DB_get_open_flags(swigCPtr, ref flags);
224 		DatabaseException.ThrowException(ret);
225 		return ret;
226 }
227 
get_transactional()228   internal int get_transactional() {
229 		return libdb_csharpPINVOKE.DB_get_transactional(swigCPtr);
230 }
231 
get_type(ref DBTYPE type)232   internal int get_type(ref DBTYPE type) {
233 		int ret;
234 		ret = libdb_csharpPINVOKE.DB_get_type(swigCPtr, ref type);
235 		DatabaseException.ThrowException(ret);
236 		return ret;
237 }
238 
join(IntPtr[] curslist, uint flags, ref int err)239   private DBC join(IntPtr[] curslist, uint flags, ref int err) {
240     IntPtr cPtr = libdb_csharpPINVOKE.DB_join(swigCPtr, curslist, flags, ref err);
241     DBC ret = (cPtr == IntPtr.Zero) ? null : new DBC(cPtr, false);
242     return ret;
243   }
244 
key_range(DB_TXN txn, DatabaseEntry key, DB_KEY_RANGE range, uint flags)245   internal int key_range(DB_TXN txn, DatabaseEntry key, DB_KEY_RANGE range, uint flags) {
246     try {
247 		int ret;
248 		ret = libdb_csharpPINVOKE.DB_key_range(swigCPtr, DB_TXN.getCPtr(txn), DBT.getCPtr(DatabaseEntry.getDBT(key)), DB_KEY_RANGE.getCPtr(range), flags);
249 		DatabaseException.ThrowException(ret);
250 		return ret;
251 } finally {
252       GC.KeepAlive(key);
253     }
254   }
255 
open(DB_TXN txn, string file, string database, DBTYPE type, uint flags, int mode)256   internal int open(DB_TXN txn, string file, string database, DBTYPE type, uint flags, int mode) {
257 	int ret;
258 	ret = libdb_csharpPINVOKE.DB_open(swigCPtr, DB_TXN.getCPtr(txn), file, database, (int)type, flags, mode);
259 	if (ret != 0)
260 		close(0);
261 	DatabaseException.ThrowException(ret);
262 	return ret;
263 }
264 
pget(DB_TXN txn, DatabaseEntry key, DatabaseEntry pkey, DatabaseEntry data, uint flags)265   internal int pget(DB_TXN txn, DatabaseEntry key, DatabaseEntry pkey, DatabaseEntry data, uint flags) {
266     try {
267 		int ret;
268 		ret = libdb_csharpPINVOKE.DB_pget(swigCPtr, DB_TXN.getCPtr(txn), DBT.getCPtr(DatabaseEntry.getDBT(key)), DBT.getCPtr(DatabaseEntry.getDBT(pkey)), DBT.getCPtr(DatabaseEntry.getDBT(data)), flags);
269 		DatabaseException.ThrowException(ret);
270 		return ret;
271 } finally {
272       GC.KeepAlive(key);
273       GC.KeepAlive(pkey);
274       GC.KeepAlive(data);
275     }
276   }
277 
put(DB_TXN txn, DatabaseEntry key, DatabaseEntry data, uint flags)278   internal int put(DB_TXN txn, DatabaseEntry key, DatabaseEntry data, uint flags) {
279     try {
280 		int ret;
281 		ret = libdb_csharpPINVOKE.DB_put(swigCPtr, DB_TXN.getCPtr(txn), DBT.getCPtr(DatabaseEntry.getDBT(key)), DBT.getCPtr(DatabaseEntry.getDBT(data)), flags);
282 		DatabaseException.ThrowException(ret);
283 		return ret;
284 } finally {
285       GC.KeepAlive(key);
286       GC.KeepAlive(data);
287     }
288   }
289 
remove(string file, string database, uint flags)290   internal int remove(string file, string database, uint flags) {
291 	int ret;
292 	ret = libdb_csharpPINVOKE.DB_remove(swigCPtr, file, database, flags);
293 	/*
294 	 * remove is a handle destructor, regardless of whether the remove
295 	 * succeeds.  Reflect that in the wrapper class.
296 	 */
297 	swigCPtr = new HandleRef(null, IntPtr.Zero);
298 	DatabaseException.ThrowException(ret);
299 	return ret;
300 }
301 
rename(string file, string database, string newname, uint flags)302   internal int rename(string file, string database, string newname, uint flags) {
303 	int ret;
304 	ret = libdb_csharpPINVOKE.DB_rename(swigCPtr, file, database, newname, flags);
305 	/*
306 	 * rename is a handle destructor, regardless of whether the rename
307 	 * succeeds.  Reflect that in the wrapper class.
308 	 */
309 	swigCPtr = new HandleRef(null, IntPtr.Zero);
310 	DatabaseException.ThrowException(ret);
311 	return ret;
312 }
313 
set_append_recno(BDB_AppendRecnoDelegate callback)314   internal int set_append_recno(BDB_AppendRecnoDelegate callback) {
315 		int ret;
316 		ret = libdb_csharpPINVOKE.DB_set_append_recno(swigCPtr, callback);
317 		DatabaseException.ThrowException(ret);
318 		return ret;
319 }
320 
set_bt_compare(BDB_CompareDelegate callback)321   internal int set_bt_compare(BDB_CompareDelegate callback) {
322 		int ret;
323 		ret = libdb_csharpPINVOKE.DB_set_bt_compare(swigCPtr, callback);
324 		DatabaseException.ThrowException(ret);
325 		return ret;
326 }
327 
set_bt_compress(BDB_CompressDelegate compress, BDB_DecompressDelegate decompress)328   internal int set_bt_compress(BDB_CompressDelegate compress, BDB_DecompressDelegate decompress) {
329 		int ret;
330 		ret = libdb_csharpPINVOKE.DB_set_bt_compress(swigCPtr, compress, decompress);
331 		DatabaseException.ThrowException(ret);
332 		return ret;
333 }
334 
get_bt_minkey(ref uint bt_minkey)335   internal int get_bt_minkey(ref uint bt_minkey) {
336 		int ret;
337 		ret = libdb_csharpPINVOKE.DB_get_bt_minkey(swigCPtr, ref bt_minkey);
338 		DatabaseException.ThrowException(ret);
339 		return ret;
340 }
341 
set_bt_minkey(uint bt_minkey)342   internal int set_bt_minkey(uint bt_minkey) {
343 		int ret;
344 		ret = libdb_csharpPINVOKE.DB_set_bt_minkey(swigCPtr, bt_minkey);
345 		DatabaseException.ThrowException(ret);
346 		return ret;
347 }
348 
set_bt_prefix(BDB_PrefixCompareDelegate callback)349   internal int set_bt_prefix(BDB_PrefixCompareDelegate callback) {
350 		int ret;
351 		ret = libdb_csharpPINVOKE.DB_set_bt_prefix(swigCPtr, callback);
352 		DatabaseException.ThrowException(ret);
353 		return ret;
354 }
355 
get_cachesize(ref uint gbytes, ref uint bytes, ref int ncache)356   internal int get_cachesize(ref uint gbytes, ref uint bytes, ref int ncache) {
357 		int ret;
358 		ret = libdb_csharpPINVOKE.DB_get_cachesize(swigCPtr, ref gbytes, ref bytes, ref ncache);
359 		DatabaseException.ThrowException(ret);
360 		return ret;
361 }
362 
set_cachesize(uint gbytes, uint bytes, int ncache)363   internal int set_cachesize(uint gbytes, uint bytes, int ncache) {
364 		int ret;
365 		ret = libdb_csharpPINVOKE.DB_set_cachesize(swigCPtr, gbytes, bytes, ncache);
366 		DatabaseException.ThrowException(ret);
367 		return ret;
368 }
369 
set_dup_compare(BDB_CompareDelegate callback)370   internal int set_dup_compare(BDB_CompareDelegate callback) {
371 		int ret;
372 		ret = libdb_csharpPINVOKE.DB_set_dup_compare(swigCPtr, callback);
373 		DatabaseException.ThrowException(ret);
374 		return ret;
375 }
376 
get_encrypt_flags(ref uint flags)377   internal int get_encrypt_flags(ref uint flags) {
378 		int ret;
379 		ret = libdb_csharpPINVOKE.DB_get_encrypt_flags(swigCPtr, ref flags);
380 		DatabaseException.ThrowException(ret);
381 		return ret;
382 }
383 
set_encrypt(string pwd, uint flags)384   internal int set_encrypt(string pwd, uint flags) {
385 		int ret;
386 		ret = libdb_csharpPINVOKE.DB_set_encrypt(swigCPtr, pwd, flags);
387 		DatabaseException.ThrowException(ret);
388 		return ret;
389 }
390 
set_errcall(BDB_ErrcallDelegate db_errcall_fcn)391   internal void set_errcall(BDB_ErrcallDelegate db_errcall_fcn) {
392     libdb_csharpPINVOKE.DB_set_errcall(swigCPtr, db_errcall_fcn);
393   }
394 
set_feedback(BDB_DbFeedbackDelegate callback)395   internal int set_feedback(BDB_DbFeedbackDelegate callback) {
396 		int ret;
397 		ret = libdb_csharpPINVOKE.DB_set_feedback(swigCPtr, callback);
398 		DatabaseException.ThrowException(ret);
399 		return ret;
400 }
401 
get_flags(ref uint flags)402   internal int get_flags(ref uint flags) {
403 		int ret;
404 		ret = libdb_csharpPINVOKE.DB_get_flags(swigCPtr, ref flags);
405 		DatabaseException.ThrowException(ret);
406 		return ret;
407 }
408 
set_flags(uint flags)409   internal int set_flags(uint flags) {
410 		int ret;
411 		ret = libdb_csharpPINVOKE.DB_set_flags(swigCPtr, flags);
412 		DatabaseException.ThrowException(ret);
413 		return ret;
414 }
415 
get_heapsize(ref uint gbytes, ref uint bytes)416   internal int get_heapsize(ref uint gbytes, ref uint bytes) {
417 		int ret;
418 		ret = libdb_csharpPINVOKE.DB_get_heapsize(swigCPtr, ref gbytes, ref bytes);
419 		DatabaseException.ThrowException(ret);
420 		return ret;
421 }
422 
set_heapsize(uint gbytes, uint bytes)423   internal int set_heapsize(uint gbytes, uint bytes) {
424 		int ret;
425 		ret = libdb_csharpPINVOKE.DB_set_heapsize(swigCPtr, gbytes, bytes);
426 		DatabaseException.ThrowException(ret);
427 		return ret;
428 }
429 
get_heap_regionsize(ref uint npages)430   internal int get_heap_regionsize(ref uint npages) {
431 		int ret;
432 		ret = libdb_csharpPINVOKE.DB_get_heap_regionsize(swigCPtr, ref npages);
433 		DatabaseException.ThrowException(ret);
434 		return ret;
435 }
436 
set_heap_regionsize(uint npages)437   internal int set_heap_regionsize(uint npages) {
438 		int ret;
439 		ret = libdb_csharpPINVOKE.DB_set_heap_regionsize(swigCPtr, npages);
440 		DatabaseException.ThrowException(ret);
441 		return ret;
442 }
443 
set_h_compare(BDB_CompareDelegate callback)444   internal int set_h_compare(BDB_CompareDelegate callback) {
445 		int ret;
446 		ret = libdb_csharpPINVOKE.DB_set_h_compare(swigCPtr, callback);
447 		DatabaseException.ThrowException(ret);
448 		return ret;
449 }
450 
get_h_ffactor(ref uint ffactor)451   internal int get_h_ffactor(ref uint ffactor) {
452 		int ret;
453 		ret = libdb_csharpPINVOKE.DB_get_h_ffactor(swigCPtr, ref ffactor);
454 		DatabaseException.ThrowException(ret);
455 		return ret;
456 }
457 
set_h_ffactor(uint ffactor)458   internal int set_h_ffactor(uint ffactor) {
459 		int ret;
460 		ret = libdb_csharpPINVOKE.DB_set_h_ffactor(swigCPtr, ffactor);
461 		DatabaseException.ThrowException(ret);
462 		return ret;
463 }
464 
set_h_hash(BDB_HashDelegate callback)465   internal int set_h_hash(BDB_HashDelegate callback) {
466 		int ret;
467 		ret = libdb_csharpPINVOKE.DB_set_h_hash(swigCPtr, callback);
468 		DatabaseException.ThrowException(ret);
469 		return ret;
470 }
471 
get_h_nelem(ref uint nelem)472   internal int get_h_nelem(ref uint nelem) {
473 		int ret;
474 		ret = libdb_csharpPINVOKE.DB_get_h_nelem(swigCPtr, ref nelem);
475 		DatabaseException.ThrowException(ret);
476 		return ret;
477 }
478 
set_h_nelem(uint nelem)479   internal int set_h_nelem(uint nelem) {
480 		int ret;
481 		ret = libdb_csharpPINVOKE.DB_set_h_nelem(swigCPtr, nelem);
482 		DatabaseException.ThrowException(ret);
483 		return ret;
484 }
485 
get_lk_exclusive(ref int onoff, ref int nowait)486   internal int get_lk_exclusive(ref int onoff, ref int nowait) {
487 		int ret;
488 		ret = libdb_csharpPINVOKE.DB_get_lk_exclusive(swigCPtr, ref onoff, ref nowait);
489 		DatabaseException.ThrowException(ret);
490 		return ret;
491 }
492 
set_lk_exclusive(int nowait)493   internal int set_lk_exclusive(int nowait) {
494 		int ret;
495 		ret = libdb_csharpPINVOKE.DB_set_lk_exclusive(swigCPtr, nowait);
496 		DatabaseException.ThrowException(ret);
497 		return ret;
498 }
499 
get_lorder(ref int lorder)500   internal int get_lorder(ref int lorder) {
501 		int ret;
502 		ret = libdb_csharpPINVOKE.DB_get_lorder(swigCPtr, ref lorder);
503 		DatabaseException.ThrowException(ret);
504 		return ret;
505 }
506 
set_lorder(int lorder)507   internal int set_lorder(int lorder) {
508 		int ret;
509 		ret = libdb_csharpPINVOKE.DB_set_lorder(swigCPtr, lorder);
510 		DatabaseException.ThrowException(ret);
511 		return ret;
512 }
513 
get_pagesize(ref uint pgsz)514   internal int get_pagesize(ref uint pgsz) {
515 		int ret;
516 		ret = libdb_csharpPINVOKE.DB_get_pagesize(swigCPtr, ref pgsz);
517 		DatabaseException.ThrowException(ret);
518 		return ret;
519 }
520 
set_pagesize(uint pgsz)521   internal int set_pagesize(uint pgsz) {
522 		int ret;
523 		ret = libdb_csharpPINVOKE.DB_set_pagesize(swigCPtr, pgsz);
524 		DatabaseException.ThrowException(ret);
525 		return ret;
526 }
527 
get_priority(ref uint flags)528   internal int get_priority(ref uint flags) {
529 		int ret;
530 		ret = libdb_csharpPINVOKE.DB_get_priority(swigCPtr, ref flags);
531 		DatabaseException.ThrowException(ret);
532 		return ret;
533 }
534 
set_priority(uint flags)535   internal int set_priority(uint flags) {
536 		int ret;
537 		ret = libdb_csharpPINVOKE.DB_set_priority(swigCPtr, flags);
538 		DatabaseException.ThrowException(ret);
539 		return ret;
540 }
541 
get_q_extentsize(ref uint extentsz)542   internal int get_q_extentsize(ref uint extentsz) {
543 		int ret;
544 		ret = libdb_csharpPINVOKE.DB_get_q_extentsize(swigCPtr, ref extentsz);
545 		DatabaseException.ThrowException(ret);
546 		return ret;
547 }
548 
set_q_extentsize(uint extentsz)549   internal int set_q_extentsize(uint extentsz) {
550 		int ret;
551 		ret = libdb_csharpPINVOKE.DB_set_q_extentsize(swigCPtr, extentsz);
552 		DatabaseException.ThrowException(ret);
553 		return ret;
554 }
555 
get_re_delim(ref int delim)556   internal int get_re_delim(ref int delim) {
557 		int ret;
558 		ret = libdb_csharpPINVOKE.DB_get_re_delim(swigCPtr, ref delim);
559 		DatabaseException.ThrowException(ret);
560 		return ret;
561 }
562 
set_re_delim(int delim)563   internal int set_re_delim(int delim) {
564 		int ret;
565 		ret = libdb_csharpPINVOKE.DB_set_re_delim(swigCPtr, delim);
566 		DatabaseException.ThrowException(ret);
567 		return ret;
568 }
569 
get_re_len(ref uint len)570   internal int get_re_len(ref uint len) {
571 		int ret;
572 		ret = libdb_csharpPINVOKE.DB_get_re_len(swigCPtr, ref len);
573 		DatabaseException.ThrowException(ret);
574 		return ret;
575 }
576 
set_re_len(uint len)577   internal int set_re_len(uint len) {
578 		int ret;
579 		ret = libdb_csharpPINVOKE.DB_set_re_len(swigCPtr, len);
580 		DatabaseException.ThrowException(ret);
581 		return ret;
582 }
583 
get_re_pad(ref int pad)584   internal int get_re_pad(ref int pad) {
585 		int ret;
586 		ret = libdb_csharpPINVOKE.DB_get_re_pad(swigCPtr, ref pad);
587 		DatabaseException.ThrowException(ret);
588 		return ret;
589 }
590 
set_re_pad(int pad)591   internal int set_re_pad(int pad) {
592 		int ret;
593 		ret = libdb_csharpPINVOKE.DB_set_re_pad(swigCPtr, pad);
594 		DatabaseException.ThrowException(ret);
595 		return ret;
596 }
597 
get_re_source(out IntPtr source)598   internal int get_re_source(out IntPtr source) {
599 		int ret;
600 		ret = libdb_csharpPINVOKE.DB_get_re_source(swigCPtr, out source);
601 		DatabaseException.ThrowException(ret);
602 		return ret;
603 }
604 
set_re_source(string source)605   internal int set_re_source(string source) {
606 		int ret;
607 		ret = libdb_csharpPINVOKE.DB_set_re_source(swigCPtr, source);
608 		DatabaseException.ThrowException(ret);
609 		return ret;
610 }
611 
stat(DB_TXN txnid, uint flags, ref int err)612   private IntPtr stat(DB_TXN txnid, uint flags, ref int err) {
613 	return libdb_csharpPINVOKE.DB_stat(swigCPtr, DB_TXN.getCPtr(txnid), flags, ref err);
614 }
615 
stat_print(uint flags)616   internal int stat_print(uint flags) {
617 		int ret;
618 		ret = libdb_csharpPINVOKE.DB_stat_print(swigCPtr, flags);
619 		DatabaseException.ThrowException(ret);
620 		return ret;
621 }
622 
sync(uint flags)623   internal int sync(uint flags) {
624 		int ret;
625 		ret = libdb_csharpPINVOKE.DB_sync(swigCPtr, flags);
626 		DatabaseException.ThrowException(ret);
627 		return ret;
628 }
629 
truncate(DB_TXN txn, ref uint countp, uint flags)630   internal int truncate(DB_TXN txn, ref uint countp, uint flags) {
631 		int ret;
632 		ret = libdb_csharpPINVOKE.DB_truncate(swigCPtr, DB_TXN.getCPtr(txn), ref countp, flags);
633 		DatabaseException.ThrowException(ret);
634 		return ret;
635 }
636 
upgrade(string file, uint flags)637   internal int upgrade(string file, uint flags) {
638 		int ret;
639 		ret = libdb_csharpPINVOKE.DB_upgrade(swigCPtr, file, flags);
640 		DatabaseException.ThrowException(ret);
641 		return ret;
642 }
643 
verify(string file, string database, System.IO.TextWriter handle, BDB_FileWriteDelegate callback, uint flags)644   internal int verify(string file, string database, System.IO.TextWriter handle, BDB_FileWriteDelegate callback, uint flags) {
645 		int ret;
646 		ret = libdb_csharpPINVOKE.DB_verify(swigCPtr, file, database, handle, callback, flags);
647 		/* Verify is a db handle destructor.  Reflect that in the wrapper class. */
648 		swigCMemOwn = false;
649 		swigCPtr = new HandleRef(null, IntPtr.Zero);
650 		DatabaseException.ThrowException(ret);
651 		return ret;
652 }
653 
654 }
655 
656 }
657