This file is indexed.

/usr/share/gtk-doc/html/libgda-4.0/GdaSqlBuilder.html is in libgda-4.0-doc 4.2.8-2build1.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

   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
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>GdaSqlBuilder</title>
<meta name="generator" content="DocBook XSL Stylesheets V1.75.2">
<link rel="home" href="index.html" title="GNOME Data Access 4 manual">
<link rel="up" href="connection.html" title="Connections &amp; commands">
<link rel="prev" href="GdaSqlParser.html" title="GdaSqlParser">
<link rel="next" href="GdaStatement.html" title="GdaStatement">
<meta name="generator" content="GTK-Doc V1.17 (XML mode)">
<link rel="stylesheet" href="style.css" type="text/css">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2">
<tr valign="middle">
<td><a accesskey="p" href="GdaSqlParser.html"><img src="left.png" width="24" height="24" border="0" alt="Prev"></a></td>
<td><a accesskey="u" href="connection.html"><img src="up.png" width="24" height="24" border="0" alt="Up"></a></td>
<td><a accesskey="h" href="index.html"><img src="home.png" width="24" height="24" border="0" alt="Home"></a></td>
<th width="100%" align="center">GNOME Data Access 4 manual</th>
<td><a accesskey="n" href="GdaStatement.html"><img src="right.png" width="24" height="24" border="0" alt="Next"></a></td>
</tr>
<tr><td colspan="5" class="shortcuts">
<a href="#GdaSqlBuilder.synopsis" class="shortcut">Top</a>
                   | 
                  <a href="#GdaSqlBuilder.description" class="shortcut">Description</a>
                   | 
                  <a href="#GdaSqlBuilder.object-hierarchy" class="shortcut">Object Hierarchy</a>
                   | 
                  <a href="#GdaSqlBuilder.properties" class="shortcut">Properties</a>
</td></tr>
</table>
<div class="refentry">
<a name="GdaSqlBuilder"></a><div class="titlepage"></div>
<div class="refnamediv"><table width="100%"><tr>
<td valign="top">
<h2><span class="refentrytitle"><a name="GdaSqlBuilder.top_of_page"></a>GdaSqlBuilder</span></h2>
<p>GdaSqlBuilder — Factory object for statements</p>
</td>
<td valign="top" align="right"></td>
</tr></table></div>
<div class="refsynopsisdiv">
<a name="GdaSqlBuilder.synopsis"></a><h2>Synopsis</h2>
<pre class="synopsis">struct              <a class="link" href="GdaSqlBuilder.html#GdaSqlBuilder-struct" title="struct GdaSqlBuilder">GdaSqlBuilder</a>;
typedef             <a class="link" href="GdaSqlBuilder.html#GdaSqlBuilderId" title="GdaSqlBuilderId">GdaSqlBuilderId</a>;
<a class="link" href="GdaSqlBuilder.html" title="GdaSqlBuilder"><span class="returnvalue">GdaSqlBuilder</span></a> *     <a class="link" href="GdaSqlBuilder.html#gda-sql-builder-new" title="gda_sql_builder_new ()">gda_sql_builder_new</a>                 (<em class="parameter"><code><a class="link" href="libgda-4.0-GdaSqlStatement.html#GdaSqlStatementType" title="enum GdaSqlStatementType"><span class="type">GdaSqlStatementType</span></a> stmt_type</code></em>);
<a class="link" href="GdaStatement.html" title="GdaStatement"><span class="returnvalue">GdaStatement</span></a> *      <a class="link" href="GdaSqlBuilder.html#gda-sql-builder-get-statement" title="gda_sql_builder_get_statement ()">gda_sql_builder_get_statement</a>       (<em class="parameter"><code><a class="link" href="GdaSqlBuilder.html" title="GdaSqlBuilder"><span class="type">GdaSqlBuilder</span></a> *builder</code></em>,
                                                         <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> **error</code></em>);
<a class="link" href="libgda-4.0-GdaSqlStatement.html#GdaSqlStatement" title="GdaSqlStatement"><span class="returnvalue">GdaSqlStatement</span></a> *   <a class="link" href="GdaSqlBuilder.html#gda-sql-builder-get-sql-statement" title="gda_sql_builder_get_sql_statement ()">gda_sql_builder_get_sql_statement</a>   (<em class="parameter"><code><a class="link" href="GdaSqlBuilder.html" title="GdaSqlBuilder"><span class="type">GdaSqlBuilder</span></a> *builder</code></em>);

<span class="returnvalue">void</span>                <a class="link" href="GdaSqlBuilder.html#gda-sql-builder-set-table" title="gda_sql_builder_set_table ()">gda_sql_builder_set_table</a>           (<em class="parameter"><code><a class="link" href="GdaSqlBuilder.html" title="GdaSqlBuilder"><span class="type">GdaSqlBuilder</span></a> *builder</code></em>,
                                                         <em class="parameter"><code>const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *table_name</code></em>);
<span class="returnvalue">void</span>                <a class="link" href="GdaSqlBuilder.html#gda-sql-builder-add-field-value" title="gda_sql_builder_add_field_value ()">gda_sql_builder_add_field_value</a>     (<em class="parameter"><code><a class="link" href="GdaSqlBuilder.html" title="GdaSqlBuilder"><span class="type">GdaSqlBuilder</span></a> *builder</code></em>,
                                                         <em class="parameter"><code>const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *field_name</code></em>,
                                                         <em class="parameter"><code><a href="http://library.gnome.org/devel/gobject/unstable/gobject-Type-Information.html#GType"><span class="type">GType</span></a> type</code></em>,
                                                         <em class="parameter"><code>...</code></em>);
<span class="returnvalue">void</span>                <a class="link" href="GdaSqlBuilder.html#gda-sql-builder-add-field-value-as-gvalue" title="gda_sql_builder_add_field_value_as_gvalue ()">gda_sql_builder_add_field_value_as_gvalue</a>
                                                        (<em class="parameter"><code><a class="link" href="GdaSqlBuilder.html" title="GdaSqlBuilder"><span class="type">GdaSqlBuilder</span></a> *builder</code></em>,
                                                         <em class="parameter"><code>const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *field_name</code></em>,
                                                         <em class="parameter"><code>const <a href="http://library.gnome.org/devel/gobject/unstable/gobject-Generic-values.html#GValue"><span class="type">GValue</span></a> *value</code></em>);
<span class="returnvalue">void</span>                <a class="link" href="GdaSqlBuilder.html#gda-sql-builder-add-field-value-id" title="gda_sql_builder_add_field_value_id ()">gda_sql_builder_add_field_value_id</a>  (<em class="parameter"><code><a class="link" href="GdaSqlBuilder.html" title="GdaSqlBuilder"><span class="type">GdaSqlBuilder</span></a> *builder</code></em>,
                                                         <em class="parameter"><code><a class="link" href="GdaSqlBuilder.html#GdaSqlBuilderId" title="GdaSqlBuilderId"><span class="type">GdaSqlBuilderId</span></a> field_id</code></em>,
                                                         <em class="parameter"><code><a class="link" href="GdaSqlBuilder.html#GdaSqlBuilderId" title="GdaSqlBuilderId"><span class="type">GdaSqlBuilderId</span></a> value_id</code></em>);
<a class="link" href="GdaSqlBuilder.html#GdaSqlBuilderId" title="GdaSqlBuilderId"><span class="returnvalue">GdaSqlBuilderId</span></a>     <a class="link" href="GdaSqlBuilder.html#gda-sql-builder-add-function" title="gda_sql_builder_add_function ()">gda_sql_builder_add_function</a>        (<em class="parameter"><code><a class="link" href="GdaSqlBuilder.html" title="GdaSqlBuilder"><span class="type">GdaSqlBuilder</span></a> *builder</code></em>,
                                                         <em class="parameter"><code>const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *func_name</code></em>,
                                                         <em class="parameter"><code>...</code></em>);
<a class="link" href="GdaSqlBuilder.html#GdaSqlBuilderId" title="GdaSqlBuilderId"><span class="returnvalue">GdaSqlBuilderId</span></a>     <a class="link" href="GdaSqlBuilder.html#gda-sql-builder-add-function-v" title="gda_sql_builder_add_function_v ()">gda_sql_builder_add_function_v</a>      (<em class="parameter"><code><a class="link" href="GdaSqlBuilder.html" title="GdaSqlBuilder"><span class="type">GdaSqlBuilder</span></a> *builder</code></em>,
                                                         <em class="parameter"><code>const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *func_name</code></em>,
                                                         <em class="parameter"><code>const <a class="link" href="GdaSqlBuilder.html#GdaSqlBuilderId" title="GdaSqlBuilderId"><span class="type">GdaSqlBuilderId</span></a> *args</code></em>,
                                                         <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gint"><span class="type">gint</span></a> args_size</code></em>);

<a class="link" href="GdaSqlBuilder.html#GdaSqlBuilderId" title="GdaSqlBuilderId"><span class="returnvalue">GdaSqlBuilderId</span></a>     <a class="link" href="GdaSqlBuilder.html#gda-sql-builder-add-id" title="gda_sql_builder_add_id ()">gda_sql_builder_add_id</a>              (<em class="parameter"><code><a class="link" href="GdaSqlBuilder.html" title="GdaSqlBuilder"><span class="type">GdaSqlBuilder</span></a> *builder</code></em>,
                                                         <em class="parameter"><code>const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *string</code></em>);
<a class="link" href="GdaSqlBuilder.html#GdaSqlBuilderId" title="GdaSqlBuilderId"><span class="returnvalue">GdaSqlBuilderId</span></a>     <a class="link" href="GdaSqlBuilder.html#gda-sql-builder-add-field-id" title="gda_sql_builder_add_field_id ()">gda_sql_builder_add_field_id</a>        (<em class="parameter"><code><a class="link" href="GdaSqlBuilder.html" title="GdaSqlBuilder"><span class="type">GdaSqlBuilder</span></a> *builder</code></em>,
                                                         <em class="parameter"><code>const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *field_name</code></em>,
                                                         <em class="parameter"><code>const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *table_name</code></em>);
<a class="link" href="GdaSqlBuilder.html#GdaSqlBuilderId" title="GdaSqlBuilderId"><span class="returnvalue">GdaSqlBuilderId</span></a>     <a class="link" href="GdaSqlBuilder.html#gda-sql-builder-add-expr" title="gda_sql_builder_add_expr ()">gda_sql_builder_add_expr</a>            (<em class="parameter"><code><a class="link" href="GdaSqlBuilder.html" title="GdaSqlBuilder"><span class="type">GdaSqlBuilder</span></a> *builder</code></em>,
                                                         <em class="parameter"><code><a class="link" href="libgda-4.0-Default-Data-handlers.html#GdaDataHandler"><span class="type">GdaDataHandler</span></a> *dh</code></em>,
                                                         <em class="parameter"><code><a href="http://library.gnome.org/devel/gobject/unstable/gobject-Type-Information.html#GType"><span class="type">GType</span></a> type</code></em>,
                                                         <em class="parameter"><code>...</code></em>);
<a class="link" href="GdaSqlBuilder.html#GdaSqlBuilderId" title="GdaSqlBuilderId"><span class="returnvalue">GdaSqlBuilderId</span></a>     <a class="link" href="GdaSqlBuilder.html#gda-sql-builder-add-expr-value" title="gda_sql_builder_add_expr_value ()">gda_sql_builder_add_expr_value</a>      (<em class="parameter"><code><a class="link" href="GdaSqlBuilder.html" title="GdaSqlBuilder"><span class="type">GdaSqlBuilder</span></a> *builder</code></em>,
                                                         <em class="parameter"><code><a class="link" href="libgda-4.0-Default-Data-handlers.html#GdaDataHandler"><span class="type">GdaDataHandler</span></a> *dh</code></em>,
                                                         <em class="parameter"><code>const <a href="http://library.gnome.org/devel/gobject/unstable/gobject-Generic-values.html#GValue"><span class="type">GValue</span></a> *value</code></em>);
<a class="link" href="GdaSqlBuilder.html#GdaSqlBuilderId" title="GdaSqlBuilderId"><span class="returnvalue">GdaSqlBuilderId</span></a>     <a class="link" href="GdaSqlBuilder.html#gda-sql-builder-add-param" title="gda_sql_builder_add_param ()">gda_sql_builder_add_param</a>           (<em class="parameter"><code><a class="link" href="GdaSqlBuilder.html" title="GdaSqlBuilder"><span class="type">GdaSqlBuilder</span></a> *builder</code></em>,
                                                         <em class="parameter"><code>const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *param_name</code></em>,
                                                         <em class="parameter"><code><a href="http://library.gnome.org/devel/gobject/unstable/gobject-Type-Information.html#GType"><span class="type">GType</span></a> type</code></em>,
                                                         <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a> nullok</code></em>);
<a class="link" href="GdaSqlBuilder.html#GdaSqlBuilderId" title="GdaSqlBuilderId"><span class="returnvalue">GdaSqlBuilderId</span></a>     <a class="link" href="GdaSqlBuilder.html#gda-sql-builder-add-case" title="gda_sql_builder_add_case ()">gda_sql_builder_add_case</a>            (<em class="parameter"><code><a class="link" href="GdaSqlBuilder.html" title="GdaSqlBuilder"><span class="type">GdaSqlBuilder</span></a> *builder</code></em>,
                                                         <em class="parameter"><code><a class="link" href="GdaSqlBuilder.html#GdaSqlBuilderId" title="GdaSqlBuilderId"><span class="type">GdaSqlBuilderId</span></a> test_expr</code></em>,
                                                         <em class="parameter"><code><a class="link" href="GdaSqlBuilder.html#GdaSqlBuilderId" title="GdaSqlBuilderId"><span class="type">GdaSqlBuilderId</span></a> else_expr</code></em>,
                                                         <em class="parameter"><code>...</code></em>);
<a class="link" href="GdaSqlBuilder.html#GdaSqlBuilderId" title="GdaSqlBuilderId"><span class="returnvalue">GdaSqlBuilderId</span></a>     <a class="link" href="GdaSqlBuilder.html#gda-sql-builder-add-case-v" title="gda_sql_builder_add_case_v ()">gda_sql_builder_add_case_v</a>          (<em class="parameter"><code><a class="link" href="GdaSqlBuilder.html" title="GdaSqlBuilder"><span class="type">GdaSqlBuilder</span></a> *builder</code></em>,
                                                         <em class="parameter"><code><a class="link" href="GdaSqlBuilder.html#GdaSqlBuilderId" title="GdaSqlBuilderId"><span class="type">GdaSqlBuilderId</span></a> test_expr</code></em>,
                                                         <em class="parameter"><code><a class="link" href="GdaSqlBuilder.html#GdaSqlBuilderId" title="GdaSqlBuilderId"><span class="type">GdaSqlBuilderId</span></a> else_expr</code></em>,
                                                         <em class="parameter"><code>const <a class="link" href="GdaSqlBuilder.html#GdaSqlBuilderId" title="GdaSqlBuilderId"><span class="type">GdaSqlBuilderId</span></a> *when_array</code></em>,
                                                         <em class="parameter"><code>const <a class="link" href="GdaSqlBuilder.html#GdaSqlBuilderId" title="GdaSqlBuilderId"><span class="type">GdaSqlBuilderId</span></a> *then_array</code></em>,
                                                         <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gint"><span class="type">gint</span></a> args_size</code></em>);
<a class="link" href="GdaSqlBuilder.html#GdaSqlBuilderId" title="GdaSqlBuilderId"><span class="returnvalue">GdaSqlBuilderId</span></a>     <a class="link" href="GdaSqlBuilder.html#gda-sql-builder-add-sub-select" title="gda_sql_builder_add_sub_select ()">gda_sql_builder_add_sub_select</a>      (<em class="parameter"><code><a class="link" href="GdaSqlBuilder.html" title="GdaSqlBuilder"><span class="type">GdaSqlBuilder</span></a> *builder</code></em>,
                                                         <em class="parameter"><code><a class="link" href="libgda-4.0-GdaSqlStatement.html#GdaSqlStatement" title="GdaSqlStatement"><span class="type">GdaSqlStatement</span></a> *sqlst</code></em>);

<a class="link" href="GdaSqlBuilder.html#GdaSqlBuilderId" title="GdaSqlBuilderId"><span class="returnvalue">GdaSqlBuilderId</span></a>     <a class="link" href="GdaSqlBuilder.html#gda-sql-builder-add-cond" title="gda_sql_builder_add_cond ()">gda_sql_builder_add_cond</a>            (<em class="parameter"><code><a class="link" href="GdaSqlBuilder.html" title="GdaSqlBuilder"><span class="type">GdaSqlBuilder</span></a> *builder</code></em>,
                                                         <em class="parameter"><code><a class="link" href="libgda-4.0-GdaSqlStatement.html#GdaSqlOperatorType" title="enum GdaSqlOperatorType"><span class="type">GdaSqlOperatorType</span></a> op</code></em>,
                                                         <em class="parameter"><code><a class="link" href="GdaSqlBuilder.html#GdaSqlBuilderId" title="GdaSqlBuilderId"><span class="type">GdaSqlBuilderId</span></a> op1</code></em>,
                                                         <em class="parameter"><code><a class="link" href="GdaSqlBuilder.html#GdaSqlBuilderId" title="GdaSqlBuilderId"><span class="type">GdaSqlBuilderId</span></a> op2</code></em>,
                                                         <em class="parameter"><code><a class="link" href="GdaSqlBuilder.html#GdaSqlBuilderId" title="GdaSqlBuilderId"><span class="type">GdaSqlBuilderId</span></a> op3</code></em>);
<a class="link" href="GdaSqlBuilder.html#GdaSqlBuilderId" title="GdaSqlBuilderId"><span class="returnvalue">GdaSqlBuilderId</span></a>     <a class="link" href="GdaSqlBuilder.html#gda-sql-builder-add-cond-v" title="gda_sql_builder_add_cond_v ()">gda_sql_builder_add_cond_v</a>          (<em class="parameter"><code><a class="link" href="GdaSqlBuilder.html" title="GdaSqlBuilder"><span class="type">GdaSqlBuilder</span></a> *builder</code></em>,
                                                         <em class="parameter"><code><a class="link" href="libgda-4.0-GdaSqlStatement.html#GdaSqlOperatorType" title="enum GdaSqlOperatorType"><span class="type">GdaSqlOperatorType</span></a> op</code></em>,
                                                         <em class="parameter"><code>const <a class="link" href="GdaSqlBuilder.html#GdaSqlBuilderId" title="GdaSqlBuilderId"><span class="type">GdaSqlBuilderId</span></a> *op_ids</code></em>,
                                                         <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gint"><span class="type">gint</span></a> op_ids_size</code></em>);
<span class="returnvalue">void</span>                <a class="link" href="GdaSqlBuilder.html#gda-sql-builder-set-where" title="gda_sql_builder_set_where ()">gda_sql_builder_set_where</a>           (<em class="parameter"><code><a class="link" href="GdaSqlBuilder.html" title="GdaSqlBuilder"><span class="type">GdaSqlBuilder</span></a> *builder</code></em>,
                                                         <em class="parameter"><code><a class="link" href="GdaSqlBuilder.html#GdaSqlBuilderId" title="GdaSqlBuilderId"><span class="type">GdaSqlBuilderId</span></a> cond_id</code></em>);

<a class="link" href="GdaSqlBuilder.html#GdaSqlBuilderId" title="GdaSqlBuilderId"><span class="returnvalue">GdaSqlBuilderId</span></a>     <a class="link" href="GdaSqlBuilder.html#gda-sql-builder-select-add-target" title="gda_sql_builder_select_add_target ()">gda_sql_builder_select_add_target</a>   (<em class="parameter"><code><a class="link" href="GdaSqlBuilder.html" title="GdaSqlBuilder"><span class="type">GdaSqlBuilder</span></a> *builder</code></em>,
                                                         <em class="parameter"><code>const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *table_name</code></em>,
                                                         <em class="parameter"><code>const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *alias</code></em>);
<a class="link" href="GdaSqlBuilder.html#GdaSqlBuilderId" title="GdaSqlBuilderId"><span class="returnvalue">GdaSqlBuilderId</span></a>     <a class="link" href="GdaSqlBuilder.html#gda-sql-builder-select-add-target-id" title="gda_sql_builder_select_add_target_id ()">gda_sql_builder_select_add_target_id</a>
                                                        (<em class="parameter"><code><a class="link" href="GdaSqlBuilder.html" title="GdaSqlBuilder"><span class="type">GdaSqlBuilder</span></a> *builder</code></em>,
                                                         <em class="parameter"><code><a class="link" href="GdaSqlBuilder.html#GdaSqlBuilderId" title="GdaSqlBuilderId"><span class="type">GdaSqlBuilderId</span></a> table_id</code></em>,
                                                         <em class="parameter"><code>const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *alias</code></em>);
<a class="link" href="GdaSqlBuilder.html#GdaSqlBuilderId" title="GdaSqlBuilderId"><span class="returnvalue">GdaSqlBuilderId</span></a>     <a class="link" href="GdaSqlBuilder.html#gda-sql-builder-select-add-field" title="gda_sql_builder_select_add_field ()">gda_sql_builder_select_add_field</a>    (<em class="parameter"><code><a class="link" href="GdaSqlBuilder.html" title="GdaSqlBuilder"><span class="type">GdaSqlBuilder</span></a> *builder</code></em>,
                                                         <em class="parameter"><code>const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *field_name</code></em>,
                                                         <em class="parameter"><code>const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *table_name</code></em>,
                                                         <em class="parameter"><code>const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *alias</code></em>);
<a class="link" href="GdaSqlBuilder.html#GdaSqlBuilderId" title="GdaSqlBuilderId"><span class="returnvalue">GdaSqlBuilderId</span></a>     <a class="link" href="GdaSqlBuilder.html#gda-sql-builder-select-join-targets" title="gda_sql_builder_select_join_targets ()">gda_sql_builder_select_join_targets</a> (<em class="parameter"><code><a class="link" href="GdaSqlBuilder.html" title="GdaSqlBuilder"><span class="type">GdaSqlBuilder</span></a> *builder</code></em>,
                                                         <em class="parameter"><code><a class="link" href="GdaSqlBuilder.html#GdaSqlBuilderId" title="GdaSqlBuilderId"><span class="type">GdaSqlBuilderId</span></a> left_target_id</code></em>,
                                                         <em class="parameter"><code><a class="link" href="GdaSqlBuilder.html#GdaSqlBuilderId" title="GdaSqlBuilderId"><span class="type">GdaSqlBuilderId</span></a> right_target_id</code></em>,
                                                         <em class="parameter"><code><a class="link" href="libgda-4.0-GdaSqlStatement.html#GdaSqlSelectJoinType" title="enum GdaSqlSelectJoinType"><span class="type">GdaSqlSelectJoinType</span></a> join_type</code></em>,
                                                         <em class="parameter"><code><a class="link" href="GdaSqlBuilder.html#GdaSqlBuilderId" title="GdaSqlBuilderId"><span class="type">GdaSqlBuilderId</span></a> join_expr</code></em>);
<span class="returnvalue">void</span>                <a class="link" href="GdaSqlBuilder.html#gda-sql-builder-join-add-field" title="gda_sql_builder_join_add_field ()">gda_sql_builder_join_add_field</a>      (<em class="parameter"><code><a class="link" href="GdaSqlBuilder.html" title="GdaSqlBuilder"><span class="type">GdaSqlBuilder</span></a> *builder</code></em>,
                                                         <em class="parameter"><code><a class="link" href="GdaSqlBuilder.html#GdaSqlBuilderId" title="GdaSqlBuilderId"><span class="type">GdaSqlBuilderId</span></a> join_id</code></em>,
                                                         <em class="parameter"><code>const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *field_name</code></em>);
<span class="returnvalue">void</span>                <a class="link" href="GdaSqlBuilder.html#gda-sql-builder-select-order-by" title="gda_sql_builder_select_order_by ()">gda_sql_builder_select_order_by</a>     (<em class="parameter"><code><a class="link" href="GdaSqlBuilder.html" title="GdaSqlBuilder"><span class="type">GdaSqlBuilder</span></a> *builder</code></em>,
                                                         <em class="parameter"><code><a class="link" href="GdaSqlBuilder.html#GdaSqlBuilderId" title="GdaSqlBuilderId"><span class="type">GdaSqlBuilderId</span></a> expr_id</code></em>,
                                                         <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a> asc</code></em>,
                                                         <em class="parameter"><code>const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *collation_name</code></em>);
<span class="returnvalue">void</span>                <a class="link" href="GdaSqlBuilder.html#gda-sql-builder-select-set-distinct" title="gda_sql_builder_select_set_distinct ()">gda_sql_builder_select_set_distinct</a> (<em class="parameter"><code><a class="link" href="GdaSqlBuilder.html" title="GdaSqlBuilder"><span class="type">GdaSqlBuilder</span></a> *builder</code></em>,
                                                         <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a> distinct</code></em>,
                                                         <em class="parameter"><code><a class="link" href="GdaSqlBuilder.html#GdaSqlBuilderId" title="GdaSqlBuilderId"><span class="type">GdaSqlBuilderId</span></a> expr_id</code></em>);
<span class="returnvalue">void</span>                <a class="link" href="GdaSqlBuilder.html#gda-sql-builder-select-set-limit" title="gda_sql_builder_select_set_limit ()">gda_sql_builder_select_set_limit</a>    (<em class="parameter"><code><a class="link" href="GdaSqlBuilder.html" title="GdaSqlBuilder"><span class="type">GdaSqlBuilder</span></a> *builder</code></em>,
                                                         <em class="parameter"><code><a class="link" href="GdaSqlBuilder.html#GdaSqlBuilderId" title="GdaSqlBuilderId"><span class="type">GdaSqlBuilderId</span></a> limit_count_expr_id</code></em>,
                                                         <em class="parameter"><code><a class="link" href="GdaSqlBuilder.html#GdaSqlBuilderId" title="GdaSqlBuilderId"><span class="type">GdaSqlBuilderId</span></a> limit_offset_expr_id</code></em>);
<span class="returnvalue">void</span>                <a class="link" href="GdaSqlBuilder.html#gda-sql-builder-select-set-having" title="gda_sql_builder_select_set_having ()">gda_sql_builder_select_set_having</a>   (<em class="parameter"><code><a class="link" href="GdaSqlBuilder.html" title="GdaSqlBuilder"><span class="type">GdaSqlBuilder</span></a> *builder</code></em>,
                                                         <em class="parameter"><code><a class="link" href="GdaSqlBuilder.html#GdaSqlBuilderId" title="GdaSqlBuilderId"><span class="type">GdaSqlBuilderId</span></a> cond_id</code></em>);
<span class="returnvalue">void</span>                <a class="link" href="GdaSqlBuilder.html#gda-sql-builder-select-group-by" title="gda_sql_builder_select_group_by ()">gda_sql_builder_select_group_by</a>     (<em class="parameter"><code><a class="link" href="GdaSqlBuilder.html" title="GdaSqlBuilder"><span class="type">GdaSqlBuilder</span></a> *builder</code></em>,
                                                         <em class="parameter"><code><a class="link" href="GdaSqlBuilder.html#GdaSqlBuilderId" title="GdaSqlBuilderId"><span class="type">GdaSqlBuilderId</span></a> expr_id</code></em>);

<span class="returnvalue">void</span>                <a class="link" href="GdaSqlBuilder.html#gda-sql-builder-compound-add-sub-select" title="gda_sql_builder_compound_add_sub_select ()">gda_sql_builder_compound_add_sub_select</a>
                                                        (<em class="parameter"><code><a class="link" href="GdaSqlBuilder.html" title="GdaSqlBuilder"><span class="type">GdaSqlBuilder</span></a> *builder</code></em>,
                                                         <em class="parameter"><code><a class="link" href="libgda-4.0-GdaSqlStatement.html#GdaSqlStatement" title="GdaSqlStatement"><span class="type">GdaSqlStatement</span></a> *sqlst</code></em>);
<span class="returnvalue">void</span>                <a class="link" href="GdaSqlBuilder.html#gda-sql-builder-compound-set-type" title="gda_sql_builder_compound_set_type ()">gda_sql_builder_compound_set_type</a>   (<em class="parameter"><code><a class="link" href="GdaSqlBuilder.html" title="GdaSqlBuilder"><span class="type">GdaSqlBuilder</span></a> *builder</code></em>,
                                                         <em class="parameter"><code><a class="link" href="libgda-4.0-GdaSqlStatement.html#GdaSqlStatementCompoundType" title="enum GdaSqlStatementCompoundType"><span class="type">GdaSqlStatementCompoundType</span></a> compound_type</code></em>);

<a class="link" href="libgda-4.0-GdaSqlStatement.html#GdaSqlExpr" title="struct GdaSqlExpr"><span class="returnvalue">GdaSqlExpr</span></a> *        <a class="link" href="GdaSqlBuilder.html#gda-sql-builder-export-expression" title="gda_sql_builder_export_expression ()">gda_sql_builder_export_expression</a>   (<em class="parameter"><code><a class="link" href="GdaSqlBuilder.html" title="GdaSqlBuilder"><span class="type">GdaSqlBuilder</span></a> *builder</code></em>,
                                                         <em class="parameter"><code><a class="link" href="GdaSqlBuilder.html#GdaSqlBuilderId" title="GdaSqlBuilderId"><span class="type">GdaSqlBuilderId</span></a> id</code></em>);
<a class="link" href="GdaSqlBuilder.html#GdaSqlBuilderId" title="GdaSqlBuilderId"><span class="returnvalue">GdaSqlBuilderId</span></a>     <a class="link" href="GdaSqlBuilder.html#gda-sql-builder-import-expression" title="gda_sql_builder_import_expression ()">gda_sql_builder_import_expression</a>   (<em class="parameter"><code><a class="link" href="GdaSqlBuilder.html" title="GdaSqlBuilder"><span class="type">GdaSqlBuilder</span></a> *builder</code></em>,
                                                         <em class="parameter"><code><a class="link" href="libgda-4.0-GdaSqlStatement.html#GdaSqlExpr" title="struct GdaSqlExpr"><span class="type">GdaSqlExpr</span></a> *expr</code></em>);
</pre>
</div>
<div class="refsect1">
<a name="GdaSqlBuilder.object-hierarchy"></a><h2>Object Hierarchy</h2>
<pre class="synopsis">
  <a href="http://library.gnome.org/devel/gobject/unstable/gobject-The-Base-Object-Type.html#GObject">GObject</a>
   +----GdaSqlBuilder
</pre>
</div>
<div class="refsect1">
<a name="GdaSqlBuilder.properties"></a><h2>Properties</h2>
<pre class="synopsis">
  "<a class="link" href="GdaSqlBuilder.html#GdaSqlBuilder--stmt-type" title='The "stmt-type" property'>stmt-type</a>"                <a class="link" href="libgda-4.0-GdaSqlStatement.html#GdaSqlStatementType" title="enum GdaSqlStatementType"><span class="type">GdaSqlStatementType</span></a>   : Write / Construct Only
</pre>
</div>
<div class="refsect1">
<a name="GdaSqlBuilder.description"></a><h2>Description</h2>
<p>
  The <a class="link" href="GdaSqlBuilder.html" title="GdaSqlBuilder"><span class="type">GdaSqlBuilder</span></a> can be used to build a <a class="link" href="GdaStatement.html" title="GdaStatement"><span class="type">GdaStatement</span></a> from its structural description,
  much in the same way a <a class="link" href="GdaSqlParser.html" title="GdaSqlParser"><span class="type">GdaSqlParser</span></a> can be used to build a <a class="link" href="GdaStatement.html" title="GdaStatement"><span class="type">GdaStatement</span></a> from an SQL
  string.
</p>
<p>
  The <a class="link" href="GdaSqlBuilder.html" title="GdaSqlBuilder"><span class="type">GdaSqlBuilder</span></a> internally constructs a <a class="link" href="libgda-4.0-GdaSqlStatement.html#GdaSqlStatement" title="GdaSqlStatement"><span class="type">GdaSqlStatement</span></a> and uses it when requested to produce
  a <a class="link" href="GdaStatement.html" title="GdaStatement"><span class="type">GdaStatement</span></a> (see <a class="link" href="GdaSqlBuilder.html#gda-sql-builder-get-statement" title="gda_sql_builder_get_statement ()"><code class="function">gda_sql_builder_get_statement()</code></a>), or a <a class="link" href="libgda-4.0-GdaSqlStatement.html#GdaSqlStatement" title="GdaSqlStatement"><span class="type">GdaSqlStatement</span></a> (see
  <a class="link" href="GdaSqlBuilder.html#gda-sql-builder-get-sql-statement" title="gda_sql_builder_get_sql_statement ()"><code class="function">gda_sql_builder_get_sql_statement()</code></a>).
</p>
<p>
  During the building process, some pieces of the statement are constructed, and assembled into the
  final statement. Each of these pieces can be reused anytime in the same <a class="link" href="GdaSqlBuilder.html" title="GdaSqlBuilder"><span class="type">GdaSqlBuilder</span></a> object, and each
  is identified using a single unsigned integer ID. That ID is dynamically allocated by the object.
</p>
<p>
  The following example builds the equivalent of the "name='joe' AND age &gt;= ##ageparam::int" expression:
  </p>
<pre class="programlisting">
GdaSqlBuilder *b=...
guint id_field = gda_sql_builder_add_id (b, "name"); // build the "name" SQL identifier
guint id_value = gda_sql_builder_add_expr (b, NULL, G_TYPE_STRING, "joe"); // 'joe' expression
guint id_cond1 = gda_sql_builder_add_cond (b, GDA_SQL_OPERATOR_TYPE_EQ, id_field, id_value, 0); // "name='joe'"
guint id_cond2 = gda_sql_builder_add_cond (b, GDA_SQL_OPERATOR_TYPE_GT,
       gda_sql_builder_add_id (b, "age"), // build the "age" SQL identifier
       gda_sql_builder_add_param (b, "ageparam", G_TYPE_INT, FALSE), // parameter
       0);
guint id_cond_and = gda_sql_builder_add_cond (b, GDA_SQL_OPERATOR_TYPE_AND, id_cond1, id_cond2, 0); // whole expression
</pre>
<p>
</p>
<p>
  For more examples, see the <a class="link" href="howto-sqlbuilder.html" title="Build statements without using a parser">Build statements without using a parser</a> section.
</p>
</div>
<div class="refsect1">
<a name="GdaSqlBuilder.details"></a><h2>Details</h2>
<div class="refsect2">
<a name="GdaSqlBuilder-struct"></a><h3>struct GdaSqlBuilder</h3>
<pre class="programlisting">struct GdaSqlBuilder;</pre>
<p>
</p>
</div>
<hr>
<div class="refsect2">
<a name="GdaSqlBuilderId"></a><h3>GdaSqlBuilderId</h3>
<pre class="programlisting">typedef guint GdaSqlBuilderId;
</pre>
<p>
</p>
</div>
<hr>
<div class="refsect2">
<a name="gda-sql-builder-new"></a><h3>gda_sql_builder_new ()</h3>
<pre class="programlisting"><a class="link" href="GdaSqlBuilder.html" title="GdaSqlBuilder"><span class="returnvalue">GdaSqlBuilder</span></a> *     gda_sql_builder_new                 (<em class="parameter"><code><a class="link" href="libgda-4.0-GdaSqlStatement.html#GdaSqlStatementType" title="enum GdaSqlStatementType"><span class="type">GdaSqlStatementType</span></a> stmt_type</code></em>);</pre>
<p>
Create a new <a class="link" href="GdaSqlBuilder.html" title="GdaSqlBuilder"><span class="type">GdaSqlBuilder</span></a> object to build <a class="link" href="GdaStatement.html" title="GdaStatement"><span class="type">GdaStatement</span></a> or <a class="link" href="libgda-4.0-GdaSqlStatement.html#GdaSqlStatement" title="GdaSqlStatement"><span class="type">GdaSqlStatement</span></a>
objects of type <em class="parameter"><code>stmt_type</code></em>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>stmt_type</code></em> :</span></p></td>
<td>the type of statement to build</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>the newly created object, or <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> if an error occurred (such as unsupported
statement type). <span class="annotation">[<a href="http://foldoc.org/transfer%20full"><span class="acronym">transfer full</span></a>]</span>
</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 4.2</p>
</div>
<hr>
<div class="refsect2">
<a name="gda-sql-builder-get-statement"></a><h3>gda_sql_builder_get_statement ()</h3>
<pre class="programlisting"><a class="link" href="GdaStatement.html" title="GdaStatement"><span class="returnvalue">GdaStatement</span></a> *      gda_sql_builder_get_statement       (<em class="parameter"><code><a class="link" href="GdaSqlBuilder.html" title="GdaSqlBuilder"><span class="type">GdaSqlBuilder</span></a> *builder</code></em>,
                                                         <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> **error</code></em>);</pre>
<p>
Creates a new <a class="link" href="GdaStatement.html" title="GdaStatement"><span class="type">GdaStatement</span></a> statement from <em class="parameter"><code>builder</code></em>'s contents.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>builder</code></em> :</span></p></td>
<td>a <a class="link" href="GdaSqlBuilder.html" title="GdaSqlBuilder"><span class="type">GdaSqlBuilder</span></a> object</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>error</code></em> :</span></p></td>
<td>a place to store errors, or <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>. <span class="annotation">[<a href="http://foldoc.org/allow-none"><span class="acronym">allow-none</span></a>]</span>
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>a new <a class="link" href="GdaStatement.html" title="GdaStatement"><span class="type">GdaStatement</span></a> object, or <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> if an error occurred. <span class="annotation">[<a href="http://foldoc.org/transfer%20full"><span class="acronym">transfer full</span></a>]</span>
</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 4.2</p>
</div>
<hr>
<div class="refsect2">
<a name="gda-sql-builder-get-sql-statement"></a><h3>gda_sql_builder_get_sql_statement ()</h3>
<pre class="programlisting"><a class="link" href="libgda-4.0-GdaSqlStatement.html#GdaSqlStatement" title="GdaSqlStatement"><span class="returnvalue">GdaSqlStatement</span></a> *   gda_sql_builder_get_sql_statement   (<em class="parameter"><code><a class="link" href="GdaSqlBuilder.html" title="GdaSqlBuilder"><span class="type">GdaSqlBuilder</span></a> *builder</code></em>);</pre>
<p>
Creates a new <a class="link" href="libgda-4.0-GdaSqlStatement.html#GdaSqlStatement" title="GdaSqlStatement"><span class="type">GdaSqlStatement</span></a> structure from <em class="parameter"><code>builder</code></em>'s contents.
</p>
<p>
The returned pointer belongs to <em class="parameter"><code>builder</code></em>'s internal representation.
Use <a class="link" href="libgda-4.0-GdaSqlStatement.html#gda-sql-statement-copy" title="gda_sql_statement_copy ()"><code class="function">gda_sql_statement_copy()</code></a> if you need to keep it.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>builder</code></em> :</span></p></td>
<td>a <a class="link" href="GdaSqlBuilder.html" title="GdaSqlBuilder"><span class="type">GdaSqlBuilder</span></a> object</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>a <a class="link" href="libgda-4.0-GdaSqlStatement.html#GdaSqlStatement" title="GdaSqlStatement"><span class="type">GdaSqlStatement</span></a> pointer. <span class="annotation">[<a href="http://foldoc.org/transfer%20none"><span class="acronym">transfer none</span></a>][<a href="http://foldoc.org/allow-none"><span class="acronym">allow-none</span></a>]</span>
</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 4.2</p>
</div>
<hr>
<div class="refsect2">
<a name="gda-sql-builder-set-table"></a><h3>gda_sql_builder_set_table ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>                gda_sql_builder_set_table           (<em class="parameter"><code><a class="link" href="GdaSqlBuilder.html" title="GdaSqlBuilder"><span class="type">GdaSqlBuilder</span></a> *builder</code></em>,
                                                         <em class="parameter"><code>const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *table_name</code></em>);</pre>
<p>
Valid only for: INSERT, UPDATE, DELETE statements
</p>
<p>
Sets the name of the table on which the built statement operates.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>builder</code></em> :</span></p></td>
<td>a <a class="link" href="GdaSqlBuilder.html" title="GdaSqlBuilder"><span class="type">GdaSqlBuilder</span></a> object</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>table_name</code></em> :</span></p></td>
<td>a table name</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 4.2</p>
</div>
<hr>
<div class="refsect2">
<a name="gda-sql-builder-add-field-value"></a><h3>gda_sql_builder_add_field_value ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>                gda_sql_builder_add_field_value     (<em class="parameter"><code><a class="link" href="GdaSqlBuilder.html" title="GdaSqlBuilder"><span class="type">GdaSqlBuilder</span></a> *builder</code></em>,
                                                         <em class="parameter"><code>const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *field_name</code></em>,
                                                         <em class="parameter"><code><a href="http://library.gnome.org/devel/gobject/unstable/gobject-Type-Information.html#GType"><span class="type">GType</span></a> type</code></em>,
                                                         <em class="parameter"><code>...</code></em>);</pre>
<p>
Valid only for: INSERT, UPDATE statements.
</p>
<p>
Specifies that the field represented by <em class="parameter"><code>field_name</code></em> will be set to the value identified
by @... of type <em class="parameter"><code>type</code></em>. See <a class="link" href="GdaSqlBuilder.html#gda-sql-builder-add-expr" title="gda_sql_builder_add_expr ()"><code class="function">gda_sql_builder_add_expr()</code></a> for more information.
</p>
<p>
This is a C convenience function. See also <a class="link" href="GdaSqlBuilder.html#gda-sql-builder-add-field-value-as-gvalue" title="gda_sql_builder_add_field_value_as_gvalue ()"><code class="function">gda_sql_builder_add_field_value_as_gvalue()</code></a>.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>builder</code></em> :</span></p></td>
<td>a <a class="link" href="GdaSqlBuilder.html" title="GdaSqlBuilder"><span class="type">GdaSqlBuilder</span></a> object</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>field_name</code></em> :</span></p></td>
<td>a field name</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>type</code></em> :</span></p></td>
<td>the GType of the following argument</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>...</code></em> :</span></p></td>
<td>value to set the field to, of the type specified by <em class="parameter"><code>type</code></em>
</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 4.2</p>
</div>
<hr>
<div class="refsect2">
<a name="gda-sql-builder-add-field-value-as-gvalue"></a><h3>gda_sql_builder_add_field_value_as_gvalue ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>                gda_sql_builder_add_field_value_as_gvalue
                                                        (<em class="parameter"><code><a class="link" href="GdaSqlBuilder.html" title="GdaSqlBuilder"><span class="type">GdaSqlBuilder</span></a> *builder</code></em>,
                                                         <em class="parameter"><code>const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *field_name</code></em>,
                                                         <em class="parameter"><code>const <a href="http://library.gnome.org/devel/gobject/unstable/gobject-Generic-values.html#GValue"><span class="type">GValue</span></a> *value</code></em>);</pre>
<p>
Valid only for: INSERT, UPDATE statements.
</p>
<p>
Specifies that the field represented by <em class="parameter"><code>field_name</code></em> will be set to the value identified
by <em class="parameter"><code>value</code></em>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>builder</code></em> :</span></p></td>
<td>a <a class="link" href="GdaSqlBuilder.html" title="GdaSqlBuilder"><span class="type">GdaSqlBuilder</span></a> object</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>field_name</code></em> :</span></p></td>
<td>a field name</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>value</code></em> :</span></p></td>
<td>value to set the field to, or <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> or a GDA_TYPE_NULL value to represent an SQL NULL</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 4.2</p>
</div>
<hr>
<div class="refsect2">
<a name="gda-sql-builder-add-field-value-id"></a><h3>gda_sql_builder_add_field_value_id ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>                gda_sql_builder_add_field_value_id  (<em class="parameter"><code><a class="link" href="GdaSqlBuilder.html" title="GdaSqlBuilder"><span class="type">GdaSqlBuilder</span></a> *builder</code></em>,
                                                         <em class="parameter"><code><a class="link" href="GdaSqlBuilder.html#GdaSqlBuilderId" title="GdaSqlBuilderId"><span class="type">GdaSqlBuilderId</span></a> field_id</code></em>,
                                                         <em class="parameter"><code><a class="link" href="GdaSqlBuilder.html#GdaSqlBuilderId" title="GdaSqlBuilderId"><span class="type">GdaSqlBuilderId</span></a> value_id</code></em>);</pre>
<p>
Valid only for: INSERT, UPDATE, SELECT statements
</p>
<div class="itemizedlist"><ul class="itemizedlist" type="disc">
<li class="listitem"><p>For UPDATE: specifies that the field represented by <em class="parameter"><code>field_id</code></em> will be set to the value identified
   by <em class="parameter"><code>value_id</code></em>.</p></li>
<li class="listitem"><p>For SELECT: add a selected item to the statement, and if <em class="parameter"><code>value_id</code></em> is not <code class="literal">0</code>, then use it as an
   alias</p></li>
<li class="listitem"><p>For INSERT: if <em class="parameter"><code>field_id</code></em> represents an SQL identifier (obtained using <a class="link" href="GdaSqlBuilder.html#gda-sql-builder-add-id" title="gda_sql_builder_add_id ()"><code class="function">gda_sql_builder_add_id()</code></a>): then if
   <em class="parameter"><code>value_id</code></em> is not <code class="literal">0</code> then specifies that the field represented by <em class="parameter"><code>field_id</code></em> will be set to the
   value identified by <em class="parameter"><code>value_id</code></em>, otherwise just specifies a named field to be given a value.
   If <em class="parameter"><code>field_id</code></em> represents a sub SELECT (obtained using <a class="link" href="GdaSqlBuilder.html#gda-sql-builder-add-sub-select" title="gda_sql_builder_add_sub_select ()"><code class="function">gda_sql_builder_add_sub_select()</code></a>), then
   this method call defines the sub SELECT from which values to insert are taken.</p></li>
</ul></div>
<p>
</p>
<p>
See also <a class="link" href="GdaSqlBuilder.html#gda-sql-builder-add-field-value" title="gda_sql_builder_add_field_value ()"><code class="function">gda_sql_builder_add_field_value()</code></a> and <a class="link" href="GdaSqlBuilder.html#gda-sql-builder-add-field-value-as-gvalue" title="gda_sql_builder_add_field_value_as_gvalue ()"><code class="function">gda_sql_builder_add_field_value_as_gvalue()</code></a>.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>builder</code></em> :</span></p></td>
<td>a <a class="link" href="GdaSqlBuilder.html" title="GdaSqlBuilder"><span class="type">GdaSqlBuilder</span></a> object</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>field_id</code></em> :</span></p></td>
<td>the ID of the field's name or definition</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>value_id</code></em> :</span></p></td>
<td>the ID of the value to set the field to, or <code class="literal">0</code>
</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 4.2</p>
</div>
<hr>
<div class="refsect2">
<a name="gda-sql-builder-add-function"></a><h3>gda_sql_builder_add_function ()</h3>
<pre class="programlisting"><a class="link" href="GdaSqlBuilder.html#GdaSqlBuilderId" title="GdaSqlBuilderId"><span class="returnvalue">GdaSqlBuilderId</span></a>     gda_sql_builder_add_function        (<em class="parameter"><code><a class="link" href="GdaSqlBuilder.html" title="GdaSqlBuilder"><span class="type">GdaSqlBuilder</span></a> *builder</code></em>,
                                                         <em class="parameter"><code>const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *func_name</code></em>,
                                                         <em class="parameter"><code>...</code></em>);</pre>
<p>
Builds a new expression which represents a function applied to some arguments
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>builder</code></em> :</span></p></td>
<td>a <a class="link" href="GdaSqlBuilder.html" title="GdaSqlBuilder"><span class="type">GdaSqlBuilder</span></a> object</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>func_name</code></em> :</span></p></td>
<td>the functions's name</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>...</code></em> :</span></p></td>
<td>a list, terminated with <code class="literal">0</code>, of each function's argument's ID</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>the ID of the new expression, or <code class="literal">0</code> if there was an error</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 4.2</p>
</div>
<hr>
<div class="refsect2">
<a name="gda-sql-builder-add-function-v"></a><h3>gda_sql_builder_add_function_v ()</h3>
<pre class="programlisting"><a class="link" href="GdaSqlBuilder.html#GdaSqlBuilderId" title="GdaSqlBuilderId"><span class="returnvalue">GdaSqlBuilderId</span></a>     gda_sql_builder_add_function_v      (<em class="parameter"><code><a class="link" href="GdaSqlBuilder.html" title="GdaSqlBuilder"><span class="type">GdaSqlBuilder</span></a> *builder</code></em>,
                                                         <em class="parameter"><code>const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *func_name</code></em>,
                                                         <em class="parameter"><code>const <a class="link" href="GdaSqlBuilder.html#GdaSqlBuilderId" title="GdaSqlBuilderId"><span class="type">GdaSqlBuilderId</span></a> *args</code></em>,
                                                         <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gint"><span class="type">gint</span></a> args_size</code></em>);</pre>
<p>
Builds a new expression which represents a function applied to some arguments
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>builder</code></em> :</span></p></td>
<td>a <a class="link" href="GdaSqlBuilder.html" title="GdaSqlBuilder"><span class="type">GdaSqlBuilder</span></a> object</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>func_name</code></em> :</span></p></td>
<td>the functions's name</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>args</code></em> :</span></p></td>
<td>an array of IDs representing the function's arguments. <span class="annotation">[<a href="http://foldoc.org/array"><span class="acronym">array</span></a> length=args_size]</span>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>args_size</code></em> :</span></p></td>
<td>
<em class="parameter"><code>args</code></em>'s size</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>the ID of the new expression, or <code class="literal">0</code> if there was an error</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 4.2</p>
</div>
<hr>
<div class="refsect2">
<a name="gda-sql-builder-add-id"></a><h3>gda_sql_builder_add_id ()</h3>
<pre class="programlisting"><a class="link" href="GdaSqlBuilder.html#GdaSqlBuilderId" title="GdaSqlBuilderId"><span class="returnvalue">GdaSqlBuilderId</span></a>     gda_sql_builder_add_id              (<em class="parameter"><code><a class="link" href="GdaSqlBuilder.html" title="GdaSqlBuilder"><span class="type">GdaSqlBuilder</span></a> *builder</code></em>,
                                                         <em class="parameter"><code>const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *string</code></em>);</pre>
<p>
Defines an expression representing an identifier in <em class="parameter"><code>builder</code></em>,
which may be reused to build other parts of a statement,
for instance as a parameter to <a class="link" href="GdaSqlBuilder.html#gda-sql-builder-add-cond" title="gda_sql_builder_add_cond ()"><code class="function">gda_sql_builder_add_cond()</code></a> or
<a class="link" href="GdaSqlBuilder.html#gda-sql-builder-add-field-value-id" title="gda_sql_builder_add_field_value_id ()"><code class="function">gda_sql_builder_add_field_value_id()</code></a>.
</p>
<p>
The new expression will contain the <em class="parameter"><code>string</code></em> literal.
For example:
</p>
<pre class="programlisting">
gda_sql_builder_add_id (b, "name")
gda_sql_builder_add_id (b, "date")
</pre>
<p>
</p>
<p>
will be rendered as SQL as:
</p>
<pre class="programlisting">
name
"date"
</pre>
<p>
</p>
<p>
because "date" is an SQL reserved keyword.
</p>
<p>
For fields, see <a class="link" href="GdaSqlBuilder.html#gda-sql-builder-add-field-id" title="gda_sql_builder_add_field_id ()"><code class="function">gda_sql_builder_add_field_id()</code></a>.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>builder</code></em> :</span></p></td>
<td>a <a class="link" href="GdaSqlBuilder.html" title="GdaSqlBuilder"><span class="type">GdaSqlBuilder</span></a> object</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>string</code></em> :</span></p></td>
<td>a string</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>the ID of the new expression, or <code class="literal">0</code> if there was an error</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 4.2</p>
</div>
<hr>
<div class="refsect2">
<a name="gda-sql-builder-add-field-id"></a><h3>gda_sql_builder_add_field_id ()</h3>
<pre class="programlisting"><a class="link" href="GdaSqlBuilder.html#GdaSqlBuilderId" title="GdaSqlBuilderId"><span class="returnvalue">GdaSqlBuilderId</span></a>     gda_sql_builder_add_field_id        (<em class="parameter"><code><a class="link" href="GdaSqlBuilder.html" title="GdaSqlBuilder"><span class="type">GdaSqlBuilder</span></a> *builder</code></em>,
                                                         <em class="parameter"><code>const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *field_name</code></em>,
                                                         <em class="parameter"><code>const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *table_name</code></em>);</pre>
<p>
Defines an expression representing a field in <em class="parameter"><code>builder</code></em>,
which may be reused to build other parts of a statement,
for instance as a parameter to <a class="link" href="GdaSqlBuilder.html#gda-sql-builder-add-cond" title="gda_sql_builder_add_cond ()"><code class="function">gda_sql_builder_add_cond()</code></a> or
<a class="link" href="GdaSqlBuilder.html#gda-sql-builder-add-field-value-id" title="gda_sql_builder_add_field_value_id ()"><code class="function">gda_sql_builder_add_field_value_id()</code></a>.
</p>
<p>
Calling this with a <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> <em class="parameter"><code>table_name</code></em> is equivalent to calling <a class="link" href="GdaSqlBuilder.html#gda-sql-builder-add-id" title="gda_sql_builder_add_id ()"><code class="function">gda_sql_builder_add_id()</code></a>.
</p>
<p>
For SELECT queries, see <a class="link" href="GdaSqlBuilder.html#gda-sql-builder-select-add-field" title="gda_sql_builder_select_add_field ()"><code class="function">gda_sql_builder_select_add_field()</code></a>.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>builder</code></em> :</span></p></td>
<td>a <a class="link" href="GdaSqlBuilder.html" title="GdaSqlBuilder"><span class="type">GdaSqlBuilder</span></a> object</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>field_name</code></em> :</span></p></td>
<td>a field name</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>table_name</code></em> :</span></p></td>
<td>a table name, or <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>. <span class="annotation">[<a href="http://foldoc.org/allow-none"><span class="acronym">allow-none</span></a>]</span>
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>the ID of the new expression, or <code class="literal">0</code> if there was an error</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 4.2</p>
</div>
<hr>
<div class="refsect2">
<a name="gda-sql-builder-add-expr"></a><h3>gda_sql_builder_add_expr ()</h3>
<pre class="programlisting"><a class="link" href="GdaSqlBuilder.html#GdaSqlBuilderId" title="GdaSqlBuilderId"><span class="returnvalue">GdaSqlBuilderId</span></a>     gda_sql_builder_add_expr            (<em class="parameter"><code><a class="link" href="GdaSqlBuilder.html" title="GdaSqlBuilder"><span class="type">GdaSqlBuilder</span></a> *builder</code></em>,
                                                         <em class="parameter"><code><a class="link" href="libgda-4.0-Default-Data-handlers.html#GdaDataHandler"><span class="type">GdaDataHandler</span></a> *dh</code></em>,
                                                         <em class="parameter"><code><a href="http://library.gnome.org/devel/gobject/unstable/gobject-Type-Information.html#GType"><span class="type">GType</span></a> type</code></em>,
                                                         <em class="parameter"><code>...</code></em>);</pre>
<p>
Defines an expression in <em class="parameter"><code>builder</code></em> which may be reused to build other parts of a statement.
</p>
<p>
The new expression will contain the value passed as the @... argument. It is possible to
customize how the value has to be interpreted by passing a specific <a class="link" href="libgda-4.0-Default-Data-handlers.html#GdaDataHandler"><span class="type">GdaDataHandler</span></a> object as <em class="parameter"><code>dh</code></em>.
</p>
<p>
Note that for composite types such as <a class="link" href="libgda-4.0-Gda-Value.html#GdaNumeric"><span class="type">GdaNumeric</span></a>, <span class="type">Gdate</span>, <a class="link" href="libgda-4.0-Gda-Value.html#GdaTime"><span class="type">GdaTime</span></a>, ... pointer to these
structures are expected, they should no be passed by value. For example:
</p>
<pre class="programlisting">GDate *date = g_date_new_dmy (27, G_DATE_MAY, 1972);
id = gda_sql_builder_add_expr (b, NULL, G_TYPE_DATE, date);
g_date_free (date);

id = gda_sql_builder_add_expr (b, NULL, G_TYPE_STRING, "my string");
id = gda_sql_builder_add_expr (b, NULL, G_TYPE_INT, 25);
</pre>
<p>
</p>
<p>
will correspond in SQL to:
</p>
<pre class="programlisting">
'05-27-1972'
'my string'
25
</pre>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>builder</code></em> :</span></p></td>
<td>a <a class="link" href="GdaSqlBuilder.html" title="GdaSqlBuilder"><span class="type">GdaSqlBuilder</span></a> object</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>dh</code></em> :</span></p></td>
<td>a <a class="link" href="libgda-4.0-Default-Data-handlers.html#GdaDataHandler"><span class="type">GdaDataHandler</span></a> to use, or <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>type</code></em> :</span></p></td>
<td>the GType of the following argument</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>...</code></em> :</span></p></td>
<td>value to set the expression to, of the type specified by <em class="parameter"><code>type</code></em>
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>the ID of the new expression, or <code class="literal">0</code> if there was an error</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 4.2</p>
</div>
<hr>
<div class="refsect2">
<a name="gda-sql-builder-add-expr-value"></a><h3>gda_sql_builder_add_expr_value ()</h3>
<pre class="programlisting"><a class="link" href="GdaSqlBuilder.html#GdaSqlBuilderId" title="GdaSqlBuilderId"><span class="returnvalue">GdaSqlBuilderId</span></a>     gda_sql_builder_add_expr_value      (<em class="parameter"><code><a class="link" href="GdaSqlBuilder.html" title="GdaSqlBuilder"><span class="type">GdaSqlBuilder</span></a> *builder</code></em>,
                                                         <em class="parameter"><code><a class="link" href="libgda-4.0-Default-Data-handlers.html#GdaDataHandler"><span class="type">GdaDataHandler</span></a> *dh</code></em>,
                                                         <em class="parameter"><code>const <a href="http://library.gnome.org/devel/gobject/unstable/gobject-Generic-values.html#GValue"><span class="type">GValue</span></a> *value</code></em>);</pre>
<p>
Defines an expression in <em class="parameter"><code>builder</code></em> which may be reused to build other parts of a statement.
</p>
<p>
The new expression will contain the value passed as the <em class="parameter"><code>value</code></em> argument. It is possible to
customize how the value has to be interpreted by passing a specific <a class="link" href="libgda-4.0-Default-Data-handlers.html#GdaDataHandler"><span class="type">GdaDataHandler</span></a> object as <em class="parameter"><code>dh</code></em>.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>builder</code></em> :</span></p></td>
<td>a <a class="link" href="GdaSqlBuilder.html" title="GdaSqlBuilder"><span class="type">GdaSqlBuilder</span></a> object</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>dh</code></em> :</span></p></td>
<td>a <a class="link" href="libgda-4.0-Default-Data-handlers.html#GdaDataHandler"><span class="type">GdaDataHandler</span></a> to use, or <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>value</code></em> :</span></p></td>
<td>value to set the expression to, or <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> or a GDA_TYPE_NULL value to represent an SQL NULL</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>the ID of the new expression, or <code class="literal">0</code> if there was an error</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 4.2</p>
</div>
<hr>
<div class="refsect2">
<a name="gda-sql-builder-add-param"></a><h3>gda_sql_builder_add_param ()</h3>
<pre class="programlisting"><a class="link" href="GdaSqlBuilder.html#GdaSqlBuilderId" title="GdaSqlBuilderId"><span class="returnvalue">GdaSqlBuilderId</span></a>     gda_sql_builder_add_param           (<em class="parameter"><code><a class="link" href="GdaSqlBuilder.html" title="GdaSqlBuilder"><span class="type">GdaSqlBuilder</span></a> *builder</code></em>,
                                                         <em class="parameter"><code>const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *param_name</code></em>,
                                                         <em class="parameter"><code><a href="http://library.gnome.org/devel/gobject/unstable/gobject-Type-Information.html#GType"><span class="type">GType</span></a> type</code></em>,
                                                         <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a> nullok</code></em>);</pre>
<p>
Defines a parameter in <em class="parameter"><code>builder</code></em> which may be reused to build other parts of a statement.
</p>
<p>
The new expression will contain the <em class="parameter"><code>string</code></em> literal.
For example:
</p>
<pre class="programlisting">
gda_sql_builder_add_param (b, "age", G_TYPE_INT, FALSE)
</pre>
<p>
</p>
<p>
will be rendered as SQL as:
</p>
<pre class="programlisting">
##age::int

</pre>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>builder</code></em> :</span></p></td>
<td>a <a class="link" href="GdaSqlBuilder.html" title="GdaSqlBuilder"><span class="type">GdaSqlBuilder</span></a> object</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>param_name</code></em> :</span></p></td>
<td>parameter's name</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>type</code></em> :</span></p></td>
<td>parameter's type</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>nullok</code></em> :</span></p></td>
<td>TRUE if the parameter can be set to <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>the ID of the new expression, or <code class="literal">0</code> if there was an error</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 4.2</p>
</div>
<hr>
<div class="refsect2">
<a name="gda-sql-builder-add-case"></a><h3>gda_sql_builder_add_case ()</h3>
<pre class="programlisting"><a class="link" href="GdaSqlBuilder.html#GdaSqlBuilderId" title="GdaSqlBuilderId"><span class="returnvalue">GdaSqlBuilderId</span></a>     gda_sql_builder_add_case            (<em class="parameter"><code><a class="link" href="GdaSqlBuilder.html" title="GdaSqlBuilder"><span class="type">GdaSqlBuilder</span></a> *builder</code></em>,
                                                         <em class="parameter"><code><a class="link" href="GdaSqlBuilder.html#GdaSqlBuilderId" title="GdaSqlBuilderId"><span class="type">GdaSqlBuilderId</span></a> test_expr</code></em>,
                                                         <em class="parameter"><code><a class="link" href="GdaSqlBuilder.html#GdaSqlBuilderId" title="GdaSqlBuilderId"><span class="type">GdaSqlBuilderId</span></a> else_expr</code></em>,
                                                         <em class="parameter"><code>...</code></em>);</pre>
<p>
Creates a new CASE ... WHEN ... THEN ... ELSE ... END expression.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>builder</code></em> :</span></p></td>
<td>a <a class="link" href="GdaSqlBuilder.html" title="GdaSqlBuilder"><span class="type">GdaSqlBuilder</span></a> object</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>test_expr</code></em> :</span></p></td>
<td>the expression ID representing the test of the CASE, or <code class="literal">0</code>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>else_expr</code></em> :</span></p></td>
<td>the expression ID representing the ELSE expression, or <code class="literal">0</code>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>...</code></em> :</span></p></td>
<td>a list, terminated by a <code class="literal">0</code>, of (WHEN expression ID, THEN expression ID) representing
all the test cases</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>the ID of the new expression, or <code class="literal">0</code> if there was an error</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 4.2</p>
</div>
<hr>
<div class="refsect2">
<a name="gda-sql-builder-add-case-v"></a><h3>gda_sql_builder_add_case_v ()</h3>
<pre class="programlisting"><a class="link" href="GdaSqlBuilder.html#GdaSqlBuilderId" title="GdaSqlBuilderId"><span class="returnvalue">GdaSqlBuilderId</span></a>     gda_sql_builder_add_case_v          (<em class="parameter"><code><a class="link" href="GdaSqlBuilder.html" title="GdaSqlBuilder"><span class="type">GdaSqlBuilder</span></a> *builder</code></em>,
                                                         <em class="parameter"><code><a class="link" href="GdaSqlBuilder.html#GdaSqlBuilderId" title="GdaSqlBuilderId"><span class="type">GdaSqlBuilderId</span></a> test_expr</code></em>,
                                                         <em class="parameter"><code><a class="link" href="GdaSqlBuilder.html#GdaSqlBuilderId" title="GdaSqlBuilderId"><span class="type">GdaSqlBuilderId</span></a> else_expr</code></em>,
                                                         <em class="parameter"><code>const <a class="link" href="GdaSqlBuilder.html#GdaSqlBuilderId" title="GdaSqlBuilderId"><span class="type">GdaSqlBuilderId</span></a> *when_array</code></em>,
                                                         <em class="parameter"><code>const <a class="link" href="GdaSqlBuilder.html#GdaSqlBuilderId" title="GdaSqlBuilderId"><span class="type">GdaSqlBuilderId</span></a> *then_array</code></em>,
                                                         <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gint"><span class="type">gint</span></a> args_size</code></em>);</pre>
<p>
Creates a new CASE ... WHEN ... THEN ... ELSE ... END expression. The WHEN expression and the THEN
expression IDs are taken from the <em class="parameter"><code>when_array</code></em> and <em class="parameter"><code>then_array</code></em> at the same index, for each index inferior to
<em class="parameter"><code>args_size</code></em>.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>builder</code></em> :</span></p></td>
<td>a <a class="link" href="GdaSqlBuilder.html" title="GdaSqlBuilder"><span class="type">GdaSqlBuilder</span></a> object</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>test_expr</code></em> :</span></p></td>
<td>the expression ID representing the test of the CASE, or <code class="literal">0</code>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>else_expr</code></em> :</span></p></td>
<td>the expression ID representing the ELSE expression, or <code class="literal">0</code>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>when_array</code></em> :</span></p></td>
<td>an array containing each WHEN expression ID, having at least <em class="parameter"><code>args_size</code></em> elements. <span class="annotation">[<a href="http://foldoc.org/array"><span class="acronym">array</span></a> length=args_size]</span>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>then_array</code></em> :</span></p></td>
<td>an array containing each THEN expression ID, having at least <em class="parameter"><code>args_size</code></em> elements. <span class="annotation">[<a href="http://foldoc.org/array"><span class="acronym">array</span></a> length=args_size]</span>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>args_size</code></em> :</span></p></td>
<td>the size of <em class="parameter"><code>when_array</code></em> and <em class="parameter"><code>then_array</code></em>
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>the ID of the new expression, or <code class="literal">0</code> if there was an error</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 4.2</p>
</div>
<hr>
<div class="refsect2">
<a name="gda-sql-builder-add-sub-select"></a><h3>gda_sql_builder_add_sub_select ()</h3>
<pre class="programlisting"><a class="link" href="GdaSqlBuilder.html#GdaSqlBuilderId" title="GdaSqlBuilderId"><span class="returnvalue">GdaSqlBuilderId</span></a>     gda_sql_builder_add_sub_select      (<em class="parameter"><code><a class="link" href="GdaSqlBuilder.html" title="GdaSqlBuilder"><span class="type">GdaSqlBuilder</span></a> *builder</code></em>,
                                                         <em class="parameter"><code><a class="link" href="libgda-4.0-GdaSqlStatement.html#GdaSqlStatement" title="GdaSqlStatement"><span class="type">GdaSqlStatement</span></a> *sqlst</code></em>);</pre>
<p>
Adds an expression which is a subselect.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>builder</code></em> :</span></p></td>
<td>a <a class="link" href="GdaSqlBuilder.html" title="GdaSqlBuilder"><span class="type">GdaSqlBuilder</span></a> object</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>sqlst</code></em> :</span></p></td>
<td>a pointer to a <a class="link" href="libgda-4.0-GdaSqlStatement.html#GdaSqlStatement" title="GdaSqlStatement"><span class="type">GdaSqlStatement</span></a>, which has to be a SELECT or compound SELECT. This will be copied.</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>the ID of the new expression, or <code class="literal">0</code> if there was an error</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 4.2</p>
</div>
<hr>
<div class="refsect2">
<a name="gda-sql-builder-add-cond"></a><h3>gda_sql_builder_add_cond ()</h3>
<pre class="programlisting"><a class="link" href="GdaSqlBuilder.html#GdaSqlBuilderId" title="GdaSqlBuilderId"><span class="returnvalue">GdaSqlBuilderId</span></a>     gda_sql_builder_add_cond            (<em class="parameter"><code><a class="link" href="GdaSqlBuilder.html" title="GdaSqlBuilder"><span class="type">GdaSqlBuilder</span></a> *builder</code></em>,
                                                         <em class="parameter"><code><a class="link" href="libgda-4.0-GdaSqlStatement.html#GdaSqlOperatorType" title="enum GdaSqlOperatorType"><span class="type">GdaSqlOperatorType</span></a> op</code></em>,
                                                         <em class="parameter"><code><a class="link" href="GdaSqlBuilder.html#GdaSqlBuilderId" title="GdaSqlBuilderId"><span class="type">GdaSqlBuilderId</span></a> op1</code></em>,
                                                         <em class="parameter"><code><a class="link" href="GdaSqlBuilder.html#GdaSqlBuilderId" title="GdaSqlBuilderId"><span class="type">GdaSqlBuilderId</span></a> op2</code></em>,
                                                         <em class="parameter"><code><a class="link" href="GdaSqlBuilder.html#GdaSqlBuilderId" title="GdaSqlBuilderId"><span class="type">GdaSqlBuilderId</span></a> op3</code></em>);</pre>
<p>
Builds a new expression which represents a condition (or operation).
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>builder</code></em> :</span></p></td>
<td>a <a class="link" href="GdaSqlBuilder.html" title="GdaSqlBuilder"><span class="type">GdaSqlBuilder</span></a> object</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>op</code></em> :</span></p></td>
<td>type of condition</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>op1</code></em> :</span></p></td>
<td>the ID of the 1st argument (not 0)</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>op2</code></em> :</span></p></td>
<td>the ID of the 2nd argument (may be <code class="literal">0</code> if <em class="parameter"><code>op</code></em> needs only one operand)</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>op3</code></em> :</span></p></td>
<td>the ID of the 3rd argument (may be <code class="literal">0</code> if <em class="parameter"><code>op</code></em> needs only one or two operand)</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>the ID of the new expression, or <code class="literal">0</code> if there was an error</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 4.2</p>
</div>
<hr>
<div class="refsect2">
<a name="gda-sql-builder-add-cond-v"></a><h3>gda_sql_builder_add_cond_v ()</h3>
<pre class="programlisting"><a class="link" href="GdaSqlBuilder.html#GdaSqlBuilderId" title="GdaSqlBuilderId"><span class="returnvalue">GdaSqlBuilderId</span></a>     gda_sql_builder_add_cond_v          (<em class="parameter"><code><a class="link" href="GdaSqlBuilder.html" title="GdaSqlBuilder"><span class="type">GdaSqlBuilder</span></a> *builder</code></em>,
                                                         <em class="parameter"><code><a class="link" href="libgda-4.0-GdaSqlStatement.html#GdaSqlOperatorType" title="enum GdaSqlOperatorType"><span class="type">GdaSqlOperatorType</span></a> op</code></em>,
                                                         <em class="parameter"><code>const <a class="link" href="GdaSqlBuilder.html#GdaSqlBuilderId" title="GdaSqlBuilderId"><span class="type">GdaSqlBuilderId</span></a> *op_ids</code></em>,
                                                         <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gint"><span class="type">gint</span></a> op_ids_size</code></em>);</pre>
<p>
Builds a new expression which represents a condition (or operation).
</p>
<p>
As a side case, if <em class="parameter"><code>ops_ids_size</code></em> is 1,
then <em class="parameter"><code>op</code></em> is ignored, and the returned ID represents <em class="parameter"><code>op_ids</code></em>[0] (this avoids any problem for example
when <em class="parameter"><code>op</code></em> is GDA_SQL_OPERATOR_TYPE_AND and there is in fact only one operand).
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>builder</code></em> :</span></p></td>
<td>a <a class="link" href="GdaSqlBuilder.html" title="GdaSqlBuilder"><span class="type">GdaSqlBuilder</span></a> object</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>op</code></em> :</span></p></td>
<td>type of condition</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>op_ids</code></em> :</span></p></td>
<td>an array of ID for the arguments (not <code class="literal">0</code>). <span class="annotation">[<a href="http://foldoc.org/array"><span class="acronym">array</span></a> length=op_ids_size]</span>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>op_ids_size</code></em> :</span></p></td>
<td>size of <em class="parameter"><code>ops_ids</code></em>
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>the ID of the new expression, or <code class="literal">0</code> if there was an error</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 4.2</p>
</div>
<hr>
<div class="refsect2">
<a name="gda-sql-builder-set-where"></a><h3>gda_sql_builder_set_where ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>                gda_sql_builder_set_where           (<em class="parameter"><code><a class="link" href="GdaSqlBuilder.html" title="GdaSqlBuilder"><span class="type">GdaSqlBuilder</span></a> *builder</code></em>,
                                                         <em class="parameter"><code><a class="link" href="GdaSqlBuilder.html#GdaSqlBuilderId" title="GdaSqlBuilderId"><span class="type">GdaSqlBuilderId</span></a> cond_id</code></em>);</pre>
<p>
Valid only for: UPDATE, DELETE, SELECT statements
</p>
<p>
Sets the WHERE condition of the statement
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>builder</code></em> :</span></p></td>
<td>a <a class="link" href="GdaSqlBuilder.html" title="GdaSqlBuilder"><span class="type">GdaSqlBuilder</span></a> object</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>cond_id</code></em> :</span></p></td>
<td>the ID of the expression to set as WHERE condition, or 0 to unset any previous WHERE condition</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 4.2</p>
</div>
<hr>
<div class="refsect2">
<a name="gda-sql-builder-select-add-target"></a><h3>gda_sql_builder_select_add_target ()</h3>
<pre class="programlisting"><a class="link" href="GdaSqlBuilder.html#GdaSqlBuilderId" title="GdaSqlBuilderId"><span class="returnvalue">GdaSqlBuilderId</span></a>     gda_sql_builder_select_add_target   (<em class="parameter"><code><a class="link" href="GdaSqlBuilder.html" title="GdaSqlBuilder"><span class="type">GdaSqlBuilder</span></a> *builder</code></em>,
                                                         <em class="parameter"><code>const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *table_name</code></em>,
                                                         <em class="parameter"><code>const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *alias</code></em>);</pre>
<p>
Adds a new target to a SELECT statement
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>builder</code></em> :</span></p></td>
<td>a <a class="link" href="GdaSqlBuilder.html" title="GdaSqlBuilder"><span class="type">GdaSqlBuilder</span></a> object</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>table_name</code></em> :</span></p></td>
<td>the name of the target table</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>alias</code></em> :</span></p></td>
<td>the alias to give to the target, or <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>. <span class="annotation">[<a href="http://foldoc.org/allow-none"><span class="acronym">allow-none</span></a>]</span>
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>the ID of the new target, or <code class="literal">0</code> if there was an error</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 4.2</p>
</div>
<hr>
<div class="refsect2">
<a name="gda-sql-builder-select-add-target-id"></a><h3>gda_sql_builder_select_add_target_id ()</h3>
<pre class="programlisting"><a class="link" href="GdaSqlBuilder.html#GdaSqlBuilderId" title="GdaSqlBuilderId"><span class="returnvalue">GdaSqlBuilderId</span></a>     gda_sql_builder_select_add_target_id
                                                        (<em class="parameter"><code><a class="link" href="GdaSqlBuilder.html" title="GdaSqlBuilder"><span class="type">GdaSqlBuilder</span></a> *builder</code></em>,
                                                         <em class="parameter"><code><a class="link" href="GdaSqlBuilder.html#GdaSqlBuilderId" title="GdaSqlBuilderId"><span class="type">GdaSqlBuilderId</span></a> table_id</code></em>,
                                                         <em class="parameter"><code>const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *alias</code></em>);</pre>
<p>
Adds a new target to a SELECT statement. If there already exists a target representing
the same table and the same alias (or with the same absence of alias) then the same target
ID is returned instead of the ID of a new target.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>builder</code></em> :</span></p></td>
<td>a <a class="link" href="GdaSqlBuilder.html" title="GdaSqlBuilder"><span class="type">GdaSqlBuilder</span></a> object</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>table_id</code></em> :</span></p></td>
<td>the ID of the expression holding a table reference (not <code class="literal">0</code>)</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>alias</code></em> :</span></p></td>
<td>the alias to give to the target, or <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>. <span class="annotation">[<a href="http://foldoc.org/allow-none"><span class="acronym">allow-none</span></a>]</span>
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>the ID of the new (or existing) target, or <code class="literal">0</code> if there was an error</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 4.2</p>
</div>
<hr>
<div class="refsect2">
<a name="gda-sql-builder-select-add-field"></a><h3>gda_sql_builder_select_add_field ()</h3>
<pre class="programlisting"><a class="link" href="GdaSqlBuilder.html#GdaSqlBuilderId" title="GdaSqlBuilderId"><span class="returnvalue">GdaSqlBuilderId</span></a>     gda_sql_builder_select_add_field    (<em class="parameter"><code><a class="link" href="GdaSqlBuilder.html" title="GdaSqlBuilder"><span class="type">GdaSqlBuilder</span></a> *builder</code></em>,
                                                         <em class="parameter"><code>const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *field_name</code></em>,
                                                         <em class="parameter"><code>const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *table_name</code></em>,
                                                         <em class="parameter"><code>const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *alias</code></em>);</pre>
<p>
Valid only for: SELECT statements.
</p>
<p>
Add a selected selected item to the SELECT statement.
</p>
<p>
For non-SELECT statements, see <a class="link" href="GdaSqlBuilder.html#gda-sql-builder-add-field-id" title="gda_sql_builder_add_field_id ()"><code class="function">gda_sql_builder_add_field_id()</code></a>.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>builder</code></em> :</span></p></td>
<td>a <a class="link" href="GdaSqlBuilder.html" title="GdaSqlBuilder"><span class="type">GdaSqlBuilder</span></a> object</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>field_name</code></em> :</span></p></td>
<td>a field name</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>table_name</code></em> :</span></p></td>
<td>a table name, or <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>alias</code></em> :</span></p></td>
<td>an alias (eg. for the "AS" clause), or <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>the ID of the added field, or <code class="literal">0</code> if there was an error</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 4.2</p>
</div>
<hr>
<div class="refsect2">
<a name="gda-sql-builder-select-join-targets"></a><h3>gda_sql_builder_select_join_targets ()</h3>
<pre class="programlisting"><a class="link" href="GdaSqlBuilder.html#GdaSqlBuilderId" title="GdaSqlBuilderId"><span class="returnvalue">GdaSqlBuilderId</span></a>     gda_sql_builder_select_join_targets (<em class="parameter"><code><a class="link" href="GdaSqlBuilder.html" title="GdaSqlBuilder"><span class="type">GdaSqlBuilder</span></a> *builder</code></em>,
                                                         <em class="parameter"><code><a class="link" href="GdaSqlBuilder.html#GdaSqlBuilderId" title="GdaSqlBuilderId"><span class="type">GdaSqlBuilderId</span></a> left_target_id</code></em>,
                                                         <em class="parameter"><code><a class="link" href="GdaSqlBuilder.html#GdaSqlBuilderId" title="GdaSqlBuilderId"><span class="type">GdaSqlBuilderId</span></a> right_target_id</code></em>,
                                                         <em class="parameter"><code><a class="link" href="libgda-4.0-GdaSqlStatement.html#GdaSqlSelectJoinType" title="enum GdaSqlSelectJoinType"><span class="type">GdaSqlSelectJoinType</span></a> join_type</code></em>,
                                                         <em class="parameter"><code><a class="link" href="GdaSqlBuilder.html#GdaSqlBuilderId" title="GdaSqlBuilderId"><span class="type">GdaSqlBuilderId</span></a> join_expr</code></em>);</pre>
<p>
Joins two targets in a SELECT statement, using the <em class="parameter"><code>join_type</code></em> type of join.
</p>
<p>
Note: if the target represented by <em class="parameter"><code>left_target_id</code></em> is actually situated after (on the right) of
the target represented by <em class="parameter"><code>right_target_id</code></em>, then the actual type of join may be switched from
<code class="literal">GDA_SQL_SELECT_JOIN_LEFT</code> to <code class="literal">GDA_SQL_SELECT_JOIN_RIGHT</code> or from <code class="literal">GDA_SQL_SELECT_JOIN_RIGHT</code> to
<code class="literal">GDA_SQL_SELECT_JOIN_LEFT</code>.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>builder</code></em> :</span></p></td>
<td>a <a class="link" href="GdaSqlBuilder.html" title="GdaSqlBuilder"><span class="type">GdaSqlBuilder</span></a> object</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>left_target_id</code></em> :</span></p></td>
<td>the ID of the left target to use (not <code class="literal">0</code>)</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>right_target_id</code></em> :</span></p></td>
<td>the ID of the right target to use (not <code class="literal">0</code>)</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>join_type</code></em> :</span></p></td>
<td>the type of join</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>join_expr</code></em> :</span></p></td>
<td>joining expression's ID, or <code class="literal">0</code>
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>the ID of the new join, or <code class="literal">0</code> if there was an error</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 4.2</p>
</div>
<hr>
<div class="refsect2">
<a name="gda-sql-builder-join-add-field"></a><h3>gda_sql_builder_join_add_field ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>                gda_sql_builder_join_add_field      (<em class="parameter"><code><a class="link" href="GdaSqlBuilder.html" title="GdaSqlBuilder"><span class="type">GdaSqlBuilder</span></a> *builder</code></em>,
                                                         <em class="parameter"><code><a class="link" href="GdaSqlBuilder.html#GdaSqlBuilderId" title="GdaSqlBuilderId"><span class="type">GdaSqlBuilderId</span></a> join_id</code></em>,
                                                         <em class="parameter"><code>const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *field_name</code></em>);</pre>
<p>
Alter a join in a SELECT statement to make its condition use equal field 
values in the fields named <em class="parameter"><code>field_name</code></em> in both tables, via the USING keyword.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>builder</code></em> :</span></p></td>
<td>a <a class="link" href="GdaSqlBuilder.html" title="GdaSqlBuilder"><span class="type">GdaSqlBuilder</span></a> object</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>join_id</code></em> :</span></p></td>
<td>the ID of the join to modify (not <code class="literal">0</code>)</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>field_name</code></em> :</span></p></td>
<td>the name of the field to use in the join condition (not <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>)</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 4.2</p>
</div>
<hr>
<div class="refsect2">
<a name="gda-sql-builder-select-order-by"></a><h3>gda_sql_builder_select_order_by ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>                gda_sql_builder_select_order_by     (<em class="parameter"><code><a class="link" href="GdaSqlBuilder.html" title="GdaSqlBuilder"><span class="type">GdaSqlBuilder</span></a> *builder</code></em>,
                                                         <em class="parameter"><code><a class="link" href="GdaSqlBuilder.html#GdaSqlBuilderId" title="GdaSqlBuilderId"><span class="type">GdaSqlBuilderId</span></a> expr_id</code></em>,
                                                         <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a> asc</code></em>,
                                                         <em class="parameter"><code>const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *collation_name</code></em>);</pre>
<p>
Adds a new ORDER BY expression to a SELECT statement.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>builder</code></em> :</span></p></td>
<td>a <span class="type">GdaSqlBuiler</span>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>expr_id</code></em> :</span></p></td>
<td>the ID of the expression to use during sorting (not <code class="literal">0</code>)</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>asc</code></em> :</span></p></td>
<td>
<a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> for an ascending sorting</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>collation_name</code></em> :</span></p></td>
<td>name of the collation to use when sorting, or <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>. <span class="annotation">[<a href="http://foldoc.org/allow-none"><span class="acronym">allow-none</span></a>]</span>
</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 4.2</p>
</div>
<hr>
<div class="refsect2">
<a name="gda-sql-builder-select-set-distinct"></a><h3>gda_sql_builder_select_set_distinct ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>                gda_sql_builder_select_set_distinct (<em class="parameter"><code><a class="link" href="GdaSqlBuilder.html" title="GdaSqlBuilder"><span class="type">GdaSqlBuilder</span></a> *builder</code></em>,
                                                         <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a> distinct</code></em>,
                                                         <em class="parameter"><code><a class="link" href="GdaSqlBuilder.html#GdaSqlBuilderId" title="GdaSqlBuilderId"><span class="type">GdaSqlBuilderId</span></a> expr_id</code></em>);</pre>
<p>
Defines (if <em class="parameter"><code>distinct</code></em> is <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a>) or removes (if <em class="parameter"><code>distinct</code></em> is <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a>) a DISTINCT clause
for a SELECT statement.
</p>
<p>
If <em class="parameter"><code>distinct</code></em> is <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a>, then the ID of an expression can be specified as the <em class="parameter"><code>expr_id</code></em> argument:
if not <code class="literal">0</code>, this is the expression used to apply the DISTINCT clause on (the resuting SQL
will then usually be "... DISTINCT ON &lt;expression&gt;...").
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>builder</code></em> :</span></p></td>
<td>a <a class="link" href="GdaSqlBuilder.html" title="GdaSqlBuilder"><span class="type">GdaSqlBuilder</span></a> object</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>distinct</code></em> :</span></p></td>
<td>set to <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> to have the DISTINCT requirement</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>expr_id</code></em> :</span></p></td>
<td>the ID of the DISTINCT ON expression, or <code class="literal">0</code> if no expression is to be used. It is ignored
if <em class="parameter"><code>distinct</code></em> is <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a>.</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 4.2</p>
</div>
<hr>
<div class="refsect2">
<a name="gda-sql-builder-select-set-limit"></a><h3>gda_sql_builder_select_set_limit ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>                gda_sql_builder_select_set_limit    (<em class="parameter"><code><a class="link" href="GdaSqlBuilder.html" title="GdaSqlBuilder"><span class="type">GdaSqlBuilder</span></a> *builder</code></em>,
                                                         <em class="parameter"><code><a class="link" href="GdaSqlBuilder.html#GdaSqlBuilderId" title="GdaSqlBuilderId"><span class="type">GdaSqlBuilderId</span></a> limit_count_expr_id</code></em>,
                                                         <em class="parameter"><code><a class="link" href="GdaSqlBuilder.html#GdaSqlBuilderId" title="GdaSqlBuilderId"><span class="type">GdaSqlBuilderId</span></a> limit_offset_expr_id</code></em>);</pre>
<p>
If <em class="parameter"><code>limit_count_expr_id</code></em> is not <code class="literal">0</code>, defines the maximum number of rows in the <a class="link" href="GdaDataModel.html" title="GdaDataModel"><span class="type">GdaDataModel</span></a>
resulting from the execution of the built statement. In this case, the offset from which the
rows must be collected can be defined by the <em class="parameter"><code>limit_offset_expr_id</code></em> expression if not <code class="literal">0</code> (note that
this feature may not be supported by all the database providers).
</p>
<p>
If <em class="parameter"><code>limit_count_expr_id</code></em> is <code class="literal">0</code>, then removes any LIMIT which may have been imposed by a previous
call to this method.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>builder</code></em> :</span></p></td>
<td>a <a class="link" href="GdaSqlBuilder.html" title="GdaSqlBuilder"><span class="type">GdaSqlBuilder</span></a> object</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>limit_count_expr_id</code></em> :</span></p></td>
<td>the ID of the LIMIT expression, or <code class="literal">0</code>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>limit_offset_expr_id</code></em> :</span></p></td>
<td>the ID of the OFFSET expression, or <code class="literal">0</code>
</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 4.2</p>
</div>
<hr>
<div class="refsect2">
<a name="gda-sql-builder-select-set-having"></a><h3>gda_sql_builder_select_set_having ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>                gda_sql_builder_select_set_having   (<em class="parameter"><code><a class="link" href="GdaSqlBuilder.html" title="GdaSqlBuilder"><span class="type">GdaSqlBuilder</span></a> *builder</code></em>,
                                                         <em class="parameter"><code><a class="link" href="GdaSqlBuilder.html#GdaSqlBuilderId" title="GdaSqlBuilderId"><span class="type">GdaSqlBuilderId</span></a> cond_id</code></em>);</pre>
<p>
Valid only for: SELECT statements
</p>
<p>
Sets the HAVING condition of the statement
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>builder</code></em> :</span></p></td>
<td>a <a class="link" href="GdaSqlBuilder.html" title="GdaSqlBuilder"><span class="type">GdaSqlBuilder</span></a> object</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>cond_id</code></em> :</span></p></td>
<td>the ID of the expression to set as HAVING condition, or 0 to unset any previous HAVING condition</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 4.2</p>
</div>
<hr>
<div class="refsect2">
<a name="gda-sql-builder-select-group-by"></a><h3>gda_sql_builder_select_group_by ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>                gda_sql_builder_select_group_by     (<em class="parameter"><code><a class="link" href="GdaSqlBuilder.html" title="GdaSqlBuilder"><span class="type">GdaSqlBuilder</span></a> *builder</code></em>,
                                                         <em class="parameter"><code><a class="link" href="GdaSqlBuilder.html#GdaSqlBuilderId" title="GdaSqlBuilderId"><span class="type">GdaSqlBuilderId</span></a> expr_id</code></em>);</pre>
<p>
Valid only for: SELECT statements
</p>
<p>
Adds the <em class="parameter"><code>expr_id</code></em> expression to the GROUP BY clause's expressions list
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>builder</code></em> :</span></p></td>
<td>a <a class="link" href="GdaSqlBuilder.html" title="GdaSqlBuilder"><span class="type">GdaSqlBuilder</span></a> object</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>expr_id</code></em> :</span></p></td>
<td>the ID of the expression to set use in the GROUP BY clause, or 0 to unset any previous GROUP BY clause</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 4.2</p>
</div>
<hr>
<div class="refsect2">
<a name="gda-sql-builder-compound-add-sub-select"></a><h3>gda_sql_builder_compound_add_sub_select ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>                gda_sql_builder_compound_add_sub_select
                                                        (<em class="parameter"><code><a class="link" href="GdaSqlBuilder.html" title="GdaSqlBuilder"><span class="type">GdaSqlBuilder</span></a> *builder</code></em>,
                                                         <em class="parameter"><code><a class="link" href="libgda-4.0-GdaSqlStatement.html#GdaSqlStatement" title="GdaSqlStatement"><span class="type">GdaSqlStatement</span></a> *sqlst</code></em>);</pre>
<p>
Add a sub select to a COMPOUND statement
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>builder</code></em> :</span></p></td>
<td>a <a class="link" href="GdaSqlBuilder.html" title="GdaSqlBuilder"><span class="type">GdaSqlBuilder</span></a> object</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>sqlst</code></em> :</span></p></td>
<td>a pointer to a <a class="link" href="libgda-4.0-GdaSqlStatement.html#GdaSqlStatement" title="GdaSqlStatement"><span class="type">GdaSqlStatement</span></a>, which has to be a SELECT or compound SELECT. This will be copied.</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 4.2</p>
</div>
<hr>
<div class="refsect2">
<a name="gda-sql-builder-compound-set-type"></a><h3>gda_sql_builder_compound_set_type ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>                gda_sql_builder_compound_set_type   (<em class="parameter"><code><a class="link" href="GdaSqlBuilder.html" title="GdaSqlBuilder"><span class="type">GdaSqlBuilder</span></a> *builder</code></em>,
                                                         <em class="parameter"><code><a class="link" href="libgda-4.0-GdaSqlStatement.html#GdaSqlStatementCompoundType" title="enum GdaSqlStatementCompoundType"><span class="type">GdaSqlStatementCompoundType</span></a> compound_type</code></em>);</pre>
<p>
Changes the type of compound which <em class="parameter"><code>builder</code></em> is making, for a COMPOUND statement
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>builder</code></em> :</span></p></td>
<td>a <a class="link" href="GdaSqlBuilder.html" title="GdaSqlBuilder"><span class="type">GdaSqlBuilder</span></a> object</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>compound_type</code></em> :</span></p></td>
<td>a type of compound</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 4.2</p>
</div>
<hr>
<div class="refsect2">
<a name="gda-sql-builder-export-expression"></a><h3>gda_sql_builder_export_expression ()</h3>
<pre class="programlisting"><a class="link" href="libgda-4.0-GdaSqlStatement.html#GdaSqlExpr" title="struct GdaSqlExpr"><span class="returnvalue">GdaSqlExpr</span></a> *        gda_sql_builder_export_expression   (<em class="parameter"><code><a class="link" href="GdaSqlBuilder.html" title="GdaSqlBuilder"><span class="type">GdaSqlBuilder</span></a> *builder</code></em>,
                                                         <em class="parameter"><code><a class="link" href="GdaSqlBuilder.html#GdaSqlBuilderId" title="GdaSqlBuilderId"><span class="type">GdaSqlBuilderId</span></a> id</code></em>);</pre>
<p>
Exports a part managed by <em class="parameter"><code>builder</code></em> as a new <a class="link" href="libgda-4.0-GdaSqlStatement.html#GdaSqlExpr" title="struct GdaSqlExpr"><span class="type">GdaSqlExpr</span></a>, which can represent any expression
in a statement.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>builder</code></em> :</span></p></td>
<td>a <a class="link" href="GdaSqlBuilder.html" title="GdaSqlBuilder"><span class="type">GdaSqlBuilder</span></a> object</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>id</code></em> :</span></p></td>
<td>the ID of the expression to be exported, (must be a valid ID in <em class="parameter"><code>builder</code></em>, not <code class="literal">0</code>)</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>a pointer to a new <a class="link" href="libgda-4.0-GdaSqlStatement.html#GdaSqlExpr" title="struct GdaSqlExpr"><span class="type">GdaSqlExpr</span></a> structure, free using <a class="link" href="libgda-4.0-GdaSqlStatement.html#gda-sql-expr-free" title="gda_sql_expr_free ()"><code class="function">gda_sql_expr_free()</code></a> when not
needed anymore. If the part with <em class="parameter"><code>id</code></em> as ID cannot be found, the returned value is <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>.</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 4.2</p>
</div>
<hr>
<div class="refsect2">
<a name="gda-sql-builder-import-expression"></a><h3>gda_sql_builder_import_expression ()</h3>
<pre class="programlisting"><a class="link" href="GdaSqlBuilder.html#GdaSqlBuilderId" title="GdaSqlBuilderId"><span class="returnvalue">GdaSqlBuilderId</span></a>     gda_sql_builder_import_expression   (<em class="parameter"><code><a class="link" href="GdaSqlBuilder.html" title="GdaSqlBuilder"><span class="type">GdaSqlBuilder</span></a> *builder</code></em>,
                                                         <em class="parameter"><code><a class="link" href="libgda-4.0-GdaSqlStatement.html#GdaSqlExpr" title="struct GdaSqlExpr"><span class="type">GdaSqlExpr</span></a> *expr</code></em>);</pre>
<p>
Imports the <em class="parameter"><code>expr</code></em> into <em class="parameter"><code>builder</code></em>.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>builder</code></em> :</span></p></td>
<td>a <a class="link" href="GdaSqlBuilder.html" title="GdaSqlBuilder"><span class="type">GdaSqlBuilder</span></a> object</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>expr</code></em> :</span></p></td>
<td>a <a class="link" href="libgda-4.0-GdaSqlStatement.html#GdaSqlExpr" title="struct GdaSqlExpr"><span class="type">GdaSqlExpr</span></a> obtained using <a class="link" href="GdaSqlBuilder.html#gda-sql-builder-export-expression" title="gda_sql_builder_export_expression ()"><code class="function">gda_sql_builder_export_expression()</code></a>
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>the ID of the new expression, or <code class="literal">0</code> if there was an error</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 4.2</p>
</div>
</div>
<div class="refsect1">
<a name="GdaSqlBuilder.property-details"></a><h2>Property Details</h2>
<div class="refsect2">
<a name="GdaSqlBuilder--stmt-type"></a><h3>The <code class="literal">"stmt-type"</code> property</h3>
<pre class="programlisting">  "stmt-type"                <a class="link" href="libgda-4.0-GdaSqlStatement.html#GdaSqlStatementType" title="enum GdaSqlStatementType"><span class="type">GdaSqlStatementType</span></a>   : Write / Construct Only</pre>
<p>
Specifies the type of statement to be built, can only be
GDA_SQL_STATEMENT_SELECT, GDA_SQL_STATEMENT_INSERT, GDA_SQL_STATEMENT_UPDATE
or GDA_SQL_STATEMENT_DELETE
</p>
<p>Default value: GDA_SQL_STATEMENT_UNKNOWN</p>
</div>
</div>
</div>
<div class="footer">
<hr>
          Generated by GTK-Doc V1.17</div>
</body>
</html>