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 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1184 1185 1186 1187 1188 1189 1190 1191 1192 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1206 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 1250 1251 1252 1253 1254 1255 1256 1257 1258 1259 1260 1261 1262 1263 1264 1265 1266 1267 1268 1269 1270 1271 1272 1273 1274 1275 1276 1277 1278 1279 1280 1281 1282 1283 1284 1285 1286 1287 1288 1289 1290 1291 1292 1293 1294 1295 1296 1297 1298 1299 1300 1301 1302 1303 1304 1305 1306 1307 1308 1309 1310 1311 1312 1313 1314 1315 1316 1317 1318 1319 1320 1321 1322 1323 1324 1325 1326 1327 1328 1329 1330 1331 1332 1333 1334 1335 1336 1337 1338 1339 1340 1341 1342 1343 1344 1345 1346 1347 1348 1349 1350 1351 1352 1353 1354 1355 1356 1357 1358 1359 1360 1361 1362 1363 1364 1365 1366 1367 1368 1369 1370 1371 1372 1373 1374 1375 1376 1377 1378 1379 1380 1381 1382 1383 1384 1385 1386 1387 1388 1389 1390 1391 1392 1393 1394 1395 1396 1397 1398 1399 1400 1401 1402 1403 1404 1405 1406 1407 1408 1409 1410 1411 1412 1413 1414 1415 1416 1417 1418 1419 1420 1421 1422 1423 1424 1425 1426 1427 1428 1429 1430 1431 1432 1433 1434 1435 1436 1437 1438 1439 1440 1441 1442 1443 1444 1445 1446 1447 1448 1449 1450 1451 1452 1453 1454 1455 1456 1457 1458 1459 1460 1461 1462 1463 1464 1465 1466 1467 1468 1469 1470 1471 1472 1473 1474 1475 1476 1477 1478 1479 1480 1481 1482 1483 1484 1485 1486 1487 1488 1489 1490 1491 1492 1493 1494 1495 1496 1497 1498 1499 1500 1501 1502 1503 1504 1505 1506 1507 1508 1509 1510 1511 1512 1513 1514 1515 1516 1517 1518 1519 1520 1521 1522 1523 1524 1525 1526 1527 1528 1529 1530 1531 1532 1533 1534 1535 1536 1537 1538 1539 1540 1541 1542 1543 1544 1545 1546 1547 1548 1549 1550 1551 1552 1553 1554 1555 1556 1557 1558 1559 1560 1561 1562 1563 1564 1565 1566 1567 1568 1569 1570 1571 1572 1573 1574 1575 1576 1577 1578 1579 1580 1581 1582 1583 1584 1585 1586 1587 1588 1589 1590 1591 1592 1593 1594 1595 1596 1597 1598 1599 1600 1601 1602 1603 1604 1605 1606 1607 1608 1609 1610 1611 1612 1613 1614 1615 1616 1617 1618 1619 1620 1621 1622 1623 1624 1625 1626 1627 1628 1629 1630 1631 1632 1633 1634 1635 1636 1637 1638 1639 1640 1641 1642 1643 1644 1645 1646 1647 1648 1649 1650 1651 1652 1653 1654 1655 1656 1657 1658 1659 1660 1661 1662 1663 1664 1665 1666 1667 1668 1669 1670 1671 1672 1673 1674 1675 1676 1677 1678 1679 1680 1681 1682 1683 1684 1685 1686 1687 1688 1689 1690 1691 1692 1693 1694 1695 1696 1697 1698 1699 1700 1701 1702 1703 1704 1705 1706 1707 1708 1709 1710 1711 1712 1713 1714 1715 1716 1717 1718 1719 1720 1721 1722 1723 1724 1725 1726 1727 1728 1729 1730 1731 1732 1733 1734 1735 1736 1737 1738 1739 1740 1741 1742 1743 1744 1745 1746 1747 1748 1749 1750 1751 1752 1753 1754 1755 1756 1757 1758 1759 1760 1761 1762 1763 1764 1765 1766 1767 1768 1769 1770 1771 1772 1773 1774 1775 1776 1777 1778 1779 1780
|
<!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: WT_SESSION Struct 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="navtreedata.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 3.1.0</span>
</div>
<div id="projectbrief"><!-- 3.1.0 --></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.13 -->
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
$(function() {
initMenu('',false,false,'search.php','Search');
});
</script>
<div id="main-nav"></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('struct_w_t___s_e_s_s_i_o_n.html','');});
</script>
<div id="doc-content">
<div class="header">
<div class="summary">
<a href="struct_w_t___s_e_s_s_i_o_n-members.html">List of all members</a> |
<a href="#pub-methods">Public Member Functions</a> |
<a href="#pub-attribs">Public Attributes</a> </div>
<div class="headertitle">
<div class="title">WT_SESSION Struct Reference<div class="ingroups"><a class="el" href="group__wt.html">WiredTiger API</a></div></div> </div>
</div><!--header-->
<div class="contents">
<p>All data operations are performed in the context of a <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="struct_w_t___s_e_s_s_i_o_n.html#details">More...</a></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:a96f25dfa6447034aea1f67ab02ab5698"><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="struct_w_t___s_e_s_s_i_o_n.html#a96f25dfa6447034aea1f67ab02ab5698">close</a> (<a class="el" href="struct_w_t___s_e_s_s_i_o_n.html">WT_SESSION</a> *session, const char *config)</td></tr>
<tr class="memdesc:a96f25dfa6447034aea1f67ab02ab5698"><td class="mdescLeft"> </td><td class="mdescRight">Close the session handle. <a href="#a96f25dfa6447034aea1f67ab02ab5698">More...</a><br /></td></tr>
<tr class="separator:a96f25dfa6447034aea1f67ab02ab5698"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a578f0fbd8a83339f1f9c00e135f006e6"><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="struct_w_t___s_e_s_s_i_o_n.html#a578f0fbd8a83339f1f9c00e135f006e6">reconfigure</a> (<a class="el" href="struct_w_t___s_e_s_s_i_o_n.html">WT_SESSION</a> *session, const char *config)</td></tr>
<tr class="memdesc:a578f0fbd8a83339f1f9c00e135f006e6"><td class="mdescLeft"> </td><td class="mdescRight">Reconfigure a session handle. <a href="#a578f0fbd8a83339f1f9c00e135f006e6">More...</a><br /></td></tr>
<tr class="separator:a578f0fbd8a83339f1f9c00e135f006e6"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:abe03ccb716e097ed1bb4d42eb733c1f9"><td class="memItemLeft" align="right" valign="top">const char * </td><td class="memItemRight" valign="bottom"><a class="el" href="struct_w_t___s_e_s_s_i_o_n.html#abe03ccb716e097ed1bb4d42eb733c1f9">strerror</a> (<a class="el" href="struct_w_t___s_e_s_s_i_o_n.html">WT_SESSION</a> *session, int error)</td></tr>
<tr class="memdesc:abe03ccb716e097ed1bb4d42eb733c1f9"><td class="mdescLeft"> </td><td class="mdescRight">Return information about an error as a string. <a href="#abe03ccb716e097ed1bb4d42eb733c1f9">More...</a><br /></td></tr>
<tr class="separator:abe03ccb716e097ed1bb4d42eb733c1f9"><td class="memSeparator" colspan="2"> </td></tr>
<tr><td colspan="2"><div class="groupHeader">Cursor handles</div></td></tr>
<tr class="memitem:afb5b4a69c2c5cafe411b2b04fdc1c75d"><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="struct_w_t___s_e_s_s_i_o_n.html#afb5b4a69c2c5cafe411b2b04fdc1c75d">open_cursor</a> (<a class="el" href="struct_w_t___s_e_s_s_i_o_n.html">WT_SESSION</a> *session, const char *uri, <a class="el" href="struct_w_t___c_u_r_s_o_r.html">WT_CURSOR</a> *to_dup, const char *config, <a class="el" href="struct_w_t___c_u_r_s_o_r.html">WT_CURSOR</a> **cursorp)</td></tr>
<tr class="memdesc:afb5b4a69c2c5cafe411b2b04fdc1c75d"><td class="mdescLeft"> </td><td class="mdescRight">Open a new cursor on a data source or duplicate an existing cursor. <a href="#afb5b4a69c2c5cafe411b2b04fdc1c75d">More...</a><br /></td></tr>
<tr class="separator:afb5b4a69c2c5cafe411b2b04fdc1c75d"><td class="memSeparator" colspan="2"> </td></tr>
<tr><td colspan="2"><div class="groupHeader">Table operations</div></td></tr>
<tr class="memitem:ac6f0630cb70bb057aa4512f7888dc701"><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="struct_w_t___s_e_s_s_i_o_n.html#ac6f0630cb70bb057aa4512f7888dc701">alter</a> (<a class="el" href="struct_w_t___s_e_s_s_i_o_n.html">WT_SESSION</a> *session, const char *name, const char *config)</td></tr>
<tr class="memdesc:ac6f0630cb70bb057aa4512f7888dc701"><td class="mdescLeft"> </td><td class="mdescRight">Alter a table. <a href="#ac6f0630cb70bb057aa4512f7888dc701">More...</a><br /></td></tr>
<tr class="separator:ac6f0630cb70bb057aa4512f7888dc701"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a358ca4141d59c345f401c58501276bbb"><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="struct_w_t___s_e_s_s_i_o_n.html#a358ca4141d59c345f401c58501276bbb">create</a> (<a class="el" href="struct_w_t___s_e_s_s_i_o_n.html">WT_SESSION</a> *session, const char *name, const char *config)</td></tr>
<tr class="memdesc:a358ca4141d59c345f401c58501276bbb"><td class="mdescLeft"> </td><td class="mdescRight">Create a table, column group, index or file. <a href="#a358ca4141d59c345f401c58501276bbb">More...</a><br /></td></tr>
<tr class="separator:a358ca4141d59c345f401c58501276bbb"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:aafa7a12a4891a5bfdc98673a5b8f9c69"><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="struct_w_t___s_e_s_s_i_o_n.html#aafa7a12a4891a5bfdc98673a5b8f9c69">compact</a> (<a class="el" href="struct_w_t___s_e_s_s_i_o_n.html">WT_SESSION</a> *session, const char *name, const char *config)</td></tr>
<tr class="memdesc:aafa7a12a4891a5bfdc98673a5b8f9c69"><td class="mdescLeft"> </td><td class="mdescRight">Compact a live row- or column-store btree or LSM tree. <a href="#aafa7a12a4891a5bfdc98673a5b8f9c69">More...</a><br /></td></tr>
<tr class="separator:aafa7a12a4891a5bfdc98673a5b8f9c69"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:adf785ef53c16d9dcc77e22cc04c87b70"><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="struct_w_t___s_e_s_s_i_o_n.html#adf785ef53c16d9dcc77e22cc04c87b70">drop</a> (<a class="el" href="struct_w_t___s_e_s_s_i_o_n.html">WT_SESSION</a> *session, const char *name, const char *config)</td></tr>
<tr class="memdesc:adf785ef53c16d9dcc77e22cc04c87b70"><td class="mdescLeft"> </td><td class="mdescRight">Drop (delete) an object. <a href="#adf785ef53c16d9dcc77e22cc04c87b70">More...</a><br /></td></tr>
<tr class="separator:adf785ef53c16d9dcc77e22cc04c87b70"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:ae0ab118df83d173c6a20eb1ea3f3fd84"><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="struct_w_t___s_e_s_s_i_o_n.html#ae0ab118df83d173c6a20eb1ea3f3fd84">join</a> (<a class="el" href="struct_w_t___s_e_s_s_i_o_n.html">WT_SESSION</a> *session, <a class="el" href="struct_w_t___c_u_r_s_o_r.html">WT_CURSOR</a> *join_cursor, <a class="el" href="struct_w_t___c_u_r_s_o_r.html">WT_CURSOR</a> *ref_cursor, const char *config)</td></tr>
<tr class="memdesc:ae0ab118df83d173c6a20eb1ea3f3fd84"><td class="mdescLeft"> </td><td class="mdescRight">Join a join cursor with a reference cursor. <a href="#ae0ab118df83d173c6a20eb1ea3f3fd84">More...</a><br /></td></tr>
<tr class="separator:ae0ab118df83d173c6a20eb1ea3f3fd84"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a1843292630960309129dcfe00e1a3817"><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="struct_w_t___s_e_s_s_i_o_n.html#a1843292630960309129dcfe00e1a3817">log_flush</a> (<a class="el" href="struct_w_t___s_e_s_s_i_o_n.html">WT_SESSION</a> *session, const char *config)</td></tr>
<tr class="memdesc:a1843292630960309129dcfe00e1a3817"><td class="mdescLeft"> </td><td class="mdescRight">Flush the log. <a href="#a1843292630960309129dcfe00e1a3817">More...</a><br /></td></tr>
<tr class="separator:a1843292630960309129dcfe00e1a3817"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:ac85541ca42d7596857d9f50e03c78eb5"><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="struct_w_t___s_e_s_s_i_o_n.html#ac85541ca42d7596857d9f50e03c78eb5">log_printf</a> (<a class="el" href="struct_w_t___s_e_s_s_i_o_n.html">WT_SESSION</a> *session, const char *format,...)</td></tr>
<tr class="memdesc:ac85541ca42d7596857d9f50e03c78eb5"><td class="mdescLeft"> </td><td class="mdescRight">Insert a <a class="el" href="group__wt.html#ga8cf04a003979e7852209079d4093d783" title="message ">WT_LOGREC_MESSAGE</a> type record in the database log files (the database must be configured for logging when this method is called). <a href="#ac85541ca42d7596857d9f50e03c78eb5">More...</a><br /></td></tr>
<tr class="separator:ac85541ca42d7596857d9f50e03c78eb5"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:ab21ec3055cade4d2682f162783314984"><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="struct_w_t___s_e_s_s_i_o_n.html#ab21ec3055cade4d2682f162783314984">rebalance</a> (<a class="el" href="struct_w_t___s_e_s_s_i_o_n.html">WT_SESSION</a> *session, const char *uri, const char *config)</td></tr>
<tr class="memdesc:ab21ec3055cade4d2682f162783314984"><td class="mdescLeft"> </td><td class="mdescRight">Rebalance a table or file, see <a class="el" href="rebalance.html">Rebalance</a>. <a href="#ab21ec3055cade4d2682f162783314984">More...</a><br /></td></tr>
<tr class="separator:ab21ec3055cade4d2682f162783314984"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a1d24b02549009f78b7c6463da0247614"><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="struct_w_t___s_e_s_s_i_o_n.html#a1d24b02549009f78b7c6463da0247614">rename</a> (<a class="el" href="struct_w_t___s_e_s_s_i_o_n.html">WT_SESSION</a> *session, const char *uri, const char *newuri, const char *config)</td></tr>
<tr class="memdesc:a1d24b02549009f78b7c6463da0247614"><td class="mdescLeft"> </td><td class="mdescRight">Rename an object. <a href="#a1d24b02549009f78b7c6463da0247614">More...</a><br /></td></tr>
<tr class="separator:a1d24b02549009f78b7c6463da0247614"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a307800663ed211447a18c46863c28787"><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="struct_w_t___s_e_s_s_i_o_n.html#a307800663ed211447a18c46863c28787">reset</a> (<a class="el" href="struct_w_t___s_e_s_s_i_o_n.html">WT_SESSION</a> *session)</td></tr>
<tr class="memdesc:a307800663ed211447a18c46863c28787"><td class="mdescLeft"> </td><td class="mdescRight">Reset the session handle. <a href="#a307800663ed211447a18c46863c28787">More...</a><br /></td></tr>
<tr class="separator:a307800663ed211447a18c46863c28787"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:ab3399430e474f7005bd5ea20e6ec7a8e"><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="struct_w_t___s_e_s_s_i_o_n.html#ab3399430e474f7005bd5ea20e6ec7a8e">salvage</a> (<a class="el" href="struct_w_t___s_e_s_s_i_o_n.html">WT_SESSION</a> *session, const char *name, const char *config)</td></tr>
<tr class="memdesc:ab3399430e474f7005bd5ea20e6ec7a8e"><td class="mdescLeft"> </td><td class="mdescRight">Salvage a table or file. <a href="#ab3399430e474f7005bd5ea20e6ec7a8e">More...</a><br /></td></tr>
<tr class="separator:ab3399430e474f7005bd5ea20e6ec7a8e"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:ac2bad195e24710d52d730fe3a7c1756a"><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="struct_w_t___s_e_s_s_i_o_n.html#ac2bad195e24710d52d730fe3a7c1756a">truncate</a> (<a class="el" href="struct_w_t___s_e_s_s_i_o_n.html">WT_SESSION</a> *session, const char *name, <a class="el" href="struct_w_t___c_u_r_s_o_r.html">WT_CURSOR</a> *start, <a class="el" href="struct_w_t___c_u_r_s_o_r.html">WT_CURSOR</a> *stop, const char *config)</td></tr>
<tr class="memdesc:ac2bad195e24710d52d730fe3a7c1756a"><td class="mdescLeft"> </td><td class="mdescRight">Truncate a file, table or cursor range. <a href="#ac2bad195e24710d52d730fe3a7c1756a">More...</a><br /></td></tr>
<tr class="separator:ac2bad195e24710d52d730fe3a7c1756a"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a556046adc68a33bd317865c6a8d9ad69"><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="struct_w_t___s_e_s_s_i_o_n.html#a556046adc68a33bd317865c6a8d9ad69">upgrade</a> (<a class="el" href="struct_w_t___s_e_s_s_i_o_n.html">WT_SESSION</a> *session, const char *name, const char *config)</td></tr>
<tr class="memdesc:a556046adc68a33bd317865c6a8d9ad69"><td class="mdescLeft"> </td><td class="mdescRight">Upgrade a table or file. <a href="#a556046adc68a33bd317865c6a8d9ad69">More...</a><br /></td></tr>
<tr class="separator:a556046adc68a33bd317865c6a8d9ad69"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a0334da4c85fe8af4197c9a7de27467d3"><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="struct_w_t___s_e_s_s_i_o_n.html#a0334da4c85fe8af4197c9a7de27467d3">verify</a> (<a class="el" href="struct_w_t___s_e_s_s_i_o_n.html">WT_SESSION</a> *session, const char *name, const char *config)</td></tr>
<tr class="memdesc:a0334da4c85fe8af4197c9a7de27467d3"><td class="mdescLeft"> </td><td class="mdescRight">Verify a table or file. <a href="#a0334da4c85fe8af4197c9a7de27467d3">More...</a><br /></td></tr>
<tr class="separator:a0334da4c85fe8af4197c9a7de27467d3"><td class="memSeparator" colspan="2"> </td></tr>
<tr><td colspan="2"><div class="groupHeader">Transactions</div></td></tr>
<tr class="memitem:a7e26b16b26b5870498752322fad790bf"><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="struct_w_t___s_e_s_s_i_o_n.html#a7e26b16b26b5870498752322fad790bf">begin_transaction</a> (<a class="el" href="struct_w_t___s_e_s_s_i_o_n.html">WT_SESSION</a> *session, const char *config)</td></tr>
<tr class="memdesc:a7e26b16b26b5870498752322fad790bf"><td class="mdescLeft"> </td><td class="mdescRight">Start a transaction in this session. <a href="#a7e26b16b26b5870498752322fad790bf">More...</a><br /></td></tr>
<tr class="separator:a7e26b16b26b5870498752322fad790bf"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a712226eca5ade5bd123026c624468fa2"><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="struct_w_t___s_e_s_s_i_o_n.html#a712226eca5ade5bd123026c624468fa2">commit_transaction</a> (<a class="el" href="struct_w_t___s_e_s_s_i_o_n.html">WT_SESSION</a> *session, const char *config)</td></tr>
<tr class="memdesc:a712226eca5ade5bd123026c624468fa2"><td class="mdescLeft"> </td><td class="mdescRight">Commit the current transaction. <a href="#a712226eca5ade5bd123026c624468fa2">More...</a><br /></td></tr>
<tr class="separator:a712226eca5ade5bd123026c624468fa2"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a96b8a369610c8cbb08b8a7c504fd1008"><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="struct_w_t___s_e_s_s_i_o_n.html#a96b8a369610c8cbb08b8a7c504fd1008">prepare_transaction</a> (<a class="el" href="struct_w_t___s_e_s_s_i_o_n.html">WT_SESSION</a> *session, const char *config)</td></tr>
<tr class="memdesc:a96b8a369610c8cbb08b8a7c504fd1008"><td class="mdescLeft"> </td><td class="mdescRight">Prepare the current transaction. <a href="#a96b8a369610c8cbb08b8a7c504fd1008">More...</a><br /></td></tr>
<tr class="separator:a96b8a369610c8cbb08b8a7c504fd1008"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:ab45f521464ad9e54d9b15efc2ffe20a1"><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="struct_w_t___s_e_s_s_i_o_n.html#ab45f521464ad9e54d9b15efc2ffe20a1">rollback_transaction</a> (<a class="el" href="struct_w_t___s_e_s_s_i_o_n.html">WT_SESSION</a> *session, const char *config)</td></tr>
<tr class="memdesc:ab45f521464ad9e54d9b15efc2ffe20a1"><td class="mdescLeft"> </td><td class="mdescRight">Roll back the current transaction. <a href="#ab45f521464ad9e54d9b15efc2ffe20a1">More...</a><br /></td></tr>
<tr class="separator:ab45f521464ad9e54d9b15efc2ffe20a1"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:aa449082ce4de7ee86a773595c416a69f"><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="struct_w_t___s_e_s_s_i_o_n.html#aa449082ce4de7ee86a773595c416a69f">timestamp_transaction</a> (<a class="el" href="struct_w_t___s_e_s_s_i_o_n.html">WT_SESSION</a> *session, const char *config)</td></tr>
<tr class="memdesc:aa449082ce4de7ee86a773595c416a69f"><td class="mdescLeft"> </td><td class="mdescRight">Set a timestamp on a transaction. <a href="#aa449082ce4de7ee86a773595c416a69f">More...</a><br /></td></tr>
<tr class="separator:aa449082ce4de7ee86a773595c416a69f"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a6550c9079198955c5071583941c85bbf"><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="struct_w_t___s_e_s_s_i_o_n.html#a6550c9079198955c5071583941c85bbf">checkpoint</a> (<a class="el" href="struct_w_t___s_e_s_s_i_o_n.html">WT_SESSION</a> *session, const char *config)</td></tr>
<tr class="memdesc:a6550c9079198955c5071583941c85bbf"><td class="mdescLeft"> </td><td class="mdescRight">Write a transactionally consistent snapshot of a database or set of objects. <a href="#a6550c9079198955c5071583941c85bbf">More...</a><br /></td></tr>
<tr class="separator:a6550c9079198955c5071583941c85bbf"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:ab15f6b5f81e6e98c9b6b41c451732873"><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="struct_w_t___s_e_s_s_i_o_n.html#ab15f6b5f81e6e98c9b6b41c451732873">snapshot</a> (<a class="el" href="struct_w_t___s_e_s_s_i_o_n.html">WT_SESSION</a> *session, const char *config)</td></tr>
<tr class="memdesc:ab15f6b5f81e6e98c9b6b41c451732873"><td class="mdescLeft"> </td><td class="mdescRight">Manage named snapshot transactions. <a href="#ab15f6b5f81e6e98c9b6b41c451732873">More...</a><br /></td></tr>
<tr class="separator:ab15f6b5f81e6e98c9b6b41c451732873"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a1d108fab498cfddbb09ee23e3321a88d"><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="struct_w_t___s_e_s_s_i_o_n.html#a1d108fab498cfddbb09ee23e3321a88d">transaction_pinned_range</a> (<a class="el" href="struct_w_t___s_e_s_s_i_o_n.html">WT_SESSION</a> *session, uint64_t *range)</td></tr>
<tr class="memdesc:a1d108fab498cfddbb09ee23e3321a88d"><td class="mdescLeft"> </td><td class="mdescRight">Return the transaction ID range pinned by the session handle. <a href="#a1d108fab498cfddbb09ee23e3321a88d">More...</a><br /></td></tr>
<tr class="separator:a1d108fab498cfddbb09ee23e3321a88d"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a61c8c3ad80d8228172db66ca70bd90fd"><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="struct_w_t___s_e_s_s_i_o_n.html#a61c8c3ad80d8228172db66ca70bd90fd">transaction_sync</a> (<a class="el" href="struct_w_t___s_e_s_s_i_o_n.html">WT_SESSION</a> *session, const char *config)</td></tr>
<tr class="memdesc:a61c8c3ad80d8228172db66ca70bd90fd"><td class="mdescLeft"> </td><td class="mdescRight">Wait for a transaction to become synchronized. <a href="#a61c8c3ad80d8228172db66ca70bd90fd">More...</a><br /></td></tr>
<tr class="separator:a61c8c3ad80d8228172db66ca70bd90fd"><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:a28a33717c138b4c481019947e230f8f6"><td class="memItemLeft" align="right" valign="top"><a class="el" href="struct_w_t___c_o_n_n_e_c_t_i_o_n.html">WT_CONNECTION</a> * </td><td class="memItemRight" valign="bottom"><a class="el" href="struct_w_t___s_e_s_s_i_o_n.html#a28a33717c138b4c481019947e230f8f6">connection</a></td></tr>
<tr class="memdesc:a28a33717c138b4c481019947e230f8f6"><td class="mdescLeft"> </td><td class="mdescRight">The connection for this session. <a href="#a28a33717c138b4c481019947e230f8f6">More...</a><br /></td></tr>
<tr class="separator:a28a33717c138b4c481019947e230f8f6"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a480525d3881dfcb90060af823a7f4a52"><td class="memItemLeft" align="right" valign="top"><a id="a480525d3881dfcb90060af823a7f4a52"></a>
void * </td><td class="memItemRight" valign="bottom"><a class="el" href="struct_w_t___s_e_s_s_i_o_n.html#a480525d3881dfcb90060af823a7f4a52">app_private</a></td></tr>
<tr class="memdesc:a480525d3881dfcb90060af823a7f4a52"><td class="mdescLeft"> </td><td class="mdescRight">A location for applications to store information that will be available in callbacks taking a <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> handle. <br /></td></tr>
<tr class="separator:a480525d3881dfcb90060af823a7f4a52"><td class="memSeparator" colspan="2"> </td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p>All data operations are performed in the context of a <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>
<p>This encapsulates the thread and transactional context of the operation.</p>
<p><b>Thread safety:</b> A <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> handle is not usually shared between threads, see <a class="el" href="threads.html">Multithreading</a> for more information. </p>
<dl><dt><b>Examples: </b></dt><dd><a class="el" href="ex_access_8c-example.html#_a2">ex_access.c</a>, <a class="el" href="ex_async_8c-example.html#_a11">ex_async.c</a>, <a class="el" href="ex_call_center_8c-example.html#_a1">ex_call_center.c</a>, <a class="el" href="ex_cursor_8c-example.html#_a15">ex_cursor.c</a>, <a class="el" href="ex_encrypt_8c-example.html#_a2">ex_encrypt.c</a>, <a class="el" href="ex_extending_8c-example.html#_a1">ex_extending.c</a>, <a class="el" href="ex_extractor_8c-example.html#_a1">ex_extractor.c</a>, <a class="el" href="ex_file_system_8c-example.html#_a4">ex_file_system.c</a>, <a class="el" href="ex_hello_8c-example.html#_a1">ex_hello.c</a>, <a class="el" href="ex_log_8c-example.html#_a1">ex_log.c</a>, <a class="el" href="ex_pack_8c-example.html#_a1">ex_pack.c</a>, <a class="el" href="ex_schema_8c-example.html#_a2">ex_schema.c</a>, <a class="el" href="ex_stat_8c-example.html#_a1">ex_stat.c</a>, <a class="el" href="ex_thread_8c-example.html#_a2">ex_thread.c</a>, <a class="el" href="nop_encrypt_8c-example.html#_a2">nop_encrypt.c</a>, and <a class="el" href="rotn_encrypt_8c-example.html#_a2">rotn_encrypt.c</a>.</dd>
</dl></div><h2 class="groupheader">Member Function Documentation</h2>
<a id="ac6f0630cb70bb057aa4512f7888dc701"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ac6f0630cb70bb057aa4512f7888dc701">◆ </a></span>alter()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">int WT_SESSION::alter </td>
<td>(</td>
<td class="paramtype"><a class="el" href="struct_w_t___s_e_s_s_i_o_n.html">WT_SESSION</a> * </td>
<td class="paramname"><em>session</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const char * </td>
<td class="paramname"><em>name</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const char * </td>
<td class="paramname"><em>config</em> </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Alter a table. </p>
<p>This will allow modification of some table settings after creation.</p>
<p>This method requires exclusive access to the specified data source(s). If any cursors are open with the specified name(s) or a data source is otherwise in use, the call will fail and return <code>EBUSY</code>.</p>
<div class="fragment"><div class="line"> error_check(session-><a class="code" href="struct_w_t___s_e_s_s_i_o_n.html#ac6f0630cb70bb057aa4512f7888dc701">alter</a>(session,</div><div class="line"> <span class="stringliteral">"table:mytable"</span>, <span class="stringliteral">"access_pattern_hint=random"</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 alter, 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>access_pattern_hint</code></td><td>It is recommended that workloads that consist primarily of updates and/or point queries specify <code>random</code>. Workloads that do many cursor scans through large ranges of data specify <code>sequential</code> and other workloads specify <code>none</code>. The option leads to an advisory call to an appropriate operating system API where available.</td><td>a string, chosen from the following options: <code>"none"</code>, <code>"random"</code>, <code>"sequential"</code>; default <code>none</code>. </td></tr>
<tr>
<td><code>app_metadata</code></td><td>application-owned metadata for this object.</td><td>a string; default empty. </td></tr>
<tr>
<td><code>cache_resident</code></td><td>do not ever evict the object's pages from cache. Not compatible with LSM tables; see <a class="el" href="tune_cache.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>log = (</code></td><td>the transaction log configuration for this object. Only valid if log is enabled in <a class="el" href="group__wt.html#gacbe8d118f978f5bfc8ccb4c77c9e8813" title="Open a connection to a database. ">wiredtiger_open</a>.</td><td>a set of related configuration options defined below. </td></tr>
<tr>
<td><code>    enabled</code></td><td>if false, this object has checkpoint-level durability.</td><td>a boolean flag; default <code>true</code>. </td></tr>
<tr>
<td><code> )</code></td><td></td><td></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="error_handling.html">Error handling</a> for details. </dd></dl>
</div>
</div>
<a id="a7e26b16b26b5870498752322fad790bf"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a7e26b16b26b5870498752322fad790bf">◆ </a></span>begin_transaction()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">int WT_SESSION::begin_transaction </td>
<td>(</td>
<td class="paramtype"><a class="el" href="struct_w_t___s_e_s_s_i_o_n.html">WT_SESSION</a> * </td>
<td class="paramname"><em>session</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const char * </td>
<td class="paramname"><em>config</em> </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Start a transaction in this session. </p>
<p>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.</p>
<p>This method must not be called on a session with an active transaction.</p>
<div class="fragment"><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"> * Opening cursors before the transaction begins allows applications to</span></div><div class="line"><span class="comment"> * cache cursors and use them for multiple operations.</span></div><div class="line"><span class="comment"> */</span></div><div class="line"> error_check(session-><a class="code" href="struct_w_t___s_e_s_s_i_o_n.html#afb5b4a69c2c5cafe411b2b04fdc1c75d">open_cursor</a>(</div><div class="line"> session, <span class="stringliteral">"table:mytable"</span>, NULL, NULL, &cursor));</div><div class="line"> error_check(session-><a class="code" href="struct_w_t___s_e_s_s_i_o_n.html#a7e26b16b26b5870498752322fad790bf">begin_transaction</a>(session, NULL));</div><div class="line"></div><div class="line"> cursor->set_key(cursor, <span class="stringliteral">"key"</span>);</div><div class="line"> cursor->set_value(cursor, <span class="stringliteral">"value"</span>);</div><div class="line"> <span class="keywordflow">switch</span> (cursor->update(cursor)) {</div><div class="line"> <span class="keywordflow">case</span> 0: <span class="comment">/* Update success */</span></div><div class="line"> error_check(session-><a class="code" href="struct_w_t___s_e_s_s_i_o_n.html#a712226eca5ade5bd123026c624468fa2">commit_transaction</a>(session, NULL));</div><div class="line"> <span class="comment">/*</span></div><div class="line"><span class="comment"> * If commit_transaction succeeds, cursors remain positioned; if</span></div><div class="line"><span class="comment"> * commit_transaction fails, the transaction was rolled-back and</span></div><div class="line"><span class="comment"> * and all cursors are reset.</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#ga5ee3c6fcd074e11efd118f3e68e91db8">WT_ROLLBACK</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"> error_check(session-><a class="code" href="struct_w_t___s_e_s_s_i_o_n.html#ab45f521464ad9e54d9b15efc2ffe20a1">rollback_transaction</a>(session, NULL));</div><div class="line"> <span class="comment">/* The rollback_transaction call resets all 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">/*</span></div><div class="line"><span class="comment"> * Cursors remain open and may be used for multiple transactions.</span></div><div class="line"><span class="comment"> */</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>ignore_prepare</code></td><td>whether to ignore the updates by other prepared transactions as part of read operations of this transaction.</td><td>a boolean flag; default <code>false</code>. </td></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>read_timestamp</code></td><td>read using the specified timestamp. The supplied value must not be older than the current oldest timestamp. See <a class="el" href="transactions.html#transaction_timestamps">Application-specified Transaction Timestamps</a>.</td><td>a string; default empty. </td></tr>
<tr>
<td><code>round_to_oldest</code></td><td>if read timestamp is earlier than oldest timestamp, read timestamp will be rounded to oldest timestamp.</td><td>a boolean flag; default <code>false</code>. </td></tr>
<tr>
<td><code>snapshot</code></td><td>use a named, in-memory snapshot, see <a class="el" href="transactions.html#transaction_named_snapshots">Named Snapshots</a>.</td><td>a string; default empty. </td></tr>
<tr>
<td><code>sync</code></td><td>whether to sync log records when the transaction commits, inherited from <a class="el" href="group__wt.html#gacbe8d118f978f5bfc8ccb4c77c9e8813" title="Open a connection to a database. ">wiredtiger_open</a> <code>transaction_sync</code>.</td><td>a boolean flag; 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="error_handling.html">Error handling</a> for details. </dd></dl>
<dl><dt><b>Examples: </b></dt><dd><a class="el" href="ex_log_8c-example.html#a17">ex_log.c</a>.</dd>
</dl>
</div>
</div>
<a id="a6550c9079198955c5071583941c85bbf"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a6550c9079198955c5071583941c85bbf">◆ </a></span>checkpoint()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">int WT_SESSION::checkpoint </td>
<td>(</td>
<td class="paramtype"><a class="el" href="struct_w_t___s_e_s_s_i_o_n.html">WT_SESSION</a> * </td>
<td class="paramname"><em>session</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const char * </td>
<td class="paramname"><em>config</em> </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Write a transactionally consistent snapshot of a database or set of objects. </p>
<p>In the absence of transaction timestamps, the checkpoint includes all transactions committed before the checkpoint starts.</p>
<p>When timestamps are in use and a <code>stable_timestamp</code> has been set via <a class="el" href="struct_w_t___c_o_n_n_e_c_t_i_o_n.html#ad082439541b1b95d6aae6c15026fe512" title="Set a global transaction timestamp. ">WT_CONNECTION::set_timestamp</a> and the checkpoint runs with <code>use_timestamp=true</code> (the default), updates committed with a timestamp larger than the <code>stable_timestamp</code> will not be included in the checkpoint for tables configured with <code>log=</code>(enabled=false). For tables with logging enabled, all committed changes will be included in the checkpoint (since recovery would roll them forward anyway).</p>
<p>Additionally, existing named checkpoints may optionally be discarded.</p>
<p>This method must not be called on a session with an active transaction.</p>
<div class="fragment"><div class="line"> <span class="comment">/* Checkpoint the database. */</span></div><div class="line"> error_check(session-><a class="code" href="struct_w_t___s_e_s_s_i_o_n.html#a6550c9079198955c5071583941c85bbf">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"> error_check(session-><a class="code" href="struct_w_t___s_e_s_s_i_o_n.html#a6550c9079198955c5071583941c85bbf">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"> error_check(session-><a class="code" href="struct_w_t___s_e_s_s_i_o_n.html#a6550c9079198955c5071583941c85bbf">checkpoint</a>(</div><div class="line"> 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"> error_check(session-><a class="code" href="struct_w_t___s_e_s_s_i_o_n.html#a6550c9079198955c5071583941c85bbf">checkpoint</a>(</div><div class="line"> 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"> error_check(session-><a class="code" href="struct_w_t___s_e_s_s_i_o_n.html#a6550c9079198955c5071583941c85bbf">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"> error_check(session-><a class="code" href="struct_w_t___s_e_s_s_i_o_n.html#a6550c9079198955c5071583941c85bbf">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"> error_check(session-><a class="code" href="struct_w_t___s_e_s_s_i_o_n.html#a6550c9079198955c5071583941c85bbf">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"> error_check(session-><a class="code" href="struct_w_t___s_e_s_s_i_o_n.html#a6550c9079198955c5071583941c85bbf">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"> error_check(session-><a class="code" href="struct_w_t___s_e_s_s_i_o_n.html#a6550c9079198955c5071583941c85bbf">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>by default, 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 set, specify a name for the checkpoint (note that checkpoints including LSM trees may not be named).</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>
<tr>
<td><code>use_timestamp</code></td><td>by default, create the checkpoint as of the last stable timestamp if timestamps are in use, or all current updates if there is no stable timestamp set. If false, this option generates a checkpoint with all updates including those later than the timestamp.</td><td>a boolean flag; default <code>true</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="error_handling.html">Error handling</a> for details. </dd></dl>
<dl><dt><b>Examples: </b></dt><dd><a class="el" href="ex_stat_8c-example.html#a23">ex_stat.c</a>.</dd>
</dl>
</div>
</div>
<a id="a96f25dfa6447034aea1f67ab02ab5698"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a96f25dfa6447034aea1f67ab02ab5698">◆ </a></span>close()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">int WT_SESSION::close </td>
<td>(</td>
<td class="paramtype"><a class="el" href="struct_w_t___s_e_s_s_i_o_n.html">WT_SESSION</a> * </td>
<td class="paramname"><em>session</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const char * </td>
<td class="paramname"><em>config</em> </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Close the session handle. </p>
<p>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.</p>
<div class="fragment"><div class="line"> error_check(session-><a class="code" href="struct_w_t___s_e_s_s_i_o_n.html#a96f25dfa6447034aea1f67ab02ab5698">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="error_handling.html">Error handling</a> for details. </dd></dl>
<dl><dt><b>Examples: </b></dt><dd><a class="el" href="ex_log_8c-example.html#a21">ex_log.c</a>, and <a class="el" href="ex_thread_8c-example.html#a15">ex_thread.c</a>.</dd>
</dl>
</div>
</div>
<a id="a712226eca5ade5bd123026c624468fa2"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a712226eca5ade5bd123026c624468fa2">◆ </a></span>commit_transaction()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">int WT_SESSION::commit_transaction </td>
<td>(</td>
<td class="paramtype"><a class="el" href="struct_w_t___s_e_s_s_i_o_n.html">WT_SESSION</a> * </td>
<td class="paramname"><em>session</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const char * </td>
<td class="paramname"><em>config</em> </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Commit the current transaction. </p>
<p>A transaction must be in progress when this method is called.</p>
<p>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.</p>
<p>This method must be called on a session with an active transaction.</p>
<div class="fragment"><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"> * Opening cursors before the transaction begins allows applications to</span></div><div class="line"><span class="comment"> * cache cursors and use them for multiple operations.</span></div><div class="line"><span class="comment"> */</span></div><div class="line"> error_check(session-><a class="code" href="struct_w_t___s_e_s_s_i_o_n.html#afb5b4a69c2c5cafe411b2b04fdc1c75d">open_cursor</a>(</div><div class="line"> session, <span class="stringliteral">"table:mytable"</span>, NULL, NULL, &cursor));</div><div class="line"> error_check(session-><a class="code" href="struct_w_t___s_e_s_s_i_o_n.html#a7e26b16b26b5870498752322fad790bf">begin_transaction</a>(session, NULL));</div><div class="line"></div><div class="line"> cursor->set_key(cursor, <span class="stringliteral">"key"</span>);</div><div class="line"> cursor->set_value(cursor, <span class="stringliteral">"value"</span>);</div><div class="line"> <span class="keywordflow">switch</span> (cursor->update(cursor)) {</div><div class="line"> <span class="keywordflow">case</span> 0: <span class="comment">/* Update success */</span></div><div class="line"> error_check(session-><a class="code" href="struct_w_t___s_e_s_s_i_o_n.html#a712226eca5ade5bd123026c624468fa2">commit_transaction</a>(session, NULL));</div><div class="line"> <span class="comment">/*</span></div><div class="line"><span class="comment"> * If commit_transaction succeeds, cursors remain positioned; if</span></div><div class="line"><span class="comment"> * commit_transaction fails, the transaction was rolled-back and</span></div><div class="line"><span class="comment"> * and all cursors are reset.</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#ga5ee3c6fcd074e11efd118f3e68e91db8">WT_ROLLBACK</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"> error_check(session-><a class="code" href="struct_w_t___s_e_s_s_i_o_n.html#ab45f521464ad9e54d9b15efc2ffe20a1">rollback_transaction</a>(session, NULL));</div><div class="line"> <span class="comment">/* The rollback_transaction call resets all 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">/*</span></div><div class="line"><span class="comment"> * Cursors remain open and may be used for multiple transactions.</span></div><div class="line"><span class="comment"> */</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>commit_timestamp</code></td><td>set the commit timestamp for the current transaction. The supplied value must not be older than the first commit timestamp set for the current transaction. The value must also not be older than the current oldest and stable timestamps. See <a class="el" href="transactions.html#transaction_timestamps">Application-specified Transaction Timestamps</a>.</td><td>a string; default empty. </td></tr>
<tr>
<td><code>sync</code></td><td>override whether to sync log records when the transaction commits, inherited from <a class="el" href="group__wt.html#gacbe8d118f978f5bfc8ccb4c77c9e8813" title="Open a connection to a database. ">wiredtiger_open</a> <code>transaction_sync</code>. The <code>background</code> setting initiates a background synchronization intended to be used with a later call to <a class="el" href="struct_w_t___s_e_s_s_i_o_n.html#a61c8c3ad80d8228172db66ca70bd90fd" title="Wait for a transaction to become synchronized. ">WT_SESSION::transaction_sync</a>. The <code>off</code> setting does not wait for record to be written or synchronized. The <code>on</code> setting forces log records to be written to the storage device.</td><td>a string, chosen from the following options: <code>"background"</code>, <code>"off"</code>, <code>"on"</code>; 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="error_handling.html">Error handling</a> for details. </dd></dl>
<dl><dt><b>Examples: </b></dt><dd><a class="el" href="ex_log_8c-example.html#a14">ex_log.c</a>.</dd>
</dl>
</div>
</div>
<a id="aafa7a12a4891a5bfdc98673a5b8f9c69"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aafa7a12a4891a5bfdc98673a5b8f9c69">◆ </a></span>compact()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">int WT_SESSION::compact </td>
<td>(</td>
<td class="paramtype"><a class="el" href="struct_w_t___s_e_s_s_i_o_n.html">WT_SESSION</a> * </td>
<td class="paramname"><em>session</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const char * </td>
<td class="paramname"><em>name</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const char * </td>
<td class="paramname"><em>config</em> </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Compact a live row- or column-store btree or LSM tree. </p>
<div class="fragment"><div class="line"> error_check(session-><a class="code" href="struct_w_t___s_e_s_s_i_o_n.html#aafa7a12a4891a5bfdc98673a5b8f9c69">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 compact, 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>timeout</code></td><td>maximum amount of time to allow for compact in seconds. The actual amount of time spent in compact may exceed the configured value. A value of zero disables the timeout.</td><td>an integer; default <code>1200</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="error_handling.html">Error handling</a> for details. </dd></dl>
</div>
</div>
<a id="a358ca4141d59c345f401c58501276bbb"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a358ca4141d59c345f401c58501276bbb">◆ </a></span>create()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">int WT_SESSION::create </td>
<td>(</td>
<td class="paramtype"><a class="el" href="struct_w_t___s_e_s_s_i_o_n.html">WT_SESSION</a> * </td>
<td class="paramname"><em>session</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const char * </td>
<td class="paramname"><em>name</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const char * </td>
<td class="paramname"><em>config</em> </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Create a table, column group, index or file. </p>
<div class="fragment"><div class="line"> error_check(session-><a class="code" href="struct_w_t___s_e_s_s_i_o_n.html#a358ca4141d59c345f401c58501276bbb">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>. For a description of URI formats see <a class="el" href="data_sources.html">Data Sources</a>. </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>access_pattern_hint</code></td><td>It is recommended that workloads that consist primarily of updates and/or point queries specify <code>random</code>. Workloads that do many cursor scans through large ranges of data specify <code>sequential</code> and other workloads specify <code>none</code>. The option leads to an advisory call to an appropriate operating system API where available.</td><td>a string, chosen from the following options: <code>"none"</code>, <code>"random"</code>, <code>"sequential"</code>; default <code>none</code>. </td></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 4KB is a good choice absent requirements from the operating system or storage device.</td><td>an integer between 512B and 128MB; default <code>4KB</code>. </td></tr>
<tr>
<td><code>app_metadata</code></td><td>application-owned metadata for this object.</td><td>a string; default empty. </td></tr>
<tr>
<td><code>block_allocation</code></td><td>configure block allocation. Permitted values are <code>"first"</code> or <code>"best"</code>; the <code>"first"</code> configuration uses a first-available algorithm during block allocation, the <code>"best"</code> configuration uses a best-fit algorithm.</td><td>a string, chosen from the following options: <code>"first"</code>, <code>"best"</code>; default <code>best</code>. </td></tr>
<tr>
<td><code>block_compressor</code></td><td>configure a compressor for file blocks. Permitted values are <code>"none"</code> or custom compression engine name 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>. If WiredTiger has builtin support for <code>"lz4"</code>, <code>"snappy"</code>, <code>"zlib"</code> or <code>"zstd"</code> compression, these names are also available. See <a class="el" href="compression.html">Compressors</a> for more information.</td><td>a string; default <code>none</code>. </td></tr>
<tr>
<td><code>cache_resident</code></td><td>do not ever evict the object's pages from cache. Not compatible with LSM tables; see <a class="el" href="tune_cache.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 block checksums; permitted values are <code>on</code> (checksum all blocks), <code>off</code> (checksum no blocks) and <code>uncompresssed</code> (checksum only blocks which are not compressed for any reason). The <code>uncompressed</code> setting is for applications which can 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>uncompressed</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. Permitted values are <code>"none"</code> or a custom 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 <code>none</code>. </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>encryption = (</code></td><td>configure an encryptor for file blocks. When a table is created, its encryptor is not implicitly used for any related indices or column groups.</td><td>a set of related configuration options defined below. </td></tr>
<tr>
<td><code>    keyid</code></td><td>An identifier that identifies a unique instance of the encryptor. It is stored in clear text, and thus is available when the wiredtiger database is reopened. On the first use of a (name, keyid) combination, the <a class="el" href="struct_w_t___e_n_c_r_y_p_t_o_r.html#a947e253ec628a29b62e4b6656eb7b92a" title="If non-NULL, this callback is called to customize the encryptor. ">WT_ENCRYPTOR::customize</a> function is called with the keyid as an argument.</td><td>a string; default empty. </td></tr>
<tr>
<td><code>    name</code></td><td>Permitted values are <code>"none"</code> or custom encryption engine name created with <a class="el" href="struct_w_t___c_o_n_n_e_c_t_i_o_n.html#a59d203f4474780ca34bd3e07b8064949" title="Add an encryption function. ">WT_CONNECTION::add_encryptor</a>. See <a class="el" href="encryption.html">Encryptors</a> for more information.</td><td>a string; default <code>none</code>. </td></tr>
<tr>
<td><code> )</code></td><td></td><td></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>extractor</code></td><td>configure custom extractor for indices. Permitted values are <code>"none"</code> or an extractor name created with <a class="el" href="struct_w_t___c_o_n_n_e_c_t_i_o_n.html#a2d65a70a305838e2a2a728fe5cb54903" title="Add a custom extractor for index keys or column groups. ">WT_CONNECTION::add_extractor</a>.</td><td>a string; default <code>none</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 <code>"none"</code>, <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 <code>none</code>. </td></tr>
<tr>
<td><code>huffman_value</code></td><td>configure Huffman encoding for values. Permitted values are <code>"none"</code>, <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 <code>none</code>. </td></tr>
<tr>
<td><code>ignore_in_memory_cache_size</code></td><td>allow update and insert operations to proceed even if the cache is already at capacity. Only valid in conjunction with in-memory databases. Should be used with caution - this configuration allows WiredTiger to consume memory over the configured cache limit.</td><td>a boolean flag; default <code>false</code>. </td></tr>
<tr>
<td><code>immutable</code></td><td>configure the index to be immutable - that is an index is not changed by any update to a record in the table.</td><td>a boolean flag; default <code>false</code>. </td></tr>
<tr>
<td><code>internal_key_max</code></td><td>the largest key stored in an internal node, in bytes. If set, keys larger than the specified size are stored as overflow items (which may require additional I/O to access). The default and the maximum allowed value are both one-tenth the size of a newly split 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>4KB</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, including a pointer to the data and a length. ">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>leaf_key_max</code></td><td>the largest key stored in a leaf node, in bytes. If set, keys larger than the specified size are stored as overflow items (which may require additional I/O to access). The default value is one-tenth the size of a newly split 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>32KB</code>. </td></tr>
<tr>
<td><code>leaf_value_max</code></td><td>the largest value stored in a leaf node, in bytes. If set, values larger than the specified size are stored as overflow items (which may require additional I/O to access). If the size is larger than the maximum leaf page size, the page size is temporarily ignored when large values are written. The default is one-half the size of a newly split leaf page.</td><td>an integer greater than or equal to 0; default <code>0</code>. </td></tr>
<tr>
<td><code>log = (</code></td><td>the transaction log configuration for this object. Only valid if log is enabled in <a class="el" href="group__wt.html#gacbe8d118f978f5bfc8ccb4c77c9e8813" title="Open a connection to a database. ">wiredtiger_open</a>.</td><td>a set of related configuration options defined below. </td></tr>
<tr>
<td><code>    enabled</code></td><td>if false, this object has checkpoint-level durability.</td><td>a boolean flag; default <code>true</code>. </td></tr>
<tr>
<td><code> )</code></td><td></td><td></td></tr>
<tr>
<td><code>lsm = (</code></td><td>options only relevant for LSM data sources.</td><td>a set of related configuration options defined below. </td></tr>
<tr>
<td><code>    auto_throttle</code></td><td>Throttle inserts into LSM trees if flushing to disk isn't keeping up.</td><td>a boolean flag; default <code>true</code>. </td></tr>
<tr>
<td><code>    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>    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>16</code>. </td></tr>
<tr>
<td><code>    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>    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>8</code>. </td></tr>
<tr>
<td><code>    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>    chunk_count_limit</code></td><td>the maximum number of chunks to allow in an LSM tree. This option automatically times out old data. As new chunks are added old chunks will be removed. Enabling this option disables LSM background merges.</td><td>an integer; default <code>0</code>. </td></tr>
<tr>
<td><code>    chunk_max</code></td><td>the maximum size a single chunk can be. Chunks larger than this size are not considered for further merges. This is a soft limit, and chunks larger than this value can be created. Must be larger than chunk_size.</td><td>an integer between 100MB and 10TB; default <code>5GB</code>. </td></tr>
<tr>
<td><code>    chunk_size</code></td><td>the maximum size of the in-memory chunk of an LSM tree. This limit is soft - it is possible for chunks to be temporarily larger than this value. This overrides the <code>memory_page_max</code> setting.</td><td>an integer between 512K and 500MB; default <code>10MB</code>. </td></tr>
<tr>
<td><code>    merge_custom = (</code></td><td>configure the tree to merge into a custom data source.</td><td>a set of related configuration options defined below. </td></tr>
<tr>
<td><code>        prefix</code></td><td>custom data source prefix instead of <code>"file"</code>.</td><td>a string; default empty. </td></tr>
<tr>
<td><code>        start _generation</code></td><td>merge generation at which the custom data source is used (zero indicates no custom data source).</td><td>an integer between 0 and 10; default <code>0</code>. </td></tr>
<tr>
<td><code>        suffix</code></td><td>custom data source suffix instead of <code>".lsm"</code>.</td><td>a string; default empty. </td></tr>
<tr>
<td><code> )</code></td><td></td><td></td></tr>
<tr>
<td><code>    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>    merge_min</code></td><td>the minimum number of chunks to include in a merge operation. If set to 0 or 1 half the value of merge_max is used.</td><td>an integer no more than 100; default <code>0</code>. </td></tr>
<tr>
<td><code> )</code></td><td></td><td></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>leaf_page_max</code>, and an upper bound of <code>cache_size / 10</code>. This limit is soft - it is possible for pages to be temporarily larger than this value. This setting is ignored for LSM trees, see <code>chunk_size</code>.</td><td>an integer between 512B and 10TB; default <code>5MB</code>. </td></tr>
<tr>
<td><code>os_cache_dirty_max</code></td><td>maximum dirty system buffer cache usage, in bytes. If non-zero, schedule writes for dirty blocks belonging to this object in the system buffer cache after that many bytes from this object are written into the buffer cache.</td><td>an integer greater than or equal to 0; default <code>0</code>. </td></tr>
<tr>
<td><code>os_cache_max</code></td><td>maximum system buffer cache usage, in bytes. If non-zero, evict object blocks from the system buffer cache after that many bytes from this object are read or written into the buffer cache.</td><td>an integer greater than or equal to 0; default <code>0</code>. </td></tr>
<tr>
<td><code>prefix_compression</code></td><td>configure prefix compression on row-store leaf pages.</td><td>a boolean flag; default <code>false</code>. </td></tr>
<tr>
<td><code>prefix_compression_min</code></td><td>minimum gain before prefix compression will be used on row-store leaf pages.</td><td>an integer greater than or equal to 0; default <code>4</code>. </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 50 and 100; default <code>90</code>. </td></tr>
<tr>
<td><code>type</code></td><td>set the type of data source used to store a column group, index or simple table. By default, a <code>"file:"</code> URI is derived from the object name. The <code>type</code> configuration can be used to switch to a different data source, such as LSM or an extension configured by the application.</td><td>a string; 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, including a pointer to the data and a length. ">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="error_handling.html">Error handling</a> for details. </dd></dl>
<dl><dt><b>Examples: </b></dt><dd><a class="el" href="ex_access_8c-example.html#a5">ex_access.c</a>, <a class="el" href="ex_async_8c-example.html#a14">ex_async.c</a>, <a class="el" href="ex_call_center_8c-example.html#a5">ex_call_center.c</a>, <a class="el" href="ex_cursor_8c-example.html#a18">ex_cursor.c</a>, <a class="el" href="ex_encrypt_8c-example.html#a29">ex_encrypt.c</a>, <a class="el" href="ex_extractor_8c-example.html#a19">ex_extractor.c</a>, <a class="el" href="ex_file_system_8c-example.html#a46">ex_file_system.c</a>, <a class="el" href="ex_log_8c-example.html#a26">ex_log.c</a>, <a class="el" href="ex_schema_8c-example.html#a5">ex_schema.c</a>, <a class="el" href="ex_stat_8c-example.html#a7">ex_stat.c</a>, and <a class="el" href="ex_thread_8c-example.html#a11">ex_thread.c</a>.</dd>
</dl>
</div>
</div>
<a id="adf785ef53c16d9dcc77e22cc04c87b70"></a>
<h2 class="memtitle"><span class="permalink"><a href="#adf785ef53c16d9dcc77e22cc04c87b70">◆ </a></span>drop()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">int WT_SESSION::drop </td>
<td>(</td>
<td class="paramtype"><a class="el" href="struct_w_t___s_e_s_s_i_o_n.html">WT_SESSION</a> * </td>
<td class="paramname"><em>session</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const char * </td>
<td class="paramname"><em>name</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const char * </td>
<td class="paramname"><em>config</em> </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Drop (delete) an object. </p>
<p>This method requires exclusive access to the specified data source(s). If any cursors are open with the specified name(s) or a data source is otherwise in use, the call will fail and return <code>EBUSY</code>.</p>
<div class="fragment"><div class="line"> error_check(session-><a class="code" href="struct_w_t___s_e_s_s_i_o_n.html#adf785ef53c16d9dcc77e22cc04c87b70">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>
<tr>
<td><code>remove_files</code></td><td>if the underlying files should be removed.</td><td>a boolean flag; default <code>true</code>. </td></tr>
</table>
</td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>zero on success, EBUSY if the object is not available for exclusive access, and a non-zero error code on failure. See <a class="el" href="error_handling.html">Error handling</a> for details. </dd></dl>
</div>
</div>
<a id="ae0ab118df83d173c6a20eb1ea3f3fd84"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ae0ab118df83d173c6a20eb1ea3f3fd84">◆ </a></span>join()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">int WT_SESSION::join </td>
<td>(</td>
<td class="paramtype"><a class="el" href="struct_w_t___s_e_s_s_i_o_n.html">WT_SESSION</a> * </td>
<td class="paramname"><em>session</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="struct_w_t___c_u_r_s_o_r.html">WT_CURSOR</a> * </td>
<td class="paramname"><em>join_cursor</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="struct_w_t___c_u_r_s_o_r.html">WT_CURSOR</a> * </td>
<td class="paramname"><em>ref_cursor</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const char * </td>
<td class="paramname"><em>config</em> </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Join a join cursor with a reference cursor. </p>
<div class="fragment"><div class="line"> <span class="comment">/* Open cursors needed by the join. */</span></div><div class="line"> error_check(session-><a class="code" href="struct_w_t___s_e_s_s_i_o_n.html#afb5b4a69c2c5cafe411b2b04fdc1c75d">open_cursor</a>(session,</div><div class="line"> <span class="stringliteral">"join:table:poptable"</span>, NULL, NULL, &join_cursor));</div><div class="line"> error_check(session-><a class="code" href="struct_w_t___s_e_s_s_i_o_n.html#afb5b4a69c2c5cafe411b2b04fdc1c75d">open_cursor</a>(session,</div><div class="line"> <span class="stringliteral">"index:poptable:country"</span>, NULL, NULL, &country_cursor));</div><div class="line"> error_check(session-><a class="code" href="struct_w_t___s_e_s_s_i_o_n.html#afb5b4a69c2c5cafe411b2b04fdc1c75d">open_cursor</a>(session,</div><div class="line"> <span class="stringliteral">"index:poptable:immutable_year"</span>, NULL, NULL, &year_cursor));</div><div class="line"></div><div class="line"> <span class="comment">/* select values WHERE country == "AU" AND year > 1900 */</span></div><div class="line"> country_cursor->set_key(country_cursor, <span class="stringliteral">"AU\0\0\0"</span>);</div><div class="line"> error_check(country_cursor->search(country_cursor));</div><div class="line"> error_check(session-><a class="code" href="struct_w_t___s_e_s_s_i_o_n.html#ae0ab118df83d173c6a20eb1ea3f3fd84">join</a>(</div><div class="line"> session, join_cursor, country_cursor, <span class="stringliteral">"compare=eq,count=10"</span>));</div><div class="line"> year_cursor->set_key(year_cursor, (uint16_t)1900);</div><div class="line"> error_check(year_cursor->search(year_cursor));</div><div class="line"> error_check(session-><a class="code" href="struct_w_t___s_e_s_s_i_o_n.html#ae0ab118df83d173c6a20eb1ea3f3fd84">join</a>(session,</div><div class="line"> join_cursor, year_cursor, <span class="stringliteral">"compare=gt,count=10,strategy=bloom"</span>));</div><div class="line"></div><div class="line"> <span class="comment">/* List the values that are joined */</span></div><div class="line"> <span class="keywordflow">while</span> ((ret = join_cursor->next(join_cursor)) == 0) {</div><div class="line"> error_check(join_cursor->get_key(join_cursor, &recno));</div><div class="line"> error_check(join_cursor->get_value(</div><div class="line"> join_cursor, &country, &year, &population));</div><div class="line"> printf(<span class="stringliteral">"ID %"</span> PRIu64, recno);</div><div class="line"> printf(</div><div class="line"> <span class="stringliteral">": country %s, year %"</span> PRIu16 <span class="stringliteral">", population %"</span> PRIu64 <span class="stringliteral">"\n"</span>,</div><div class="line"> country, year, population);</div><div class="line"> }</div><div class="line"> scan_end_check(ret == <a class="code" href="group__wt.html#ga3c9e1b494d95cf34404ab7a974af6bf8">WT_NOTFOUND</a>);</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">join_cursor</td><td>a cursor that was opened using a <code>"join:"</code> URI. It may not have been used for any operations other than other join calls. </td></tr>
<tr><td class="paramname">ref_cursor</td><td>an index cursor having the same base table as the join_cursor, or a table cursor open on the same base table, or another join cursor. Unless the ref_cursor is another join cursor, it must be positioned.</td></tr>
</table>
</dd>
</dl>
<p>The ref_cursor limits the results seen by iterating the join_cursor to table items referred to by the key in this index. The set of keys referred to is modified by the compare config option.</p>
<p>Multiple join calls builds up a set of ref_cursors, and by default, the results seen by iteration are the intersection of the cursor ranges participating in the join. When configured with <code>"operation=or"</code>, the results seen are the union of the participating cursor ranges.</p>
<p>After the join call completes, the ref_cursor cursor may not be used for any purpose other than get_key and get_value. Any other cursor method (e.g. next, prev,close) will fail. When the join_cursor is closed, the ref_cursor is made available for general use again. The application should close ref_cursor when finished with it, although not before the join_cursor is closed.</p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<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>bloom_bit_count</code></td><td>the number of bits used per item for the bloom filter.</td><td>an integer between 2 and 1000; default <code>16</code>. </td></tr>
<tr>
<td><code>bloom_false_positives</code></td><td>return all values that pass the bloom filter, without eliminating any false positives.</td><td>a boolean flag; default <code>false</code>. </td></tr>
<tr>
<td><code>bloom_hash_count</code></td><td>the number of hash values per item for the bloom filter.</td><td>an integer between 2 and 100; default <code>8</code>. </td></tr>
<tr>
<td><code>compare</code></td><td>modifies the set of items to be returned so that the index key satisfies the given comparison relative to the key set in this cursor.</td><td>a string, chosen from the following options: <code>"eq"</code>, <code>"ge"</code>, <code>"gt"</code>, <code>"le"</code>, <code>"lt"</code>; default <code>"eq"</code>. </td></tr>
<tr>
<td><code>count</code></td><td>set an approximate count of the elements that would be included in the join. This is used in sizing the bloom filter, and also influences evaluation order for cursors in the join. When the count is equal for multiple bloom filters in a composition of joins, the bloom filter may be shared.</td><td>an integer; default <code></code>. </td></tr>
<tr>
<td><code>operation</code></td><td>the operation applied between this and other joined cursors. When "operation=and" is specified, all the conditions implied by joins must be satisfied for an entry to be returned by the join cursor; when "operation=or" is specified, only one must be satisfied. All cursors joined to a join cursor must have matching operations.</td><td>a string, chosen from the following options: <code>"and"</code>, <code>"or"</code>; default <code>"and"</code>. </td></tr>
<tr>
<td><code>strategy</code></td><td>when set to bloom, a bloom filter is created and populated for this index. This has an up front cost but may reduce the number of accesses to the main table when iterating the joined cursor. The bloom setting requires that count be set.</td><td>a string, chosen from the following options: <code>"bloom"</code>, <code>"default"</code>; 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="error_handling.html">Error handling</a> for details. </dd></dl>
<dl><dt><b>Examples: </b></dt><dd><a class="el" href="ex_schema_8c-example.html#a21">ex_schema.c</a>, and <a class="el" href="ex_stat_8c-example.html#a8">ex_stat.c</a>.</dd>
</dl>
</div>
</div>
<a id="a1843292630960309129dcfe00e1a3817"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a1843292630960309129dcfe00e1a3817">◆ </a></span>log_flush()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">int WT_SESSION::log_flush </td>
<td>(</td>
<td class="paramtype"><a class="el" href="struct_w_t___s_e_s_s_i_o_n.html">WT_SESSION</a> * </td>
<td class="paramname"><em>session</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const char * </td>
<td class="paramname"><em>config</em> </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Flush the log. </p>
<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>sync</code></td><td>forcibly flush the log and wait for it to achieve the synchronization level specified. The <code>background</code> setting initiates a background synchronization intended to be used with a later call to <a class="el" href="struct_w_t___s_e_s_s_i_o_n.html#a61c8c3ad80d8228172db66ca70bd90fd" title="Wait for a transaction to become synchronized. ">WT_SESSION::transaction_sync</a>. The <code>off</code> setting forces any buffered log records to be written to the file system. The <code>on</code> setting forces log records to be written to the storage device.</td><td>a string, chosen from the following options: <code>"background"</code>, <code>"off"</code>, <code>"on"</code>; default <code>on</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="error_handling.html">Error handling</a> for details. </dd></dl>
</div>
</div>
<a id="ac85541ca42d7596857d9f50e03c78eb5"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ac85541ca42d7596857d9f50e03c78eb5">◆ </a></span>log_printf()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">int WT_SESSION::log_printf </td>
<td>(</td>
<td class="paramtype"><a class="el" href="struct_w_t___s_e_s_s_i_o_n.html">WT_SESSION</a> * </td>
<td class="paramname"><em>session</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const char * </td>
<td class="paramname"><em>format</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"> </td>
<td class="paramname"><em>...</em> </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Insert a <a class="el" href="group__wt.html#ga8cf04a003979e7852209079d4093d783" title="message ">WT_LOGREC_MESSAGE</a> type record in the database log files (the database must be configured for logging when this method is called). </p>
<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">format</td><td>a printf format specifier </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="error_handling.html">Error handling</a> for details. </dd></dl>
<dl><dt><b>Examples: </b></dt><dd><a class="el" href="ex_encrypt_8c-example.html#a28">ex_encrypt.c</a>, and <a class="el" href="ex_log_8c-example.html#a27">ex_log.c</a>.</dd>
</dl>
</div>
</div>
<a id="afb5b4a69c2c5cafe411b2b04fdc1c75d"></a>
<h2 class="memtitle"><span class="permalink"><a href="#afb5b4a69c2c5cafe411b2b04fdc1c75d">◆ </a></span>open_cursor()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">int WT_SESSION::open_cursor </td>
<td>(</td>
<td class="paramtype"><a class="el" href="struct_w_t___s_e_s_s_i_o_n.html">WT_SESSION</a> * </td>
<td class="paramname"><em>session</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const char * </td>
<td class="paramname"><em>uri</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="struct_w_t___c_u_r_s_o_r.html">WT_CURSOR</a> * </td>
<td class="paramname"><em>to_dup</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const char * </td>
<td class="paramname"><em>config</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="struct_w_t___c_u_r_s_o_r.html">WT_CURSOR</a> ** </td>
<td class="paramname"><em>cursorp</em> </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Open a new cursor on a data source or duplicate an existing cursor. </p>
<div class="fragment"><div class="line"> error_check(session-><a class="code" href="struct_w_t___s_e_s_s_i_o_n.html#afb5b4a69c2c5cafe411b2b04fdc1c75d">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> </p>
<div class="fragment"><div class="line"> error_check(session-><a class="code" href="struct_w_t___s_e_s_s_i_o_n.html#afb5b4a69c2c5cafe411b2b04fdc1c75d">open_cursor</a>(</div><div class="line"> session, <span class="stringliteral">"table:mytable"</span>, NULL, NULL, &cursor));</div><div class="line"> cursor->set_key(cursor, key);</div><div class="line"> error_check(cursor->search(cursor));</div><div class="line"></div><div class="line"> <span class="comment">/* Duplicate the cursor. */</span></div><div class="line"> error_check(</div><div class="line"> session-><a class="code" href="struct_w_t___s_e_s_s_i_o_n.html#afb5b4a69c2c5cafe411b2b04fdc1c75d">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.</p>
<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>.</p>
<p>Cursors capable of supporting transactional operations operate in the context of the current transaction, if any.</p>
<p><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> implicitly resets all cursors.</p>
<p>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.</p>
<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 />
</td></tr>
</table>
</dd>
</dl>
<p>The following are the builtin basic cursor types: </p><table class="doxtable">
<tr>
<th>URI</th><th>Type</th><th>Notes </th></tr>
<tr>
<td><code>table:<table name>[<projection>]</code></td><td>table cursor</td><td>table key, table value(s) with optional projection of columns </td></tr>
<tr>
<td><code>colgroup:<table name>:<column group name></code></td><td>column group cursor</td><td>table key, column group value(s) </td></tr>
<tr>
<td><code>index:<table name>:<index name>[<projection>]</code></td><td>index cursor</td><td>key=index key, value=table value(s) with optional projection of columns </td></tr>
<tr>
<td><code>join:table:<table name>[<projection>]</code></td><td>join cursor</td><td>key=table key, value=table value(s) with optional projection of columns </td></tr>
</table>
<p>Some administrative tasks can be accomplished using the following special cursor types that give access to data managed by WiredTiger: </p><table class="doxtable">
<tr>
<th>URI</th><th>Type</th><th>Notes </th></tr>
<tr>
<td><code>backup:</code></td><td>backup cursor</td><td>key=<code>string</code>, see <a class="el" href="backup.html">Backups</a> for details </td></tr>
<tr>
<td><code>log:</code></td><td>log cursor</td><td>key=<code>(long fileID, long offset, int seqno)</code>,<br />
value=<code>(uint64_t txnid, uint32_t rectype,<br />
uint32_t optype, uint32_t fileid,<br />
<a class="el" href="group__wt.html#struct_w_t___i_t_e_m" title="A raw item of data to be managed, including a pointer to the data and a length. ">WT_ITEM</a> key, <a class="el" href="group__wt.html#struct_w_t___i_t_e_m" title="A raw item of data to be managed, including a pointer to the data and a length. ">WT_ITEM</a> value)</code>,<br />
see <a class="el" href="cursor_log.html">Log cursors</a> for details </td></tr>
<tr>
<td><code>metadata:[create]</code></td><td>metadata cursor (optionally only returning configuration strings for <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> if <code>create</code> is appended</td><td>key=<code>string</code>, value=<code>string</code>,<br />
see <a class="el" href="cursors.html#metadata">Reading WiredTiger Metadata</a> for details </td></tr>
<tr>
<td><code>statistics:[<data source URI>]</code></td><td>database</td><td>data source or join statistics cursor</td><td>key=<code>int id</code>,<br />
value=<code>(string description, string value, uint64_t value)</code>,<br />
see <a class="el" href="data_sources.html#data_statistics">Statistics Data</a> for details </td></tr>
</table>
<p>Advanced applications may also open the following low-level cursor types: </p><table class="doxtable">
<tr>
<th>URI</th><th>Type</th><th>Notes </th></tr>
<tr>
<td><code>file:<file name></code></td><td>file cursor</td><td>file key, file value(s) </td></tr>
<tr>
<td><code>lsm:<name></code></td><td>LSM cursor (key=LSM key, value=LSM value)</td><td>LSM key, LSM value,<br />
see <a class="el" href="lsm.html">Log-Structured Merge Trees</a> </td></tr>
</table>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramdir"></td><td class="paramname">to_dup</td><td>a cursor to duplicate or gather statistics on </td></tr>
<tr><td class="paramdir"></td><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-loading, a fast, initial load path (see <a class="el" href="tune_bulk_load.html">Bulk-load</a> for more information). Bulk-load may only be used for newly created objects and applications should use the <a class="el" href="struct_w_t___c_u_r_s_o_r.html#aac90d9fbcc031570f924db55f8a1cee3" title="Insert a record and optionally update an existing record. ">WT_CURSOR::insert</a> method to insert rows. When bulk-loading, rows must be loaded in sorted order. The value is usually a true/false flag; when bulk-loading fixed-length column store objects, the special value <code>bitmap</code> 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, including a pointer to the data and a length. ">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 object's <code>value_format</code> configuration). Bulk-loaded 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, "json" selects a JSON format with each record formatted as fields named by column names if available, and "print" selects a format where only non-printing characters are hexadecimal encoded. These formats are 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>"json"</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 when 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> method is called; valid only for row-store cursors. 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>next_random_sample_size</code></td><td>cursors configured by <code>next_random</code> to return pseudo-random records from the object randomly select from the entire object, by default. Setting <code>next_random_sample_size</code> to a non-zero value sets the number of samples the application expects to take using the <code>next_random</code> cursor. A cursor configured with both <code>next_random</code> and <code>next_random_sample_size</code> attempts to divide the object into <code>next_random_sample_size</code> equal-sized pieces, and each retrieval returns a record from one of those pieces. See <a class="el" href="cursor_random.html">Cursor random</a> for details.</td><td>a string; default <code>0</code>. </td></tr>
<tr>
<td><code>overwrite</code></td><td>configures whether the cursor's insert, update and remove methods check the existing state of the record. If <code>overwrite</code> is <code>false</code>, <a class="el" href="struct_w_t___c_u_r_s_o_r.html#aac90d9fbcc031570f924db55f8a1cee3" title="Insert a record and optionally update an existing record. ">WT_CURSOR::insert</a> fails with <a class="el" href="group__wt.html#gaeca1f3c4a70b8b71b56d2c2fc99a469c" title="Attempt to insert an existing key. ">WT_DUPLICATE_KEY</a> if the record exists, <a class="el" href="struct_w_t___c_u_r_s_o_r.html#a444cdc0952e7f8d55d23173516c7037f" title="Update an existing record and optionally insert a record. ">WT_CURSOR::update</a> and <a class="el" href="struct_w_t___c_u_r_s_o_r.html#abbba24fe607fee519c4c9c4669cd4455" title="Remove a record. ">WT_CURSOR::remove</a> fail with <a class="el" href="group__wt.html#ga3c9e1b494d95cf34404ab7a974af6bf8" title="Item not found. ">WT_NOTFOUND</a> if the record does not exist.</td><td>a boolean flag; default <code>true</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>readonly</code></td><td>only query operations are supported by this cursor. An error is returned if a modification is attempted using the cursor. The default is false for all cursor types except for log and metadata cursors.</td><td>a boolean flag; default <code>false</code>. </td></tr>
<tr>
<td><code>statistics</code></td><td>Specify the statistics to be gathered. Choosing "all" gathers statistics regardless of cost and may include traversing on-disk files; "fast" gathers a subset of relatively inexpensive statistics. The selection must agree with the database <code>statistics</code> configuration specified to <a class="el" href="group__wt.html#gacbe8d118f978f5bfc8ccb4c77c9e8813" title="Open a connection to a database. ">wiredtiger_open</a> or <a class="el" href="struct_w_t___c_o_n_n_e_c_t_i_o_n.html#a579141678af06217b22869cbc604c6d4" title="Reconfigure a connection handle. ">WT_CONNECTION::reconfigure</a>. For example, "all" or "fast" can be configured when the database is configured with "all", but the cursor open will fail if "all" is specified when the database is configured with "fast", and the cursor open will fail in all cases when the database is configured with "none". If "size" is configured, only the underlying size of the object on disk is filled in and the object is not opened. If <code>statistics</code> is not configured, the default configuration is the database configuration. The "clear" configuration resets statistics after gathering them, where appropriate (for example, a cache size statistic is not cleared, while the count of cursor insert operations will be cleared). See <a class="el" href="statistics.html">Statistics</a> for more information.</td><td>a list, with values chosen from the following options: <code>"all"</code>, <code>"cache_walk"</code>, <code>"fast"</code>, <code>"clear"</code>, <code>"size"</code>, <code>"tree_walk"</code>; default empty. </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="paramdir">[out]</td><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="error_handling.html">Error handling</a> for details. </dd></dl>
<dl><dt><b>Examples: </b></dt><dd><a class="el" href="ex_access_8c-example.html#a6">ex_access.c</a>, <a class="el" href="ex_call_center_8c-example.html#a6">ex_call_center.c</a>, <a class="el" href="ex_cursor_8c-example.html#a19">ex_cursor.c</a>, <a class="el" href="ex_encrypt_8c-example.html#a18">ex_encrypt.c</a>, <a class="el" href="ex_extractor_8c-example.html#a11">ex_extractor.c</a>, <a class="el" href="ex_file_system_8c-example.html#a47">ex_file_system.c</a>, <a class="el" href="ex_log_8c-example.html#a4">ex_log.c</a>, <a class="el" href="ex_schema_8c-example.html#a6">ex_schema.c</a>, <a class="el" href="ex_stat_8c-example.html#a5">ex_stat.c</a>, and <a class="el" href="ex_thread_8c-example.html#a4">ex_thread.c</a>.</dd>
</dl>
</div>
</div>
<a id="a96b8a369610c8cbb08b8a7c504fd1008"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a96b8a369610c8cbb08b8a7c504fd1008">◆ </a></span>prepare_transaction()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">int WT_SESSION::prepare_transaction </td>
<td>(</td>
<td class="paramtype"><a class="el" href="struct_w_t___s_e_s_s_i_o_n.html">WT_SESSION</a> * </td>
<td class="paramname"><em>session</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const char * </td>
<td class="paramname"><em>config</em> </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Prepare the current transaction. </p>
<p>A transaction must be in progress when this method is called.</p>
<p>Preparing a transaction will guarantee a subsequent commit will succeed. Only commit and rollback are allowed on a transaction after it has been prepared. The transaction prepare API is designed to support MongoDB exclusively, and guarantees update conflicts have been resolved, but does not guarantee durability.</p>
<p>This method must be called on a session with an active transaction.</p>
<div class="fragment"><div class="line"> <span class="comment">/*</span></div><div class="line"><span class="comment"> * Prepare a transaction which guarantees a subsequent commit will</span></div><div class="line"><span class="comment"> * succeed. Only commit and rollback are allowed on a transaction after</span></div><div class="line"><span class="comment"> * it has been prepared.</span></div><div class="line"><span class="comment"> */</span></div><div class="line"> error_check(session-><a class="code" href="struct_w_t___s_e_s_s_i_o_n.html#afb5b4a69c2c5cafe411b2b04fdc1c75d">open_cursor</a>(</div><div class="line"> session, <span class="stringliteral">"table:mytable"</span>, NULL, NULL, &cursor));</div><div class="line"> error_check(session-><a class="code" href="struct_w_t___s_e_s_s_i_o_n.html#a7e26b16b26b5870498752322fad790bf">begin_transaction</a>(session, NULL));</div><div class="line"> cursor->set_key(cursor, <span class="stringliteral">"key"</span>);</div><div class="line"> cursor->set_value(cursor, <span class="stringliteral">"value"</span>);</div><div class="line"> error_check(session-><a class="code" href="struct_w_t___s_e_s_s_i_o_n.html#a96b8a369610c8cbb08b8a7c504fd1008">prepare_transaction</a>(</div><div class="line"> session, <span class="stringliteral">"prepare_timestamp=2a"</span>));</div><div class="line"> error_check(session-><a class="code" href="struct_w_t___s_e_s_s_i_o_n.html#a712226eca5ade5bd123026c624468fa2">commit_transaction</a>(</div><div class="line"> session, <span class="stringliteral">"commit_timestamp=2b"</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>prepare_timestamp</code></td><td>set the prepare timestamp for the updates of the current transaction. The supplied value must not be older than any active read timestamps. This configuration option is mandatory. See <a class="el" href="transactions.html#transaction_timestamps">Application-specified Transaction Timestamps</a>.</td><td>a string; 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="error_handling.html">Error handling</a> for details. </dd></dl>
</div>
</div>
<a id="ab21ec3055cade4d2682f162783314984"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ab21ec3055cade4d2682f162783314984">◆ </a></span>rebalance()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">int WT_SESSION::rebalance </td>
<td>(</td>
<td class="paramtype"><a class="el" href="struct_w_t___s_e_s_s_i_o_n.html">WT_SESSION</a> * </td>
<td class="paramname"><em>session</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const char * </td>
<td class="paramname"><em>uri</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const char * </td>
<td class="paramname"><em>config</em> </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Rebalance a table or file, see <a class="el" href="rebalance.html">Rebalance</a>. </p>
<p>This method requires exclusive access to the specified data source(s). If any cursors are open with the specified name(s) or a data source is otherwise in use, the call will fail and return <code>EBUSY</code>.</p>
<div class="fragment"><div class="line"> error_check(session-><a class="code" href="struct_w_t___s_e_s_s_i_o_n.html#ab21ec3055cade4d2682f162783314984">rebalance</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">uri</td><td>the current URI of the object, such as <code>"table:mytable"</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, EBUSY if the object is not available for exclusive access, and a non-zero error code on failure. See <a class="el" href="error_handling.html">Error handling</a> for details. </dd></dl>
</div>
</div>
<a id="a578f0fbd8a83339f1f9c00e135f006e6"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a578f0fbd8a83339f1f9c00e135f006e6">◆ </a></span>reconfigure()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">int WT_SESSION::reconfigure </td>
<td>(</td>
<td class="paramtype"><a class="el" href="struct_w_t___s_e_s_s_i_o_n.html">WT_SESSION</a> * </td>
<td class="paramname"><em>session</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const char * </td>
<td class="paramname"><em>config</em> </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Reconfigure a session handle. </p>
<div class="fragment"><div class="line"> error_check(session-><a class="code" href="struct_w_t___s_e_s_s_i_o_n.html#a578f0fbd8a83339f1f9c00e135f006e6">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.</p>
<p>All cursors are reset.</p>
<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>cache_cursors</code></td><td>enable caching of cursors for reuse. Any calls to <a class="el" href="struct_w_t___c_u_r_s_o_r.html#aeea071f192cab12245a50fbe71c3460b" title="Close the cursor. ">WT_CURSOR::close</a> for a cursor created in this session will mark the cursor as cached and keep it available to be reused for later calls to <a class="el" 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. ">WT_SESSION::open_cursor</a>. Cached cursors may be eventually closed. This value is inherited from <a class="el" href="group__wt.html#gacbe8d118f978f5bfc8ccb4c77c9e8813" title="Open a connection to a database. ">wiredtiger_open</a> <code>cache_cursors</code>.</td><td>a boolean flag; default <code>true</code>. </td></tr>
<tr>
<td><code>ignore_cache_size</code></td><td>when set, operations performed by this session ignore the cache size and are not blocked when the cache is full. Note that use of this option for operations that create cache pressure can starve ordinary sessions that obey the cache size.</td><td>a boolean flag; default <code>false</code>. </td></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="error_handling.html">Error handling</a> for details. </dd></dl>
</div>
</div>
<a id="a1d24b02549009f78b7c6463da0247614"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a1d24b02549009f78b7c6463da0247614">◆ </a></span>rename()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">int WT_SESSION::rename </td>
<td>(</td>
<td class="paramtype"><a class="el" href="struct_w_t___s_e_s_s_i_o_n.html">WT_SESSION</a> * </td>
<td class="paramname"><em>session</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const char * </td>
<td class="paramname"><em>uri</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const char * </td>
<td class="paramname"><em>newuri</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const char * </td>
<td class="paramname"><em>config</em> </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Rename an object. </p>
<div class="fragment"><div class="line"> error_check(session-><a class="code" href="struct_w_t___s_e_s_s_i_o_n.html#a1d24b02549009f78b7c6463da0247614">rename</a>(session, <span class="stringliteral">"table:old"</span>, <span class="stringliteral">"table:new"</span>, NULL));</div></div><!-- fragment --><p> This method requires exclusive access to the specified data source(s). If any cursors are open with the specified name(s) or a data source is otherwise in use, the call will fail and return <code>EBUSY</code>.</p>
<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 current URI of the object, such as <code>"table:old"</code> </td></tr>
<tr><td class="paramname">newuri</td><td>the new URI 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, EBUSY if the object is not available for exclusive access, and a non-zero error code on failure. See <a class="el" href="error_handling.html">Error handling</a> for details. </dd></dl>
</div>
</div>
<a id="a307800663ed211447a18c46863c28787"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a307800663ed211447a18c46863c28787">◆ </a></span>reset()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">int WT_SESSION::reset </td>
<td>(</td>
<td class="paramtype"><a class="el" href="struct_w_t___s_e_s_s_i_o_n.html">WT_SESSION</a> * </td>
<td class="paramname"><em>session</em></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Reset the session handle. </p>
<p>This method resets all cursors associated with this session and discards cached resources. The session can be re-used immediately after this call returns. If a transaction is running on this session, then this call takes no action and return an error.</p>
<div class="fragment"><div class="line"> error_check(session-><a class="code" href="struct_w_t___s_e_s_s_i_o_n.html#a307800663ed211447a18c46863c28787">reset</a>(session));</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>
</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="error_handling.html">Error handling</a> for details. </dd></dl>
</div>
</div>
<a id="ab45f521464ad9e54d9b15efc2ffe20a1"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ab45f521464ad9e54d9b15efc2ffe20a1">◆ </a></span>rollback_transaction()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">int WT_SESSION::rollback_transaction </td>
<td>(</td>
<td class="paramtype"><a class="el" href="struct_w_t___s_e_s_s_i_o_n.html">WT_SESSION</a> * </td>
<td class="paramname"><em>session</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const char * </td>
<td class="paramname"><em>config</em> </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Roll back the current transaction. </p>
<p>A transaction must be in progress when this method is called.</p>
<p>All cursors are reset.</p>
<p>This method must be called on a session with an active transaction.</p>
<div class="fragment"><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"> * Opening cursors before the transaction begins allows applications to</span></div><div class="line"><span class="comment"> * cache cursors and use them for multiple operations.</span></div><div class="line"><span class="comment"> */</span></div><div class="line"> error_check(session-><a class="code" href="struct_w_t___s_e_s_s_i_o_n.html#afb5b4a69c2c5cafe411b2b04fdc1c75d">open_cursor</a>(</div><div class="line"> session, <span class="stringliteral">"table:mytable"</span>, NULL, NULL, &cursor));</div><div class="line"> error_check(session-><a class="code" href="struct_w_t___s_e_s_s_i_o_n.html#a7e26b16b26b5870498752322fad790bf">begin_transaction</a>(session, NULL));</div><div class="line"></div><div class="line"> cursor->set_key(cursor, <span class="stringliteral">"key"</span>);</div><div class="line"> cursor->set_value(cursor, <span class="stringliteral">"value"</span>);</div><div class="line"> <span class="keywordflow">switch</span> (cursor->update(cursor)) {</div><div class="line"> <span class="keywordflow">case</span> 0: <span class="comment">/* Update success */</span></div><div class="line"> error_check(session-><a class="code" href="struct_w_t___s_e_s_s_i_o_n.html#a712226eca5ade5bd123026c624468fa2">commit_transaction</a>(session, NULL));</div><div class="line"> <span class="comment">/*</span></div><div class="line"><span class="comment"> * If commit_transaction succeeds, cursors remain positioned; if</span></div><div class="line"><span class="comment"> * commit_transaction fails, the transaction was rolled-back and</span></div><div class="line"><span class="comment"> * and all cursors are reset.</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#ga5ee3c6fcd074e11efd118f3e68e91db8">WT_ROLLBACK</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"> error_check(session-><a class="code" href="struct_w_t___s_e_s_s_i_o_n.html#ab45f521464ad9e54d9b15efc2ffe20a1">rollback_transaction</a>(session, NULL));</div><div class="line"> <span class="comment">/* The rollback_transaction call resets all 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">/*</span></div><div class="line"><span class="comment"> * Cursors remain open and may be used for multiple transactions.</span></div><div class="line"><span class="comment"> */</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="error_handling.html">Error handling</a> for details. </dd></dl>
</div>
</div>
<a id="ab3399430e474f7005bd5ea20e6ec7a8e"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ab3399430e474f7005bd5ea20e6ec7a8e">◆ </a></span>salvage()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">int WT_SESSION::salvage </td>
<td>(</td>
<td class="paramtype"><a class="el" href="struct_w_t___s_e_s_s_i_o_n.html">WT_SESSION</a> * </td>
<td class="paramname"><em>session</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const char * </td>
<td class="paramname"><em>name</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const char * </td>
<td class="paramname"><em>config</em> </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Salvage a table or file. </p>
<p>Salvage rebuilds the file, or files of which a table is comprised, discarding any corrupted file blocks.</p>
<p>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 table or file 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 table or file. ">WT_SESSION::verify</a> method.</p>
<p>Files are rebuilt in place, the salvage method overwrites the existing files.</p>
<p>This method requires exclusive access to the specified data source(s). If any cursors are open with the specified name(s) or a data source is otherwise in use, the call will fail and return <code>EBUSY</code>.</p>
<div class="fragment"><div class="line"> error_check(session-><a class="code" href="struct_w_t___s_e_s_s_i_o_n.html#ab3399430e474f7005bd5ea20e6ec7a8e">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 table or file 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, EBUSY if the object is not available for exclusive access, and a non-zero error code on failure. See <a class="el" href="error_handling.html">Error handling</a> for details. </dd></dl>
</div>
</div>
<a id="ab15f6b5f81e6e98c9b6b41c451732873"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ab15f6b5f81e6e98c9b6b41c451732873">◆ </a></span>snapshot()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">int WT_SESSION::snapshot </td>
<td>(</td>
<td class="paramtype"><a class="el" href="struct_w_t___s_e_s_s_i_o_n.html">WT_SESSION</a> * </td>
<td class="paramname"><em>session</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const char * </td>
<td class="paramname"><em>config</em> </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Manage named snapshot transactions. </p>
<p>Use this API to create and drop named snapshots. Named snapshot transactions can be accessed via WT_CURSOR::open. See <a class="el" href="transactions.html#transaction_named_snapshots">Named Snapshots</a>.</p>
<div class="fragment"><div class="line"> <span class="comment">/* Create a named snapshot */</span></div><div class="line"> error_check(session-><a class="code" href="struct_w_t___s_e_s_s_i_o_n.html#ab15f6b5f81e6e98c9b6b41c451732873">snapshot</a>(session, <span class="stringliteral">"name=June01"</span>));</div><div class="line"></div><div class="line"> <span class="comment">/* Open a transaction at a given snapshot */</span></div><div class="line"> error_check(session-><a class="code" href="struct_w_t___s_e_s_s_i_o_n.html#a7e26b16b26b5870498752322fad790bf">begin_transaction</a>(session, <span class="stringliteral">"snapshot=June01"</span>));</div><div class="line"></div><div class="line"> <span class="comment">/* Drop all named snapshots */</span></div><div class="line"> error_check(session-><a class="code" href="struct_w_t___s_e_s_s_i_o_n.html#ab15f6b5f81e6e98c9b6b41c451732873">snapshot</a>(session, <span class="stringliteral">"drop=(all)"</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>if non-empty, specifies which snapshots to drop. Where a group of snapshots are being dropped, the order is based on snapshot creation order not alphanumeric name order.</td><td>a set of related configuration options defined below. </td></tr>
<tr>
<td><code>    all</code></td><td>drop all named snapshots.</td><td>a boolean flag; default <code>false</code>. </td></tr>
<tr>
<td><code>    before</code></td><td>drop all snapshots up to but not including the specified name.</td><td>a string; default empty. </td></tr>
<tr>
<td><code>    names</code></td><td>drop specific named snapshots.</td><td>a list of strings; default empty. </td></tr>
<tr>
<td><code>    to</code></td><td>drop all snapshots up to and including the specified name.</td><td>a string; default empty. </td></tr>
<tr>
<td><code> )</code></td><td></td><td></td></tr>
<tr>
<td><code>include_updates</code></td><td>make updates from the current transaction visible to users of the named snapshot. Transactions started with such a named snapshot are restricted to being read-only.</td><td>a boolean flag; default <code>false</code>. </td></tr>
<tr>
<td><code>name</code></td><td>specify a name for the snapshot.</td><td>a string; 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="error_handling.html">Error handling</a> for details. </dd></dl>
</div>
</div>
<a id="abe03ccb716e097ed1bb4d42eb733c1f9"></a>
<h2 class="memtitle"><span class="permalink"><a href="#abe03ccb716e097ed1bb4d42eb733c1f9">◆ </a></span>strerror()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">const char* WT_SESSION::strerror </td>
<td>(</td>
<td class="paramtype"><a class="el" href="struct_w_t___s_e_s_s_i_o_n.html">WT_SESSION</a> * </td>
<td class="paramname"><em>session</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">int </td>
<td class="paramname"><em>error</em> </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Return information about an error as a string. </p>
<div class="fragment"><div class="line"> <span class="keyword">const</span> <span class="keywordtype">char</span> *key = <span class="stringliteral">"non-existent key"</span>;</div><div class="line"> cursor->set_key(cursor, key);</div><div class="line"> <span class="keywordflow">if</span> ((ret = cursor->remove(cursor)) != 0) {</div><div class="line"> fprintf(stderr,</div><div class="line"> <span class="stringliteral">"cursor.remove: %s\n"</span>,</div><div class="line"> cursor->session->strerror(cursor->session, ret));</div><div class="line"> <span class="keywordflow">return</span> (ret);</div><div class="line"> }</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">error</td><td>a return value from a WiredTiger, ISO C, or POSIX standard API </td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>a string representation of the error </dd></dl>
<dl><dt><b>Examples: </b></dt><dd><a class="el" href="ex_thread_8c-example.html#a9">ex_thread.c</a>.</dd>
</dl>
</div>
</div>
<a id="aa449082ce4de7ee86a773595c416a69f"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aa449082ce4de7ee86a773595c416a69f">◆ </a></span>timestamp_transaction()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">int WT_SESSION::timestamp_transaction </td>
<td>(</td>
<td class="paramtype"><a class="el" href="struct_w_t___s_e_s_s_i_o_n.html">WT_SESSION</a> * </td>
<td class="paramname"><em>session</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const char * </td>
<td class="paramname"><em>config</em> </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Set a timestamp on a transaction. </p>
<div class="fragment"><div class="line"> error_check(</div><div class="line"> session-><a class="code" href="struct_w_t___s_e_s_s_i_o_n.html#aa449082ce4de7ee86a773595c416a69f">timestamp_transaction</a>(session, <span class="stringliteral">"commit_timestamp=2a"</span>));</div></div><!-- fragment --><p> This method must be called on a session with an active transaction.</p>
<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>commit_timestamp</code></td><td>set the commit timestamp for the current transaction. The supplied value must not be older than the first commit timestamp set for the current transaction. The value must also not be older than the current oldest and stable timestamps. See <a class="el" href="transactions.html#transaction_timestamps">Application-specified Transaction Timestamps</a>.</td><td>a string; default empty. </td></tr>
<tr>
<td><code>read_timestamp</code></td><td>read using the specified timestamp. The supplied value must not be older than the current oldest timestamp. This can only be set once for a transaction. <a class="el" href="transactions.html#transaction_timestamps">Application-specified Transaction Timestamps</a>.</td><td>a string; default empty. </td></tr>
<tr>
<td><code>round_to_oldest</code></td><td>if read timestamp is earlier than oldest timestamp, read timestamp will be rounded to oldest timestamp.</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="error_handling.html">Error handling</a> for details. </dd></dl>
</div>
</div>
<a id="a1d108fab498cfddbb09ee23e3321a88d"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a1d108fab498cfddbb09ee23e3321a88d">◆ </a></span>transaction_pinned_range()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">int WT_SESSION::transaction_pinned_range </td>
<td>(</td>
<td class="paramtype"><a class="el" href="struct_w_t___s_e_s_s_i_o_n.html">WT_SESSION</a> * </td>
<td class="paramname"><em>session</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">uint64_t * </td>
<td class="paramname"><em>range</em> </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Return the transaction ID range pinned by the session handle. </p>
<p>The ID range is approximate and is calculated based on the oldest ID needed for the active transaction in this session, compared to the newest transaction in the system.</p>
<div class="fragment"><div class="line"> <span class="comment">/* Check the transaction ID range pinned by the session handle. */</span></div><div class="line"> uint64_t range;</div><div class="line"></div><div class="line"> error_check(session-><a class="code" href="struct_w_t___s_e_s_s_i_o_n.html#a1d108fab498cfddbb09ee23e3321a88d">transaction_pinned_range</a>(session, &range));</div></div><!-- fragment --> <dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramdir"></td><td class="paramname">session</td><td>the session handle </td></tr>
<tr><td class="paramdir">[out]</td><td class="paramname">range</td><td>the range of IDs pinned by this session. Zero if there is no active transaction. </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="error_handling.html">Error handling</a> for details. </dd></dl>
</div>
</div>
<a id="a61c8c3ad80d8228172db66ca70bd90fd"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a61c8c3ad80d8228172db66ca70bd90fd">◆ </a></span>transaction_sync()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">int WT_SESSION::transaction_sync </td>
<td>(</td>
<td class="paramtype"><a class="el" href="struct_w_t___s_e_s_s_i_o_n.html">WT_SESSION</a> * </td>
<td class="paramname"><em>session</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const char * </td>
<td class="paramname"><em>config</em> </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Wait for a transaction to become synchronized. </p>
<p>This method is only useful when <a class="el" href="group__wt.html#gacbe8d118f978f5bfc8ccb4c77c9e8813" title="Open a connection to a database. ">wiredtiger_open</a> is configured with the <code>transaction_sync</code> setting disabled.</p>
<p>This method must not be called on a session with an active transaction.</p>
<div class="fragment"><div class="line"> error_check(session-><a class="code" href="struct_w_t___s_e_s_s_i_o_n.html#a61c8c3ad80d8228172db66ca70bd90fd">transaction_sync</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>. Permitted values: <table class="doxtable">
<tr>
<th>Name</th><th>Effect</th><th>Values </th></tr>
<tr>
<td><code>timeout_ms</code></td><td>maximum amount of time to wait for background sync to complete in milliseconds. A value of zero disables the timeout and returns immediately.</td><td>an integer; default <code>1200000</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="error_handling.html">Error handling</a> for details. </dd></dl>
</div>
</div>
<a id="ac2bad195e24710d52d730fe3a7c1756a"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ac2bad195e24710d52d730fe3a7c1756a">◆ </a></span>truncate()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">int WT_SESSION::truncate </td>
<td>(</td>
<td class="paramtype"><a class="el" href="struct_w_t___s_e_s_s_i_o_n.html">WT_SESSION</a> * </td>
<td class="paramname"><em>session</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const char * </td>
<td class="paramname"><em>name</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="struct_w_t___c_u_r_s_o_r.html">WT_CURSOR</a> * </td>
<td class="paramname"><em>start</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="struct_w_t___c_u_r_s_o_r.html">WT_CURSOR</a> * </td>
<td class="paramname"><em>stop</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const char * </td>
<td class="paramname"><em>config</em> </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Truncate a file, table or cursor range. </p>
<p>Truncate a table or file. </p><div class="fragment"><div class="line"> error_check(session-><a class="code" href="struct_w_t___s_e_s_s_i_o_n.html#ac2bad195e24710d52d730fe3a7c1756a">truncate</a>(</div><div class="line"> 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">WT_CURSOR</a> *start, *stop;</div><div class="line"></div><div class="line"> error_check(session-><a class="code" href="struct_w_t___s_e_s_s_i_o_n.html#afb5b4a69c2c5cafe411b2b04fdc1c75d">open_cursor</a>(</div><div class="line"> session, <span class="stringliteral">"table:mytable"</span>, NULL, NULL, &start));</div><div class="line"> start-><a class="code" href="struct_w_t___c_u_r_s_o_r.html#ad1088d719df40babc1f57d086691ebdc">set_key</a>(start, <span class="stringliteral">"June01"</span>);</div><div class="line"> error_check(start-><a class="code" href="struct_w_t___c_u_r_s_o_r.html#a7e25b2ced2cf3ec68bd5429bf921c79f">search</a>(start));</div><div class="line"></div><div class="line"> error_check(session-><a class="code" href="struct_w_t___s_e_s_s_i_o_n.html#afb5b4a69c2c5cafe411b2b04fdc1c75d">open_cursor</a>(</div><div class="line"> session, <span class="stringliteral">"table:mytable"</span>, NULL, NULL, &stop));</div><div class="line"> stop-><a class="code" href="struct_w_t___c_u_r_s_o_r.html#ad1088d719df40babc1f57d086691ebdc">set_key</a>(stop, <span class="stringliteral">"June30"</span>);</div><div class="line"> error_check(stop-><a class="code" href="struct_w_t___c_u_r_s_o_r.html#a7e25b2ced2cf3ec68bd5429bf921c79f">search</a>(stop));</div><div class="line"></div><div class="line"> error_check(session-><a class="code" href="struct_w_t___s_e_s_s_i_o_n.html#ac2bad195e24710d52d730fe3a7c1756a">truncate</a>(session, NULL, start, stop, NULL));</div></div><!-- fragment --><p> Any specified cursors end with no position, and subsequent calls to 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> (<a class="el" href="struct_w_t___c_u_r_s_o_r.html#a43d6664d2f68902aa63f933864242e76" title="Return the previous record. ">WT_CURSOR::prev</a>) method will iterate from the beginning (end) of the table.</p>
<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 table or file to truncate </td></tr>
<tr><td class="paramname">start</td><td>optional cursor marking the first record discarded; if <code>NULL</code>, the truncate starts from the beginning of the object </td></tr>
<tr><td class="paramname">stop</td><td>optional cursor marking the last record discarded; if <code>NULL</code>, the truncate continues to the end of the object </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="error_handling.html">Error handling</a> for details. </dd></dl>
</div>
</div>
<a id="a556046adc68a33bd317865c6a8d9ad69"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a556046adc68a33bd317865c6a8d9ad69">◆ </a></span>upgrade()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">int WT_SESSION::upgrade </td>
<td>(</td>
<td class="paramtype"><a class="el" href="struct_w_t___s_e_s_s_i_o_n.html">WT_SESSION</a> * </td>
<td class="paramname"><em>session</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const char * </td>
<td class="paramname"><em>name</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const char * </td>
<td class="paramname"><em>config</em> </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Upgrade a table or file. </p>
<p>Upgrade upgrades a table or file, if upgrade is required.</p>
<p>This method requires exclusive access to the specified data source(s). If any cursors are open with the specified name(s) or a data source is otherwise in use, the call will fail and return <code>EBUSY</code>.</p>
<div class="fragment"><div class="line"> error_check(session-><a class="code" href="struct_w_t___s_e_s_s_i_o_n.html#a556046adc68a33bd317865c6a8d9ad69">upgrade</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 table or file to upgrade </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, EBUSY if the object is not available for exclusive access, and a non-zero error code on failure. See <a class="el" href="error_handling.html">Error handling</a> for details. </dd></dl>
</div>
</div>
<a id="a0334da4c85fe8af4197c9a7de27467d3"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a0334da4c85fe8af4197c9a7de27467d3">◆ </a></span>verify()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">int WT_SESSION::verify </td>
<td>(</td>
<td class="paramtype"><a class="el" href="struct_w_t___s_e_s_s_i_o_n.html">WT_SESSION</a> * </td>
<td class="paramname"><em>session</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const char * </td>
<td class="paramname"><em>name</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const char * </td>
<td class="paramname"><em>config</em> </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Verify a table or file. </p>
<p>Verify reports if a file, or the files of which a table is comprised, have been corrupted. The <a class="el" href="struct_w_t___s_e_s_s_i_o_n.html#ab3399430e474f7005bd5ea20e6ec7a8e" title="Salvage a table or file. ">WT_SESSION::salvage</a> method can be used to repair a corrupted file,</p>
<div class="fragment"><div class="line"> error_check(session-><a class="code" href="struct_w_t___s_e_s_s_i_o_n.html#a0334da4c85fe8af4197c9a7de27467d3">verify</a>(session, <span class="stringliteral">"table:mytable"</span>, NULL));</div></div><!-- fragment --><p> This method requires exclusive access to the specified data source(s). If any cursors are open with the specified name(s) or a data source is otherwise in use, the call will fail and return <code>EBUSY</code>.</p>
<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 table or file to verify </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>dump_address</code></td><td>Display addresses and page types as pages are verified, using the application's message handler, intended for debugging.</td><td>a boolean flag; default <code>false</code>. </td></tr>
<tr>
<td><code>dump_blocks</code></td><td>Display the contents of on-disk blocks as they are verified, using the application's message handler, intended for debugging.</td><td>a boolean flag; default <code>false</code>. </td></tr>
<tr>
<td><code>dump_layout</code></td><td>Display the layout of the files as they are verified, using the application's message handler, intended for debugging; requires optional support from the block manager.</td><td>a boolean flag; default <code>false</code>. </td></tr>
<tr>
<td><code>dump_offsets</code></td><td>Display the contents of specific on-disk blocks, using the application's message handler, intended for debugging.</td><td>a list of strings; default empty. </td></tr>
<tr>
<td><code>dump_pages</code></td><td>Display the contents of in-memory pages as they are verified, using the application's message handler, intended for debugging.</td><td>a boolean flag; default <code>false</code>. </td></tr>
<tr>
<td><code>strict</code></td><td>Treat any verification problem as an error; by default, verify will warn, but not fail, in the case of errors that won't affect future behavior (for example, a leaked block).</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, EBUSY if the object is not available for exclusive access, and a non-zero error code on failure. See <a class="el" href="error_handling.html">Error handling</a> for details. </dd></dl>
</div>
</div>
<h2 class="groupheader">Member Data Documentation</h2>
<a id="a28a33717c138b4c481019947e230f8f6"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a28a33717c138b4c481019947e230f8f6">◆ </a></span>connection</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="struct_w_t___c_o_n_n_e_c_t_i_o_n.html">WT_CONNECTION</a>* WT_SESSION::connection</td>
</tr>
</table>
</div><div class="memdoc">
<p>The connection for this session. </p>
<dl><dt><b>Examples: </b></dt><dd><a class="el" href="ex_encrypt_8c-example.html#a5">ex_encrypt.c</a>.</dd>
</dl>
</div>
</div>
</div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
<ul>
<li class="navelem"><a class="el" href="struct_w_t___s_e_s_s_i_o_n.html">WT_SESSION</a></li>
<li class="footer">Copyright (c) 2008-2018 MongoDB, Inc. All rights reserved. Contact <a href="mailto:info@wiredtiger.com">info@wiredtiger.com</a> for more information.</li>
</ul>
</div>
</body>
</html>
|