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
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
<title>QOF: Query: Querying for Objects</title>
<link href="doxygen.css" rel="stylesheet" type="text/css">
</head><body>
<!-- Generated by Doxygen 1.3.6-20040222 -->
<div class="qindex"><a class="qindex" href="index.html">Main Page</a> | <a class="qindex" href="modules.html">Modules</a> | <a class="qindex" href="classes.html">Alphabetical List</a> | <a class="qindex" href="annotated.html">Data Structures</a> | <a class="qindex" href="files.html">File List</a> | <a class="qindex" href="functions.html">Data Fields</a> | <a class="qindex" href="globals.html">Globals</a> | <a class="qindex" href="pages.html">Related Pages</a></div>
<h1>Query: Querying for Objects<br>
<small>
[<a class="el" href="group__QOF.html">Query Object Framework</a>]</small>
</h1><hr><a name="_details"></a><h2>Detailed Description</h2>
BASIC QUERY API: With this API you can create arbitrary logical queries to find sets of arbitrary object. To make simple queries (1 term, such as a search for a parameter with one value), create the appropriate QueryTerm structure and stick it in a Query object using xaccInitQuery. The QueryTerm should be malloced but the Query object will handle freeing it. To make compound queries, make multiple simple queries and combine them using <a class="el" href="group__Query.html#ga38">qof_query_merge()</a> and the logical operations of your choice.<p>
SQL QUERY API: As an alternative to building queries one predicate at a time, you can use the SQL query interface. This interface will accept a string containing an SQL query, parse it, convert it into the core representation, and execute it.<p>
STRUCTURE OF A QUERY: A Query is a logical function of any number of QueryTerms. A QueryTerm consists of a C function pointer (the Predicate) and a PredicateData structure containing data passed to the predicate funtion. The PredicateData structure is a constant associated with the Term and is identical for every object that is tested.<p>
The terms of the Query may represent any logical function and are stored in canonical form, i.e. the function is expressed as a logical sum of logical products. So if you have QueryTerms a, b, c, d, e and you have the logical function a(b+c) + !(c(d+e)), it gets stored as ab + ac + !c + !c!e +!d!c + !d!e. This may not be optimal for evaluation of some functions but it's easy to store, easy to manipulate, and it doesn't require a complete algebra system to deal with.<p>
The representation is of a GList of GLists of QueryTerms. The "backbone" GList q->terms represents the OR-chain, and every item on the backbone is a GList of QueryTerms representing an AND-chain corresponding to a single product-term in the canonical representation. QueryTerms are duplicated when necessary to fill out the canonical form, and the same predicate may be evaluated multiple times per split for complex queries. This is a place where we could probably optimize.<p>
Evaluation of a Query (see <a class="el" href="group__Query.html#ga26">qof_query_run()</a>) is optimized as much as possible by short-circuited evaluation. The predicates in each AND-chain are sorted by predicate type, with Account queries sorted first to allow the evaluator to completely eliminate accounts from the search if there's no chance of them having splits that match. (XXX above no longer applies)
<p>
<table border=0 cellpadding=0 cellspacing=0>
<tr><td></td></tr>
<tr><td colspan=2><br><h2>Files</h2></td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top>file </td><td class="memItemRight" valign=bottom><a class="el" href="qofquery-deserial_8h.html">qofquery-deserial.h</a></td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Convert Qof-Query XML to QofQuery. <br><br></td></tr>
<p>
<tr><td class="memItemLeft" nowrap align=right valign=top>file </td><td class="memItemRight" valign=bottom><a class="el" href="qofquery-serialize_8h.html">qofquery-serialize.h</a></td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Convert QofQuery to XML. <br><br></td></tr>
<p>
<tr><td class="memItemLeft" nowrap align=right valign=top>file </td><td class="memItemRight" valign=bottom><a class="el" href="qofquery_8h.html">qofquery.h</a></td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">find objects that match a certain expression. <br><br></td></tr>
<p>
<tr><td class="memItemLeft" nowrap align=right valign=top>file </td><td class="memItemRight" valign=bottom><a class="el" href="qofquerycore_8h.html">qofquerycore.h</a></td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">API for providing core Query data types. <br><br></td></tr>
<p>
<tr><td class="memItemLeft" nowrap align=right valign=top>file </td><td class="memItemRight" valign=bottom><a class="el" href="qofsql_8h.html">qofsql.h</a></td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">QOF client-side SQL parser. <br><br></td></tr>
<p>
<tr><td colspan=2><br><h2>Modules</h2></td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top>group </td><td class="memItemRight" valign=bottom><a class="el" href="group__XML.html">Serialize Queries to/from XML</a></td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top>group </td><td class="memItemRight" valign=bottom><a class="el" href="group__SQL.html">SQL Interface to Query</a></td></tr>
<tr><td colspan=2><br><h2>Data Structures</h2></td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top>struct </td><td class="memItemRight" valign=bottom><a class="el" href="struct__QofQueryPredData.html">_QofQueryPredData</a></td></tr>
<tr><td colspan=2><br><h2>Query Subsystem Initialization and Shudown</h2></td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top>void </td><td class="memItemRight" valign=bottom><a class="el" href="group__Query.html#ga2">qof_query_init</a> (void)</td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top><a class="anchor" name="ga3" doxytag="Query::qof_query_shutdown" ></a>
void </td><td class="memItemRight" valign=bottom><b>qof_query_shutdown</b> (void)</td></tr>
<tr><td colspan=2><br><h2>Low-Level API Functions</h2></td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top><a class="anchor" name="ga4" doxytag="Query::qof_query_build_param_list" ></a>
GSList * </td><td class="memItemRight" valign=bottom><b>qof_query_build_param_list</b> (char const *param,...)</td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="group__Query.html#ga0">QofQuery</a> * </td><td class="memItemRight" valign=bottom><a class="el" href="group__Query.html#ga5">qof_query_create</a> (void)</td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top><a class="anchor" name="ga6" doxytag="Query::qof_query_create_for" ></a>
<a class="el" href="group__Query.html#ga0">QofQuery</a> * </td><td class="memItemRight" valign=bottom><b>qof_query_create_for</b> (QofIdTypeConst obj_type)</td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top>void </td><td class="memItemRight" valign=bottom><a class="el" href="group__Query.html#ga7">qof_query_destroy</a> (<a class="el" href="group__Query.html#ga0">QofQuery</a> *q)</td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top>void </td><td class="memItemRight" valign=bottom><a class="el" href="group__Query.html#ga8">qof_query_search_for</a> (<a class="el" href="group__Query.html#ga0">QofQuery</a> *query, QofIdTypeConst obj_type)</td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top>void </td><td class="memItemRight" valign=bottom><a class="el" href="group__Query.html#ga9">qof_query_set_book</a> (<a class="el" href="group__Query.html#ga0">QofQuery</a> *q, <a class="el" href="struct__QofBook.html">QofBook</a> *book)</td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top>void </td><td class="memItemRight" valign=bottom><a class="el" href="group__Query.html#ga10">qof_query_add_term</a> (<a class="el" href="group__Query.html#ga0">QofQuery</a> *query, GSList *param_list, <a class="el" href="struct__QofQueryPredData.html">QofQueryPredData</a> *pred_data, <a class="el" href="group__Query.html#ga54">QofQueryOp</a> op)</td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top>void </td><td class="memItemRight" valign=bottom><a class="el" href="group__Query.html#ga11">qof_query_add_guid_match</a> (<a class="el" href="group__Query.html#ga0">QofQuery</a> *q, GSList *param_list, const <a class="el" href="union__GUID.html">GUID</a> *guid, <a class="el" href="group__Query.html#ga54">QofQueryOp</a> op)</td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top>void </td><td class="memItemRight" valign=bottom><a class="el" href="group__Query.html#ga12">qof_query_add_guid_list_match</a> (<a class="el" href="group__Query.html#ga0">QofQuery</a> *q, GSList *param_list, GList *guid_list, <a class="el" href="group__Query.html#ga59">QofGuidMatch</a> options, <a class="el" href="group__Query.html#ga54">QofQueryOp</a> op)</td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top>void </td><td class="memItemRight" valign=bottom><a class="el" href="group__Query.html#ga13">qof_query_add_boolean_match</a> (<a class="el" href="group__Query.html#ga0">QofQuery</a> *q, GSList *param_list, gboolean value, <a class="el" href="group__Query.html#ga54">QofQueryOp</a> op)</td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top>GList * </td><td class="memItemRight" valign=bottom><a class="el" href="group__Query.html#ga14">qof_query_run</a> (<a class="el" href="group__Query.html#ga0">QofQuery</a> *query)</td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top>GList * </td><td class="memItemRight" valign=bottom><a class="el" href="group__Query.html#ga15">qof_query_last_run</a> (<a class="el" href="group__Query.html#ga0">QofQuery</a> *query)</td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top>void </td><td class="memItemRight" valign=bottom><a class="el" href="group__Query.html#ga16">qof_query_clear</a> (<a class="el" href="group__Query.html#ga0">QofQuery</a> *query)</td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top>void </td><td class="memItemRight" valign=bottom><a class="el" href="group__Query.html#ga17">qof_query_purge_terms</a> (<a class="el" href="group__Query.html#ga0">QofQuery</a> *q, GSList *param_list)</td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top>int </td><td class="memItemRight" valign=bottom><a class="el" href="group__Query.html#ga18">qof_query_has_terms</a> (<a class="el" href="group__Query.html#ga0">QofQuery</a> *q)</td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top>int </td><td class="memItemRight" valign=bottom><a class="el" href="group__Query.html#ga19">qof_query_num_terms</a> (<a class="el" href="group__Query.html#ga0">QofQuery</a> *q)</td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top>gboolean </td><td class="memItemRight" valign=bottom><a class="el" href="group__Query.html#ga20">qof_query_has_term_type</a> (<a class="el" href="group__Query.html#ga0">QofQuery</a> *q, GSList *term_param)</td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="group__Query.html#ga0">QofQuery</a> * </td><td class="memItemRight" valign=bottom><a class="el" href="group__Query.html#ga21">qof_query_copy</a> (<a class="el" href="group__Query.html#ga0">QofQuery</a> *q)</td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="group__Query.html#ga0">QofQuery</a> * </td><td class="memItemRight" valign=bottom><a class="el" href="group__Query.html#ga22">qof_query_invert</a> (<a class="el" href="group__Query.html#ga0">QofQuery</a> *q)</td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="group__Query.html#ga0">QofQuery</a> * </td><td class="memItemRight" valign=bottom><a class="el" href="group__Query.html#ga23">qof_query_merge</a> (<a class="el" href="group__Query.html#ga0">QofQuery</a> *q1, <a class="el" href="group__Query.html#ga0">QofQuery</a> *q2, <a class="el" href="group__Query.html#ga54">QofQueryOp</a> op)</td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top>void </td><td class="memItemRight" valign=bottom><a class="el" href="group__Query.html#ga24">qof_query_merge_in_place</a> (<a class="el" href="group__Query.html#ga0">QofQuery</a> *q1, <a class="el" href="group__Query.html#ga0">QofQuery</a> *q2, <a class="el" href="group__Query.html#ga54">QofQueryOp</a> op)</td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top>void </td><td class="memItemRight" valign=bottom><a class="el" href="group__Query.html#ga25">qof_query_set_sort_order</a> (<a class="el" href="group__Query.html#ga0">QofQuery</a> *q, GSList *primary_sort_params, GSList *secondary_sort_params, GSList *tertiary_sort_params)</td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top><a class="anchor" name="ga26" doxytag="Query::qof_query_set_sort_options" ></a>
void </td><td class="memItemRight" valign=bottom><b>qof_query_set_sort_options</b> (<a class="el" href="group__Query.html#ga0">QofQuery</a> *q, gint prim_op, gint sec_op, gint tert_op)</td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top>void </td><td class="memItemRight" valign=bottom><a class="el" href="group__Query.html#ga27">qof_query_set_sort_increasing</a> (<a class="el" href="group__Query.html#ga0">QofQuery</a> *q, gboolean prim_inc, gboolean sec_inc, gboolean tert_inc)</td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top>void </td><td class="memItemRight" valign=bottom><a class="el" href="group__Query.html#ga28">qof_query_set_max_results</a> (<a class="el" href="group__Query.html#ga0">QofQuery</a> *q, int n)</td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top>gboolean </td><td class="memItemRight" valign=bottom><a class="el" href="group__Query.html#ga29">qof_query_equal</a> (<a class="el" href="group__Query.html#ga0">QofQuery</a> *q1, <a class="el" href="group__Query.html#ga0">QofQuery</a> *q2)</td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top>void </td><td class="memItemRight" valign=bottom><a class="el" href="group__Query.html#ga30">qof_query_print</a> (<a class="el" href="group__Query.html#ga0">QofQuery</a> *query)</td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top>QofIdType </td><td class="memItemRight" valign=bottom><a class="el" href="group__Query.html#ga31">qof_query_get_search_for</a> (<a class="el" href="group__Query.html#ga0">QofQuery</a> *q)</td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top>GList * </td><td class="memItemRight" valign=bottom><a class="el" href="group__Query.html#ga32">qof_query_get_books</a> (<a class="el" href="group__Query.html#ga0">QofQuery</a> *q)</td></tr>
<tr><td colspan=2><br><h2>Core Data Type Predicates</h2></td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top><a class="anchor" name="ga33" doxytag="Query::qof_query_string_predicate" ></a>
<a class="el" href="struct__QofQueryPredData.html">QofQueryPredData</a> * </td><td class="memItemRight" valign=bottom><b>qof_query_string_predicate</b> (<a class="el" href="group__Query.html#ga55">QofQueryCompare</a> how, const char *str, <a class="el" href="group__Query.html#ga56">QofStringMatch</a> options, gboolean is_regex)</td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top><a class="anchor" name="ga34" doxytag="Query::qof_query_date_predicate" ></a>
<a class="el" href="struct__QofQueryPredData.html">QofQueryPredData</a> * </td><td class="memItemRight" valign=bottom><b>qof_query_date_predicate</b> (<a class="el" href="group__Query.html#ga55">QofQueryCompare</a> how, QofDateMatch options, <a class="el" href="structtimespec64.html">Timespec</a> date)</td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top><a class="anchor" name="ga35" doxytag="Query::qof_query_numeric_predicate" ></a>
<a class="el" href="struct__QofQueryPredData.html">QofQueryPredData</a> * </td><td class="memItemRight" valign=bottom><b>qof_query_numeric_predicate</b> (<a class="el" href="group__Query.html#ga55">QofQueryCompare</a> how, QofNumericMatch options, <a class="el" href="group__Numeric.html#ga0">gnc_numeric</a> value)</td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top><a class="anchor" name="ga36" doxytag="Query::qof_query_guid_predicate" ></a>
<a class="el" href="struct__QofQueryPredData.html">QofQueryPredData</a> * </td><td class="memItemRight" valign=bottom><b>qof_query_guid_predicate</b> (<a class="el" href="group__Query.html#ga59">QofGuidMatch</a> options, GList *guids)</td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top><a class="anchor" name="ga37" doxytag="Query::qof_query_int32_predicate" ></a>
<a class="el" href="struct__QofQueryPredData.html">QofQueryPredData</a> * </td><td class="memItemRight" valign=bottom><b>qof_query_int32_predicate</b> (<a class="el" href="group__Query.html#ga55">QofQueryCompare</a> how, gint32 val)</td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top><a class="anchor" name="ga38" doxytag="Query::qof_query_int64_predicate" ></a>
<a class="el" href="struct__QofQueryPredData.html">QofQueryPredData</a> * </td><td class="memItemRight" valign=bottom><b>qof_query_int64_predicate</b> (<a class="el" href="group__Query.html#ga55">QofQueryCompare</a> how, gint64 val)</td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top><a class="anchor" name="ga39" doxytag="Query::qof_query_double_predicate" ></a>
<a class="el" href="struct__QofQueryPredData.html">QofQueryPredData</a> * </td><td class="memItemRight" valign=bottom><b>qof_query_double_predicate</b> (<a class="el" href="group__Query.html#ga55">QofQueryCompare</a> how, double val)</td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top><a class="anchor" name="ga40" doxytag="Query::qof_query_boolean_predicate" ></a>
<a class="el" href="struct__QofQueryPredData.html">QofQueryPredData</a> * </td><td class="memItemRight" valign=bottom><b>qof_query_boolean_predicate</b> (<a class="el" href="group__Query.html#ga55">QofQueryCompare</a> how, gboolean val)</td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top><a class="anchor" name="ga41" doxytag="Query::qof_query_char_predicate" ></a>
<a class="el" href="struct__QofQueryPredData.html">QofQueryPredData</a> * </td><td class="memItemRight" valign=bottom><b>qof_query_char_predicate</b> (<a class="el" href="group__Query.html#ga60">QofCharMatch</a> options, const char *chars)</td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="struct__QofQueryPredData.html">QofQueryPredData</a> * </td><td class="memItemRight" valign=bottom><a class="el" href="group__Query.html#ga42">qof_query_kvp_predicate</a> (<a class="el" href="group__Query.html#ga55">QofQueryCompare</a> how, GSList *path, const <a class="el" href="group__KVP.html#ga1">KvpValue</a> *value)</td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="struct__QofQueryPredData.html">QofQueryPredData</a> * </td><td class="memItemRight" valign=bottom><a class="el" href="group__Query.html#ga43">qof_query_kvp_predicate_path</a> (<a class="el" href="group__Query.html#ga55">QofQueryCompare</a> how, const char *path, const <a class="el" href="group__KVP.html#ga1">KvpValue</a> *value)</td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="struct__QofQueryPredData.html">QofQueryPredData</a> * </td><td class="memItemRight" valign=bottom><a class="el" href="group__Query.html#ga44">qof_query_core_predicate_copy</a> (<a class="el" href="struct__QofQueryPredData.html">QofQueryPredData</a> *pdata)</td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top>void </td><td class="memItemRight" valign=bottom><a class="el" href="group__Query.html#ga45">qof_query_core_predicate_free</a> (<a class="el" href="struct__QofQueryPredData.html">QofQueryPredData</a> *pdata)</td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top>char * </td><td class="memItemRight" valign=bottom><a class="el" href="group__Query.html#ga46">qof_query_core_to_string</a> (<a class="el" href="group__Class.html#ga0">QofType</a>, gpointer object, <a class="el" href="struct__QofParam.html">QofParam</a> *getter)</td></tr>
<tr><td colspan=2><br><h2>Defines</h2></td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top><a class="anchor" name="ga47" doxytag="Query::QOF_QUERY_FIRST_TERM" ></a>
#define </td><td class="memItemRight" valign=bottom><b>QOF_QUERY_FIRST_TERM</b> QOF_QUERY_AND</td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top>#define </td><td class="memItemRight" valign=bottom><a class="el" href="group__Query.html#ga48">QUERY_DEFAULT_SORT</a> "QofQueryDefaultSort"</td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top>#define </td><td class="memItemRight" valign=bottom><a class="el" href="group__Query.html#ga49">QOF_PARAM_BOOK</a> "book"</td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top><a class="anchor" name="ga50" doxytag="Query::QOF_PARAM_GUID" ></a>
#define </td><td class="memItemRight" valign=bottom><b>QOF_PARAM_GUID</b> "guid"</td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top>#define </td><td class="memItemRight" valign=bottom><a class="el" href="group__Query.html#ga51">QOF_PARAM_ACTIVE</a> "active"</td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top>#define </td><td class="memItemRight" valign=bottom><a class="el" href="group__Query.html#ga52">QOF_DATE_MATCH_ROUNDED</a> QOF_DATE_MATCH_DAY</td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top><a class="anchor" name="ga53" doxytag="Query::QOF_DATE_MATCH_NORMAL" ></a>
#define </td><td class="memItemRight" valign=bottom><b>QOF_DATE_MATCH_NORMAL</b> QOF_DATE_MATCH_TIME</td></tr>
<tr><td colspan=2><br><h2>Typedefs</h2></td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top>typedef _QofQuery </td><td class="memItemRight" valign=bottom><a class="el" href="group__Query.html#ga0">QofQuery</a></td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top>typedef <a class="el" href="struct__QofQueryPredData.html">_QofQueryPredData</a> </td><td class="memItemRight" valign=bottom><a class="el" href="group__Query.html#ga1">QofQueryPredData</a></td></tr>
<tr><td colspan=2><br><h2>Enumerations</h2></td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top>enum </td><td class="memItemRight" valign=bottom><a class="el" href="group__Query.html#ga54">QofQueryOp</a> { <br>
<b>QOF_QUERY_AND</b> = 1,
<b>QOF_QUERY_OR</b>,
<b>QOF_QUERY_NAND</b>,
<b>QOF_QUERY_NOR</b>,
<br>
<b>QOF_QUERY_XOR</b>
<br>
}</td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top>enum </td><td class="memItemRight" valign=bottom><a class="el" href="group__Query.html#ga55">QofQueryCompare</a> { <br>
<b>QOF_COMPARE_LT</b> = 1,
<b>QOF_COMPARE_LTE</b>,
<b>QOF_COMPARE_EQUAL</b>,
<b>QOF_COMPARE_GT</b>,
<br>
<b>QOF_COMPARE_GTE</b>,
<b>QOF_COMPARE_NEQ</b>
<br>
}</td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top>enum </td><td class="memItemRight" valign=bottom><a class="el" href="group__Query.html#ga56">QofStringMatch</a> { <b>QOF_STRING_MATCH_NORMAL</b> = 1,
<b>QOF_STRING_MATCH_CASEINSENSITIVE</b>
}</td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top>enum </td><td class="memItemRight" valign=bottom><b>QofDateMatch</b> { <b>QOF_DATE_MATCH_NORMAL</b> = 1,
<b>QOF_DATE_MATCH_DAY</b>
}</td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top>enum </td><td class="memItemRight" valign=bottom><b>QofNumericMatch</b> { <b>QOF_NUMERIC_MATCH_DEBIT</b> = 1,
<b>QOF_NUMERIC_MATCH_CREDIT</b>,
<b>QOF_NUMERIC_MATCH_ANY</b>
}</td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top>enum </td><td class="memItemRight" valign=bottom><a class="el" href="group__Query.html#ga59">QofGuidMatch</a> { <br>
<a class="el" href="group__Query.html#gga59a16">QOF_GUID_MATCH_ANY</a> = 1,
<b>QOF_GUID_MATCH_NONE</b>,
<b>QOF_GUID_MATCH_NULL</b>,
<a class="el" href="group__Query.html#gga59a19">QOF_GUID_MATCH_ALL</a>,
<br>
<a class="el" href="group__Query.html#gga59a20">QOF_GUID_MATCH_LIST_ANY</a>
<br>
}</td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top>enum </td><td class="memItemRight" valign=bottom><a class="el" href="group__Query.html#ga60">QofCharMatch</a> { <b>QOF_CHAR_MATCH_ANY</b> = 1,
<b>QOF_CHAR_MATCH_NONE</b>
}</td></tr>
</table>
<hr><h2>Define Documentation</h2>
<a class="anchor" name="ga52" doxytag="qofquerycore.h::QOF_DATE_MATCH_ROUNDED" ></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
<tr>
<td class="mdRow">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="md" nowrap valign="top"> #define QOF_DATE_MATCH_ROUNDED QOF_DATE_MATCH_DAY
</table>
</td>
</tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
<tr>
<td>
</td>
<td>
<p>
Comparisons for QOF_TYPE_DATE The QOF_DATE_MATCH_DAY comparison rounds the two time values to mid-day and then compares these rounded values. The QOF_DATE_MATCH_TIME comparison matches teh time values, down to the second. </td>
</tr>
</table>
<a class="anchor" name="ga51" doxytag="qofquery.h::QOF_PARAM_ACTIVE" ></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
<tr>
<td class="mdRow">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="md" nowrap valign="top"> #define QOF_PARAM_ACTIVE "active"
</table>
</td>
</tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
<tr>
<td>
</td>
<td>
<p>
"Known" Object Parameters -- some objects might support these </td>
</tr>
</table>
<a class="anchor" name="ga49" doxytag="qofquery.h::QOF_PARAM_BOOK" ></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
<tr>
<td class="mdRow">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="md" nowrap valign="top"> #define QOF_PARAM_BOOK "book"
</table>
</td>
</tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
<tr>
<td>
</td>
<td>
<p>
"Known" Object Parameters -- all objects must support these </td>
</tr>
</table>
<a class="anchor" name="ga48" doxytag="qofquery.h::QUERY_DEFAULT_SORT" ></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
<tr>
<td class="mdRow">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="md" nowrap valign="top"> #define QUERY_DEFAULT_SORT "QofQueryDefaultSort"
</table>
</td>
</tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
<tr>
<td>
</td>
<td>
<p>
Default sort object type </td>
</tr>
</table>
<hr><h2>Typedef Documentation</h2>
<a class="anchor" name="ga0" doxytag="qofquery.h::QofQuery" ></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
<tr>
<td class="mdRow">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="md" nowrap valign="top"> typedef struct _QofQuery <a class="el" href="group__Query.html#ga0">QofQuery</a>
</table>
</td>
</tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
<tr>
<td>
</td>
<td>
<p>
A Query </td>
</tr>
</table>
<a class="anchor" name="ga1" doxytag="qofquerycore.h::QofQueryPredData" ></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
<tr>
<td class="mdRow">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="md" nowrap valign="top"> typedef struct <a class="el" href="struct__QofQueryPredData.html">_QofQueryPredData</a> <a class="el" href="struct__QofQueryPredData.html">QofQueryPredData</a>
</table>
</td>
</tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
<tr>
<td>
</td>
<td>
<p>
PREDICATE DATA TYPES: All the predicate data types are rolled up into the union type PredicateData. The "type" field specifies which type the union is. </td>
</tr>
</table>
<hr><h2>Enumeration Type Documentation</h2>
<a class="anchor" name="ga60" doxytag="qofquerycore.h::QofCharMatch" ></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
<tr>
<td class="mdRow">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="md" nowrap valign="top"> enum <a class="el" href="group__Query.html#ga60">QofCharMatch</a>
</table>
</td>
</tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
<tr>
<td>
</td>
<td>
<p>
A CHAR type is for a RECNCell, Comparisons for QOF_TYPE_CHAR 'ANY' will match any charagter in the string.<p>
Match 'ANY' is a convenience/performance-enhanced predicate for the compound statement (value==char1) || (value==char2) || etc. Match 'NONE' is equivalent to (value != char1) && (value != char2) && etc. </td>
</tr>
</table>
<a class="anchor" name="ga59" doxytag="qofquerycore.h::QofGuidMatch" ></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
<tr>
<td class="mdRow">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="md" nowrap valign="top"> enum <a class="el" href="group__Query.html#ga59">QofGuidMatch</a>
</table>
</td>
</tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
<tr>
<td>
</td>
<td>
<p>
<dl compact><dt><b>Enumeration values: </b></dt><dd>
<table border=0 cellspacing=2 cellpadding=0>
<tr><td valign=top><em><a class="anchor" name="gga59a16" doxytag="QOF_GUID_MATCH_ANY" ></a>QOF_GUID_MATCH_ANY</em> </td><td>
These expect a single object and expect the QofAccessFunc returns GUID* </td></tr>
<tr><td valign=top><em><a class="anchor" name="gga59a19" doxytag="QOF_GUID_MATCH_ALL" ></a>QOF_GUID_MATCH_ALL</em> </td><td>
These expect a GList* of objects and calls the QofAccessFunc routine on each item in the list to obtain a GUID* for each object </td></tr>
<tr><td valign=top><em><a class="anchor" name="gga59a20" doxytag="QOF_GUID_MATCH_LIST_ANY" ></a>QOF_GUID_MATCH_LIST_ANY</em> </td><td>
These expect a single object and expect the QofAccessFunc function to return a GList* of GUID* (the list is the property of the caller) </td></tr>
</table>
</dl>
</td>
</tr>
</table>
<a class="anchor" name="ga55" doxytag="qofquerycore.h::QofQueryCompare" ></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
<tr>
<td class="mdRow">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="md" nowrap valign="top"> enum <a class="el" href="group__Query.html#ga55">QofQueryCompare</a>
</table>
</td>
</tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
<tr>
<td>
</td>
<td>
<p>
Standard Query comparitors, for how to compare objects in a predicate. Note that not all core types implement all comparitors </td>
</tr>
</table>
<a class="anchor" name="ga54" doxytag="qofquery.h::QofQueryOp" ></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
<tr>
<td class="mdRow">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="md" nowrap valign="top"> enum <a class="el" href="group__Query.html#ga54">QofQueryOp</a>
</table>
</td>
</tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
<tr>
<td>
</td>
<td>
<p>
Query Term Operators, for combining Query Terms </td>
</tr>
</table>
<a class="anchor" name="ga56" doxytag="qofquerycore.h::QofStringMatch" ></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
<tr>
<td class="mdRow">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="md" nowrap valign="top"> enum <a class="el" href="group__Query.html#ga56">QofStringMatch</a>
</table>
</td>
</tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
<tr>
<td>
</td>
<td>
<p>
List of known core query data-types... Each core query type defines it's set of optional "comparitor qualifiers". </td>
</tr>
</table>
<hr><h2>Function Documentation</h2>
<a class="anchor" name="ga13" doxytag="qofquery.h::qof_query_add_boolean_match" ></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
<tr>
<td class="mdRow">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="md" nowrap valign="top"> void qof_query_add_boolean_match </td>
<td class="md" valign="top">( </td>
<td class="md" nowrap valign="top"><a class="el" href="group__Query.html#ga0">QofQuery</a> * </td>
<td class="mdname" nowrap> <em>q</em>, </td>
</tr>
<tr>
<td class="md" nowrap align="right"></td>
<td></td>
<td class="md" nowrap>GSList * </td>
<td class="mdname" nowrap> <em>param_list</em>, </td>
</tr>
<tr>
<td class="md" nowrap align="right"></td>
<td></td>
<td class="md" nowrap>gboolean </td>
<td class="mdname" nowrap> <em>value</em>, </td>
</tr>
<tr>
<td class="md" nowrap align="right"></td>
<td></td>
<td class="md" nowrap><a class="el" href="group__Query.html#ga54">QofQueryOp</a> </td>
<td class="mdname" nowrap> <em>op</em></td>
</tr>
<tr>
<td></td>
<td class="md">) </td>
<td class="md" colspan="2"></td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
<tr>
<td>
</td>
<td>
<p>
Handy-dandy convenience routines, avoids having to create a separate predicate for boolean matches. We might want to create handy-dandy sugar routines for the other predicate types as well. </td>
</tr>
</table>
<a class="anchor" name="ga12" doxytag="qofquery.h::qof_query_add_guid_list_match" ></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
<tr>
<td class="mdRow">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="md" nowrap valign="top"> void qof_query_add_guid_list_match </td>
<td class="md" valign="top">( </td>
<td class="md" nowrap valign="top"><a class="el" href="group__Query.html#ga0">QofQuery</a> * </td>
<td class="mdname" nowrap> <em>q</em>, </td>
</tr>
<tr>
<td class="md" nowrap align="right"></td>
<td></td>
<td class="md" nowrap>GSList * </td>
<td class="mdname" nowrap> <em>param_list</em>, </td>
</tr>
<tr>
<td class="md" nowrap align="right"></td>
<td></td>
<td class="md" nowrap>GList * </td>
<td class="mdname" nowrap> <em>guid_list</em>, </td>
</tr>
<tr>
<td class="md" nowrap align="right"></td>
<td></td>
<td class="md" nowrap><a class="el" href="group__Query.html#ga59">QofGuidMatch</a> </td>
<td class="mdname" nowrap> <em>options</em>, </td>
</tr>
<tr>
<td class="md" nowrap align="right"></td>
<td></td>
<td class="md" nowrap><a class="el" href="group__Query.html#ga54">QofQueryOp</a> </td>
<td class="mdname" nowrap> <em>op</em></td>
</tr>
<tr>
<td></td>
<td class="md">) </td>
<td class="md" colspan="2"></td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
<tr>
<td>
</td>
<td>
<p>
DOCUMENT ME !! </td>
</tr>
</table>
<a class="anchor" name="ga11" doxytag="qofquery.h::qof_query_add_guid_match" ></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
<tr>
<td class="mdRow">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="md" nowrap valign="top"> void qof_query_add_guid_match </td>
<td class="md" valign="top">( </td>
<td class="md" nowrap valign="top"><a class="el" href="group__Query.html#ga0">QofQuery</a> * </td>
<td class="mdname" nowrap> <em>q</em>, </td>
</tr>
<tr>
<td class="md" nowrap align="right"></td>
<td></td>
<td class="md" nowrap>GSList * </td>
<td class="mdname" nowrap> <em>param_list</em>, </td>
</tr>
<tr>
<td class="md" nowrap align="right"></td>
<td></td>
<td class="md" nowrap>const <a class="el" href="union__GUID.html">GUID</a> * </td>
<td class="mdname" nowrap> <em>guid</em>, </td>
</tr>
<tr>
<td class="md" nowrap align="right"></td>
<td></td>
<td class="md" nowrap><a class="el" href="group__Query.html#ga54">QofQueryOp</a> </td>
<td class="mdname" nowrap> <em>op</em></td>
</tr>
<tr>
<td></td>
<td class="md">) </td>
<td class="md" colspan="2"></td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
<tr>
<td>
</td>
<td>
<p>
DOCUMENT ME !! </td>
</tr>
</table>
<a class="anchor" name="ga10" doxytag="qofquery.h::qof_query_add_term" ></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
<tr>
<td class="mdRow">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="md" nowrap valign="top"> void qof_query_add_term </td>
<td class="md" valign="top">( </td>
<td class="md" nowrap valign="top"><a class="el" href="group__Query.html#ga0">QofQuery</a> * </td>
<td class="mdname" nowrap> <em>query</em>, </td>
</tr>
<tr>
<td class="md" nowrap align="right"></td>
<td></td>
<td class="md" nowrap>GSList * </td>
<td class="mdname" nowrap> <em>param_list</em>, </td>
</tr>
<tr>
<td class="md" nowrap align="right"></td>
<td></td>
<td class="md" nowrap><a class="el" href="struct__QofQueryPredData.html">QofQueryPredData</a> * </td>
<td class="mdname" nowrap> <em>pred_data</em>, </td>
</tr>
<tr>
<td class="md" nowrap align="right"></td>
<td></td>
<td class="md" nowrap><a class="el" href="group__Query.html#ga54">QofQueryOp</a> </td>
<td class="mdname" nowrap> <em>op</em></td>
</tr>
<tr>
<td></td>
<td class="md">) </td>
<td class="md" colspan="2"></td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
<tr>
<td>
</td>
<td>
<p>
This is the general function that adds a new Query Term to a query. It will find the 'obj_type' object of the search item and compare the 'param_list' parameter to the predicate data via the comparitor.<p>
The param_list is a recursive list of parameters. For example, you can say 'split->memo' by creating a list of one element, "SPLIT_MEMO". You can say 'split->account->name' by creating a list of two elements, "SPLIT_ACCOUNT" and "ACCOUNT_NAME". The list becomes the property of the Query.<p>
For example:<p>
acct_name_pred_data = make_string_pred_data(QOF_STRING_MATCH_CASEINSENSITIVE, account_name); param_list = make_list (SPLIT_ACCOUNT, ACCOUNT_NAME, NULL); qof_query_add_term (query, param_list, QOF_COMPARE_EQUAL, acct_name_pred_data, QOF_QUERY_AND);<p>
Please note that QofQuery does not, at this time, support joins. That is, one cannot specify a predicate that is a parameter list. Put another way, one cannot search for objects where obja->thingy == objb->stuff </td>
</tr>
</table>
<a class="anchor" name="ga16" doxytag="qofquery.h::qof_query_clear" ></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
<tr>
<td class="mdRow">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="md" nowrap valign="top"> void qof_query_clear </td>
<td class="md" valign="top">( </td>
<td class="md" nowrap valign="top"><a class="el" href="group__Query.html#ga0">QofQuery</a> * </td>
<td class="mdname1" valign="top" nowrap> <em>query</em> </td>
<td class="md" valign="top"> ) </td>
<td class="md" nowrap></td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
<tr>
<td>
</td>
<td>
<p>
Remove all query terms from query. query matches nothing after <a class="el" href="group__Query.html#ga28">qof_query_clear()</a>. </td>
</tr>
</table>
<a class="anchor" name="ga21" doxytag="qofquery.h::qof_query_copy" ></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
<tr>
<td class="mdRow">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="md" nowrap valign="top"> <a class="el" href="group__Query.html#ga0">QofQuery</a>* qof_query_copy </td>
<td class="md" valign="top">( </td>
<td class="md" nowrap valign="top"><a class="el" href="group__Query.html#ga0">QofQuery</a> * </td>
<td class="mdname1" valign="top" nowrap> <em>q</em> </td>
<td class="md" valign="top"> ) </td>
<td class="md" nowrap></td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
<tr>
<td>
</td>
<td>
<p>
Make a copy of the indicated query </td>
</tr>
</table>
<a class="anchor" name="ga44" doxytag="qofquerycore.h::qof_query_core_predicate_copy" ></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
<tr>
<td class="mdRow">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="md" nowrap valign="top"> <a class="el" href="struct__QofQueryPredData.html">QofQueryPredData</a>* qof_query_core_predicate_copy </td>
<td class="md" valign="top">( </td>
<td class="md" nowrap valign="top"><a class="el" href="struct__QofQueryPredData.html">QofQueryPredData</a> * </td>
<td class="mdname1" valign="top" nowrap> <em>pdata</em> </td>
<td class="md" valign="top"> ) </td>
<td class="md" nowrap></td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
<tr>
<td>
</td>
<td>
<p>
Copy a predicate. </td>
</tr>
</table>
<a class="anchor" name="ga45" doxytag="qofquerycore.h::qof_query_core_predicate_free" ></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
<tr>
<td class="mdRow">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="md" nowrap valign="top"> void qof_query_core_predicate_free </td>
<td class="md" valign="top">( </td>
<td class="md" nowrap valign="top"><a class="el" href="struct__QofQueryPredData.html">QofQueryPredData</a> * </td>
<td class="mdname1" valign="top" nowrap> <em>pdata</em> </td>
<td class="md" valign="top"> ) </td>
<td class="md" nowrap></td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
<tr>
<td>
</td>
<td>
<p>
Destroy a predicate. </td>
</tr>
</table>
<a class="anchor" name="ga46" doxytag="qofquerycore.h::qof_query_core_to_string" ></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
<tr>
<td class="mdRow">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="md" nowrap valign="top"> char* qof_query_core_to_string </td>
<td class="md" valign="top">( </td>
<td class="md" nowrap valign="top"><a class="el" href="group__Class.html#ga0">QofType</a> </td>
<td class="mdname" nowrap>, </td>
</tr>
<tr>
<td class="md" nowrap align="right"></td>
<td></td>
<td class="md" nowrap>gpointer </td>
<td class="mdname" nowrap> <em>object</em>, </td>
</tr>
<tr>
<td class="md" nowrap align="right"></td>
<td></td>
<td class="md" nowrap><a class="el" href="struct__QofParam.html">QofParam</a> * </td>
<td class="mdname" nowrap> <em>getter</em></td>
</tr>
<tr>
<td></td>
<td class="md">) </td>
<td class="md" colspan="2"></td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
<tr>
<td>
</td>
<td>
<p>
Return a printable string for a core data object. Caller needs to g_free() the returned string. </td>
</tr>
</table>
<a class="anchor" name="ga5" doxytag="qofquery.h::qof_query_create" ></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
<tr>
<td class="mdRow">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="md" nowrap valign="top"> <a class="el" href="group__Query.html#ga0">QofQuery</a>* qof_query_create </td>
<td class="md" valign="top">( </td>
<td class="md" nowrap valign="top">void </td>
<td class="mdname1" valign="top" nowrap> </td>
<td class="md" valign="top"> ) </td>
<td class="md" nowrap></td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
<tr>
<td>
</td>
<td>
<p>
Create a new query. Before running the query, a 'search-for' type must be set otherwise nothing will be returned. The results of the query is a list of the indicated search-for type.<p>
Allocates and initializes a Query structure which must be freed by the user with <a class="el" href="group__Query.html#ga35">qof_query_destroy()</a>. A newly-allocated QofQuery object matches nothing (<a class="el" href="group__Query.html#ga26">qof_query_run()</a> will return NULL). </td>
</tr>
</table>
<a class="anchor" name="ga7" doxytag="qofquery.h::qof_query_destroy" ></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
<tr>
<td class="mdRow">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="md" nowrap valign="top"> void qof_query_destroy </td>
<td class="md" valign="top">( </td>
<td class="md" nowrap valign="top"><a class="el" href="group__Query.html#ga0">QofQuery</a> * </td>
<td class="mdname1" valign="top" nowrap> <em>q</em> </td>
<td class="md" valign="top"> ) </td>
<td class="md" nowrap></td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
<tr>
<td>
</td>
<td>
<p>
Frees the resources associate with a Query object. </td>
</tr>
</table>
<a class="anchor" name="ga29" doxytag="qofquery.h::qof_query_equal" ></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
<tr>
<td class="mdRow">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="md" nowrap valign="top"> gboolean qof_query_equal </td>
<td class="md" valign="top">( </td>
<td class="md" nowrap valign="top"><a class="el" href="group__Query.html#ga0">QofQuery</a> * </td>
<td class="mdname" nowrap> <em>q1</em>, </td>
</tr>
<tr>
<td class="md" nowrap align="right"></td>
<td></td>
<td class="md" nowrap><a class="el" href="group__Query.html#ga0">QofQuery</a> * </td>
<td class="mdname" nowrap> <em>q2</em></td>
</tr>
<tr>
<td></td>
<td class="md">) </td>
<td class="md" colspan="2"></td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
<tr>
<td>
</td>
<td>
<p>
Compare two queries for equality. Query terms are compared each to each. This is a simplistic implementation -- logical equivalences between different and/or trees are ignored. </td>
</tr>
</table>
<a class="anchor" name="ga32" doxytag="qofquery.h::qof_query_get_books" ></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
<tr>
<td class="mdRow">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="md" nowrap valign="top"> GList* qof_query_get_books </td>
<td class="md" valign="top">( </td>
<td class="md" nowrap valign="top"><a class="el" href="group__Query.html#ga0">QofQuery</a> * </td>
<td class="mdname1" valign="top" nowrap> <em>q</em> </td>
<td class="md" valign="top"> ) </td>
<td class="md" nowrap></td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
<tr>
<td>
</td>
<td>
<p>
Return the list of books we're using </td>
</tr>
</table>
<a class="anchor" name="ga31" doxytag="qofquery.h::qof_query_get_search_for" ></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
<tr>
<td class="mdRow">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="md" nowrap valign="top"> QofIdType qof_query_get_search_for </td>
<td class="md" valign="top">( </td>
<td class="md" nowrap valign="top"><a class="el" href="group__Query.html#ga0">QofQuery</a> * </td>
<td class="mdname1" valign="top" nowrap> <em>q</em> </td>
<td class="md" valign="top"> ) </td>
<td class="md" nowrap></td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
<tr>
<td>
</td>
<td>
<p>
Return the type of data we're querying for </td>
</tr>
</table>
<a class="anchor" name="ga20" doxytag="qofquery.h::qof_query_has_term_type" ></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
<tr>
<td class="mdRow">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="md" nowrap valign="top"> gboolean qof_query_has_term_type </td>
<td class="md" valign="top">( </td>
<td class="md" nowrap valign="top"><a class="el" href="group__Query.html#ga0">QofQuery</a> * </td>
<td class="mdname" nowrap> <em>q</em>, </td>
</tr>
<tr>
<td class="md" nowrap align="right"></td>
<td></td>
<td class="md" nowrap>GSList * </td>
<td class="mdname" nowrap> <em>term_param</em></td>
</tr>
<tr>
<td></td>
<td class="md">) </td>
<td class="md" colspan="2"></td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
<tr>
<td>
</td>
<td>
<p>
DOCUMENT ME !! </td>
</tr>
</table>
<a class="anchor" name="ga18" doxytag="qofquery.h::qof_query_has_terms" ></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
<tr>
<td class="mdRow">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="md" nowrap valign="top"> int qof_query_has_terms </td>
<td class="md" valign="top">( </td>
<td class="md" nowrap valign="top"><a class="el" href="group__Query.html#ga0">QofQuery</a> * </td>
<td class="mdname1" valign="top" nowrap> <em>q</em> </td>
<td class="md" valign="top"> ) </td>
<td class="md" nowrap></td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
<tr>
<td>
</td>
<td>
<p>
Return boolean FALSE if there are no terms in the query Can be used as a predicate to see if the query has been initialized (return value > 0) or is "blank" (return value == 0). </td>
</tr>
</table>
<a class="anchor" name="ga2" doxytag="qofquery.h::qof_query_init" ></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
<tr>
<td class="mdRow">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="md" nowrap valign="top"> void qof_query_init </td>
<td class="md" valign="top">( </td>
<td class="md" nowrap valign="top">void </td>
<td class="mdname1" valign="top" nowrap> </td>
<td class="md" valign="top"> ) </td>
<td class="md" nowrap></td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
<tr>
<td>
</td>
<td>
<p>
Subsystem initialization and shutdown. Call init() once to initalize the query subsytem; call shutdown() to free up any resources associated with the query subsystem. Typically called during application startup, shutdown. </td>
</tr>
</table>
<a class="anchor" name="ga22" doxytag="qofquery.h::qof_query_invert" ></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
<tr>
<td class="mdRow">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="md" nowrap valign="top"> <a class="el" href="group__Query.html#ga0">QofQuery</a>* qof_query_invert </td>
<td class="md" valign="top">( </td>
<td class="md" nowrap valign="top"><a class="el" href="group__Query.html#ga0">QofQuery</a> * </td>
<td class="mdname1" valign="top" nowrap> <em>q</em> </td>
<td class="md" valign="top"> ) </td>
<td class="md" nowrap></td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
<tr>
<td>
</td>
<td>
<p>
Make a copy of the indicated query, inverting the sense of the search. In other words, if the original query search for all objects with a certain condition, the inverted query will search for all object with NOT that condition. The union of the results returned by the original and inverted queries equals the set of all searched objects. These to sets are disjoint (share no members in common).<p>
This will return a newly allocated QofQuery object, or NULL on error. Free it with <a class="el" href="group__Query.html#ga35">qof_query_destroy()</a> when no longer needed. </td>
</tr>
</table>
<a class="anchor" name="ga42" doxytag="qofquerycore.h::qof_query_kvp_predicate" ></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
<tr>
<td class="mdRow">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="md" nowrap valign="top"> <a class="el" href="struct__QofQueryPredData.html">QofQueryPredData</a>* qof_query_kvp_predicate </td>
<td class="md" valign="top">( </td>
<td class="md" nowrap valign="top"><a class="el" href="group__Query.html#ga55">QofQueryCompare</a> </td>
<td class="mdname" nowrap> <em>how</em>, </td>
</tr>
<tr>
<td class="md" nowrap align="right"></td>
<td></td>
<td class="md" nowrap>GSList * </td>
<td class="mdname" nowrap> <em>path</em>, </td>
</tr>
<tr>
<td class="md" nowrap align="right"></td>
<td></td>
<td class="md" nowrap>const <a class="el" href="group__KVP.html#ga1">KvpValue</a> * </td>
<td class="mdname" nowrap> <em>value</em></td>
</tr>
<tr>
<td></td>
<td class="md">) </td>
<td class="md" colspan="2"></td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
<tr>
<td>
</td>
<td>
<p>
The <a class="el" href="group__Query.html#ga107">qof_query_kvp_predicate()</a> matches the object that has the value 'value' located at the path 'path'. In a certain sense, the 'path' is handled as if it were a paramter. </td>
</tr>
</table>
<a class="anchor" name="ga43" doxytag="qofquerycore.h::qof_query_kvp_predicate_path" ></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
<tr>
<td class="mdRow">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="md" nowrap valign="top"> <a class="el" href="struct__QofQueryPredData.html">QofQueryPredData</a>* qof_query_kvp_predicate_path </td>
<td class="md" valign="top">( </td>
<td class="md" nowrap valign="top"><a class="el" href="group__Query.html#ga55">QofQueryCompare</a> </td>
<td class="mdname" nowrap> <em>how</em>, </td>
</tr>
<tr>
<td class="md" nowrap align="right"></td>
<td></td>
<td class="md" nowrap>const char * </td>
<td class="mdname" nowrap> <em>path</em>, </td>
</tr>
<tr>
<td class="md" nowrap align="right"></td>
<td></td>
<td class="md" nowrap>const <a class="el" href="group__KVP.html#ga1">KvpValue</a> * </td>
<td class="mdname" nowrap> <em>value</em></td>
</tr>
<tr>
<td></td>
<td class="md">) </td>
<td class="md" colspan="2"></td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
<tr>
<td>
</td>
<td>
<p>
Same predicate as above, except that 'path' is assumed to be a string containing slash-separated pathname. </td>
</tr>
</table>
<a class="anchor" name="ga15" doxytag="qofquery.h::qof_query_last_run" ></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
<tr>
<td class="mdRow">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="md" nowrap valign="top"> GList* qof_query_last_run </td>
<td class="md" valign="top">( </td>
<td class="md" nowrap valign="top"><a class="el" href="group__Query.html#ga0">QofQuery</a> * </td>
<td class="mdname1" valign="top" nowrap> <em>query</em> </td>
<td class="md" valign="top"> ) </td>
<td class="md" nowrap></td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
<tr>
<td>
</td>
<td>
<p>
Return the results of the last query, without causing the query to be re-run. Do NOT free the resulting list. This list is managed internally by QofQuery. </td>
</tr>
</table>
<a class="anchor" name="ga23" doxytag="qofquery.h::qof_query_merge" ></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
<tr>
<td class="mdRow">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="md" nowrap valign="top"> <a class="el" href="group__Query.html#ga0">QofQuery</a>* qof_query_merge </td>
<td class="md" valign="top">( </td>
<td class="md" nowrap valign="top"><a class="el" href="group__Query.html#ga0">QofQuery</a> * </td>
<td class="mdname" nowrap> <em>q1</em>, </td>
</tr>
<tr>
<td class="md" nowrap align="right"></td>
<td></td>
<td class="md" nowrap><a class="el" href="group__Query.html#ga0">QofQuery</a> * </td>
<td class="mdname" nowrap> <em>q2</em>, </td>
</tr>
<tr>
<td class="md" nowrap align="right"></td>
<td></td>
<td class="md" nowrap><a class="el" href="group__Query.html#ga54">QofQueryOp</a> </td>
<td class="mdname" nowrap> <em>op</em></td>
</tr>
<tr>
<td></td>
<td class="md">) </td>
<td class="md" colspan="2"></td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
<tr>
<td>
</td>
<td>
<p>
Combine two queries together using the Boolean set (logical) operator 'op'. For example, if the operator 'op' is set to QUERY_AND, then the set of results returned by the query will will be the Boolean set intersection of the results returned by q1 and q2. Similarly, QUERY_OR maps to set union, etc.<p>
Both queries must have compatible search-types. If both queries are set, they must search for the same object type. If only one is set, the resulting query will search for the set type. If neither query has the search-type set, the result will be unset as well.<p>
This will return a newly allocated QofQuery object, or NULL on error. Free it with <a class="el" href="group__Query.html#ga35">qof_query_destroy()</a> when no longer needed. </td>
</tr>
</table>
<a class="anchor" name="ga24" doxytag="qofquery.h::qof_query_merge_in_place" ></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
<tr>
<td class="mdRow">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="md" nowrap valign="top"> void qof_query_merge_in_place </td>
<td class="md" valign="top">( </td>
<td class="md" nowrap valign="top"><a class="el" href="group__Query.html#ga0">QofQuery</a> * </td>
<td class="mdname" nowrap> <em>q1</em>, </td>
</tr>
<tr>
<td class="md" nowrap align="right"></td>
<td></td>
<td class="md" nowrap><a class="el" href="group__Query.html#ga0">QofQuery</a> * </td>
<td class="mdname" nowrap> <em>q2</em>, </td>
</tr>
<tr>
<td class="md" nowrap align="right"></td>
<td></td>
<td class="md" nowrap><a class="el" href="group__Query.html#ga54">QofQueryOp</a> </td>
<td class="mdname" nowrap> <em>op</em></td>
</tr>
<tr>
<td></td>
<td class="md">) </td>
<td class="md" colspan="2"></td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
<tr>
<td>
</td>
<td>
<p>
Like qof_query_merge, but this will merge a copy of q2 into q1. q2 remains unchanged. </td>
</tr>
</table>
<a class="anchor" name="ga19" doxytag="qofquery.h::qof_query_num_terms" ></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
<tr>
<td class="mdRow">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="md" nowrap valign="top"> int qof_query_num_terms </td>
<td class="md" valign="top">( </td>
<td class="md" nowrap valign="top"><a class="el" href="group__Query.html#ga0">QofQuery</a> * </td>
<td class="mdname1" valign="top" nowrap> <em>q</em> </td>
<td class="md" valign="top"> ) </td>
<td class="md" nowrap></td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
<tr>
<td>
</td>
<td>
<p>
Return the number of terms in the canonical form of the query. </td>
</tr>
</table>
<a class="anchor" name="ga30" doxytag="qofquery.h::qof_query_print" ></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
<tr>
<td class="mdRow">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="md" nowrap valign="top"> void qof_query_print </td>
<td class="md" valign="top">( </td>
<td class="md" nowrap valign="top"><a class="el" href="group__Query.html#ga0">QofQuery</a> * </td>
<td class="mdname1" valign="top" nowrap> <em>query</em> </td>
<td class="md" valign="top"> ) </td>
<td class="md" nowrap></td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
<tr>
<td>
</td>
<td>
<p>
Print the Query in human-readable format. Useful for debugging and development. </td>
</tr>
</table>
<a class="anchor" name="ga17" doxytag="qofquery.h::qof_query_purge_terms" ></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
<tr>
<td class="mdRow">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="md" nowrap valign="top"> void qof_query_purge_terms </td>
<td class="md" valign="top">( </td>
<td class="md" nowrap valign="top"><a class="el" href="group__Query.html#ga0">QofQuery</a> * </td>
<td class="mdname" nowrap> <em>q</em>, </td>
</tr>
<tr>
<td class="md" nowrap align="right"></td>
<td></td>
<td class="md" nowrap>GSList * </td>
<td class="mdname" nowrap> <em>param_list</em></td>
</tr>
<tr>
<td></td>
<td class="md">) </td>
<td class="md" colspan="2"></td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
<tr>
<td>
</td>
<td>
<p>
Remove query terms of a particular type from q. The "type" of a term is determined by the type of data that gets passed to the predicate function. XXX ??? Huh? remove anything of that predicate type, or just the particular predicate ? </td>
</tr>
</table>
<a class="anchor" name="ga14" doxytag="qofquery.h::qof_query_run" ></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
<tr>
<td class="mdRow">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="md" nowrap valign="top"> GList* qof_query_run </td>
<td class="md" valign="top">( </td>
<td class="md" nowrap valign="top"><a class="el" href="group__Query.html#ga0">QofQuery</a> * </td>
<td class="mdname1" valign="top" nowrap> <em>query</em> </td>
<td class="md" valign="top"> ) </td>
<td class="md" nowrap></td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
<tr>
<td>
</td>
<td>
<p>
Perform the query, return the results. The returned list is a list of the 'search-for' type that was previously set with the <a class="el" href="group__Query.html#ga30">qof_query_search_for()</a> or the qof_query_create_for() routines. The returned list will have been sorted using the indicated sort order, and trimed to the max_results length.<p>
Do NOT free the resulting list. This list is managed internally by QofQuery. </td>
</tr>
</table>
<a class="anchor" name="ga8" doxytag="qofquery.h::qof_query_search_for" ></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
<tr>
<td class="mdRow">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="md" nowrap valign="top"> void qof_query_search_for </td>
<td class="md" valign="top">( </td>
<td class="md" nowrap valign="top"><a class="el" href="group__Query.html#ga0">QofQuery</a> * </td>
<td class="mdname" nowrap> <em>query</em>, </td>
</tr>
<tr>
<td class="md" nowrap align="right"></td>
<td></td>
<td class="md" nowrap>QofIdTypeConst </td>
<td class="mdname" nowrap> <em>obj_type</em></td>
</tr>
<tr>
<td></td>
<td class="md">) </td>
<td class="md" colspan="2"></td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
<tr>
<td>
</td>
<td>
<p>
Set the object type to be searched for. The results of performuing the query will be a list of this obj_type. </td>
</tr>
</table>
<a class="anchor" name="ga9" doxytag="qofquery.h::qof_query_set_book" ></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
<tr>
<td class="mdRow">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="md" nowrap valign="top"> void qof_query_set_book </td>
<td class="md" valign="top">( </td>
<td class="md" nowrap valign="top"><a class="el" href="group__Query.html#ga0">QofQuery</a> * </td>
<td class="mdname" nowrap> <em>q</em>, </td>
</tr>
<tr>
<td class="md" nowrap align="right"></td>
<td></td>
<td class="md" nowrap><a class="el" href="struct__QofBook.html">QofBook</a> * </td>
<td class="mdname" nowrap> <em>book</em></td>
</tr>
<tr>
<td></td>
<td class="md">) </td>
<td class="md" colspan="2"></td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
<tr>
<td>
</td>
<td>
<p>
Set the book to be searched. Books contain/identify collections of objects; the search will be performed over those books specified with this function. If no books are set, no results will be returned (since there is nothing to search over).<p>
You can search multiple books. To specify multiple books, call this function multiple times with different arguments. XXX needed qof_query_clear_books() to reset the list ... </td>
</tr>
</table>
<a class="anchor" name="ga28" doxytag="qofquery.h::qof_query_set_max_results" ></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
<tr>
<td class="mdRow">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="md" nowrap valign="top"> void qof_query_set_max_results </td>
<td class="md" valign="top">( </td>
<td class="md" nowrap valign="top"><a class="el" href="group__Query.html#ga0">QofQuery</a> * </td>
<td class="mdname" nowrap> <em>q</em>, </td>
</tr>
<tr>
<td class="md" nowrap align="right"></td>
<td></td>
<td class="md" nowrap>int </td>
<td class="mdname" nowrap> <em>n</em></td>
</tr>
<tr>
<td></td>
<td class="md">) </td>
<td class="md" colspan="2"></td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
<tr>
<td>
</td>
<td>
<p>
Set the maximum number of results that should be returned. If 'max-results' is set to -1, then all of the results are returned. If there are more results than 'max-results', then the result list is trimmed. Note that there is an important interplay between 'max-results' and the sort order: only the last bit of results are returned. For example, if the sort order is set to be increasing date order, then only the objects with the most recent dates will be returned. </td>
</tr>
</table>
<a class="anchor" name="ga27" doxytag="qofquery.h::qof_query_set_sort_increasing" ></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
<tr>
<td class="mdRow">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="md" nowrap valign="top"> void qof_query_set_sort_increasing </td>
<td class="md" valign="top">( </td>
<td class="md" nowrap valign="top"><a class="el" href="group__Query.html#ga0">QofQuery</a> * </td>
<td class="mdname" nowrap> <em>q</em>, </td>
</tr>
<tr>
<td class="md" nowrap align="right"></td>
<td></td>
<td class="md" nowrap>gboolean </td>
<td class="mdname" nowrap> <em>prim_inc</em>, </td>
</tr>
<tr>
<td class="md" nowrap align="right"></td>
<td></td>
<td class="md" nowrap>gboolean </td>
<td class="mdname" nowrap> <em>sec_inc</em>, </td>
</tr>
<tr>
<td class="md" nowrap align="right"></td>
<td></td>
<td class="md" nowrap>gboolean </td>
<td class="mdname" nowrap> <em>tert_inc</em></td>
</tr>
<tr>
<td></td>
<td class="md">) </td>
<td class="md" colspan="2"></td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
<tr>
<td>
</td>
<td>
<p>
When a query is run, the results are sorted before being returned. This routine can be used to control the direction of the ordering. A value of TRUE indicates the sort will be in increasing order, a value of FALSE will order results in decreasing order.<p>
Note that if there are more results than the 'max-results' value, then only the *last* max-results will be returned. For example, if the sort is set to be increasing date order, then only the objects with the most recent dates will be returned. </td>
</tr>
</table>
<a class="anchor" name="ga25" doxytag="qofquery.h::qof_query_set_sort_order" ></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
<tr>
<td class="mdRow">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="md" nowrap valign="top"> void qof_query_set_sort_order </td>
<td class="md" valign="top">( </td>
<td class="md" nowrap valign="top"><a class="el" href="group__Query.html#ga0">QofQuery</a> * </td>
<td class="mdname" nowrap> <em>q</em>, </td>
</tr>
<tr>
<td class="md" nowrap align="right"></td>
<td></td>
<td class="md" nowrap>GSList * </td>
<td class="mdname" nowrap> <em>primary_sort_params</em>, </td>
</tr>
<tr>
<td class="md" nowrap align="right"></td>
<td></td>
<td class="md" nowrap>GSList * </td>
<td class="mdname" nowrap> <em>secondary_sort_params</em>, </td>
</tr>
<tr>
<td class="md" nowrap align="right"></td>
<td></td>
<td class="md" nowrap>GSList * </td>
<td class="mdname" nowrap> <em>tertiary_sort_params</em></td>
</tr>
<tr>
<td></td>
<td class="md">) </td>
<td class="md" colspan="2"></td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
<tr>
<td>
</td>
<td>
<p>
When a query is run, the results are sorted before being returned. This routine can be used to set the paramters on which the sort will be performed. Two objects in the result list will be compared using the 'primary_sort_params', and sorted based on that order. If the comparison shows that they are equal, then the 'secondary_sort_params' will be used. If still equal, then the tertiary params will be compared. Any or all of these parameter lists may be NULL. Any of these parameter lists may be set to QUERY_DEFAULT_SORT.<p>
Note that if there are more results than the 'max-results' value, then only the *last* max-results will be returned. For example, if the sort is set to be increasing date order, then only the objects with the most recent dates will be returned.<p>
The input lists become the property of QofQuery and are managed by it. They will be freed when the query is destroyed (or when new lists are set). </td>
</tr>
</table>
<hr size="1"><address style="align: right;"><small>Generated on Sun May 23 15:41:47 2004 for QOF by
<a href="http://www.doxygen.org/index.html">
<img src="doxygen.png" alt="doxygen" align="middle" border=0 > </a>1.3.6-20040222 </small></address>
</body>
</html>
|