This file is indexed.

/usr/include/libgda-5.0/libgda/sql-parser/gda-statement-struct-parts.h is in libgda-5.0-dev 5.0.3-1.

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
/*
 * Copyright (C) 2008 Bas Driessen <bas.driessen@xobas.com>
 * Copyright (C) 2008 - 2011 Vivien Malerba <malerba@gnome-db.org>
 * Copyright (C) 2009 - 2010 Murray Cumming <murrayc@murrayc.com>
 *
 * This library is free software; you can redistribute it and/or
 * modify it under the terms of the GNU Lesser General Public
 * License as published by the Free Software Foundation; either
 * version 2 of the License, or (at your option) any later version.
 *
 * This library is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 * Lesser General Public License for more details.
 *
 * You should have received a copy of the GNU Lesser General Public
 * License along with this library; if not, write to the
 * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
 * Boston, MA  02110-1301, USA.
 */

#ifndef _GDA_STATEMENT_STRUCT_PARTS_H
#define _GDA_STATEMENT_STRUCT_PARTS_H

#include <glib.h>
#include <glib-object.h>
#include <sql-parser/gda-statement-struct.h>
#include <sql-parser/gda-statement-struct-pspec.h>
#include <sql-parser/gda-statement-struct-decl.h>
#include <libgda/gda-meta-struct.h>

G_BEGIN_DECLS
/*
 * GdaSqlExpr: (skip)
 *
 **/
typedef struct _GdaSqlExpr      GdaSqlExpr;
/*
 * GdaSqlField: (skip)
 *
 **/
typedef struct _GdaSqlField     GdaSqlField;
/*
 * GdaSqlTable: (skip)
 *
 **/
typedef struct _GdaSqlTable     GdaSqlTable;
/*
 * GdaSqlFunction: (skip)
 *
 **/
typedef struct _GdaSqlFunction  GdaSqlFunction;
/*
 * GdaSqlOperation: (skip)
 *
 **/
typedef struct _GdaSqlOperation GdaSqlOperation;
/*
 * GdaSqlCase: (skip)
 *
 **/
typedef struct _GdaSqlCase GdaSqlCase;
/*
 * GdaSqlSelectField: (skip)
 *
 **/
typedef struct _GdaSqlSelectField GdaSqlSelectField;
/*
 * GdaSqlSelectTarget: (skip)
 *
 **/
typedef struct _GdaSqlSelectTarget GdaSqlSelectTarget;
/*
 * GdaSqlSelectJoin: (skip)
 *
 **/
typedef struct _GdaSqlSelectJoin GdaSqlSelectJoin;
/*
 * GdaSqlSelectFrom: (skip)
 *
 **/
typedef struct _GdaSqlSelectFrom GdaSqlSelectFrom;
/*
 * GdaSqlSelectOrder: (skip)
 *
 **/
typedef struct _GdaSqlSelectOrder GdaSqlSelectOrder;

/*
 * Any Expression
 */
/**
 * GdaSqlExpr: (skip)
 * @any: inheritance structure
 * @value: (allow-none): a #GValue, or %NULL. Please see specific note about this field. 
 * @param_spec: (allow-none): a #GdaSqlParamSpec, or %NULL if this is not a variable
 * @func: (allow-none): not %NULL if expression is a function or aggregate
 * @cond: (allow-none): not %NULL if expression is a condition or an operation
 * @select: (allow-none): not %NULL if expression is a sub select statement (#GdaSqlStatementSelect or #GdaSqlStatementCompound)
 * @case_s: (allow-none): not %NULL if expression is a CASE WHEN ... expression
 * @cast_as: (allow-none): not %NULL if expression must be cast to another data type
 * @value_is_ident: Please see specific note about the @value field
 *
 * This structure contains any expression, either as a value (the @value part is set),
 * a variable (the @param_spec is set), or as other types of expressions.
 *
 * Note 1 about the @value field: if the expression represents a string value in the SQL statement,
 * the string itself must be represented as it would be in the actual SQL, ie. it should be
 * escaped (accordingly to the escaping rules of the database which will use the SQL). For 
 * example a string representing the <userinput>'joe'</userinput> value should be
 * <userinput>"'joe'"</userinput> and not <userinput>"joe"</userinput>.
 *
 * Note 2 about the @value field: if the expression represents an SQL identifier (such as a table
 * or field name), then the @value_is_ident should be set to %TRUE, and @value should be a string
 * which may contain double quotes around SQL identifiers which also are reserved keywords or which
 * are case sensitive.
 */
struct _GdaSqlExpr {
	GdaSqlAnyPart    any;
	GValue          *value;
	GdaSqlParamSpec *param_spec;
	GdaSqlFunction  *func;
	GdaSqlOperation *cond;
	GdaSqlAnyPart   *select; /* SELECT OR COMPOUND statements: GdaSqlStatementSelect or GdaSqlStatementCompound */
	GdaSqlCase      *case_s;

	gchar           *cast_as;

	gboolean         value_is_ident;

	/*< private >*/
	/* Padding for future expansion */
	gpointer         _gda_reserved1;
	gpointer         _gda_reserved2;
	gpointer         _gda_reserved3;
	gpointer         _gda_reserved4;
};

#define GDA_TYPE_SQL_EXPR (gda_sql_expr_get_type())
GType            gda_sql_expr_get_type       (void) G_GNUC_CONST;
GdaSqlExpr      *gda_sql_expr_new            (GdaSqlAnyPart *parent);
void             gda_sql_expr_free           (GdaSqlExpr *expr);
GdaSqlExpr      *gda_sql_expr_copy           (GdaSqlExpr *expr);
gchar           *gda_sql_expr_serialize      (GdaSqlExpr *expr);
void             _gda_sql_expr_check_clean   (GdaSqlExpr *expr);
void             gda_sql_expr_take_select    (GdaSqlExpr *expr, GdaSqlStatement *stmt);

/*
 * Any Table's field
 */
/**
 * GdaSqlField: (skip)
 * any: 
 * @field_name: 
 * @validity_meta_table_column: 
 *
 * This structure represents the name of a table's field.
 */
struct _GdaSqlField {
	GdaSqlAnyPart       any;
	gchar              *field_name;

	/* validity check with a connection */
	GdaMetaTableColumn *validity_meta_table_column;

	/*< private >*/
	/* Padding for future expansion */
	gpointer         _gda_reserved1;
	gpointer         _gda_reserved2;
};

GdaSqlField     *gda_sql_field_new            (GdaSqlAnyPart *parent);
void             gda_sql_field_free           (GdaSqlField *field);
GdaSqlField     *gda_sql_field_copy           (GdaSqlField *field);
gchar           *gda_sql_field_serialize      (GdaSqlField *field);
void             _gda_sql_field_check_clean   (GdaSqlField *field);

void             gda_sql_field_take_name      (GdaSqlField *field, GValue *value);

/*
 * Any table
 */
/**
 * GdaSqlTable: (skip)
 * @any: 
 * @table_name: 
 * @validity_meta_object: 
 *
 * This structure represents the name of a table.
 */
struct _GdaSqlTable
{
	GdaSqlAnyPart       any;
	gchar              *table_name;

	/* validity check with a connection */
	GdaMetaDbObject    *validity_meta_object;

	/*< private >*/
	/* Padding for future expansion */
	gpointer         _gda_reserved1;
	gpointer         _gda_reserved2;
};

GdaSqlTable     *gda_sql_table_new            (GdaSqlAnyPart *parent);
void             gda_sql_table_free           (GdaSqlTable *table);
GdaSqlTable     *gda_sql_table_copy           (GdaSqlTable *table);
gchar           *gda_sql_table_serialize      (GdaSqlTable *table);
void             _gda_sql_table_check_clean   (GdaSqlTable *table);

void             gda_sql_table_take_name      (GdaSqlTable *table, GValue *value);

/*
 * A function with any number of arguments
 */
/**
 * GdaSqlFunction: (skip)
 * @any: inheritance structure
 * @function_name: name of the function , in the form [[catalog.]schema.]function_name
 * @args_list: list of #GdaSqlExpr expressions, one for each argument
 *
 * This structure represents a function or an aggregate with zero or more arguments.
 */
struct _GdaSqlFunction {
	GdaSqlAnyPart       any;
	gchar              *function_name;
	GSList             *args_list;

	/*< private >*/
	/* Padding for future expansion */
	gpointer         _gda_reserved1;
	gpointer         _gda_reserved2;
};

GdaSqlFunction  *gda_sql_function_new            (GdaSqlAnyPart *parent);
void             gda_sql_function_free           (GdaSqlFunction *function);
GdaSqlFunction  *gda_sql_function_copy           (GdaSqlFunction *function);
gchar           *gda_sql_function_serialize      (GdaSqlFunction *function);
void             gda_sql_function_check_clean    (GdaSqlFunction *function);

void             gda_sql_function_take_name      (GdaSqlFunction *function, GValue *value);
void             gda_sql_function_take_args_list (GdaSqlFunction *function, GSList *args);

/*
 * An operation on one or more expressions
 */
/**
 * GdaSqlOperatorType:
 * @GDA_SQL_OPERATOR_TYPE_AND: 
 * @GDA_SQL_OPERATOR_TYPE_OR: 
 * @GDA_SQL_OPERATOR_TYPE_EQ: 
 * @GDA_SQL_OPERATOR_TYPE_IS: 
 * @GDA_SQL_OPERATOR_TYPE_LIKE:
 * @GDA_SQL_OPERATOR_TYPE_ILIKE:  
 * @GDA_SQL_OPERATOR_TYPE_BETWEEN: 
 * @GDA_SQL_OPERATOR_TYPE_GT: 
 * @GDA_SQL_OPERATOR_TYPE_LT: 
 * @GDA_SQL_OPERATOR_TYPE_GEQ: 
 * @GDA_SQL_OPERATOR_TYPE_LEQ: 
 * @GDA_SQL_OPERATOR_TYPE_DIFF: 
 * @GDA_SQL_OPERATOR_TYPE_REGEXP: 
 * @GDA_SQL_OPERATOR_TYPE_REGEXP_CI: 
 * @GDA_SQL_OPERATOR_TYPE_NOT_REGEXP: 
 * @GDA_SQL_OPERATOR_TYPE_NOT_REGEXP_CI: 
 * @GDA_SQL_OPERATOR_TYPE_SIMILAR: 
 * @GDA_SQL_OPERATOR_TYPE_ISNULL: 
 * @GDA_SQL_OPERATOR_TYPE_ISNOTNULL: 
 * @GDA_SQL_OPERATOR_TYPE_NOT: 
 * @GDA_SQL_OPERATOR_TYPE_IN: 
 * @GDA_SQL_OPERATOR_TYPE_NOTIN: 
 * @GDA_SQL_OPERATOR_TYPE_CONCAT: 
 * @GDA_SQL_OPERATOR_TYPE_PLUS: 
 * @GDA_SQL_OPERATOR_TYPE_MINUS: 
 * @GDA_SQL_OPERATOR_TYPE_STAR: 
 * @GDA_SQL_OPERATOR_TYPE_DIV: 
 * @GDA_SQL_OPERATOR_TYPE_REM: 
 * @GDA_SQL_OPERATOR_TYPE_BITAND: 
 * @GDA_SQL_OPERATOR_TYPE_BITOR: 
 * @GDA_SQL_OPERATOR_TYPE_BITNOT:
 */
typedef enum {
	GDA_SQL_OPERATOR_TYPE_AND,
	GDA_SQL_OPERATOR_TYPE_OR,

	GDA_SQL_OPERATOR_TYPE_EQ,
	GDA_SQL_OPERATOR_TYPE_IS,
	GDA_SQL_OPERATOR_TYPE_LIKE,
	GDA_SQL_OPERATOR_TYPE_BETWEEN,
	GDA_SQL_OPERATOR_TYPE_GT,
	GDA_SQL_OPERATOR_TYPE_LT,
	GDA_SQL_OPERATOR_TYPE_GEQ,
	GDA_SQL_OPERATOR_TYPE_LEQ,
	GDA_SQL_OPERATOR_TYPE_DIFF,
	GDA_SQL_OPERATOR_TYPE_REGEXP,
	GDA_SQL_OPERATOR_TYPE_REGEXP_CI,
	GDA_SQL_OPERATOR_TYPE_NOT_REGEXP,
	GDA_SQL_OPERATOR_TYPE_NOT_REGEXP_CI,
	GDA_SQL_OPERATOR_TYPE_SIMILAR,
	GDA_SQL_OPERATOR_TYPE_ISNULL,
	GDA_SQL_OPERATOR_TYPE_ISNOTNULL,
	GDA_SQL_OPERATOR_TYPE_NOT,
	GDA_SQL_OPERATOR_TYPE_IN,
	GDA_SQL_OPERATOR_TYPE_NOTIN,

	GDA_SQL_OPERATOR_TYPE_CONCAT,
	GDA_SQL_OPERATOR_TYPE_PLUS,
	GDA_SQL_OPERATOR_TYPE_MINUS,
	GDA_SQL_OPERATOR_TYPE_STAR,
	GDA_SQL_OPERATOR_TYPE_DIV,
	GDA_SQL_OPERATOR_TYPE_REM,
	GDA_SQL_OPERATOR_TYPE_BITAND,
	GDA_SQL_OPERATOR_TYPE_BITOR,
	GDA_SQL_OPERATOR_TYPE_BITNOT,
	GDA_SQL_OPERATOR_TYPE_ILIKE
} GdaSqlOperatorType;

/**
 * GdaSqlOperation: (skip)
 * @any: inheritance structure
 * @operator_type: 
 * @operands: list of #GdaSqlExpr operands
 *
 * This structure represents an operation between one or more operands.
 */
struct _GdaSqlOperation {
	GdaSqlAnyPart       any;
	GdaSqlOperatorType  operator_type;
	GSList             *operands;

	/*< private >*/
	/* Padding for future expansion */
	gpointer         _gda_reserved1;
	gpointer         _gda_reserved2;
};

GdaSqlOperation  *gda_sql_operation_new            (GdaSqlAnyPart *parent);
void              gda_sql_operation_free           (GdaSqlOperation *operation);
GdaSqlOperation  *gda_sql_operation_copy           (GdaSqlOperation *operation);
gchar            *gda_sql_operation_serialize      (GdaSqlOperation *operation);
const gchar      *gda_sql_operation_operator_to_string (GdaSqlOperatorType op);
GdaSqlOperatorType    gda_sql_operation_operator_from_string (const gchar *op);

/*
 * A CASE expression
 */
/**
 * GdaSqlCase: (skip)
 * @any: inheritance structure
 * @base_expr: expression to test
 * @when_expr_list: list of #GdaSqlExpr, one for each WHEN clause
 * @then_expr_list: list of #GdaSqlExpr, one for each THEN clause
 * @else_expr: default expression for the CASE
 *
 * This structure represents a CASE WHEN... construct
 */
struct _GdaSqlCase
{
	GdaSqlAnyPart    any;
	GdaSqlExpr      *base_expr;
	GSList          *when_expr_list;
	GSList          *then_expr_list;
	GdaSqlExpr      *else_expr;

	/*< private >*/
	/* Padding for future expansion */
	gpointer         _gda_reserved1;
	gpointer         _gda_reserved2;
};

GdaSqlCase        *gda_sql_case_new            (GdaSqlAnyPart *parent);
void               gda_sql_case_free           (GdaSqlCase *sc);
GdaSqlCase        *gda_sql_case_copy           (GdaSqlCase *sc);
gchar             *gda_sql_case_serialize      (GdaSqlCase *sc);

/*
 * Any expression in a SELECT ... before the FROM clause
 */
/**
 * GdaSqlSelectField: (skip)
 * @any: inheritance structure
 * @expr: expression
 * @field_name: field name part of @expr if @expr represents a field
 * @table_name: table name part of @expr if @expr represents a field
 * @as: alias
 * @validity_meta_object: 
 * @validity_meta_table_column: 
 *
 * This structure represents a selected item in a SELECT statement (when executed, the returned data set
 * will have one column per selected item). Note that the @table_name and 
 * @field_name field parts <emphasis>will be</emphasis> overwritten by &LIBGDA;,
 * set the value of @expr->value instead.
 */
struct _GdaSqlSelectField
{
	GdaSqlAnyPart       any;
	GdaSqlExpr         *expr;
	gchar              *field_name; /* may be NULL if expr does not refer to a table.field, can also be "*" */
	gchar              *table_name; /* may be NULL if expr does not refer to a table.field */
	gchar              *as;

	/* validity check with a connection */
	GdaMetaDbObject    *validity_meta_object;
	GdaMetaTableColumn *validity_meta_table_column;

	/*< private >*/
	/* Padding for future expansion */
	gpointer         _gda_reserved1;
	gpointer         _gda_reserved2;
};

GdaSqlSelectField *gda_sql_select_field_new            (GdaSqlAnyPart *parent);
void               gda_sql_select_field_free           (GdaSqlSelectField *field);
GdaSqlSelectField *gda_sql_select_field_copy           (GdaSqlSelectField *field);
gchar             *gda_sql_select_field_serialize      (GdaSqlSelectField *field);
void               _gda_sql_select_field_check_clean   (GdaSqlSelectField *field);

void               gda_sql_select_field_take_star_value(GdaSqlSelectField *field, GValue *value);
void               gda_sql_select_field_take_expr      (GdaSqlSelectField *field, GdaSqlExpr *expr);
void               gda_sql_select_field_take_alias     (GdaSqlSelectField *field, GValue *alias);

/*
 * Any TARGET ... in a SELECT statement
 */
/**
 * GdaSqlSelectTarget: (skip)
 * @any: inheritance structure
 * @expr: expression
 * @table_name: table name part of @expr if @expr represents a table
 * @as: alias
 * @validity_meta_object: 
 *
 * This structure represents a target used to fetch data from in a SELECT statement; it can represent a table or
 * a sub select. Note that the @table_name
 * part <emphasis>will be</emphasis> overwritten by &LIBGDA;,
 * set the value of @expr->value instead.
 */
struct _GdaSqlSelectTarget
{
	GdaSqlAnyPart       any;
	GdaSqlExpr         *expr;
	gchar              *table_name; /* may be NULL if expr does not refer to a table */
	gchar              *as;

	/* validity check with a connection */
	GdaMetaDbObject    *validity_meta_object;

	/*< private >*/
	/* Padding for future expansion */
	gpointer         _gda_reserved1;
	gpointer         _gda_reserved2;
};

GdaSqlSelectTarget *gda_sql_select_target_new            (GdaSqlAnyPart *parent);
void                gda_sql_select_target_free           (GdaSqlSelectTarget *target);
GdaSqlSelectTarget *gda_sql_select_target_copy           (GdaSqlSelectTarget *target);
gchar              *gda_sql_select_target_serialize      (GdaSqlSelectTarget *target);
void                _gda_sql_select_target_check_clean   (GdaSqlSelectTarget *target);

void                gda_sql_select_target_take_table_name (GdaSqlSelectTarget *target, GValue *value);
void                gda_sql_select_target_take_select (GdaSqlSelectTarget *target, GdaSqlStatement *stmt);
void                gda_sql_select_target_take_alias (GdaSqlSelectTarget *target, GValue *alias);

/*
 * Any JOIN ... in a SELECT statement
 */
/**
 * GdaSqlSelectJoinType:
 * @GDA_SQL_SELECT_JOIN_CROSS: 
 * @GDA_SQL_SELECT_JOIN_NATURAL: 
 * @GDA_SQL_SELECT_JOIN_INNER: 
 * @GDA_SQL_SELECT_JOIN_LEFT: 
 * @GDA_SQL_SELECT_JOIN_RIGHT: 
 * @GDA_SQL_SELECT_JOIN_FULL:
 */
typedef enum {
	GDA_SQL_SELECT_JOIN_CROSS,
	GDA_SQL_SELECT_JOIN_NATURAL,
	GDA_SQL_SELECT_JOIN_INNER,
	GDA_SQL_SELECT_JOIN_LEFT,
	GDA_SQL_SELECT_JOIN_RIGHT,
	GDA_SQL_SELECT_JOIN_FULL
} GdaSqlSelectJoinType;

/**
 * GdaSqlSelectJoin: (skip)
 * @any: inheritance structure
 * @type: type of join
 * @position: represents a join between a target at (pos &lt; @position) and the one at @position
 * @expr: (allow-none): joining expression, or %NULL
 * @use: (allow-none): list of #GdaSqlField pointers to use when joining, or %NULL
 *
 * This structure represents a join between two targets in a SELECT statement.
 */
struct _GdaSqlSelectJoin
{
	GdaSqlAnyPart         any;
	GdaSqlSelectJoinType  type;
	gint                  position; /* between a target at (pos < @position) and the one @position */
	GdaSqlExpr           *expr;
	GSList               *use; /* list of GdaSqlField pointers */

	/*< private >*/
	/* Padding for future expansion */
	gpointer         _gda_reserved1;
	gpointer         _gda_reserved2;
};

GdaSqlSelectJoin  *gda_sql_select_join_new            (GdaSqlAnyPart *parent);
void               gda_sql_select_join_free           (GdaSqlSelectJoin *join);
GdaSqlSelectJoin  *gda_sql_select_join_copy           (GdaSqlSelectJoin *join);
gchar             *gda_sql_select_join_serialize      (GdaSqlSelectJoin *join);

const gchar       *gda_sql_select_join_type_to_string (GdaSqlSelectJoinType type);


/*
 * Any FROM ... in a SELECT statement
 */
/**
 * GdaSqlSelectFrom: (skip)
 * @any: inheritance structure
 * @targets: (element-type Gda.SqlSelectTarget): list of #GdaSqlSelectTarget
 * @joins: (element-type Gda.SqlSelectJoin): list of #GdaSqlSelectJoin
 *
 * This structure represents the FROM clause of a SELECT statement, it lists targets and joins
 */
struct _GdaSqlSelectFrom
{
	GdaSqlAnyPart    any;
	GSList          *targets;
	GSList          *joins;

	/*< private >*/
	/* Padding for future expansion */
	gpointer         _gda_reserved1;
	gpointer         _gda_reserved2;
};

GdaSqlSelectFrom  *gda_sql_select_from_new            (GdaSqlAnyPart *parent);
void               gda_sql_select_from_free           (GdaSqlSelectFrom *from);
GdaSqlSelectFrom  *gda_sql_select_from_copy           (GdaSqlSelectFrom *from);
gchar             *gda_sql_select_from_serialize      (GdaSqlSelectFrom *from);

void               gda_sql_select_from_take_new_target(GdaSqlSelectFrom *from, GdaSqlSelectTarget *target);
void               gda_sql_select_from_take_new_join  (GdaSqlSelectFrom *from, GdaSqlSelectJoin *join);

/*
 * Any expression in a SELECT ... after the ORDER BY
 */
/**
 * GdaSqlSelectOrder: (skip)
 * @any: inheritance structure
 * @expr: expression to order on
 * @asc: TRUE is ordering is ascending
 * @collation_name: name of the collation to use for ordering
 *
 * This structure represents the ordering of a SELECT statement.
 */
struct _GdaSqlSelectOrder
{
	GdaSqlAnyPart    any;
	GdaSqlExpr      *expr;
	gboolean         asc;
	gchar           *collation_name;

	/*< private >*/
	/* Padding for future expansion */
	gpointer         _gda_reserved1;
	gpointer         _gda_reserved2;
};

GdaSqlSelectOrder *gda_sql_select_order_new            (GdaSqlAnyPart *parent);
void               gda_sql_select_order_free           (GdaSqlSelectOrder *order);
GdaSqlSelectOrder *gda_sql_select_order_copy           (GdaSqlSelectOrder *order);
gchar             *gda_sql_select_order_serialize      (GdaSqlSelectOrder *order);

G_END_DECLS

#endif