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
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html><head><meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
<title>ResultSet.h File Reference</title>
<link href="doxygen.css" rel="stylesheet" type="text/css">
<link href="tabs.css" rel="stylesheet" type="text/css">
<link rel="stylesheet" href="libzdb.css">
</head><body>
<a href="" class="back" onclick="history.back();return false;">⬅</a>
<!-- Generated by Doxygen 1.11.0 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */
$(function() { codefold.init(0); });
/* @license-end */
</script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */
$(function(){ initResizable(false); });
/* @license-end */
</script>
<div id="nav-path" class="navpath">
<ul>
<li class="navelem"><a class="el" href="dir_bb61871b4c63e4e6685a8d6c52430594.html">zdb</a></li> </ul>
</div>
</div><!-- top -->
<div id="doc-content">
<div class="header">
<div class="summary">
<a href="#define-members">Macros</a> |
<a href="#typedef-members">Typedefs</a> </div>
<div class="headertitle"><div class="title">ResultSet.h File Reference</div></div>
</div><!--header-->
<div class="contents">
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p>A <b>ResultSet</b> represents a database result set. </p>
<p>A ResultSet is created by executing a SQL SELECT statement using either <a class="el" href="Connection_8h.html#a3d1e39204654573ccac3d8ba3a2eae58" title="Executes a SQL query and returns a ResultSet.">Connection_executeQuery()</a> or <a class="el" href="PreparedStatement_8h.html#a3e33ed8289ac8b8b11438b009a169e63" title="Executes the prepared SQL query.">PreparedStatement_executeQuery()</a>.</p>
<p>A ResultSet maintains a cursor pointing to its current row of data. Initially, the cursor is positioned before the first row. <a class="el" href="#a771894bb8c0ddfd90ed6ed9c9c3e46b3" title="Moves the cursor to the next row.">ResultSet_next()</a> moves the cursor to the next row, and because it returns false when there are no more rows, it can be used in a while loop to iterate through the result set. A ResultSet is not updatable and has a cursor that moves forward only. Thus, you can iterate through it only once and only from the first row to the last row.</p>
<p>The ResultSet interface provides getter methods for retrieving column values from the current row. Values can be retrieved using either the index number of the column or the name of the column. In general, using the column index will be more efficient. <em>Columns are numbered from 1.</em></p>
<p>Column names used as input to getter methods are case sensitive. When a getter method is called with a column name and several columns have the same name, the value of the first matching column will be returned. The column name option is designed to be used when column names are used in the SQL query that generated the result set. For columns that are NOT explicitly named in the query, it is best to use column indices.</p>
<h2><a class="anchor" id="autotoc_md22"></a>
Examples</h2>
<p>The following examples demonstrate how to obtain a ResultSet and how to retrieve values from it.</p>
<h3><a class="anchor" id="autotoc_md23"></a>
Example: Using column names</h3>
<p>In this example, columns are named in the SELECT statement, and we retrieve values using the column names (we could of course also use indices if we want):</p>
<div class="fragment"><div class="line">ResultSet_T r = <a class="code hl_function" href="Connection_8h.html#a3d1e39204654573ccac3d8ba3a2eae58">Connection_executeQuery</a>(con, <span class="stringliteral">"SELECT ssn, name, photo FROM employees"</span>);</div>
<div class="line"><span class="keywordflow">while</span> (<a class="code hl_function" href="#a771894bb8c0ddfd90ed6ed9c9c3e46b3">ResultSet_next</a>(r)) </div>
<div class="line">{</div>
<div class="line"> <span class="keywordtype">int</span> ssn = <a class="code hl_function" href="#a51563d2ce1e948806d34c0960f5d66dc">ResultSet_getIntByName</a>(r, <span class="stringliteral">"ssn"</span>);</div>
<div class="line"> <span class="keyword">const</span> <span class="keywordtype">char</span> *name = <a class="code hl_function" href="#a94f3683ed6ed1926d2b9013d5ffc8f82">ResultSet_getStringByName</a>(r, <span class="stringliteral">"name"</span>);</div>
<div class="line"> <span class="keywordtype">int</span> photoSize;</div>
<div class="line"> <span class="keyword">const</span> <span class="keywordtype">void</span> *photo = <a class="code hl_function" href="#a08e197bc42a118e3cb2ca748b0525ec3">ResultSet_getBlobByName</a>(r, <span class="stringliteral">"photo"</span>, &photoSize);</div>
<div class="line"> <span class="keywordflow">if</span> (photoSize > 0) </div>
<div class="line"> {</div>
<div class="line"> <span class="comment">// Process photo data</span></div>
<div class="line"> }</div>
<div class="line"> <span class="comment">// Process other data...</span></div>
<div class="line">}</div>
<div class="ttc" id="aConnection_8h_html_a3d1e39204654573ccac3d8ba3a2eae58"><div class="ttname"><a href="Connection_8h.html#a3d1e39204654573ccac3d8ba3a2eae58">Connection_executeQuery</a></div><div class="ttdeci">ResultSet_T Connection_executeQuery(T C, const char *sql,...)</div><div class="ttdoc">Executes a SQL query and returns a ResultSet.</div></div>
<div class="ttc" id="aResultSet_8h_html_a08e197bc42a118e3cb2ca748b0525ec3"><div class="ttname"><a href="#a08e197bc42a118e3cb2ca748b0525ec3">ResultSet_getBlobByName</a></div><div class="ttdeci">const void * ResultSet_getBlobByName(T R, const char *columnName, int *size)</div><div class="ttdoc">Gets the designated column's value as a void pointer.</div></div>
<div class="ttc" id="aResultSet_8h_html_a51563d2ce1e948806d34c0960f5d66dc"><div class="ttname"><a href="#a51563d2ce1e948806d34c0960f5d66dc">ResultSet_getIntByName</a></div><div class="ttdeci">int ResultSet_getIntByName(T R, const char *columnName)</div><div class="ttdoc">Gets the designated column's value as an int.</div></div>
<div class="ttc" id="aResultSet_8h_html_a771894bb8c0ddfd90ed6ed9c9c3e46b3"><div class="ttname"><a href="#a771894bb8c0ddfd90ed6ed9c9c3e46b3">ResultSet_next</a></div><div class="ttdeci">bool ResultSet_next(T R)</div><div class="ttdoc">Moves the cursor to the next row.</div></div>
<div class="ttc" id="aResultSet_8h_html_a94f3683ed6ed1926d2b9013d5ffc8f82"><div class="ttname"><a href="#a94f3683ed6ed1926d2b9013d5ffc8f82">ResultSet_getStringByName</a></div><div class="ttdeci">const char * ResultSet_getStringByName(T R, const char *columnName)</div><div class="ttdoc">Gets the designated column's value as a C-string.</div></div>
</div><!-- fragment --><h3><a class="anchor" id="autotoc_md24"></a>
Example: Using column indices</h3>
<p>This example demonstrates selecting a generated result and printing it. When the SELECT statement doesn't name the column, we use the column index to retrieve the value:</p>
<div class="fragment"><div class="line">ResultSet_T r = <a class="code hl_function" href="Connection_8h.html#a3d1e39204654573ccac3d8ba3a2eae58">Connection_executeQuery</a>(con, <span class="stringliteral">"SELECT COUNT(*) FROM employees"</span>);</div>
<div class="line"><span class="keywordflow">if</span> (<a class="code hl_function" href="#a771894bb8c0ddfd90ed6ed9c9c3e46b3">ResultSet_next</a>(r)) </div>
<div class="line">{</div>
<div class="line"> <span class="keyword">const</span> <span class="keywordtype">char</span> *count = <a class="code hl_function" href="#ac65ad967dcaad62aa13d166c446e8f58">ResultSet_getString</a>(r, 1);</div>
<div class="line"> printf(<span class="stringliteral">"Number of employees: %s\n"</span>, <a class="code hl_define" href="zdb_8h.html#a297ccf9a42e722258e3b51f9dabeab0a">valueOr</a>(count, <span class="stringliteral">"none"</span>));</div>
<div class="line">} </div>
<div class="line"><span class="keywordflow">else</span></div>
<div class="line">{</div>
<div class="line"> printf(<span class="stringliteral">"No results returned\n"</span>);</div>
<div class="line">}</div>
<div class="ttc" id="aResultSet_8h_html_ac65ad967dcaad62aa13d166c446e8f58"><div class="ttname"><a href="#ac65ad967dcaad62aa13d166c446e8f58">ResultSet_getString</a></div><div class="ttdeci">const char * ResultSet_getString(T R, int columnIndex)</div><div class="ttdoc">Gets the designated column's value as a C-string.</div></div>
<div class="ttc" id="azdb_8h_html_a297ccf9a42e722258e3b51f9dabeab0a"><div class="ttname"><a href="zdb_8h.html#a297ccf9a42e722258e3b51f9dabeab0a">valueOr</a></div><div class="ttdeci">#define valueOr(expr, default_value)</div><div class="ttdef"><b>Definition</b> zdb.h:107</div></div>
</div><!-- fragment --><h2><a class="anchor" id="autotoc_md25"></a>
Automatic type conversions</h2>
<p>A ResultSet stores values internally as bytes and converts values on-the-fly to numeric types when requested, such as when <a class="el" href="#aa73672053b34ee50c21eac0783b28719" title="Gets the designated column's value as an int.">ResultSet_getInt()</a> or one of the other numeric get-methods are called. In the above example, even if <em>count(*)</em> returns a numeric value, we can use <a class="el" href="#ac65ad967dcaad62aa13d166c446e8f58" title="Gets the designated column's value as a C-string.">ResultSet_getString()</a> to get the number as a string or if we choose, we can use <a class="el" href="#aa73672053b34ee50c21eac0783b28719" title="Gets the designated column's value as an int.">ResultSet_getInt()</a> to get the value as an integer. In the latter case, note that if the column value cannot be converted to a number, an SQLException is thrown.</p>
<h2><a class="anchor" id="autotoc_md26"></a>
Date and Time</h2>
<p>ResultSet provides two principal methods for retrieving temporal column values as C types. <a class="el" href="#a073df52b04dfbaaaf088baede0f770f5" title="Gets the designated column's value as a Unix timestamp.">ResultSet_getTimestamp()</a> converts a SQL timestamp value to a <code>time_t</code> and <a class="el" href="#a98e618557d128694b2239c55f7618262" title="Gets the designated column's value as a Date, Time or DateTime.">ResultSet_getDateTime()</a> returns a <code>tm structure</code> representing a Date, Time, DateTime, or Timestamp column type. To get a temporal column value as a string, simply use <a class="el" href="#ac65ad967dcaad62aa13d166c446e8f58" title="Gets the designated column's value as a C-string.">ResultSet_getString()</a></p>
<p><em>A ResultSet is reentrant, but not thread-safe and should only be used by one thread (at a time).</em></p>
<dl class="section note"><dt>Note</dt><dd>Remember that column indices in ResultSet are 1-based, not 0-based.</dd></dl>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="Connection_8h.html" title="A Connection represents a connection to a SQL database system.">Connection.h</a> <a class="el" href="PreparedStatement_8h.html" title="A PreparedStatement represents a single SQL statement pre-compiled into byte code for later execution...">PreparedStatement.h</a> <a class="el" href="SQLException_8h.html" title="Signals that an SQL specific exception has occurred.">SQLException.h</a> </dd></dl>
</div><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="define-members" name="define-members"></a>
Macros</h2></td></tr>
<tr class="memitem:a0acb682b8260ab1c60b918599864e2e5" id="r_a0acb682b8260ab1c60b918599864e2e5"><td class="memItemLeft" align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="#a0acb682b8260ab1c60b918599864e2e5">T</a>   ResultSet_T</td></tr>
<tr class="separator:a0acb682b8260ab1c60b918599864e2e5"><td class="memSeparator" colspan="2"> </td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="typedef-members" name="typedef-members"></a>
Typedefs</h2></td></tr>
<tr class="memitem:ac27bdf37e94a374efe32a90c9db7fecc" id="r_ac27bdf37e94a374efe32a90c9db7fecc"><td class="memItemLeft" align="right" valign="top">typedef struct ResultSet_S * </td><td class="memItemRight" valign="bottom"><a class="el" href="#ac27bdf37e94a374efe32a90c9db7fecc">T</a></td></tr>
<tr class="separator:ac27bdf37e94a374efe32a90c9db7fecc"><td class="memSeparator" colspan="2"> </td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="func-members" name="func-members"></a>
Functions</h2></td></tr>
<tr><td colspan="2"><div class="groupHeader">Properties</div></td></tr>
<tr class="memitem:a74a9a4c55f9ff432e6cbb5c196627427" id="r_a74a9a4c55f9ff432e6cbb5c196627427"><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="#a74a9a4c55f9ff432e6cbb5c196627427">ResultSet_getColumnCount</a> (<a class="el" href="Connection_8h.html#a8dc1b239f8e305fbd1406ff041c89151">T</a> R)</td></tr>
<tr class="memdesc:a74a9a4c55f9ff432e6cbb5c196627427"><td class="mdescLeft"> </td><td class="mdescRight">Gets the number of columns in this ResultSet. <br /></td></tr>
<tr class="separator:a74a9a4c55f9ff432e6cbb5c196627427"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a10e8a66eabf5cbcdc26edc842199c7bf" id="r_a10e8a66eabf5cbcdc26edc842199c7bf"><td class="memItemLeft" align="right" valign="top">const char * </td><td class="memItemRight" valign="bottom"><a class="el" href="#a10e8a66eabf5cbcdc26edc842199c7bf">ResultSet_getColumnName</a> (<a class="el" href="Connection_8h.html#a8dc1b239f8e305fbd1406ff041c89151">T</a> R, int columnIndex)</td></tr>
<tr class="memdesc:a10e8a66eabf5cbcdc26edc842199c7bf"><td class="mdescLeft"> </td><td class="mdescRight">Gets the designated column's name. <br /></td></tr>
<tr class="separator:a10e8a66eabf5cbcdc26edc842199c7bf"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a3f9283bcdd0ae95a05b22f30c9c1a08b" id="r_a3f9283bcdd0ae95a05b22f30c9c1a08b"><td class="memItemLeft" align="right" valign="top">long </td><td class="memItemRight" valign="bottom"><a class="el" href="#a3f9283bcdd0ae95a05b22f30c9c1a08b">ResultSet_getColumnSize</a> (<a class="el" href="Connection_8h.html#a8dc1b239f8e305fbd1406ff041c89151">T</a> R, int columnIndex)</td></tr>
<tr class="memdesc:a3f9283bcdd0ae95a05b22f30c9c1a08b"><td class="mdescLeft"> </td><td class="mdescRight">Gets the size of a column in bytes. <br /></td></tr>
<tr class="separator:a3f9283bcdd0ae95a05b22f30c9c1a08b"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:abba9d66851f27f8cc4fc6511551b8092" id="r_abba9d66851f27f8cc4fc6511551b8092"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="#abba9d66851f27f8cc4fc6511551b8092">ResultSet_setFetchSize</a> (<a class="el" href="Connection_8h.html#a8dc1b239f8e305fbd1406ff041c89151">T</a> R, int rows)</td></tr>
<tr class="memdesc:abba9d66851f27f8cc4fc6511551b8092"><td class="mdescLeft"> </td><td class="mdescRight">Sets the number of rows to fetch from the database. <br /></td></tr>
<tr class="separator:abba9d66851f27f8cc4fc6511551b8092"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a889b66128f756eb72bb15a1205b64986" id="r_a889b66128f756eb72bb15a1205b64986"><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="#a889b66128f756eb72bb15a1205b64986">ResultSet_getFetchSize</a> (<a class="el" href="Connection_8h.html#a8dc1b239f8e305fbd1406ff041c89151">T</a> R)</td></tr>
<tr class="memdesc:a889b66128f756eb72bb15a1205b64986"><td class="mdescLeft"> </td><td class="mdescRight">Gets the number of rows to fetch from the database. <br /></td></tr>
<tr class="separator:a889b66128f756eb72bb15a1205b64986"><td class="memSeparator" colspan="2"> </td></tr>
<tr><td colspan="2"><div class="groupHeader">Functions</div></td></tr>
<tr class="memitem:a771894bb8c0ddfd90ed6ed9c9c3e46b3" id="r_a771894bb8c0ddfd90ed6ed9c9c3e46b3"><td class="memItemLeft" align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><a class="el" href="#a771894bb8c0ddfd90ed6ed9c9c3e46b3">ResultSet_next</a> (<a class="el" href="Connection_8h.html#a8dc1b239f8e305fbd1406ff041c89151">T</a> R)</td></tr>
<tr class="memdesc:a771894bb8c0ddfd90ed6ed9c9c3e46b3"><td class="mdescLeft"> </td><td class="mdescRight">Moves the cursor to the next row. <br /></td></tr>
<tr class="separator:a771894bb8c0ddfd90ed6ed9c9c3e46b3"><td class="memSeparator" colspan="2"> </td></tr>
<tr><td colspan="2"><div class="groupHeader">Columns</div></td></tr>
<tr class="memitem:a7a402b4aa9f5c08dd5edd9ee97517673" id="r_a7a402b4aa9f5c08dd5edd9ee97517673"><td class="memItemLeft" align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><a class="el" href="#a7a402b4aa9f5c08dd5edd9ee97517673">ResultSet_isnull</a> (<a class="el" href="Connection_8h.html#a8dc1b239f8e305fbd1406ff041c89151">T</a> R, int columnIndex)</td></tr>
<tr class="memdesc:a7a402b4aa9f5c08dd5edd9ee97517673"><td class="mdescLeft"> </td><td class="mdescRight">Checks if the designated column's value is SQL NULL. <br /></td></tr>
<tr class="separator:a7a402b4aa9f5c08dd5edd9ee97517673"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:ac65ad967dcaad62aa13d166c446e8f58" id="r_ac65ad967dcaad62aa13d166c446e8f58"><td class="memItemLeft" align="right" valign="top">const char * </td><td class="memItemRight" valign="bottom"><a class="el" href="#ac65ad967dcaad62aa13d166c446e8f58">ResultSet_getString</a> (<a class="el" href="Connection_8h.html#a8dc1b239f8e305fbd1406ff041c89151">T</a> R, int columnIndex)</td></tr>
<tr class="memdesc:ac65ad967dcaad62aa13d166c446e8f58"><td class="mdescLeft"> </td><td class="mdescRight">Gets the designated column's value as a C-string. <br /></td></tr>
<tr class="separator:ac65ad967dcaad62aa13d166c446e8f58"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a94f3683ed6ed1926d2b9013d5ffc8f82" id="r_a94f3683ed6ed1926d2b9013d5ffc8f82"><td class="memItemLeft" align="right" valign="top">const char * </td><td class="memItemRight" valign="bottom"><a class="el" href="#a94f3683ed6ed1926d2b9013d5ffc8f82">ResultSet_getStringByName</a> (<a class="el" href="Connection_8h.html#a8dc1b239f8e305fbd1406ff041c89151">T</a> R, const char *columnName)</td></tr>
<tr class="memdesc:a94f3683ed6ed1926d2b9013d5ffc8f82"><td class="mdescLeft"> </td><td class="mdescRight">Gets the designated column's value as a C-string. <br /></td></tr>
<tr class="separator:a94f3683ed6ed1926d2b9013d5ffc8f82"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:aa73672053b34ee50c21eac0783b28719" id="r_aa73672053b34ee50c21eac0783b28719"><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="#aa73672053b34ee50c21eac0783b28719">ResultSet_getInt</a> (<a class="el" href="Connection_8h.html#a8dc1b239f8e305fbd1406ff041c89151">T</a> R, int columnIndex)</td></tr>
<tr class="memdesc:aa73672053b34ee50c21eac0783b28719"><td class="mdescLeft"> </td><td class="mdescRight">Gets the designated column's value as an int. <br /></td></tr>
<tr class="separator:aa73672053b34ee50c21eac0783b28719"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a51563d2ce1e948806d34c0960f5d66dc" id="r_a51563d2ce1e948806d34c0960f5d66dc"><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="#a51563d2ce1e948806d34c0960f5d66dc">ResultSet_getIntByName</a> (<a class="el" href="Connection_8h.html#a8dc1b239f8e305fbd1406ff041c89151">T</a> R, const char *columnName)</td></tr>
<tr class="memdesc:a51563d2ce1e948806d34c0960f5d66dc"><td class="mdescLeft"> </td><td class="mdescRight">Gets the designated column's value as an int. <br /></td></tr>
<tr class="separator:a51563d2ce1e948806d34c0960f5d66dc"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a5d3ed80bc1b5816f27e135a8e392aca7" id="r_a5d3ed80bc1b5816f27e135a8e392aca7"><td class="memItemLeft" align="right" valign="top">long long </td><td class="memItemRight" valign="bottom"><a class="el" href="#a5d3ed80bc1b5816f27e135a8e392aca7">ResultSet_getLLong</a> (<a class="el" href="Connection_8h.html#a8dc1b239f8e305fbd1406ff041c89151">T</a> R, int columnIndex)</td></tr>
<tr class="memdesc:a5d3ed80bc1b5816f27e135a8e392aca7"><td class="mdescLeft"> </td><td class="mdescRight">Gets the designated column's value as a long long. <br /></td></tr>
<tr class="separator:a5d3ed80bc1b5816f27e135a8e392aca7"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:ab843c4ecf8d195d6449927bf7fb9defd" id="r_ab843c4ecf8d195d6449927bf7fb9defd"><td class="memItemLeft" align="right" valign="top">long long </td><td class="memItemRight" valign="bottom"><a class="el" href="#ab843c4ecf8d195d6449927bf7fb9defd">ResultSet_getLLongByName</a> (<a class="el" href="Connection_8h.html#a8dc1b239f8e305fbd1406ff041c89151">T</a> R, const char *columnName)</td></tr>
<tr class="memdesc:ab843c4ecf8d195d6449927bf7fb9defd"><td class="mdescLeft"> </td><td class="mdescRight">Gets the designated column's value as a long long. <br /></td></tr>
<tr class="separator:ab843c4ecf8d195d6449927bf7fb9defd"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:ab501755d054fea3bdab5de15a2259e9e" id="r_ab501755d054fea3bdab5de15a2259e9e"><td class="memItemLeft" align="right" valign="top">double </td><td class="memItemRight" valign="bottom"><a class="el" href="#ab501755d054fea3bdab5de15a2259e9e">ResultSet_getDouble</a> (<a class="el" href="Connection_8h.html#a8dc1b239f8e305fbd1406ff041c89151">T</a> R, int columnIndex)</td></tr>
<tr class="memdesc:ab501755d054fea3bdab5de15a2259e9e"><td class="mdescLeft"> </td><td class="mdescRight">Gets the designated column's value as a double. <br /></td></tr>
<tr class="separator:ab501755d054fea3bdab5de15a2259e9e"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a38c392c208d0f6be4c6b4a29c624a367" id="r_a38c392c208d0f6be4c6b4a29c624a367"><td class="memItemLeft" align="right" valign="top">double </td><td class="memItemRight" valign="bottom"><a class="el" href="#a38c392c208d0f6be4c6b4a29c624a367">ResultSet_getDoubleByName</a> (<a class="el" href="Connection_8h.html#a8dc1b239f8e305fbd1406ff041c89151">T</a> R, const char *columnName)</td></tr>
<tr class="memdesc:a38c392c208d0f6be4c6b4a29c624a367"><td class="mdescLeft"> </td><td class="mdescRight">Gets the designated column's value as a double. <br /></td></tr>
<tr class="separator:a38c392c208d0f6be4c6b4a29c624a367"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:adee072900d8136c0d6bd0596388f1e83" id="r_adee072900d8136c0d6bd0596388f1e83"><td class="memItemLeft" align="right" valign="top">const void * </td><td class="memItemRight" valign="bottom"><a class="el" href="#adee072900d8136c0d6bd0596388f1e83">ResultSet_getBlob</a> (<a class="el" href="Connection_8h.html#a8dc1b239f8e305fbd1406ff041c89151">T</a> R, int columnIndex, int *size)</td></tr>
<tr class="memdesc:adee072900d8136c0d6bd0596388f1e83"><td class="mdescLeft"> </td><td class="mdescRight">Gets the designated column's value as a void pointer. <br /></td></tr>
<tr class="separator:adee072900d8136c0d6bd0596388f1e83"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a08e197bc42a118e3cb2ca748b0525ec3" id="r_a08e197bc42a118e3cb2ca748b0525ec3"><td class="memItemLeft" align="right" valign="top">const void * </td><td class="memItemRight" valign="bottom"><a class="el" href="#a08e197bc42a118e3cb2ca748b0525ec3">ResultSet_getBlobByName</a> (<a class="el" href="Connection_8h.html#a8dc1b239f8e305fbd1406ff041c89151">T</a> R, const char *columnName, int *size)</td></tr>
<tr class="memdesc:a08e197bc42a118e3cb2ca748b0525ec3"><td class="mdescLeft"> </td><td class="mdescRight">Gets the designated column's value as a void pointer. <br /></td></tr>
<tr class="separator:a08e197bc42a118e3cb2ca748b0525ec3"><td class="memSeparator" colspan="2"> </td></tr>
<tr><td colspan="2"><div class="groupHeader">Date and Time</div></td></tr>
<tr class="memitem:a073df52b04dfbaaaf088baede0f770f5" id="r_a073df52b04dfbaaaf088baede0f770f5"><td class="memItemLeft" align="right" valign="top">time_t </td><td class="memItemRight" valign="bottom"><a class="el" href="#a073df52b04dfbaaaf088baede0f770f5">ResultSet_getTimestamp</a> (<a class="el" href="Connection_8h.html#a8dc1b239f8e305fbd1406ff041c89151">T</a> R, int columnIndex)</td></tr>
<tr class="memdesc:a073df52b04dfbaaaf088baede0f770f5"><td class="mdescLeft"> </td><td class="mdescRight">Gets the designated column's value as a Unix timestamp. <br /></td></tr>
<tr class="separator:a073df52b04dfbaaaf088baede0f770f5"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a9d2d95be1cea80e6213967ce617f576f" id="r_a9d2d95be1cea80e6213967ce617f576f"><td class="memItemLeft" align="right" valign="top">time_t </td><td class="memItemRight" valign="bottom"><a class="el" href="#a9d2d95be1cea80e6213967ce617f576f">ResultSet_getTimestampByName</a> (<a class="el" href="Connection_8h.html#a8dc1b239f8e305fbd1406ff041c89151">T</a> R, const char *columnName)</td></tr>
<tr class="memdesc:a9d2d95be1cea80e6213967ce617f576f"><td class="mdescLeft"> </td><td class="mdescRight">Gets the designated column's value as a Unix timestamp. <br /></td></tr>
<tr class="separator:a9d2d95be1cea80e6213967ce617f576f"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a98e618557d128694b2239c55f7618262" id="r_a98e618557d128694b2239c55f7618262"><td class="memItemLeft" align="right" valign="top">struct tm </td><td class="memItemRight" valign="bottom"><a class="el" href="#a98e618557d128694b2239c55f7618262">ResultSet_getDateTime</a> (<a class="el" href="Connection_8h.html#a8dc1b239f8e305fbd1406ff041c89151">T</a> R, int columnIndex)</td></tr>
<tr class="memdesc:a98e618557d128694b2239c55f7618262"><td class="mdescLeft"> </td><td class="mdescRight">Gets the designated column's value as a Date, Time or DateTime. <br /></td></tr>
<tr class="separator:a98e618557d128694b2239c55f7618262"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a5733613fb15d5a4e614cb9157e4dd86f" id="r_a5733613fb15d5a4e614cb9157e4dd86f"><td class="memItemLeft" align="right" valign="top">struct tm </td><td class="memItemRight" valign="bottom"><a class="el" href="#a5733613fb15d5a4e614cb9157e4dd86f">ResultSet_getDateTimeByName</a> (<a class="el" href="Connection_8h.html#a8dc1b239f8e305fbd1406ff041c89151">T</a> R, const char *columnName)</td></tr>
<tr class="memdesc:a5733613fb15d5a4e614cb9157e4dd86f"><td class="mdescLeft"> </td><td class="mdescRight">Gets the designated column's value as a Date, Time or DateTime. <br /></td></tr>
<tr class="separator:a5733613fb15d5a4e614cb9157e4dd86f"><td class="memSeparator" colspan="2"> </td></tr>
</table>
<h2 class="groupheader">Macro Definition Documentation</h2>
<a id="a0acb682b8260ab1c60b918599864e2e5" name="a0acb682b8260ab1c60b918599864e2e5"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a0acb682b8260ab1c60b918599864e2e5">◆ </a></span>T</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">#define <a class="el" href="Connection_8h.html#a8dc1b239f8e305fbd1406ff041c89151">T</a>   ResultSet_T</td>
</tr>
</table>
</div><div class="memdoc">
</div>
</div>
<h2 class="groupheader">Typedef Documentation</h2>
<a id="ac27bdf37e94a374efe32a90c9db7fecc" name="ac27bdf37e94a374efe32a90c9db7fecc"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ac27bdf37e94a374efe32a90c9db7fecc">◆ </a></span>T</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">typedef struct ResultSet_S* <a class="el" href="Connection_8h.html#a8dc1b239f8e305fbd1406ff041c89151">T</a></td>
</tr>
</table>
</div><div class="memdoc">
</div>
</div>
<h2 class="groupheader">Function Documentation</h2>
<a id="a74a9a4c55f9ff432e6cbb5c196627427" name="a74a9a4c55f9ff432e6cbb5c196627427"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a74a9a4c55f9ff432e6cbb5c196627427">◆ </a></span>ResultSet_getColumnCount()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">int ResultSet_getColumnCount </td>
<td>(</td>
<td class="paramtype"><a class="el" href="Connection_8h.html#a8dc1b239f8e305fbd1406ff041c89151">T</a></td> <td class="paramname"><span class="paramname"><em>R</em></span></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Gets the number of columns in this ResultSet. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">R</td><td>A ResultSet object </td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>The number of columns </dd></dl>
</div>
</div>
<a id="a10e8a66eabf5cbcdc26edc842199c7bf" name="a10e8a66eabf5cbcdc26edc842199c7bf"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a10e8a66eabf5cbcdc26edc842199c7bf">◆ </a></span>ResultSet_getColumnName()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">const char * ResultSet_getColumnName </td>
<td>(</td>
<td class="paramtype"><a class="el" href="Connection_8h.html#a8dc1b239f8e305fbd1406ff041c89151">T</a></td> <td class="paramname"><span class="paramname"><em>R</em></span>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">int</td> <td class="paramname"><span class="paramname"><em>columnIndex</em></span> )</td>
</tr>
</table>
</div><div class="memdoc">
<p>Gets the designated column's name. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">R</td><td>A ResultSet object </td></tr>
<tr><td class="paramname">columnIndex</td><td>The first column is 1, the second is 2, ... </td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>Column name or NULL if the column does not exist. You should use the method <a class="el" href="#a74a9a4c55f9ff432e6cbb5c196627427" title="Gets the number of columns in this ResultSet.">ResultSet_getColumnCount()</a> to test for the availability of columns in the result set. </dd></dl>
</div>
</div>
<a id="a3f9283bcdd0ae95a05b22f30c9c1a08b" name="a3f9283bcdd0ae95a05b22f30c9c1a08b"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a3f9283bcdd0ae95a05b22f30c9c1a08b">◆ </a></span>ResultSet_getColumnSize()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">long ResultSet_getColumnSize </td>
<td>(</td>
<td class="paramtype"><a class="el" href="Connection_8h.html#a8dc1b239f8e305fbd1406ff041c89151">T</a></td> <td class="paramname"><span class="paramname"><em>R</em></span>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">int</td> <td class="paramname"><span class="paramname"><em>columnIndex</em></span> )</td>
</tr>
</table>
</div><div class="memdoc">
<p>Gets the size of a column in bytes. </p>
<p>If the column is a blob then this method returns the number of bytes in that blob. No type conversions occur. If the result is a string (or a number since a number can be converted into a string) then return the number of bytes in the resulting string.</p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">R</td><td>A ResultSet object </td></tr>
<tr><td class="paramname">columnIndex</td><td>The first column is 1, the second is 2, ... </td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>Column data size </dd></dl>
<dl class="exception"><dt>Exceptions</dt><dd>
<table class="exception">
<tr><td class="paramname">SQLException</td><td>If columnIndex is outside the valid range </td></tr>
</table>
</dd>
</dl>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="SQLException_8h.html" title="Signals that an SQL specific exception has occurred.">SQLException.h</a> </dd></dl>
</div>
</div>
<a id="abba9d66851f27f8cc4fc6511551b8092" name="abba9d66851f27f8cc4fc6511551b8092"></a>
<h2 class="memtitle"><span class="permalink"><a href="#abba9d66851f27f8cc4fc6511551b8092">◆ </a></span>ResultSet_setFetchSize()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void ResultSet_setFetchSize </td>
<td>(</td>
<td class="paramtype"><a class="el" href="Connection_8h.html#a8dc1b239f8e305fbd1406ff041c89151">T</a></td> <td class="paramname"><span class="paramname"><em>R</em></span>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">int</td> <td class="paramname"><span class="paramname"><em>rows</em></span> )</td>
</tr>
</table>
</div><div class="memdoc">
<p>Sets the number of rows to fetch from the database. </p>
<p>ResultSet will prefetch rows in batches of number of <code>rows</code> when <a class="el" href="#a771894bb8c0ddfd90ed6ed9c9c3e46b3" title="Moves the cursor to the next row.">ResultSet_next()</a> is called to reduce the network roundtrip to the database. This method is only applicable to MySQL and Oracle.</p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">R</td><td>A ResultSet object </td></tr>
<tr><td class="paramname">rows</td><td>The number of rows to fetch (1..INT_MAX) </td></tr>
</table>
</dd>
</dl>
<dl class="exception"><dt>Exceptions</dt><dd>
<table class="exception">
<tr><td class="paramname">SQLException</td><td>If a database error occurs </td></tr>
<tr><td class="paramname">AssertException</td><td>If `rows` is less than 1 </td></tr>
</table>
</dd>
</dl>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="Connection_8h.html#a69aab12859ab87b931ffb418b7aca328" title="Sets the number of rows to fetch for ResultSet objects.">Connection_setFetchSize</a> </dd></dl>
</div>
</div>
<a id="a889b66128f756eb72bb15a1205b64986" name="a889b66128f756eb72bb15a1205b64986"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a889b66128f756eb72bb15a1205b64986">◆ </a></span>ResultSet_getFetchSize()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">int ResultSet_getFetchSize </td>
<td>(</td>
<td class="paramtype"><a class="el" href="Connection_8h.html#a8dc1b239f8e305fbd1406ff041c89151">T</a></td> <td class="paramname"><span class="paramname"><em>R</em></span></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Gets the number of rows to fetch from the database. </p>
<p>Unless previously set with <a class="el" href="#abba9d66851f27f8cc4fc6511551b8092" title="Sets the number of rows to fetch from the database.">ResultSet_setFetchSize()</a>, the returned value is the same as returned by <a class="el" href="Connection_8h.html#ac26356b1b7ea3b23edb4f26b327f0dbe" title="Gets the number of rows to fetch for ResultSet objects.">Connection_getFetchSize()</a></p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">R</td><td>A ResultSet object </td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>The number of rows to fetch or 0 if N/A </dd></dl>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="Connection_8h.html#ac26356b1b7ea3b23edb4f26b327f0dbe" title="Gets the number of rows to fetch for ResultSet objects.">Connection_getFetchSize</a> </dd></dl>
</div>
</div>
<a id="a771894bb8c0ddfd90ed6ed9c9c3e46b3" name="a771894bb8c0ddfd90ed6ed9c9c3e46b3"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a771894bb8c0ddfd90ed6ed9c9c3e46b3">◆ </a></span>ResultSet_next()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">bool ResultSet_next </td>
<td>(</td>
<td class="paramtype"><a class="el" href="Connection_8h.html#a8dc1b239f8e305fbd1406ff041c89151">T</a></td> <td class="paramname"><span class="paramname"><em>R</em></span></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Moves the cursor to the next row. </p>
<p>A ResultSet cursor is initially positioned before the first row; the first call to this method makes the first row the current row; the second call makes the second row the current row, and so on. When there are no more available rows false is returned. An empty ResultSet will return false on the first call to <a class="el" href="#a771894bb8c0ddfd90ed6ed9c9c3e46b3" title="Moves the cursor to the next row.">ResultSet_next()</a>.</p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">R</td><td>A ResultSet object </td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>true if the new current row is valid; false if there are no more rows </dd></dl>
<dl class="exception"><dt>Exceptions</dt><dd>
<table class="exception">
<tr><td class="paramname">SQLException</td><td>If a database access error occurs </td></tr>
</table>
</dd>
</dl>
</div>
</div>
<a id="a7a402b4aa9f5c08dd5edd9ee97517673" name="a7a402b4aa9f5c08dd5edd9ee97517673"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a7a402b4aa9f5c08dd5edd9ee97517673">◆ </a></span>ResultSet_isnull()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">bool ResultSet_isnull </td>
<td>(</td>
<td class="paramtype"><a class="el" href="Connection_8h.html#a8dc1b239f8e305fbd1406ff041c89151">T</a></td> <td class="paramname"><span class="paramname"><em>R</em></span>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">int</td> <td class="paramname"><span class="paramname"><em>columnIndex</em></span> )</td>
</tr>
</table>
</div><div class="memdoc">
<p>Checks if the designated column's value is SQL NULL. </p>
<p>If the column value is SQL NULL, a ResultSet returns the NULL for reference types and 0 for value types. Use this method if you need to differentiate between SQL NULL and the value NULL/0.</p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">R</td><td>A ResultSet object </td></tr>
<tr><td class="paramname">columnIndex</td><td>The first column is 1, the second is 2, ... </td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>true if column value is SQL NULL, false otherwise </dd></dl>
<dl class="exception"><dt>Exceptions</dt><dd>
<table class="exception">
<tr><td class="paramname">SQLException</td><td>If a database access error occurs or columnIndex is outside the valid range </td></tr>
</table>
</dd>
</dl>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="SQLException_8h.html" title="Signals that an SQL specific exception has occurred.">SQLException.h</a> </dd></dl>
</div>
</div>
<a id="ac65ad967dcaad62aa13d166c446e8f58" name="ac65ad967dcaad62aa13d166c446e8f58"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ac65ad967dcaad62aa13d166c446e8f58">◆ </a></span>ResultSet_getString()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">const char * ResultSet_getString </td>
<td>(</td>
<td class="paramtype"><a class="el" href="Connection_8h.html#a8dc1b239f8e305fbd1406ff041c89151">T</a></td> <td class="paramname"><span class="paramname"><em>R</em></span>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">int</td> <td class="paramname"><span class="paramname"><em>columnIndex</em></span> )</td>
</tr>
</table>
</div><div class="memdoc">
<p>Gets the designated column's value as a C-string. </p>
<p><em>The returned string may only be valid until the next call to <a class="el" href="#a771894bb8c0ddfd90ed6ed9c9c3e46b3" title="Moves the cursor to the next row.">ResultSet_next()</a> and if you plan to use the returned value longer, you must make a copy.</em></p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">R</td><td>A ResultSet object </td></tr>
<tr><td class="paramname">columnIndex</td><td>The first column is 1, the second is 2, ... </td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>The column value; if the value is SQL NULL, the value returned is NULL </dd></dl>
<dl class="exception"><dt>Exceptions</dt><dd>
<table class="exception">
<tr><td class="paramname">SQLException</td><td>If a database access error occurs or columnIndex is outside the valid range </td></tr>
</table>
</dd>
</dl>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="SQLException_8h.html" title="Signals that an SQL specific exception has occurred.">SQLException.h</a> </dd></dl>
</div>
</div>
<a id="a94f3683ed6ed1926d2b9013d5ffc8f82" name="a94f3683ed6ed1926d2b9013d5ffc8f82"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a94f3683ed6ed1926d2b9013d5ffc8f82">◆ </a></span>ResultSet_getStringByName()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">const char * ResultSet_getStringByName </td>
<td>(</td>
<td class="paramtype"><a class="el" href="Connection_8h.html#a8dc1b239f8e305fbd1406ff041c89151">T</a></td> <td class="paramname"><span class="paramname"><em>R</em></span>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const char *</td> <td class="paramname"><span class="paramname"><em>columnName</em></span> )</td>
</tr>
</table>
</div><div class="memdoc">
<p>Gets the designated column's value as a C-string. </p>
<p><em>The returned string may only be valid until the next call to <a class="el" href="#a771894bb8c0ddfd90ed6ed9c9c3e46b3" title="Moves the cursor to the next row.">ResultSet_next()</a> and if you plan to use the returned value longer, you must make a copy.</em></p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">R</td><td>A ResultSet object </td></tr>
<tr><td class="paramname">columnName</td><td>The SQL name of the column. <em>case-sensitive</em> </td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>The column value; if the value is SQL NULL, the value returned is NULL </dd></dl>
<dl class="exception"><dt>Exceptions</dt><dd>
<table class="exception">
<tr><td class="paramname">SQLException</td><td>If a database access error occurs or columnName does not exist </td></tr>
</table>
</dd>
</dl>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="SQLException_8h.html" title="Signals that an SQL specific exception has occurred.">SQLException.h</a> </dd></dl>
</div>
</div>
<a id="aa73672053b34ee50c21eac0783b28719" name="aa73672053b34ee50c21eac0783b28719"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aa73672053b34ee50c21eac0783b28719">◆ </a></span>ResultSet_getInt()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">int ResultSet_getInt </td>
<td>(</td>
<td class="paramtype"><a class="el" href="Connection_8h.html#a8dc1b239f8e305fbd1406ff041c89151">T</a></td> <td class="paramname"><span class="paramname"><em>R</em></span>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">int</td> <td class="paramname"><span class="paramname"><em>columnIndex</em></span> )</td>
</tr>
</table>
</div><div class="memdoc">
<p>Gets the designated column's value as an int. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">R</td><td>A ResultSet object </td></tr>
<tr><td class="paramname">columnIndex</td><td>The first column is 1, the second is 2, ... </td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>The column value; if the value is SQL NULL, the value returned is 0 </dd></dl>
<dl class="exception"><dt>Exceptions</dt><dd>
<table class="exception">
<tr><td class="paramname">SQLException</td><td>If a database access error occurs, columnIndex is outside the valid range or if the value is NaN </td></tr>
</table>
</dd>
</dl>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="SQLException_8h.html" title="Signals that an SQL specific exception has occurred.">SQLException.h</a> </dd></dl>
</div>
</div>
<a id="a51563d2ce1e948806d34c0960f5d66dc" name="a51563d2ce1e948806d34c0960f5d66dc"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a51563d2ce1e948806d34c0960f5d66dc">◆ </a></span>ResultSet_getIntByName()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">int ResultSet_getIntByName </td>
<td>(</td>
<td class="paramtype"><a class="el" href="Connection_8h.html#a8dc1b239f8e305fbd1406ff041c89151">T</a></td> <td class="paramname"><span class="paramname"><em>R</em></span>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const char *</td> <td class="paramname"><span class="paramname"><em>columnName</em></span> )</td>
</tr>
</table>
</div><div class="memdoc">
<p>Gets the designated column's value as an int. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">R</td><td>A ResultSet object </td></tr>
<tr><td class="paramname">columnName</td><td>The SQL name of the column. <em>case-sensitive</em> </td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>The column value; if the value is SQL NULL, the value returned is 0 </dd></dl>
<dl class="exception"><dt>Exceptions</dt><dd>
<table class="exception">
<tr><td class="paramname">SQLException</td><td>If a database access error occurs, columnName does not exist or if the value is NaN </td></tr>
</table>
</dd>
</dl>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="SQLException_8h.html" title="Signals that an SQL specific exception has occurred.">SQLException.h</a> </dd></dl>
</div>
</div>
<a id="a5d3ed80bc1b5816f27e135a8e392aca7" name="a5d3ed80bc1b5816f27e135a8e392aca7"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a5d3ed80bc1b5816f27e135a8e392aca7">◆ </a></span>ResultSet_getLLong()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">long long ResultSet_getLLong </td>
<td>(</td>
<td class="paramtype"><a class="el" href="Connection_8h.html#a8dc1b239f8e305fbd1406ff041c89151">T</a></td> <td class="paramname"><span class="paramname"><em>R</em></span>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">int</td> <td class="paramname"><span class="paramname"><em>columnIndex</em></span> )</td>
</tr>
</table>
</div><div class="memdoc">
<p>Gets the designated column's value as a long long. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">R</td><td>A ResultSet object </td></tr>
<tr><td class="paramname">columnIndex</td><td>The first column is 1, the second is 2, ... </td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>The column value; if the value is SQL NULL, the value returned is 0 </dd></dl>
<dl class="exception"><dt>Exceptions</dt><dd>
<table class="exception">
<tr><td class="paramname">SQLException</td><td>If a database access error occurs, columnIndex is outside the valid range or if the value is NaN </td></tr>
</table>
</dd>
</dl>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="SQLException_8h.html" title="Signals that an SQL specific exception has occurred.">SQLException.h</a> </dd></dl>
</div>
</div>
<a id="ab843c4ecf8d195d6449927bf7fb9defd" name="ab843c4ecf8d195d6449927bf7fb9defd"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ab843c4ecf8d195d6449927bf7fb9defd">◆ </a></span>ResultSet_getLLongByName()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">long long ResultSet_getLLongByName </td>
<td>(</td>
<td class="paramtype"><a class="el" href="Connection_8h.html#a8dc1b239f8e305fbd1406ff041c89151">T</a></td> <td class="paramname"><span class="paramname"><em>R</em></span>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const char *</td> <td class="paramname"><span class="paramname"><em>columnName</em></span> )</td>
</tr>
</table>
</div><div class="memdoc">
<p>Gets the designated column's value as a long long. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">R</td><td>A ResultSet object </td></tr>
<tr><td class="paramname">columnName</td><td>The SQL name of the column. <em>case-sensitive</em> </td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>The column value; if the value is SQL NULL, the value returned is 0 </dd></dl>
<dl class="exception"><dt>Exceptions</dt><dd>
<table class="exception">
<tr><td class="paramname">SQLException</td><td>If a database access error occurs, columnName does not exist or if the value is NaN </td></tr>
</table>
</dd>
</dl>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="SQLException_8h.html" title="Signals that an SQL specific exception has occurred.">SQLException.h</a> </dd></dl>
</div>
</div>
<a id="ab501755d054fea3bdab5de15a2259e9e" name="ab501755d054fea3bdab5de15a2259e9e"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ab501755d054fea3bdab5de15a2259e9e">◆ </a></span>ResultSet_getDouble()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">double ResultSet_getDouble </td>
<td>(</td>
<td class="paramtype"><a class="el" href="Connection_8h.html#a8dc1b239f8e305fbd1406ff041c89151">T</a></td> <td class="paramname"><span class="paramname"><em>R</em></span>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">int</td> <td class="paramname"><span class="paramname"><em>columnIndex</em></span> )</td>
</tr>
</table>
</div><div class="memdoc">
<p>Gets the designated column's value as a double. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">R</td><td>A ResultSet object </td></tr>
<tr><td class="paramname">columnIndex</td><td>The first column is 1, the second is 2, ... </td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>The column value; if the value is SQL NULL, the value returned is 0.0 </dd></dl>
<dl class="exception"><dt>Exceptions</dt><dd>
<table class="exception">
<tr><td class="paramname">SQLException</td><td>If a database access error occurs, columnIndex is outside the valid range or if the value is NaN </td></tr>
</table>
</dd>
</dl>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="SQLException_8h.html" title="Signals that an SQL specific exception has occurred.">SQLException.h</a> </dd></dl>
</div>
</div>
<a id="a38c392c208d0f6be4c6b4a29c624a367" name="a38c392c208d0f6be4c6b4a29c624a367"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a38c392c208d0f6be4c6b4a29c624a367">◆ </a></span>ResultSet_getDoubleByName()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">double ResultSet_getDoubleByName </td>
<td>(</td>
<td class="paramtype"><a class="el" href="Connection_8h.html#a8dc1b239f8e305fbd1406ff041c89151">T</a></td> <td class="paramname"><span class="paramname"><em>R</em></span>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const char *</td> <td class="paramname"><span class="paramname"><em>columnName</em></span> )</td>
</tr>
</table>
</div><div class="memdoc">
<p>Gets the designated column's value as a double. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">R</td><td>A ResultSet object </td></tr>
<tr><td class="paramname">columnName</td><td>The SQL name of the column. <em>case-sensitive</em> </td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>The column value; if the value is SQL NULL, the value returned is 0.0 </dd></dl>
<dl class="exception"><dt>Exceptions</dt><dd>
<table class="exception">
<tr><td class="paramname">SQLException</td><td>If a database access error occurs, columnName does not exist or if the value is NaN </td></tr>
</table>
</dd>
</dl>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="SQLException_8h.html" title="Signals that an SQL specific exception has occurred.">SQLException.h</a> </dd></dl>
</div>
</div>
<a id="adee072900d8136c0d6bd0596388f1e83" name="adee072900d8136c0d6bd0596388f1e83"></a>
<h2 class="memtitle"><span class="permalink"><a href="#adee072900d8136c0d6bd0596388f1e83">◆ </a></span>ResultSet_getBlob()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">const void * ResultSet_getBlob </td>
<td>(</td>
<td class="paramtype"><a class="el" href="Connection_8h.html#a8dc1b239f8e305fbd1406ff041c89151">T</a></td> <td class="paramname"><span class="paramname"><em>R</em></span>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">int</td> <td class="paramname"><span class="paramname"><em>columnIndex</em></span>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">int *</td> <td class="paramname"><span class="paramname"><em>size</em></span> )</td>
</tr>
</table>
</div><div class="memdoc">
<p>Gets the designated column's value as a void pointer. </p>
<p><em>The returned blob may only be valid until the next call to <a class="el" href="#a771894bb8c0ddfd90ed6ed9c9c3e46b3" title="Moves the cursor to the next row.">ResultSet_next()</a> and if you plan to use the returned value longer, you must make a copy.</em></p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">R</td><td>A ResultSet object </td></tr>
<tr><td class="paramname">columnIndex</td><td>The first column is 1, the second is 2, ... </td></tr>
<tr><td class="paramname">size</td><td>The number of bytes in the blob is stored in size </td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>The column value; if the value is SQL NULL, the value returned is NULL </dd></dl>
<dl class="exception"><dt>Exceptions</dt><dd>
<table class="exception">
<tr><td class="paramname">SQLException</td><td>If a database access error occurs or columnIndex is outside the valid range </td></tr>
</table>
</dd>
</dl>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="SQLException_8h.html" title="Signals that an SQL specific exception has occurred.">SQLException.h</a> </dd></dl>
</div>
</div>
<a id="a08e197bc42a118e3cb2ca748b0525ec3" name="a08e197bc42a118e3cb2ca748b0525ec3"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a08e197bc42a118e3cb2ca748b0525ec3">◆ </a></span>ResultSet_getBlobByName()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">const void * ResultSet_getBlobByName </td>
<td>(</td>
<td class="paramtype"><a class="el" href="Connection_8h.html#a8dc1b239f8e305fbd1406ff041c89151">T</a></td> <td class="paramname"><span class="paramname"><em>R</em></span>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const char *</td> <td class="paramname"><span class="paramname"><em>columnName</em></span>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">int *</td> <td class="paramname"><span class="paramname"><em>size</em></span> )</td>
</tr>
</table>
</div><div class="memdoc">
<p>Gets the designated column's value as a void pointer. </p>
<p><em>The returned blob may only be valid until the next call to <a class="el" href="#a771894bb8c0ddfd90ed6ed9c9c3e46b3" title="Moves the cursor to the next row.">ResultSet_next()</a> and if you plan to use the returned value longer, you must make a copy.</em></p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">R</td><td>A ResultSet object </td></tr>
<tr><td class="paramname">columnName</td><td>The SQL name of the column. <em>case-sensitive</em> </td></tr>
<tr><td class="paramname">size</td><td>The number of bytes in the blob is stored in size </td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>The column value; if the value is SQL NULL, the value returned is NULL </dd></dl>
<dl class="exception"><dt>Exceptions</dt><dd>
<table class="exception">
<tr><td class="paramname">SQLException</td><td>If a database access error occurs or columnName does not exist </td></tr>
</table>
</dd>
</dl>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="SQLException_8h.html" title="Signals that an SQL specific exception has occurred.">SQLException.h</a> </dd></dl>
</div>
</div>
<a id="a073df52b04dfbaaaf088baede0f770f5" name="a073df52b04dfbaaaf088baede0f770f5"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a073df52b04dfbaaaf088baede0f770f5">◆ </a></span>ResultSet_getTimestamp()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">time_t ResultSet_getTimestamp </td>
<td>(</td>
<td class="paramtype"><a class="el" href="Connection_8h.html#a8dc1b239f8e305fbd1406ff041c89151">T</a></td> <td class="paramname"><span class="paramname"><em>R</em></span>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">int</td> <td class="paramname"><span class="paramname"><em>columnIndex</em></span> )</td>
</tr>
</table>
</div><div class="memdoc">
<p>Gets the designated column's value as a Unix timestamp. </p>
<p>The returned value is in Coordinated Universal Time (UTC) and represents seconds since the <b>epoch</b> (January 1, 1970, 00:00:00 GMT).</p>
<p>Even though the underlying database might support timestamp ranges before the epoch and after '2038-01-19 03:14:07 UTC' it is safest not to assume or use values outside this range. Especially on a 32-bit system.</p>
<p><em>SQLite</em> does not have temporal SQL data types per se and using this method with SQLite assumes the column value in the Result Set to be either a numerical value representing a Unix Time in UTC which is returned as-is or an <a href="http://en.wikipedia.org/wiki/ISO_8601">ISO 8601</a> time string which is converted to a <code>time_t</code> value.</p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">R</td><td>A ResultSet object </td></tr>
<tr><td class="paramname">columnIndex</td><td>The first column is 1, the second is 2, ... </td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>The column value as seconds since the epoch in the GMT timezone. If the value is SQL NULL, the value returned is 0. </dd></dl>
<dl class="exception"><dt>Exceptions</dt><dd>
<table class="exception">
<tr><td class="paramname">SQLException</td><td>If a database access error occurs, if <code>columnIndex</code> is outside the range [1..<a class="el" href="#a74a9a4c55f9ff432e6cbb5c196627427" title="Gets the number of columns in this ResultSet.">ResultSet_getColumnCount()</a>] or if the column value cannot be converted to a valid timestamp </td></tr>
</table>
</dd>
</dl>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="SQLException_8h.html" title="Signals that an SQL specific exception has occurred.">SQLException.h</a> <a class="el" href="PreparedStatement_8h.html#a3cf4d848d41a7901727bccac2b58d31c" title="Sets the in parameter at index parameterIndex to the given Unix timestamp value.">PreparedStatement_setTimestamp</a> </dd></dl>
</div>
</div>
<a id="a9d2d95be1cea80e6213967ce617f576f" name="a9d2d95be1cea80e6213967ce617f576f"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a9d2d95be1cea80e6213967ce617f576f">◆ </a></span>ResultSet_getTimestampByName()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">time_t ResultSet_getTimestampByName </td>
<td>(</td>
<td class="paramtype"><a class="el" href="Connection_8h.html#a8dc1b239f8e305fbd1406ff041c89151">T</a></td> <td class="paramname"><span class="paramname"><em>R</em></span>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const char *</td> <td class="paramname"><span class="paramname"><em>columnName</em></span> )</td>
</tr>
</table>
</div><div class="memdoc">
<p>Gets the designated column's value as a Unix timestamp. </p>
<p>The returned value is in Coordinated Universal Time (UTC) and represents seconds since the <b>epoch</b> (January 1, 1970, 00:00:00 GMT).</p>
<p>Even though the underlying database might support timestamp ranges before the epoch and after '2038-01-19 03:14:07 UTC' it is safest not to assume or use values outside this range. Especially on a 32-bit system.</p>
<p><em>SQLite</em> does not have temporal SQL data types per se and using this method with SQLite assumes the column value in the Result Set to be either a numerical value representing a Unix Time in UTC which is returned as-is or an <a href="http://en.wikipedia.org/wiki/ISO_8601">ISO 8601</a> time string which is converted to a <code>time_t</code> value.</p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">R</td><td>A ResultSet object </td></tr>
<tr><td class="paramname">columnName</td><td>The SQL name of the column. <em>case-sensitive</em> </td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>The column value as seconds since the epoch in the GMT timezone. If the value is SQL NULL, the value returned is 0. </dd></dl>
<dl class="exception"><dt>Exceptions</dt><dd>
<table class="exception">
<tr><td class="paramname">SQLException</td><td>If a database access error occurs, if <code>columnName</code> is not found or if the column value cannot be converted to a valid timestamp </td></tr>
</table>
</dd>
</dl>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="SQLException_8h.html" title="Signals that an SQL specific exception has occurred.">SQLException.h</a> <a class="el" href="PreparedStatement_8h.html#a3cf4d848d41a7901727bccac2b58d31c" title="Sets the in parameter at index parameterIndex to the given Unix timestamp value.">PreparedStatement_setTimestamp</a> </dd></dl>
</div>
</div>
<a id="a98e618557d128694b2239c55f7618262" name="a98e618557d128694b2239c55f7618262"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a98e618557d128694b2239c55f7618262">◆ </a></span>ResultSet_getDateTime()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">struct tm ResultSet_getDateTime </td>
<td>(</td>
<td class="paramtype"><a class="el" href="Connection_8h.html#a8dc1b239f8e305fbd1406ff041c89151">T</a></td> <td class="paramname"><span class="paramname"><em>R</em></span>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">int</td> <td class="paramname"><span class="paramname"><em>columnIndex</em></span> )</td>
</tr>
</table>
</div><div class="memdoc">
<p>Gets the designated column's value as a Date, Time or DateTime. </p>
<p>This method can be used to retrieve the value of columns with the SQL data type, Date, Time, DateTime or Timestamp. The returned <code>tm</code> structure follows the convention for usage with mktime(3) where:</p>
<ul>
<li>tm_hour = hours since midnight [0-23]</li>
<li>tm_min = minutes after the hour [0-59]</li>
<li>tm_sec = seconds after the minute [0-60]</li>
<li>tm_mday = day of the month [1-31]</li>
<li>tm_mon = months since January <b>[0-11]</b></li>
</ul>
<p>If the column value contains timezone information, tm_gmtoff is set to the offset from UTC in seconds, otherwise tm_gmtoff is set to 0. <em>On systems without tm_gmtoff, (Solaris), the member, tm_wday is set to gmt offset instead as this property is ignored by mktime on input.</em> The exception to the above is <b>tm_year</b> which contains the year literal and <em>not years since 1900</em> which is the convention. All other fields in the structure are set to zero. If the column type is DateTime or Timestamp all the fields mentioned above are set, if it is a Date or a Time, only the relevant fields are set.</p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">R</td><td>A ResultSet object </td></tr>
<tr><td class="paramname">columnIndex</td><td>The first column is 1, the second is 2, ... </td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>A tm structure with fields for date and time. If the value is SQL NULL, a zeroed tm structure is returned. Use <a class="el" href="#a7a402b4aa9f5c08dd5edd9ee97517673" title="Checks if the designated column's value is SQL NULL.">ResultSet_isnull()</a> if in doubt. </dd></dl>
<dl class="exception"><dt>Exceptions</dt><dd>
<table class="exception">
<tr><td class="paramname">SQLException</td><td>If a database access error occurs, if <code>columnIndex</code> is outside the range [1..<a class="el" href="#a74a9a4c55f9ff432e6cbb5c196627427" title="Gets the number of columns in this ResultSet.">ResultSet_getColumnCount()</a>] or if the column value cannot be converted to a valid SQL Date, Time or DateTime type </td></tr>
</table>
</dd>
</dl>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="SQLException_8h.html" title="Signals that an SQL specific exception has occurred.">SQLException.h</a> </dd></dl>
</div>
</div>
<a id="a5733613fb15d5a4e614cb9157e4dd86f" name="a5733613fb15d5a4e614cb9157e4dd86f"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a5733613fb15d5a4e614cb9157e4dd86f">◆ </a></span>ResultSet_getDateTimeByName()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">struct tm ResultSet_getDateTimeByName </td>
<td>(</td>
<td class="paramtype"><a class="el" href="Connection_8h.html#a8dc1b239f8e305fbd1406ff041c89151">T</a></td> <td class="paramname"><span class="paramname"><em>R</em></span>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const char *</td> <td class="paramname"><span class="paramname"><em>columnName</em></span> )</td>
</tr>
</table>
</div><div class="memdoc">
<p>Gets the designated column's value as a Date, Time or DateTime. </p>
<p>This method can be used to retrieve the value of columns with the SQL data type, Date, Time, DateTime or Timestamp. The returned <code>tm</code> structure follows the convention for usage with mktime(3) where:</p>
<ul>
<li>tm_hour = hours since midnight [0-23]</li>
<li>tm_min = minutes after the hour [0-59]</li>
<li>tm_sec = seconds after the minute [0-60]</li>
<li>tm_mday = day of the month [1-31]</li>
<li>tm_mon = months since January <b>[0-11]</b></li>
</ul>
<p>If the column value contains timezone information, tm_gmtoff is set to the offset from UTC in seconds, otherwise tm_gmtoff is set to 0. <em>On systems without tm_gmtoff, (Solaris), the member, tm_wday is set to gmt offset instead as this property is ignored by mktime on input.</em> The exception to the above is <b>tm_year</b> which contains the year literal and <em>not years since 1900</em> which is the convention. All other fields in the structure are set to zero. If the column type is DateTime or Timestamp all the fields mentioned above are set, if it is a Date or a Time, only the relevant fields are set.</p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">R</td><td>A ResultSet object </td></tr>
<tr><td class="paramname">columnName</td><td>The SQL name of the column. <em>case-sensitive</em> </td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>A tm structure with fields for date and time. If the value is SQL NULL, a zeroed tm structure is returned. Use <a class="el" href="#a7a402b4aa9f5c08dd5edd9ee97517673" title="Checks if the designated column's value is SQL NULL.">ResultSet_isnull()</a> if in doubt. </dd></dl>
<dl class="exception"><dt>Exceptions</dt><dd>
<table class="exception">
<tr><td class="paramname">SQLException</td><td>If a database access error occurs, if <code>columnName</code> is not found or if the column value cannot be converted to a valid SQL Date, Time or DateTime type </td></tr>
</table>
</dd>
</dl>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="SQLException_8h.html" title="Signals that an SQL specific exception has occurred.">SQLException.h</a> </dd></dl>
</div>
</div>
</div><!-- contents -->
<p style="text-align:center;color:#808080;font-size:90%;margin:40px 0 20px 0;">
Copyright © <a href="https://tildeslash.com/">Tildeslash Ltd</a>. All
rights reserved.</p>
</body></html>
|