-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathclasswiredtiger_1_1_session.html
1125 lines (1091 loc) · 87.5 KB
/
classwiredtiger_1_1_session.html
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
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<title>WiredTiger: wiredtiger.Session Class Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript">
$(document).ready(initResizable);
</script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
<link href="wiredtiger.css" rel="stylesheet" type="text/css"/>
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
<tbody>
<tr style="height: 56px;">
<td id="projectlogo"><a href="http://wiredtiger.com/"><img alt="Logo" src="LogoFinal-header.png" alt="WiredTiger" /></a></td>
<td style="padding-left: 0.5em;">
<div id="projectname">
 <span id="projectnumber">Version 1.4.2</span>
</div>
</td>
</tr>
</tbody>
</table>
</div>
<div class="banner">
<a href="https://github.com/wiredtiger/wiredtiger">Fork me on GitHub</a>
<a class="last" href="http://groups.google.com/group/wiredtiger-users">Join my user group</a>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.2 -->
<div id="navrow1" class="tabs">
<ul class="tablist">
<li><a href="index.html"><span>Main Page</span></a></li>
<li><a href="pages.html"><span>Related Pages</span></a></li>
<li><a href="modules.html"><span>Modules</span></a></li>
<li><a href="examples.html"><span>Examples</span></a></li>
<li><a href="license.html"><span>License</span></a></li>
</ul>
</div>
<div id="navrow2" class="tabs2">
<ul class="tablist">
<li><a href="annotated.html"><span>Class List</span></a></li>
<li><a href="hierarchy.html"><span>Class Hierarchy</span></a></li>
<li><a href="functions.html"><span>Class Members</span></a></li>
</ul>
</div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
<div id="nav-tree">
<div id="nav-tree-contents">
<div id="nav-sync" class="sync"></div>
</div>
</div>
<div id="splitbar" style="-moz-user-select:none;"
class="ui-resizable-handle">
</div>
</div>
<script type="text/javascript">
$(document).ready(function(){initNavTree('classwiredtiger_1_1_session.html','');});
</script>
<div id="doc-content">
<div class="header">
<div class="summary">
<a href="classwiredtiger_1_1_session-members.html">List of all members</a> |
<a href="#pub-methods">Public Member Functions</a> |
<a href="#pub-attribs">Public Attributes</a> |
<a href="#pub-static-attribs">Static Public Attributes</a> </div>
<div class="headertitle">
<div class="title">wiredtiger.Session Class Reference<div class="ingroups"><a class="el" href="group__wt__python.html">WiredTiger Python API</a></div></div> </div>
</div><!--header-->
<div class="contents">
<p>Python wrapper around C <a class="el" href="struct_w_t___s_e_s_s_i_o_n.html" title="All data operations are performed in the context of a WT_SESSION.">WT_SESSION</a>.
<a href="classwiredtiger_1_1_session.html#details">More...</a></p>
<p>Inherits object.</p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr class="memitem:aed00603cc6df8c4b75585003157c1ffd"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="aed00603cc6df8c4b75585003157c1ffd"></a>
def </td><td class="memItemRight" valign="bottom"><b>__init__</b></td></tr>
<tr class="separator:aed00603cc6df8c4b75585003157c1ffd"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a63f702c75007d8d25165ebf55ee92739"><td class="memItemLeft" align="right" valign="top">def </td><td class="memItemRight" valign="bottom"><a class="el" href="classwiredtiger_1_1_session.html#a63f702c75007d8d25165ebf55ee92739">close</a></td></tr>
<tr class="memdesc:a63f702c75007d8d25165ebf55ee92739"><td class="mdescLeft"> </td><td class="mdescRight">close(self, config) -> int <a href="#a63f702c75007d8d25165ebf55ee92739"></a><br/></td></tr>
<tr class="separator:a63f702c75007d8d25165ebf55ee92739"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:aa761c6e0840b09436289b4a7db0befc2"><td class="memItemLeft" align="right" valign="top">def </td><td class="memItemRight" valign="bottom"><a class="el" href="classwiredtiger_1_1_session.html#aa761c6e0840b09436289b4a7db0befc2">reconfigure</a></td></tr>
<tr class="memdesc:aa761c6e0840b09436289b4a7db0befc2"><td class="mdescLeft"> </td><td class="mdescRight">reconfigure(self, config) -> int <a href="#aa761c6e0840b09436289b4a7db0befc2"></a><br/></td></tr>
<tr class="separator:aa761c6e0840b09436289b4a7db0befc2"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:aa7f8ff75031b4ee2f337cf2776361a79"><td class="memItemLeft" align="right" valign="top">def </td><td class="memItemRight" valign="bottom"><a class="el" href="classwiredtiger_1_1_session.html#aa7f8ff75031b4ee2f337cf2776361a79">open_cursor</a></td></tr>
<tr class="memdesc:aa7f8ff75031b4ee2f337cf2776361a79"><td class="mdescLeft"> </td><td class="mdescRight">open_cursor(self, uri, to_dup, config) -> int <a href="#aa7f8ff75031b4ee2f337cf2776361a79"></a><br/></td></tr>
<tr class="separator:aa7f8ff75031b4ee2f337cf2776361a79"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a05806032431c2420bf709d7cfdb6937c"><td class="memItemLeft" align="right" valign="top">def </td><td class="memItemRight" valign="bottom"><a class="el" href="classwiredtiger_1_1_session.html#a05806032431c2420bf709d7cfdb6937c">create</a></td></tr>
<tr class="memdesc:a05806032431c2420bf709d7cfdb6937c"><td class="mdescLeft"> </td><td class="mdescRight">create(self, name, config) -> int <a href="#a05806032431c2420bf709d7cfdb6937c"></a><br/></td></tr>
<tr class="separator:a05806032431c2420bf709d7cfdb6937c"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:afbf37a8455a785f7aabbfc29e91cde81"><td class="memItemLeft" align="right" valign="top">def </td><td class="memItemRight" valign="bottom"><a class="el" href="classwiredtiger_1_1_session.html#afbf37a8455a785f7aabbfc29e91cde81">compact</a></td></tr>
<tr class="memdesc:afbf37a8455a785f7aabbfc29e91cde81"><td class="mdescLeft"> </td><td class="mdescRight">compact(self, name, config) -> int <a href="#afbf37a8455a785f7aabbfc29e91cde81"></a><br/></td></tr>
<tr class="separator:afbf37a8455a785f7aabbfc29e91cde81"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:aa5636db260be86b90228978057daea34"><td class="memItemLeft" align="right" valign="top">def </td><td class="memItemRight" valign="bottom"><a class="el" href="classwiredtiger_1_1_session.html#aa5636db260be86b90228978057daea34">drop</a></td></tr>
<tr class="memdesc:aa5636db260be86b90228978057daea34"><td class="mdescLeft"> </td><td class="mdescRight">drop(self, name, config) -> int <a href="#aa5636db260be86b90228978057daea34"></a><br/></td></tr>
<tr class="separator:aa5636db260be86b90228978057daea34"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a661a9bb6dcaf9d6484758ec81d8772b9"><td class="memItemLeft" align="right" valign="top">def </td><td class="memItemRight" valign="bottom"><a class="el" href="classwiredtiger_1_1_session.html#a661a9bb6dcaf9d6484758ec81d8772b9">rename</a></td></tr>
<tr class="memdesc:a661a9bb6dcaf9d6484758ec81d8772b9"><td class="mdescLeft"> </td><td class="mdescRight">rename(self, oldname, newname, config) -> int <a href="#a661a9bb6dcaf9d6484758ec81d8772b9"></a><br/></td></tr>
<tr class="separator:a661a9bb6dcaf9d6484758ec81d8772b9"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:ac77449102799219855d198197426af5e"><td class="memItemLeft" align="right" valign="top">def </td><td class="memItemRight" valign="bottom"><a class="el" href="classwiredtiger_1_1_session.html#ac77449102799219855d198197426af5e">salvage</a></td></tr>
<tr class="memdesc:ac77449102799219855d198197426af5e"><td class="mdescLeft"> </td><td class="mdescRight">salvage(self, name, config) -> int <a href="#ac77449102799219855d198197426af5e"></a><br/></td></tr>
<tr class="separator:ac77449102799219855d198197426af5e"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a80a9ee8697a61a1ad13d893d67d981bb"><td class="memItemLeft" align="right" valign="top">def </td><td class="memItemRight" valign="bottom"><a class="el" href="classwiredtiger_1_1_session.html#a80a9ee8697a61a1ad13d893d67d981bb">truncate</a></td></tr>
<tr class="memdesc:a80a9ee8697a61a1ad13d893d67d981bb"><td class="mdescLeft"> </td><td class="mdescRight">truncate(self, name, start, stop, config) -> int <a href="#a80a9ee8697a61a1ad13d893d67d981bb"></a><br/></td></tr>
<tr class="separator:a80a9ee8697a61a1ad13d893d67d981bb"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a10d14f378fa6368b0f5d1923a3473188"><td class="memItemLeft" align="right" valign="top">def </td><td class="memItemRight" valign="bottom"><a class="el" href="classwiredtiger_1_1_session.html#a10d14f378fa6368b0f5d1923a3473188">upgrade</a></td></tr>
<tr class="memdesc:a10d14f378fa6368b0f5d1923a3473188"><td class="mdescLeft"> </td><td class="mdescRight">upgrade(self, name, config) -> int <a href="#a10d14f378fa6368b0f5d1923a3473188"></a><br/></td></tr>
<tr class="separator:a10d14f378fa6368b0f5d1923a3473188"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a30e548e0d6121f50de5b401f76ccdc39"><td class="memItemLeft" align="right" valign="top">def </td><td class="memItemRight" valign="bottom"><a class="el" href="classwiredtiger_1_1_session.html#a30e548e0d6121f50de5b401f76ccdc39">verify</a></td></tr>
<tr class="memdesc:a30e548e0d6121f50de5b401f76ccdc39"><td class="mdescLeft"> </td><td class="mdescRight">verify(self, name, config) -> int <a href="#a30e548e0d6121f50de5b401f76ccdc39"></a><br/></td></tr>
<tr class="separator:a30e548e0d6121f50de5b401f76ccdc39"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:ac041afc6a582ea2a9dd9af60a0603fdd"><td class="memItemLeft" align="right" valign="top">def </td><td class="memItemRight" valign="bottom"><a class="el" href="classwiredtiger_1_1_session.html#ac041afc6a582ea2a9dd9af60a0603fdd">begin_transaction</a></td></tr>
<tr class="memdesc:ac041afc6a582ea2a9dd9af60a0603fdd"><td class="mdescLeft"> </td><td class="mdescRight">begin_transaction(self, config) -> int <a href="#ac041afc6a582ea2a9dd9af60a0603fdd"></a><br/></td></tr>
<tr class="separator:ac041afc6a582ea2a9dd9af60a0603fdd"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:aea2d198c1ce6615ac2d5fecccd1be625"><td class="memItemLeft" align="right" valign="top">def </td><td class="memItemRight" valign="bottom"><a class="el" href="classwiredtiger_1_1_session.html#aea2d198c1ce6615ac2d5fecccd1be625">commit_transaction</a></td></tr>
<tr class="memdesc:aea2d198c1ce6615ac2d5fecccd1be625"><td class="mdescLeft"> </td><td class="mdescRight">commit_transaction(self, config) -> int <a href="#aea2d198c1ce6615ac2d5fecccd1be625"></a><br/></td></tr>
<tr class="separator:aea2d198c1ce6615ac2d5fecccd1be625"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a56d07de3ee9db0059fe25f160c9f9cd3"><td class="memItemLeft" align="right" valign="top">def </td><td class="memItemRight" valign="bottom"><a class="el" href="classwiredtiger_1_1_session.html#a56d07de3ee9db0059fe25f160c9f9cd3">rollback_transaction</a></td></tr>
<tr class="memdesc:a56d07de3ee9db0059fe25f160c9f9cd3"><td class="mdescLeft"> </td><td class="mdescRight">rollback_transaction(self, config) -> int <a href="#a56d07de3ee9db0059fe25f160c9f9cd3"></a><br/></td></tr>
<tr class="separator:a56d07de3ee9db0059fe25f160c9f9cd3"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a7a8b13b96530447f26a07e7d85521659"><td class="memItemLeft" align="right" valign="top">def </td><td class="memItemRight" valign="bottom"><a class="el" href="classwiredtiger_1_1_session.html#a7a8b13b96530447f26a07e7d85521659">checkpoint</a></td></tr>
<tr class="memdesc:a7a8b13b96530447f26a07e7d85521659"><td class="mdescLeft"> </td><td class="mdescRight">checkpoint(self, config) -> int <a href="#a7a8b13b96530447f26a07e7d85521659"></a><br/></td></tr>
<tr class="separator:a7a8b13b96530447f26a07e7d85521659"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a4b01fb98ddc63825a3db3414d0058c26"><td class="memItemLeft" align="right" valign="top">def </td><td class="memItemRight" valign="bottom"><a class="el" href="classwiredtiger_1_1_session.html#a4b01fb98ddc63825a3db3414d0058c26">msg_printf</a></td></tr>
<tr class="memdesc:a4b01fb98ddc63825a3db3414d0058c26"><td class="mdescLeft"> </td><td class="mdescRight">msg_printf(self, fmt) -> int <a href="#a4b01fb98ddc63825a3db3414d0058c26"></a><br/></td></tr>
<tr class="separator:a4b01fb98ddc63825a3db3414d0058c26"><td class="memSeparator" colspan="2"> </td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-attribs"></a>
Public Attributes</h2></td></tr>
<tr class="memitem:ad3453e7cb4601a5c0c6e512fa5bffe3b"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ad3453e7cb4601a5c0c6e512fa5bffe3b"></a>
 </td><td class="memItemRight" valign="bottom"><b>this</b></td></tr>
<tr class="separator:ad3453e7cb4601a5c0c6e512fa5bffe3b"><td class="memSeparator" colspan="2"> </td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-static-attribs"></a>
Static Public Attributes</h2></td></tr>
<tr class="memitem:af5c1f8c931bf1db6a16d3fe8c5f3aaf1"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="af5c1f8c931bf1db6a16d3fe8c5f3aaf1"></a>
tuple </td><td class="memItemRight" valign="bottom"><b>thisown</b></td></tr>
<tr class="separator:af5c1f8c931bf1db6a16d3fe8c5f3aaf1"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a4c82c4adfa1d66df06734e161e8d2b43"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a4c82c4adfa1d66df06734e161e8d2b43"></a>
tuple </td><td class="memItemRight" valign="bottom"><b>connection</b></td></tr>
<tr class="separator:a4c82c4adfa1d66df06734e161e8d2b43"><td class="memSeparator" colspan="2"> </td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p>Python wrapper around C <a class="el" href="struct_w_t___s_e_s_s_i_o_n.html" title="All data operations are performed in the context of a WT_SESSION.">WT_SESSION</a>. </p>
</div><h2 class="groupheader">Member Function Documentation</h2>
<a class="anchor" id="ac041afc6a582ea2a9dd9af60a0603fdd"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">def wiredtiger.Session.begin_transaction </td>
<td>(</td>
<td class="paramtype"> </td>
<td class="paramname"><em>self</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"> </td>
<td class="paramname"><em>args</em> </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>begin_transaction(self, config) -> int </p>
<p>Start a transaction in this session. The transaction remains active until ended by <a class="el" href="struct_w_t___s_e_s_s_i_o_n.html#a712226eca5ade5bd123026c624468fa2" title="Commit the current transaction.">WT_SESSION::commit_transaction</a> or <a class="el" href="struct_w_t___s_e_s_s_i_o_n.html#ab45f521464ad9e54d9b15efc2ffe20a1" title="Roll back the current transaction.">WT_SESSION::rollback_transaction</a>. Operations performed on cursors capable of supporting transactional operations that are already open in this session, or which are opened before the transaction ends, will operate in the context of the transaction.All open cursors are reset.<a class="el" href="struct_w_t___s_e_s_s_i_o_n.html#a7e26b16b26b5870498752322fad790bf" title="Start a transaction in this session.">WT_SESSION::begin_transaction</a> will fail if a transaction is already in progress in the session.<div class="fragment"><div class="line"> ret =</div>
<div class="line"> session-><a class="code" href="struct_w_t___s_e_s_s_i_o_n.html#afb5b4a69c2c5cafe411b2b04fdc1c75d" title="Open a new cursor on a data source or duplicate an existing cursor.">open_cursor</a>(session, <span class="stringliteral">"table:mytable"</span>, NULL, NULL, &cursor);</div>
<div class="line"> ret = session-><a class="code" href="struct_w_t___s_e_s_s_i_o_n.html#a7e26b16b26b5870498752322fad790bf" title="Start a transaction in this session.">begin_transaction</a>(session, NULL);</div>
<div class="line"> <span class="comment">/*</span></div>
<div class="line"><span class="comment"> * Cursors may be opened before or after the transaction begins, and in</span></div>
<div class="line"><span class="comment"> * either case, subsequent operations are included in the transaction.</span></div>
<div class="line"><span class="comment"> * The begin_transaction call resets all open cursors.</span></div>
<div class="line"><span class="comment"> */</span></div>
<div class="line"></div>
<div class="line"> cursor-><a class="code" href="struct_w_t___c_u_r_s_o_r.html#ad1088d719df40babc1f57d086691ebdc" title="Set the key for the next operation.">set_key</a>(cursor, <span class="stringliteral">"key"</span>);</div>
<div class="line"> cursor-><a class="code" href="struct_w_t___c_u_r_s_o_r.html#a27f7cbd0cd3e561f6a145704813ad64c" title="Set the value for the next operation.">set_value</a>(cursor, <span class="stringliteral">"value"</span>);</div>
<div class="line"> <span class="keywordflow">switch</span> (ret = cursor-><a class="code" href="struct_w_t___c_u_r_s_o_r.html#a444cdc0952e7f8d55d23173516c7037f" title="Update a record.">update</a>(cursor)) {</div>
<div class="line"> <span class="keywordflow">case</span> 0: <span class="comment">/* Update success */</span></div>
<div class="line"> ret = session-><a class="code" href="struct_w_t___s_e_s_s_i_o_n.html#a712226eca5ade5bd123026c624468fa2" title="Commit the current transaction.">commit_transaction</a>(session, NULL);</div>
<div class="line"> <span class="comment">/*</span></div>
<div class="line"><span class="comment"> * The commit_transaction call resets all open cursors.</span></div>
<div class="line"><span class="comment"> * If commit_transaction fails, the transaction was rolled-back.</span></div>
<div class="line"><span class="comment"> */</span></div>
<div class="line"> <span class="keywordflow">break</span>;</div>
<div class="line"> <span class="keywordflow">case</span> <a class="code" href="group__wt.html#ga9650b6e97a88921ec1302935908d0c47" title="Conflict between concurrent operations.">WT_DEADLOCK</a>: <span class="comment">/* Update conflict */</span></div>
<div class="line"> <span class="keywordflow">default</span>: <span class="comment">/* Other error */</span></div>
<div class="line"> ret = session-><a class="code" href="struct_w_t___s_e_s_s_i_o_n.html#ab45f521464ad9e54d9b15efc2ffe20a1" title="Roll back the current transaction.">rollback_transaction</a>(session, NULL);</div>
<div class="line"> <span class="comment">/* The rollback_transaction call resets all open cursors. */</span></div>
<div class="line"> <span class="keywordflow">break</span>;</div>
<div class="line"> }</div>
<div class="line"></div>
<div class="line"> <span class="comment">/* Cursors remain open and may be used for multiple transactions. */</span></div>
</div><!-- fragment --> <dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">session</td><td>the session handle </td></tr>
<tr><td class="paramname">config</td><td>Configuration string, see <a class="el" href="config_strings.html">Configuration Strings</a>. Permitted values: <table class="doxtable">
<tr>
<th>Name</th><th>Effect</th><th>Values </th></tr>
<tr>
<td><code>isolation</code></td><td>the isolation level for this transaction; defaults to the session's isolation level.</td><td>a string, chosen from the following options: <code>"read-uncommitted"</code>, <code>"read-committed"</code>, <code>"snapshot"</code>; default empty. </td></tr>
<tr>
<td><code>name</code></td><td>name of the transaction for tracing and debugging.</td><td>a string; default empty. </td></tr>
<tr>
<td><code>priority</code></td><td>priority of the transaction for resolving conflicts. Transactions with higher values are less likely to abort.</td><td>an integer between -100 and 100; default <code>0</code>. </td></tr>
<tr>
<td><code>sync</code></td><td>how to sync log records when the transaction commits.</td><td>a string, chosen from the following options: <code>"full"</code>, <code>"flush"</code>, <code>"write"</code>, <code>"none"</code>; default <code>full</code>. </td></tr>
</table>
</td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>zero on success and a non-zero error code on failure. See <a class="el" href="group__wt.html#error_returns">Error Returns</a> for details. </dd></dl>
</p>
</div>
</div>
<a class="anchor" id="a7a8b13b96530447f26a07e7d85521659"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">def wiredtiger.Session.checkpoint </td>
<td>(</td>
<td class="paramtype"> </td>
<td class="paramname"><em>self</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"> </td>
<td class="paramname"><em>args</em> </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>checkpoint(self, config) -> int </p>
<p>Write a transactionally consistent snapshot of a database or set of objects. The checkpoint includes all transactions committed before the checkpoint starts. Additionally, checkpoints may optionally be discarded.<div class="fragment"><div class="line"> <span class="comment">/* Checkpoint the database. */</span></div>
<div class="line"> ret = session-><a class="code" href="struct_w_t___s_e_s_s_i_o_n.html#a6550c9079198955c5071583941c85bbf" title="Write a transactionally consistent snapshot of a database or set of objects.">checkpoint</a>(session, NULL);</div>
<div class="line"></div>
<div class="line"> <span class="comment">/* Checkpoint of the database, creating a named snapshot. */</span></div>
<div class="line"> ret = session-><a class="code" href="struct_w_t___s_e_s_s_i_o_n.html#a6550c9079198955c5071583941c85bbf" title="Write a transactionally consistent snapshot of a database or set of objects.">checkpoint</a>(session, <span class="stringliteral">"name=June01"</span>);</div>
<div class="line"></div>
<div class="line"> <span class="comment">/*</span></div>
<div class="line"><span class="comment"> * Checkpoint a list of objects.</span></div>
<div class="line"><span class="comment"> * JSON parsing requires quoting the list of target URIs.</span></div>
<div class="line"><span class="comment"> */</span></div>
<div class="line"> ret = session-></div>
<div class="line"> <a class="code" href="struct_w_t___s_e_s_s_i_o_n.html#a6550c9079198955c5071583941c85bbf" title="Write a transactionally consistent snapshot of a database or set of objects.">checkpoint</a>(session, <span class="stringliteral">"target=(\"table:table1\",\"table:table2\")"</span>);</div>
<div class="line"></div>
<div class="line"> <span class="comment">/*</span></div>
<div class="line"><span class="comment"> * Checkpoint a list of objects, creating a named snapshot.</span></div>
<div class="line"><span class="comment"> * JSON parsing requires quoting the list of target URIs.</span></div>
<div class="line"><span class="comment"> */</span></div>
<div class="line"> ret = session-></div>
<div class="line"> <a class="code" href="struct_w_t___s_e_s_s_i_o_n.html#a6550c9079198955c5071583941c85bbf" title="Write a transactionally consistent snapshot of a database or set of objects.">checkpoint</a>(session, <span class="stringliteral">"target=(\"table:mytable\"),name=midnight"</span>);</div>
<div class="line"></div>
<div class="line"> <span class="comment">/* Checkpoint the database, discarding all previous snapshots. */</span></div>
<div class="line"> ret = session-><a class="code" href="struct_w_t___s_e_s_s_i_o_n.html#a6550c9079198955c5071583941c85bbf" title="Write a transactionally consistent snapshot of a database or set of objects.">checkpoint</a>(session, <span class="stringliteral">"drop=(from=all)"</span>);</div>
<div class="line"></div>
<div class="line"> <span class="comment">/* Checkpoint the database, discarding the "midnight" snapshot. */</span></div>
<div class="line"> ret = session-><a class="code" href="struct_w_t___s_e_s_s_i_o_n.html#a6550c9079198955c5071583941c85bbf" title="Write a transactionally consistent snapshot of a database or set of objects.">checkpoint</a>(session, <span class="stringliteral">"drop=(midnight)"</span>);</div>
<div class="line"></div>
<div class="line"> <span class="comment">/*</span></div>
<div class="line"><span class="comment"> * Checkpoint the database, discarding all snapshots after and</span></div>
<div class="line"><span class="comment"> * including "noon".</span></div>
<div class="line"><span class="comment"> */</span></div>
<div class="line"> ret = session-><a class="code" href="struct_w_t___s_e_s_s_i_o_n.html#a6550c9079198955c5071583941c85bbf" title="Write a transactionally consistent snapshot of a database or set of objects.">checkpoint</a>(session, <span class="stringliteral">"drop=(from=noon)"</span>);</div>
<div class="line"></div>
<div class="line"> <span class="comment">/*</span></div>
<div class="line"><span class="comment"> * Checkpoint the database, discarding all snapshots before and</span></div>
<div class="line"><span class="comment"> * including "midnight".</span></div>
<div class="line"><span class="comment"> */</span></div>
<div class="line"> ret = session-><a class="code" href="struct_w_t___s_e_s_s_i_o_n.html#a6550c9079198955c5071583941c85bbf" title="Write a transactionally consistent snapshot of a database or set of objects.">checkpoint</a>(session, <span class="stringliteral">"drop=(to=midnight)"</span>);</div>
<div class="line"></div>
<div class="line"> <span class="comment">/*</span></div>
<div class="line"><span class="comment"> * Create a checkpoint of a table, creating the "July01" snapshot and</span></div>
<div class="line"><span class="comment"> * discarding the "May01" and "June01" snapshots.</span></div>
<div class="line"><span class="comment"> * JSON parsing requires quoting the list of target URIs.</span></div>
<div class="line"><span class="comment"> */</span></div>
<div class="line"> ret = session-><a class="code" href="struct_w_t___s_e_s_s_i_o_n.html#a6550c9079198955c5071583941c85bbf" title="Write a transactionally consistent snapshot of a database or set of objects.">checkpoint</a>(session,</div>
<div class="line"> <span class="stringliteral">"target=(\"table:mytable\"),name=July01,drop=(May01,June01)"</span>);</div>
</div><!-- fragment --> <dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">session</td><td>the session handle </td></tr>
<tr><td class="paramname">config</td><td>Configuration string, see <a class="el" href="config_strings.html">Configuration Strings</a>. Permitted values: <table class="doxtable">
<tr>
<th>Name</th><th>Effect</th><th>Values </th></tr>
<tr>
<td><code>drop</code></td><td>specify a list of checkpoints to drop. The list may additionally contain one of the following keys: <code>"from=all"</code> to drop all checkpoints, <code>"from=<checkpoint>"</code> to drop all checkpoints after and including the named checkpoint, or <code>"to=<checkpoint>"</code> to drop all checkpoints before and including the named checkpoint. Checkpoints cannot be dropped while a hot backup is in progress or if open in a cursor.</td><td>a list of strings; default empty. </td></tr>
<tr>
<td><code>force</code></td><td>checkpoints may be skipped if the underlying object has not been modified, this option forces the checkpoint.</td><td>a boolean flag; default <code>false</code>. </td></tr>
<tr>
<td><code>name</code></td><td>if non-empty, specify a name for the checkpoint.</td><td>a string; default empty. </td></tr>
<tr>
<td><code>target</code></td><td>if non-empty, checkpoint the list of objects.</td><td>a list of strings; default empty. </td></tr>
</table>
</td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>zero on success and a non-zero error code on failure. See <a class="el" href="group__wt.html#error_returns">Error Returns</a> for details. </dd></dl>
</p>
</div>
</div>
<a class="anchor" id="a63f702c75007d8d25165ebf55ee92739"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">def wiredtiger.Session.close </td>
<td>(</td>
<td class="paramtype"> </td>
<td class="paramname"><em>self</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"> </td>
<td class="paramname"><em>args</em> </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>close(self, config) -> int </p>
<p>Close the session handle. This will release the resources associated with the session handle, including rolling back any active transactions and closing any cursors that remain open in the session.<div class="fragment"><div class="line"> ret = session-><a class="code" href="struct_w_t___s_e_s_s_i_o_n.html#a96f25dfa6447034aea1f67ab02ab5698" title="Close the session handle.">close</a>(session, NULL);</div>
</div><!-- fragment --> <dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">session</td><td>the session handle </td></tr>
<tr><td class="paramname">config</td><td>Configuration string, see <a class="el" href="config_strings.html">Configuration Strings</a>. No values currently permitted. </td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>zero on success and a non-zero error code on failure. See <a class="el" href="group__wt.html#error_returns">Error Returns</a> for details. </dd></dl>
</p>
</div>
</div>
<a class="anchor" id="aea2d198c1ce6615ac2d5fecccd1be625"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">def wiredtiger.Session.commit_transaction </td>
<td>(</td>
<td class="paramtype"> </td>
<td class="paramname"><em>self</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"> </td>
<td class="paramname"><em>args</em> </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>commit_transaction(self, config) -> int </p>
<p>Commit the current transaction. A transaction must be in progress when this method is called.All open cursors are reset.If <a class="el" href="struct_w_t___s_e_s_s_i_o_n.html#a712226eca5ade5bd123026c624468fa2" title="Commit the current transaction.">WT_SESSION::commit_transaction</a> returns an error, the transaction was rolled-back, not committed.<div class="fragment"><div class="line"> ret =</div>
<div class="line"> session-><a class="code" href="struct_w_t___s_e_s_s_i_o_n.html#afb5b4a69c2c5cafe411b2b04fdc1c75d" title="Open a new cursor on a data source or duplicate an existing cursor.">open_cursor</a>(session, <span class="stringliteral">"table:mytable"</span>, NULL, NULL, &cursor);</div>
<div class="line"> ret = session-><a class="code" href="struct_w_t___s_e_s_s_i_o_n.html#a7e26b16b26b5870498752322fad790bf" title="Start a transaction in this session.">begin_transaction</a>(session, NULL);</div>
<div class="line"> <span class="comment">/*</span></div>
<div class="line"><span class="comment"> * Cursors may be opened before or after the transaction begins, and in</span></div>
<div class="line"><span class="comment"> * either case, subsequent operations are included in the transaction.</span></div>
<div class="line"><span class="comment"> * The begin_transaction call resets all open cursors.</span></div>
<div class="line"><span class="comment"> */</span></div>
<div class="line"></div>
<div class="line"> cursor-><a class="code" href="struct_w_t___c_u_r_s_o_r.html#ad1088d719df40babc1f57d086691ebdc" title="Set the key for the next operation.">set_key</a>(cursor, <span class="stringliteral">"key"</span>);</div>
<div class="line"> cursor-><a class="code" href="struct_w_t___c_u_r_s_o_r.html#a27f7cbd0cd3e561f6a145704813ad64c" title="Set the value for the next operation.">set_value</a>(cursor, <span class="stringliteral">"value"</span>);</div>
<div class="line"> <span class="keywordflow">switch</span> (ret = cursor-><a class="code" href="struct_w_t___c_u_r_s_o_r.html#a444cdc0952e7f8d55d23173516c7037f" title="Update a record.">update</a>(cursor)) {</div>
<div class="line"> <span class="keywordflow">case</span> 0: <span class="comment">/* Update success */</span></div>
<div class="line"> ret = session-><a class="code" href="struct_w_t___s_e_s_s_i_o_n.html#a712226eca5ade5bd123026c624468fa2" title="Commit the current transaction.">commit_transaction</a>(session, NULL);</div>
<div class="line"> <span class="comment">/*</span></div>
<div class="line"><span class="comment"> * The commit_transaction call resets all open cursors.</span></div>
<div class="line"><span class="comment"> * If commit_transaction fails, the transaction was rolled-back.</span></div>
<div class="line"><span class="comment"> */</span></div>
<div class="line"> <span class="keywordflow">break</span>;</div>
<div class="line"> <span class="keywordflow">case</span> <a class="code" href="group__wt.html#ga9650b6e97a88921ec1302935908d0c47" title="Conflict between concurrent operations.">WT_DEADLOCK</a>: <span class="comment">/* Update conflict */</span></div>
<div class="line"> <span class="keywordflow">default</span>: <span class="comment">/* Other error */</span></div>
<div class="line"> ret = session-><a class="code" href="struct_w_t___s_e_s_s_i_o_n.html#ab45f521464ad9e54d9b15efc2ffe20a1" title="Roll back the current transaction.">rollback_transaction</a>(session, NULL);</div>
<div class="line"> <span class="comment">/* The rollback_transaction call resets all open cursors. */</span></div>
<div class="line"> <span class="keywordflow">break</span>;</div>
<div class="line"> }</div>
<div class="line"></div>
<div class="line"> <span class="comment">/* Cursors remain open and may be used for multiple transactions. */</span></div>
</div><!-- fragment --> <dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">session</td><td>the session handle </td></tr>
<tr><td class="paramname">config</td><td>Configuration string, see <a class="el" href="config_strings.html">Configuration Strings</a>. No values currently permitted. </td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>zero on success and a non-zero error code on failure. See <a class="el" href="group__wt.html#error_returns">Error Returns</a> for details. </dd></dl>
</p>
</div>
</div>
<a class="anchor" id="afbf37a8455a785f7aabbfc29e91cde81"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">def wiredtiger.Session.compact </td>
<td>(</td>
<td class="paramtype"> </td>
<td class="paramname"><em>self</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"> </td>
<td class="paramname"><em>args</em> </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>compact(self, name, config) -> int </p>
<p>Compact an object. <div class="fragment"><div class="line"> ret = session-><a class="code" href="struct_w_t___s_e_s_s_i_o_n.html#aafa7a12a4891a5bfdc98673a5b8f9c69" title="Compact an object.">compact</a>(session, <span class="stringliteral">"table:mytable"</span>, NULL);</div>
</div><!-- fragment --> <dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">session</td><td>the session handle </td></tr>
<tr><td class="paramname">name</td><td>the URI of the object to drop, such as <code>"table:stock"</code> </td></tr>
<tr><td class="paramname">config</td><td>Configuration string, see <a class="el" href="config_strings.html">Configuration Strings</a>. Permitted values: <table class="doxtable">
<tr>
<th>Name</th><th>Effect</th><th>Values </th></tr>
<tr>
<td><code>trigger</code></td><td>Compaction will not be attempted unless the specified percentage of the underlying objects is expected to be recovered by compaction.</td><td>an integer between 10 and 50; default <code>30</code>. </td></tr>
</table>
</td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>zero on success and a non-zero error code on failure. See <a class="el" href="group__wt.html#error_returns">Error Returns</a> for details. </dd></dl>
</p>
</div>
</div>
<a class="anchor" id="a05806032431c2420bf709d7cfdb6937c"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">def wiredtiger.Session.create </td>
<td>(</td>
<td class="paramtype"> </td>
<td class="paramname"><em>self</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"> </td>
<td class="paramname"><em>args</em> </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>create(self, name, config) -> int </p>
<p>Create a table, column group, index or file. <div class="fragment"><div class="line"> ret = session-><a class="code" href="struct_w_t___s_e_s_s_i_o_n.html#a358ca4141d59c345f401c58501276bbb" title="Create a table, column group, index or file.">create</a>(session,</div>
<div class="line"> <span class="stringliteral">"table:mytable"</span>, <span class="stringliteral">"key_format=S,value_format=S"</span>);</div>
</div><!-- fragment --> <dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">session</td><td>the session handle </td></tr>
<tr><td class="paramname">name</td><td>the URI of the object to create, such as <code>"table:stock"</code> </td></tr>
<tr><td class="paramname">config</td><td>Configuration string, see <a class="el" href="config_strings.html">Configuration Strings</a>. Permitted values: <table class="doxtable">
<tr>
<th>Name</th><th>Effect</th><th>Values </th></tr>
<tr>
<td><code>allocation_size</code></td><td>the file unit allocation size, in bytes, must a power-of-two; smaller values decrease the file space required by overflow items, and the default value of 512B is a good choice absent requirements from the operating system or storage device.</td><td>an integer between 512B and 128MB; default <code>512B</code>. </td></tr>
<tr>
<td><code>block_compressor</code></td><td>configure a compressor for file blocks. Permitted values are empty (off) or <code>"bzip2"</code>, <code>"snappy"</code> or custom compression engine <code>"name"</code> created with <a class="el" href="struct_w_t___c_o_n_n_e_c_t_i_o_n.html#a4f26bfa799ae5e72b536ac93d6200783" title="Add a compression function.">WT_CONNECTION::add_compressor</a>. See <a class="el" href="compression.html">Compressors</a> for more information.</td><td>a string; default empty. </td></tr>
<tr>
<td><code>cache_resident</code></td><td>do not ever evict the object's pages; see <a class="el" href="tuning.html#tuning_cache_resident">Cache resident objects</a> for more information.</td><td>a boolean flag; default <code>false</code>. </td></tr>
<tr>
<td><code>checksum</code></td><td>configure file block checksums; permitted values are <code>on</code> (checksum all file blocks), <code>off</code> (checksum no file blocks) and <code>uncompresssed</code> (checksum only file blocks which are not compressed for some reason). The <code>uncompressed</code> value is for applications which can reasonably rely on decompression to fail if a block has been corrupted.</td><td>a string, chosen from the following options: <code>"on"</code>, <code>"off"</code>, <code>"uncompressed"</code>; default <code>on</code>. </td></tr>
<tr>
<td><code>colgroups</code></td><td>comma-separated list of names of column groups. Each column group is stored separately, keyed by the primary key of the table. If no column groups are specified, all columns are stored together in a single file. All value columns in the table must appear in at least one column group. Each column group must be created with a separate call to <a class="el" href="struct_w_t___s_e_s_s_i_o_n.html#a358ca4141d59c345f401c58501276bbb" title="Create a table, column group, index or file.">WT_SESSION::create</a>.</td><td>a list of strings; default empty. </td></tr>
<tr>
<td><code>collator</code></td><td>configure custom collation for keys. Value must be a collator name created with <a class="el" href="struct_w_t___c_o_n_n_e_c_t_i_o_n.html#a89290382c55f20e5a4e1bc9216c7a8c8" title="Add a custom collation function.">WT_CONNECTION::add_collator</a>.</td><td>a string; default empty. </td></tr>
<tr>
<td><code>columns</code></td><td>list of the column names. Comma-separated list of the form <code>(column[,...])</code>. For tables, the number of entries must match the total number of values in <code>key_format</code> and <code>value_format</code>. For colgroups and indices, all column names must appear in the list of columns for the table.</td><td>a list of strings; default empty. </td></tr>
<tr>
<td><code>dictionary</code></td><td>the maximum number of unique values remembered in the Btree row-store leaf page value dictionary; see <a class="el" href="file_formats.html#file_formats_compression">File formats and compression</a> for more information.</td><td>an integer greater than or equal to 0; default <code>0</code>. </td></tr>
<tr>
<td><code>exclusive</code></td><td>fail if the object exists. When false (the default), if the object exists, check that its settings match the specified configuration.</td><td>a boolean flag; default <code>false</code>. </td></tr>
<tr>
<td><code>format</code></td><td>the file format.</td><td>a string, chosen from the following options: <code>"btree"</code>; default <code>btree</code>. </td></tr>
<tr>
<td><code>huffman_key</code></td><td>configure Huffman encoding for keys. Permitted values are empty (off), <code>"english"</code>, <code>"utf8<file>"</code> or <code>"utf16<file>"</code>. See <a class="el" href="huffman.html">Huffman Encoding</a> for more information.</td><td>a string; default empty. </td></tr>
<tr>
<td><code>huffman_value</code></td><td>configure Huffman encoding for values. Permitted values are empty (off), <code>"english"</code>, <code>"utf8<file>"</code> or <code>"utf16<file>"</code>. See <a class="el" href="huffman.html">Huffman Encoding</a> for more information.</td><td>a string; default empty. </td></tr>
<tr>
<td><code>internal_item_max</code></td><td>the maximum key size stored on internal nodes, in bytes. If zero, a maximum is calculated to permit at least 8 keys per internal page.</td><td>an integer greater than or equal to 0; default <code>0</code>. </td></tr>
<tr>
<td><code>internal_key_truncate</code></td><td>configure internal key truncation, discarding unnecessary trailing bytes on internal keys (ignored for custom collators).</td><td>a boolean flag; default <code>true</code>. </td></tr>
<tr>
<td><code>internal_page_max</code></td><td>the maximum page size for internal nodes, in bytes; the size must be a multiple of the allocation size and is significant for applications wanting to avoid excessive L2 cache misses while searching the tree. The page maximum is the bytes of uncompressed data, that is, the limit is applied before any block compression is done.</td><td>an integer between 512B and 512MB; default <code>2KB</code>. </td></tr>
<tr>
<td><code>key_format</code></td><td>the format of the data packed into key items. See <a class="el" href="schema.html#schema_format_types">Format types</a> for details. By default, the key_format is <code>'u'</code> and applications use <a class="el" href="group__wt.html#struct_w_t___i_t_e_m" title="A raw item of data to be managed.">WT_ITEM</a> structures to manipulate raw byte arrays. By default, records are stored in row-store files: keys of type <code>'r'</code> are record numbers and records referenced by record number are stored in column-store files.</td><td>a format string; default <code>u</code>. </td></tr>
<tr>
<td><code>key_gap</code></td><td>the maximum gap between instantiated keys in a Btree leaf page, constraining the number of keys processed to instantiate a random Btree leaf page key.</td><td>an integer greater than or equal to 0; default <code>10</code>. </td></tr>
<tr>
<td><code>leaf_item_max</code></td><td>the maximum key or value size stored on leaf nodes, in bytes. If zero, a size is calculated to permit at least 8 items (values or row store keys) per leaf page.</td><td>an integer greater than or equal to 0; default <code>0</code>. </td></tr>
<tr>
<td><code>leaf_page_max</code></td><td>the maximum page size for leaf nodes, in bytes; the size must be a multiple of the allocation size, and is significant for applications wanting to maximize sequential data transfer from a storage device. The page maximum is the bytes of uncompressed data, that is, the limit is applied before any block compression is done.</td><td>an integer between 512B and 512MB; default <code>1MB</code>. </td></tr>
<tr>
<td><code>lsm_bloom</code></td><td>create bloom filters on LSM tree chunks as they are merged.</td><td>a boolean flag; default <code>true</code>. </td></tr>
<tr>
<td><code>lsm_bloom_bit_count</code></td><td>the number of bits used per item for LSM bloom filters.</td><td>an integer between 2 and 1000; default <code>8</code>. </td></tr>
<tr>
<td><code>lsm_bloom_config</code></td><td>config string used when creating Bloom filter files, passed to <a class="el" href="struct_w_t___s_e_s_s_i_o_n.html#a358ca4141d59c345f401c58501276bbb" title="Create a table, column group, index or file.">WT_SESSION::create</a>.</td><td>a string; default empty. </td></tr>
<tr>
<td><code>lsm_bloom_hash_count</code></td><td>the number of hash values per item used for LSM bloom filters.</td><td>an integer between 2 and 100; default <code>4</code>. </td></tr>
<tr>
<td><code>lsm_bloom_newest</code></td><td>create a bloom filter on an LSM tree chunk before it's first merge. Only supported if bloom filters are enabled.</td><td>a boolean flag; default <code>false</code>. </td></tr>
<tr>
<td><code>lsm_bloom_oldest</code></td><td>create a bloom filter on the oldest LSM tree chunk. Only supported if bloom filters are enabled.</td><td>a boolean flag; default <code>false</code>. </td></tr>
<tr>
<td><code>lsm_chunk_size</code></td><td>the maximum size of the in-memory chunk of an LSM tree.</td><td>an integer between 512K and 500MB; default <code>2MB</code>. </td></tr>
<tr>
<td><code>lsm_merge_max</code></td><td>the maximum number of chunks to include in a merge operation.</td><td>an integer between 2 and 100; default <code>15</code>. </td></tr>
<tr>
<td><code>lsm_merge_threads</code></td><td>the number of thread to perform merge operations.</td><td>an integer between 1 and 10; default <code>1</code>. </td></tr>
<tr>
<td><code>memory_page_max</code></td><td>the maximum size a page can grow to in memory before being reconciled to disk. The specified size will be adjusted to a lower bound of <code>50 * leaf_page_max</code>. This limit is soft - it is possible for pages to be temporarily larger than this value.</td><td>an integer between 512B and 10TB; default <code>5MB</code>. </td></tr>
<tr>
<td><code>prefix_compression</code></td><td>configure row-store format key prefix compression.</td><td>a boolean flag; default <code>true</code>. </td></tr>
<tr>
<td><code>source</code></td><td>override the default data source URI derived from the object name.</td><td>a string; default empty. </td></tr>
<tr>
<td><code>split_pct</code></td><td>the Btree page split size as a percentage of the maximum Btree page size, that is, when a Btree page is split, it will be split into smaller pages, where each page is the specified percentage of the maximum Btree page size.</td><td>an integer between 25 and 100; default <code>75</code>. </td></tr>
<tr>
<td><code>type</code></td><td>set the data source type. This setting overrides the URI prefix for the data source, if no <code>source</code> configuration setting is provided.</td><td>a string, chosen from the following options: <code>"file"</code>, <code>"lsm"</code>; default <code>file</code>. </td></tr>
<tr>
<td><code>value_format</code></td><td>the format of the data packed into value items. See <a class="el" href="schema.html#schema_format_types">Format types</a> for details. By default, the value_format is <code>'u'</code> and applications use a <a class="el" href="group__wt.html#struct_w_t___i_t_e_m" title="A raw item of data to be managed.">WT_ITEM</a> structure to manipulate raw byte arrays. Value items of type 't' are bitfields, and when configured with record number type keys, will be stored using a fixed-length store.</td><td>a format string; default <code>u</code>. </td></tr>
</table>
</td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>zero on success and a non-zero error code on failure. See <a class="el" href="group__wt.html#error_returns">Error Returns</a> for details. </dd></dl>
</p>
</div>
</div>
<a class="anchor" id="aa5636db260be86b90228978057daea34"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">def wiredtiger.Session.drop </td>
<td>(</td>
<td class="paramtype"> </td>
<td class="paramname"><em>self</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"> </td>
<td class="paramname"><em>args</em> </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>drop(self, name, config) -> int </p>
<p>Drop (delete) an object. <div class="fragment"><div class="line"> ret = session-><a class="code" href="struct_w_t___s_e_s_s_i_o_n.html#adf785ef53c16d9dcc77e22cc04c87b70" title="Drop (delete) an object.">drop</a>(session, <span class="stringliteral">"table:mytable"</span>, NULL);</div>
</div><!-- fragment --> <dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">session</td><td>the session handle </td></tr>
<tr><td class="paramname">name</td><td>the URI of the object to drop, such as <code>"table:stock"</code> </td></tr>
<tr><td class="paramname">config</td><td>Configuration string, see <a class="el" href="config_strings.html">Configuration Strings</a>. Permitted values: <table class="doxtable">
<tr>
<th>Name</th><th>Effect</th><th>Values </th></tr>
<tr>
<td><code>force</code></td><td>return success if the object does not exist.</td><td>a boolean flag; default <code>false</code>. </td></tr>
</table>
</td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>zero on success and a non-zero error code on failure. See <a class="el" href="group__wt.html#error_returns">Error Returns</a> for details. </dd></dl>
</p>
</div>
</div>
<a class="anchor" id="a4b01fb98ddc63825a3db3414d0058c26"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">def wiredtiger.Session.msg_printf </td>
<td>(</td>
<td class="paramtype"> </td>
<td class="paramname"><em>self</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"> </td>
<td class="paramname"><em>args</em> </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>msg_printf(self, fmt) -> int </p>
<p>Send a string to the message handler for debugging. <div class="fragment"><div class="line"> ret = session-><a class="code" href="struct_w_t___s_e_s_s_i_o_n.html#a7ac96e4c2574fbb2b43c17666326f8a8" title="Send a string to the message handler for debugging.">msg_printf</a>(</div>
<div class="line"> session, <span class="stringliteral">"process ID %"</span> PRIuMAX, (uintmax_t)getpid());</div>
</div><!-- fragment --> <dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">session</td><td>the session handle </td></tr>
<tr><td class="paramname">fmt</td><td>a printf-like format specification </td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>zero on success and a non-zero error code on failure. See <a class="el" href="group__wt.html#error_returns">Error Returns</a> for details. </dd></dl>
</p>
</div>
</div>
<a class="anchor" id="aa7f8ff75031b4ee2f337cf2776361a79"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">def wiredtiger.Session.open_cursor </td>
<td>(</td>
<td class="paramtype"> </td>
<td class="paramname"><em>self</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"> </td>
<td class="paramname"><em>args</em> </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>open_cursor(self, uri, to_dup, config) -> int </p>
<p>Open a new cursor on a data source or duplicate an existing cursor. <div class="fragment"><div class="line"> ret = session-><a class="code" href="struct_w_t___s_e_s_s_i_o_n.html#afb5b4a69c2c5cafe411b2b04fdc1c75d" title="Open a new cursor on a data source or duplicate an existing cursor.">open_cursor</a>(</div>
<div class="line"> session, <span class="stringliteral">"table:mytable"</span>, NULL, NULL, &cursor);</div>
</div><!-- fragment --><p> An existing cursor can be duplicated by passing it as the <code>to_dup</code> parameter and setting the <code>uri</code> parameter to <code>NULL:</code> <div class="fragment"><div class="line"> ret = session-><a class="code" href="struct_w_t___s_e_s_s_i_o_n.html#afb5b4a69c2c5cafe411b2b04fdc1c75d" title="Open a new cursor on a data source or duplicate an existing cursor.">open_cursor</a>(</div>
<div class="line"> session, <span class="stringliteral">"table:mytable"</span>, NULL, NULL, &cursor);</div>
<div class="line"> cursor-><a class="code" href="struct_w_t___c_u_r_s_o_r.html#ad1088d719df40babc1f57d086691ebdc" title="Set the key for the next operation.">set_key</a>(cursor, key);</div>
<div class="line"> ret = cursor-><a class="code" href="struct_w_t___c_u_r_s_o_r.html#a7e25b2ced2cf3ec68bd5429bf921c79f" title="Move to the record matching the key.">search</a>(cursor);</div>
<div class="line"></div>
<div class="line"> <span class="comment">/* Duplicate the cursor. */</span></div>
<div class="line"> ret = session-><a class="code" href="struct_w_t___s_e_s_s_i_o_n.html#afb5b4a69c2c5cafe411b2b04fdc1c75d" title="Open a new cursor on a data source or duplicate an existing cursor.">open_cursor</a>(session, NULL, cursor, NULL, &duplicate);</div>
</div><!-- fragment --><p> Cursors being duplicated must have a key set, and successfully duplicated cursors are positioned at the same place in the data source as the original.To reconfigure a cursor, duplicate it with a new configuration value:<div class="fragment"><div class="line"> ret = session-><a class="code" href="struct_w_t___s_e_s_s_i_o_n.html#afb5b4a69c2c5cafe411b2b04fdc1c75d" title="Open a new cursor on a data source or duplicate an existing cursor.">open_cursor</a>(</div>
<div class="line"> session, <span class="stringliteral">"table:mytable"</span>, NULL, NULL, &cursor);</div>
<div class="line"> cursor-><a class="code" href="struct_w_t___c_u_r_s_o_r.html#ad1088d719df40babc1f57d086691ebdc" title="Set the key for the next operation.">set_key</a>(cursor, key);</div>
<div class="line"></div>
<div class="line"> <span class="comment">/* Reconfigure the cursor to overwrite the record. */</span></div>
<div class="line"> ret = session-><a class="code" href="struct_w_t___s_e_s_s_i_o_n.html#afb5b4a69c2c5cafe411b2b04fdc1c75d" title="Open a new cursor on a data source or duplicate an existing cursor.">open_cursor</a>(</div>
<div class="line"> session, NULL, cursor, <span class="stringliteral">"overwrite"</span>, &overwrite_cursor);</div>
<div class="line"> ret = cursor-><a class="code" href="struct_w_t___c_u_r_s_o_r.html#aeea071f192cab12245a50fbe71c3460b" title="Close the cursor.">close</a>(cursor);</div>
<div class="line"></div>
<div class="line"> overwrite_cursor->set_value(overwrite_cursor, value);</div>
<div class="line"> ret = overwrite_cursor->insert(cursor);</div>
</div><!-- fragment --><p> Cursor handles should be discarded by calling <a class="el" href="struct_w_t___c_u_r_s_o_r.html#aeea071f192cab12245a50fbe71c3460b" title="Close the cursor.">WT_CURSOR::close</a>.Cursors capable of supporting transactional operations operate in the context of the current transaction, if any. Ending a transaction implicitly resets all open cursors.Cursors are relatively light-weight objects but may hold references to heavier-weight objects; applications should re-use cursors when possible, but instantiating new cursors is not so expensive that applications need to cache cursors at all cost.<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">session</td><td>the session handle </td></tr>
<tr><td class="paramname">uri</td><td>the data source on which the cursor operates; cursors are usually opened on tables, however, cursors can be opened on any data source, regardless of whether it is ultimately stored in a table. Some cursor types may have limited functionality (for example, they may be read-only or not support transactional updates). See <a class="el" href="data_sources.html">Data Sources</a> for more information. <br/>
The following are the builtin cursor types: <table class="doxtable">
<tr>
<th>URI</th><th>Type</th><th>Key/Value types </th></tr>
<tr>
<td><code>backup:</code></td><td>hot backup cursor</td><td>key=<code>string</code>, see <a class="el" href="hot_backup.html">Hot backup</a> for details </td></tr>
<tr>
<td><code>colgroup:<tablename>.<columnset></code></td><td>column group cursor</td><td>table key, column group value(s) </td></tr>
<tr>
<td><code>config:[<uri>]</code></td><td>object configuration cursor</td><td>(key=config string, value=config value) </td></tr>
<tr>
<td><code>file:<filename></code></td><td>file cursor</td><td>file key, file value(s) </td></tr>
<tr>
<td><code>index:<tablename>.<indexname></code></td><td>index cursor</td><td>key=index key, value=table value(s) </td></tr>
<tr>
<td><code>lsm:<name></code></td><td>LSM cursor (key=LSM key, value=LSM value)</td><td>See also: <a class="el" href="lsm.html">Log-Structured Merge Trees</a> </td></tr>
<tr>
<td><code>statistics:[file</code><code>:<filename>]</code></td><td>database or file statistics cursor</td><td>key=<code>int id</code>, value=(<code>string description, string value, uint64_t value</code>), see <a class="el" href="data_sources.html#data_statistics">Statistics Data</a> for details </td></tr>
<tr>
<td><code>table:<tablename></code></td><td>table cursor</td><td>table key, table value(s) </td></tr>
</table>
</td></tr>
<tr><td class="paramname">to_dup</td><td>a cursor to duplicate </td></tr>
<tr><td class="paramname">config</td><td>Configuration string, see <a class="el" href="config_strings.html">Configuration Strings</a>. Permitted values: <table class="doxtable">
<tr>
<th>Name</th><th>Effect</th><th>Values </th></tr>
<tr>
<td><code>append</code></td><td>append the value as a new record, creating a new record number key; valid only for cursors with record number keys.</td><td>a boolean flag; default <code>false</code>. </td></tr>
<tr>
<td><code>bulk</code></td><td>configure the cursor for bulk loads, a fast load path that may only be used for newly created objects. Cursors configured for bulk load only support the <a class="el" href="struct_w_t___c_u_r_s_o_r.html#aac90d9fbcc031570f924db55f8a1cee3" title="Insert a record, and optionally overwrite an existing record.">WT_CURSOR::insert</a> and <a class="el" href="struct_w_t___c_u_r_s_o_r.html#aeea071f192cab12245a50fbe71c3460b" title="Close the cursor.">WT_CURSOR::close</a> methods. The value is usually a true/false flag, but the the special value <code>"bitmap"</code> is for use with fixed-length column stores, and allows chunks of a memory resident bitmap to be loaded directly into a file by passing a <code><a class="el" href="group__wt.html#struct_w_t___i_t_e_m" title="A raw item of data to be managed.">WT_ITEM</a></code> to <a class="el" href="struct_w_t___c_u_r_s_o_r.html#a27f7cbd0cd3e561f6a145704813ad64c" title="Set the value for the next operation.">WT_CURSOR::set_value</a> where the <code>size</code> field indicates the number of records in the bitmap (as specified by the file's <code>value_format</code>). Bulk load bitmap values must end on a byte boundary relative to the bit count - except for the last set of values loaded.</td><td>a string; default <code>false</code>. </td></tr>
<tr>
<td><code>checkpoint</code></td><td>the name of a checkpoint to open (the reserved name "WiredTigerCheckpoint" opens the most recent internal checkpoint taken for the object). The cursor does not support data modification.</td><td>a string; default empty. </td></tr>
<tr>
<td><code>dump</code></td><td>configure the cursor for dump format inputs and outputs: "hex" selects a simple hexadecimal format, "print" selects a format where only non-printing characters are hexadecimal encoded. The cursor dump format is compatible with the <a class="el" href="command_line.html#util_dump">wt dump</a> and <a class="el" href="command_line.html#util_load">wt load</a> commands.</td><td>a string, chosen from the following options: <code>"hex"</code>, <code>"print"</code>; default empty. </td></tr>
<tr>
<td><code>next_random</code></td><td>configure the cursor to return a pseudo-random record from the object; valid only for row-store cursors. Cursors configured with next_random only support the <a class="el" href="struct_w_t___c_u_r_s_o_r.html#a0503f16bd8f3d05aa3552f229b3a8e1b" title="Return the next record.">WT_CURSOR::next</a> and <a class="el" href="struct_w_t___c_u_r_s_o_r.html#aeea071f192cab12245a50fbe71c3460b" title="Close the cursor.">WT_CURSOR::close</a> methods. See <a class="el" href="cursor_random.html">Cursor random</a> for details.</td><td>a boolean flag; default <code>false</code>. </td></tr>
<tr>
<td><code>overwrite</code></td><td>change the behavior of the cursor's insert method to overwrite previously existing values.</td><td>a boolean flag; default <code>false</code>. </td></tr>
<tr>
<td><code>raw</code></td><td>ignore the encodings for the key and value, manage data as if the formats were <code>"u"</code>. See <a class="el" href="cursors.html#cursor_raw">Raw mode</a> for details.</td><td>a boolean flag; default <code>false</code>. </td></tr>
<tr>
<td><code>statistics_clear</code></td><td>reset statistics counters when the cursor is closed; valid only for statistics cursors.</td><td>a boolean flag; default <code>false</code>. </td></tr>
<tr>
<td><code>statistics_fast</code></td><td>only gather statistics that don't require traversing the tree; valid only for statistics cursors.</td><td>a boolean flag; default <code>false</code>. </td></tr>
<tr>
<td><code>target</code></td><td>if non-empty, backup the list of objects; valid only for a backup data source.</td><td>a list of strings; default empty. </td></tr>
</table>
</td></tr>
<tr><td class="paramname">cursorp</td><td>a pointer to the newly opened cursor </td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>zero on success and a non-zero error code on failure. See <a class="el" href="group__wt.html#error_returns">Error Returns</a> for details. </dd></dl>
</p>
</div>
</div>
<a class="anchor" id="aa761c6e0840b09436289b4a7db0befc2"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">def wiredtiger.Session.reconfigure </td>
<td>(</td>
<td class="paramtype"> </td>
<td class="paramname"><em>self</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"> </td>
<td class="paramname"><em>args</em> </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>reconfigure(self, config) -> int </p>
<p>Reconfigure a session handle. <div class="fragment"><div class="line"> ret = session-><a class="code" href="struct_w_t___s_e_s_s_i_o_n.html#a578f0fbd8a83339f1f9c00e135f006e6" title="Reconfigure a session handle.">reconfigure</a>(session, <span class="stringliteral">"isolation=snapshot"</span>);</div>
</div><!-- fragment --><p> <a class="el" href="struct_w_t___s_e_s_s_i_o_n.html#a578f0fbd8a83339f1f9c00e135f006e6" title="Reconfigure a session handle.">WT_SESSION::reconfigure</a> will fail if a transaction is in progress in the session. All open cursors are reset.<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">session</td><td>the session handle </td></tr>
<tr><td class="paramname">config</td><td>Configuration string, see <a class="el" href="config_strings.html">Configuration Strings</a>. Permitted values: <table class="doxtable">
<tr>
<th>Name</th><th>Effect</th><th>Values </th></tr>
<tr>
<td><code>isolation</code></td><td>the default isolation level for operations in this session.</td><td>a string, chosen from the following options: <code>"read-uncommitted"</code>, <code>"read-committed"</code>, <code>"snapshot"</code>; default <code>read-committed</code>. </td></tr>
</table>
</td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>zero on success and a non-zero error code on failure. See <a class="el" href="group__wt.html#error_returns">Error Returns</a> for details. </dd></dl>
</p>
</div>
</div>
<a class="anchor" id="a661a9bb6dcaf9d6484758ec81d8772b9"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">def wiredtiger.Session.rename </td>
<td>(</td>
<td class="paramtype"> </td>
<td class="paramname"><em>self</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"> </td>
<td class="paramname"><em>args</em> </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>rename(self, oldname, newname, config) -> int </p>
<p>Rename an object. <div class="fragment"><div class="line"> ret = session-><a class="code" href="struct_w_t___s_e_s_s_i_o_n.html#a52f78bc88e48e3905158277c518b80d4" title="Rename an object.">rename</a>(session, <span class="stringliteral">"table:old"</span>, <span class="stringliteral">"table:new"</span>, NULL);</div>
</div><!-- fragment --> <dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">session</td><td>the session handle </td></tr>
<tr><td class="paramname">oldname</td><td>the current URI of the object, such as <code>"table:old"</code> </td></tr>
<tr><td class="paramname">newname</td><td>the new name of the object, such as <code>"table:new"</code> </td></tr>
<tr><td class="paramname">config</td><td>Configuration string, see <a class="el" href="config_strings.html">Configuration Strings</a>. No values currently permitted. </td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>zero on success and a non-zero error code on failure. See <a class="el" href="group__wt.html#error_returns">Error Returns</a> for details. </dd></dl>
</p>
</div>
</div>
<a class="anchor" id="a56d07de3ee9db0059fe25f160c9f9cd3"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">def wiredtiger.Session.rollback_transaction </td>
<td>(</td>
<td class="paramtype"> </td>
<td class="paramname"><em>self</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"> </td>
<td class="paramname"><em>args</em> </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>rollback_transaction(self, config) -> int </p>
<p>Roll back the current transaction. A transaction must be in progress when this method is called.All open cursors are reset.<div class="fragment"><div class="line"> ret =</div>
<div class="line"> session-><a class="code" href="struct_w_t___s_e_s_s_i_o_n.html#afb5b4a69c2c5cafe411b2b04fdc1c75d" title="Open a new cursor on a data source or duplicate an existing cursor.">open_cursor</a>(session, <span class="stringliteral">"table:mytable"</span>, NULL, NULL, &cursor);</div>
<div class="line"> ret = session-><a class="code" href="struct_w_t___s_e_s_s_i_o_n.html#a7e26b16b26b5870498752322fad790bf" title="Start a transaction in this session.">begin_transaction</a>(session, NULL);</div>
<div class="line"> <span class="comment">/*</span></div>
<div class="line"><span class="comment"> * Cursors may be opened before or after the transaction begins, and in</span></div>
<div class="line"><span class="comment"> * either case, subsequent operations are included in the transaction.</span></div>
<div class="line"><span class="comment"> * The begin_transaction call resets all open cursors.</span></div>
<div class="line"><span class="comment"> */</span></div>
<div class="line"></div>
<div class="line"> cursor-><a class="code" href="struct_w_t___c_u_r_s_o_r.html#ad1088d719df40babc1f57d086691ebdc" title="Set the key for the next operation.">set_key</a>(cursor, <span class="stringliteral">"key"</span>);</div>
<div class="line"> cursor-><a class="code" href="struct_w_t___c_u_r_s_o_r.html#a27f7cbd0cd3e561f6a145704813ad64c" title="Set the value for the next operation.">set_value</a>(cursor, <span class="stringliteral">"value"</span>);</div>
<div class="line"> <span class="keywordflow">switch</span> (ret = cursor-><a class="code" href="struct_w_t___c_u_r_s_o_r.html#a444cdc0952e7f8d55d23173516c7037f" title="Update a record.">update</a>(cursor)) {</div>
<div class="line"> <span class="keywordflow">case</span> 0: <span class="comment">/* Update success */</span></div>
<div class="line"> ret = session-><a class="code" href="struct_w_t___s_e_s_s_i_o_n.html#a712226eca5ade5bd123026c624468fa2" title="Commit the current transaction.">commit_transaction</a>(session, NULL);</div>
<div class="line"> <span class="comment">/*</span></div>
<div class="line"><span class="comment"> * The commit_transaction call resets all open cursors.</span></div>
<div class="line"><span class="comment"> * If commit_transaction fails, the transaction was rolled-back.</span></div>
<div class="line"><span class="comment"> */</span></div>
<div class="line"> <span class="keywordflow">break</span>;</div>
<div class="line"> <span class="keywordflow">case</span> <a class="code" href="group__wt.html#ga9650b6e97a88921ec1302935908d0c47" title="Conflict between concurrent operations.">WT_DEADLOCK</a>: <span class="comment">/* Update conflict */</span></div>
<div class="line"> <span class="keywordflow">default</span>: <span class="comment">/* Other error */</span></div>
<div class="line"> ret = session-><a class="code" href="struct_w_t___s_e_s_s_i_o_n.html#ab45f521464ad9e54d9b15efc2ffe20a1" title="Roll back the current transaction.">rollback_transaction</a>(session, NULL);</div>
<div class="line"> <span class="comment">/* The rollback_transaction call resets all open cursors. */</span></div>
<div class="line"> <span class="keywordflow">break</span>;</div>
<div class="line"> }</div>
<div class="line"></div>
<div class="line"> <span class="comment">/* Cursors remain open and may be used for multiple transactions. */</span></div>
</div><!-- fragment --> <dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">session</td><td>the session handle </td></tr>
<tr><td class="paramname">config</td><td>Configuration string, see <a class="el" href="config_strings.html">Configuration Strings</a>. No values currently permitted. </td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>zero on success and a non-zero error code on failure. See <a class="el" href="group__wt.html#error_returns">Error Returns</a> for details. </dd></dl>
</p>
</div>
</div>
<a class="anchor" id="ac77449102799219855d198197426af5e"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">def wiredtiger.Session.salvage </td>
<td>(</td>
<td class="paramtype"> </td>
<td class="paramname"><em>self</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"> </td>
<td class="paramname"><em>args</em> </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>salvage(self, name, config) -> int </p>
<p>Salvage a file or table. Salvage rebuilds the file, or files of which a table is comprised, discarding any corrupted file blocks.Previously deleted records may re-appear, and inserted records may disappear, when salvage is done, so salvage should not be run unless it is known to be necessary. Normally, salvage should be called after a file or table has been corrupted, as reported by the <a class="el" href="struct_w_t___s_e_s_s_i_o_n.html#a0334da4c85fe8af4197c9a7de27467d3" title="Verify a file or table.">WT_SESSION::verify</a> method.Files are rebuilt in place, the salvage method overwrites the existing files.<div class="fragment"><div class="line"> ret = session-><a class="code" href="struct_w_t___s_e_s_s_i_o_n.html#ab3399430e474f7005bd5ea20e6ec7a8e" title="Salvage a file or table.">salvage</a>(session, <span class="stringliteral">"table:mytable"</span>, NULL);</div>
</div><!-- fragment --> <dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">session</td><td>the session handle </td></tr>
<tr><td class="paramname">name</td><td>the URI of the file or table to salvage </td></tr>
<tr><td class="paramname">config</td><td>Configuration string, see <a class="el" href="config_strings.html">Configuration Strings</a>. Permitted values: <table class="doxtable">
<tr>
<th>Name</th><th>Effect</th><th>Values </th></tr>
<tr>
<td><code>force</code></td><td>force salvage even of files that do not appear to be WiredTiger files.</td><td>a boolean flag; default <code>false</code>. </td></tr>
</table>
</td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>zero on success and a non-zero error code on failure. See <a class="el" href="group__wt.html#error_returns">Error Returns</a> for details. </dd></dl>
</p>
</div>
</div>
<a class="anchor" id="a80a9ee8697a61a1ad13d893d67d981bb"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">def wiredtiger.Session.truncate </td>
<td>(</td>
<td class="paramtype"> </td>
<td class="paramname"><em>self</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"> </td>
<td class="paramname"><em>args</em> </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>truncate(self, name, start, stop, config) -> int </p>
<p>Truncate a file, table or cursor range. Truncate a file or table. </p>
<div class="fragment"><div class="line"> ret = session-><a class="code" href="struct_w_t___s_e_s_s_i_o_n.html#ac2bad195e24710d52d730fe3a7c1756a" title="Truncate a file, table or cursor range.">truncate</a>(session, <span class="stringliteral">"table:mytable"</span>, NULL, NULL, NULL);</div>
</div><!-- fragment --><p> Truncate a cursor range. When truncating based on a cursor position, it is not required the cursor reference a record in the object, only that the key be set. This allows applications to discard portions of the object name space without knowing exactly what records the object contains. </p>
<div class="fragment"><div class="line"> <a class="code" href="struct_w_t___c_u_r_s_o_r.html" title="A WT_CURSOR handle is the interface to a cursor.">WT_CURSOR</a> *start, *stop;</div>
<div class="line"></div>