This file is indexed.

/usr/include/libgdamm-5.0/libgdamm/sqlparser.h is in libgdamm5.0-dev 4.99.6-0ubuntu3.

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
// -*- c++ -*-
// Generated by gtkmmproc -- DO NOT MODIFY!
#ifndef _LIBGDAMM_SQLPARSER_H
#define _LIBGDAMM_SQLPARSER_H


#include <glibmm/ustring.h>
#include <sigc++/sigc++.h>

// -*- C++ -*- //

/* set.h
 *
 * Copyright 2006 libgdamm Development Team
 *
 * 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.1 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., 675 Mass Ave, Cambridge, MA 02139, USA.
 */

#include <libgdamm/batch.h>
#include <libgdamm/statement.h>


#ifndef DOXYGEN_SHOULD_SKIP_THIS
typedef struct _GdaSqlParser GdaSqlParser;
typedef struct _GdaSqlParserClass GdaSqlParserClass;
#endif /* DOXYGEN_SHOULD_SKIP_THIS */


namespace Gnome
{

namespace Gda
{ class SqlParser_Class; } // namespace Gda

} // namespace Gnome
namespace Gnome
{

namespace Gda
{

/** @addtogroup libgdammEnums libgdamm Enums and Flags */

/**
 * @ingroup libgdammEnums
 */
enum SqlParserMode
{
  SQL_PARSER_MODE_PARSE,
  SQL_PARSER_MODE_DELIMIT
};

} // namespace Gda

} // namespace Gnome


#ifndef DOXYGEN_SHOULD_SKIP_THIS
namespace Glib
{

template <>
class Value<Gnome::Gda::SqlParserMode> : public Glib::Value_Enum<Gnome::Gda::SqlParserMode>
{
public:
  static GType value_type() G_GNUC_CONST;
};

} // namespace Glib
#endif /* DOXYGEN_SHOULD_SKIP_THIS */


namespace Gnome
{

namespace Gda
{

class SqlParserError : public Glib::Error
{
public:
  enum Code
  {
    SQL_PARSER_SYNTAX_ERROR,
    SQL_PARSER_OVERFLOW_ERROR,
    SQL_PARSER_EMPTY_SQL_ERROR
  };

  SqlParserError(Code error_code, const Glib::ustring& error_message);
  explicit SqlParserError(GError* gobject);
  Code code() const;

#ifndef DOXYGEN_SHOULD_SKIP_THIS
private:

  static void throw_func(GError* gobject);

  friend void wrap_init(); // uses throw_func()

  #endif //DOXYGEN_SHOULD_SKIP_THIS
};

} // namespace Gda

} // namespace Gnome

#ifndef DOXYGEN_SHOULD_SKIP_THIS
namespace Glib
{

template <>
class Value<Gnome::Gda::SqlParserError::Code> : public Glib::Value_Enum<Gnome::Gda::SqlParserError::Code>
{
public:
  static GType value_type() G_GNUC_CONST;
};

} // namespace Glib
#endif /* DOXYGEN_SHOULD_SKIP_THIS */


namespace Gnome
{

namespace Gda
{

		
//TODO: Find out how to escape /* so we can actually show the full syntax at the end of this text.
/** SQL parser.
 *
 * The Gda::SqlParser is an object dedicated to creating Gda::Statement and 
 * Gda::Batch objects from SQL strings. The actual contents of the parsed 
 * statements is represented as Gda::SqlStatement structures (which can be 
 * obtained from any Gda::Statement through the "structure" property).
 *
 * Gda::SqlParser parsers can be created by calling Gda::ServerProvider::create_parser() 
 * for a provider adapted SQL parser, or using create() for a general purpose SQL parser.
 * 
 * The Gda::SqlParser can either work in "parse" mode where it will try to parse
 * the SQL string, or in "delimiter" mode where it will only attempt at delimiting 
 * SQL statements in a string which may contain several SQL statements (usually 
 * separated by a semi column). If operating in "parser" mode, and the parser 
 * can't correctly parse the string, then it will switch to the "delimiter" mode 
 * for the next statement in the string to parse (and create a STATEMENT_UNKNOWN statement).
 * 
 * The Gda::SqlParser object parses and analyses SQL statements and reports the 
 * following statement types:
 *
 * - SELECT (and COMPOUND select), INSERT, UPDATE and DELETE SQL statements should be completely parsed.
 *
 * - Transaction related statements (corresponding to the BEGIN, COMMIT, 
 *   ROLLBACK, SAVEPOINT, ROLLBACK SAVEPOINT and DELETE SAVEPOINT) are parsed and a 
 *   minimalist structure is created to extract some information (that structure is not enough per-se to re-create the complete SQL statement).
 *
 * Any other type of SQL statement (CREATE TABLE, ...) creates a GdaStatement of 
 * type STATEMENT_UNKNOWN, and it only able to locate place holders (variables)
 * and end of statement marks.
 *
 * NOTE: Any SQL of a type which should be parsed which but which creates a Gda::Statement
 * of type GDA_SQL_STATEMENT_UNKNOWN (check with Gda::Statement::get_statement_type()) 
 * should be reported as a bug.
 *
 * The Gda::SqlParser object recognizes place holders (variables), which can later
 * be queried and valued using Gda::Statement::get_parameters(). 
 * See the syntax description for the underlying <a href="http://library.gnome.org/devel/libgda/stable/GdaSqlParser.html#GdaSqlParser.description">GdaSqlParser</a>.
 *
 * @ingroup Connection
 */

class SqlParser : public Glib::Object
{
  
#ifndef DOXYGEN_SHOULD_SKIP_THIS

public:
  typedef SqlParser CppObjectType;
  typedef SqlParser_Class CppClassType;
  typedef GdaSqlParser BaseObjectType;
  typedef GdaSqlParserClass BaseClassType;

private:  friend class SqlParser_Class;
  static CppClassType sqlparser_class_;

private:
  // noncopyable
  SqlParser(const SqlParser&);
  SqlParser& operator=(const SqlParser&);

protected:
  explicit SqlParser(const Glib::ConstructParams& construct_params);
  explicit SqlParser(GdaSqlParser* castitem);

#endif /* DOXYGEN_SHOULD_SKIP_THIS */

public:
  virtual ~SqlParser();

#ifndef DOXYGEN_SHOULD_SKIP_THIS
  static GType get_type()      G_GNUC_CONST;


  static GType get_base_type() G_GNUC_CONST;
#endif

  ///Provides access to the underlying C GObject.
  GdaSqlParser*       gobj()       { return reinterpret_cast<GdaSqlParser*>(gobject_); }

  ///Provides access to the underlying C GObject.
  const GdaSqlParser* gobj() const { return reinterpret_cast<GdaSqlParser*>(gobject_); }

  ///Provides access to the underlying C instance. The caller is responsible for unrefing it. Use when directly setting fields in structs.
  GdaSqlParser* gobj_copy();

private:

protected:
  SqlParser();
public:
  
  static Glib::RefPtr<SqlParser> create();

  
  //TODO: Should these be const?
  
  /** Parses @a sql and creates a Gda::Statement statement from the first SQL statement contained in @a sql: if @a sql
   * contains more than one statement, then the remaining part of the string is not parsed at all, and @a remain (if
   * not <tt>0</tt>) will point at the first non parsed character.
   * 
   * To include variables in the @a sql string, see the
   * GdaSqlParser's object description.
   * @param sql The SQL string to parse.
   * @param remain Location to store a pointer to remaining part of @a sql in case @a sql has multiple statement, or <tt>0</tt>.
   * @return A new Gda::Statement object, or <tt>0</tt> if an error occurred.
   */

  Glib::RefPtr<Statement> parse_string(const Glib::ustring& sql, Glib::ustring& remain);

  Glib::RefPtr<Statement> parse_string(const Glib::ustring& sql);
    
  
  /** Parse @a sql and creates a Gda::Batch object which contains all the Gda::Statement objects created while parsing (one object
   * per SQL statement). Empty statements (composed of spaces only) do not appear in the resulting object.
   * 
   *  @a sql is parsed and Gda::Statement objects are created as long as no error is found in @a sql. If an error is found
   * at some point, then the parsing stops and @a remain may contain a non <tt>0</tt> pointer, @a error may be set, and <tt>0</tt>
   * is returned.
   * 
   * if @a sql is <tt>0</tt>, then the returned Gda::Batch object will contain no statement.
   * 
   * To include variables in the @a sql string, see the
   * GdaSqlParser's object description.
   * @param sql The SQL string to parse.
   * @param remain Location to store a pointer to remaining part of @a sql in case an error occurred while parsing @a sql, or <tt>0</tt>.
   * @return A new Gda::Batch object, or <tt>0</tt> if an error occurred.
   */

  Glib::RefPtr<Batch> parse_string_as_batch(const Glib::ustring& sql, Glib::ustring& remain);

  Glib::RefPtr<Batch> parse_string_as_batch(const Glib::ustring& sql);
  
  
  /** Parse @a filename's contents and creates a Gda::Batch object which contains all the
   * Gda::Statement objects created while parsing (one object per SQL statement).
   * 
   *  @a filename's contents are parsed and Gda::Statement objects are created as long as no error is found. If an error is found
   * at some point, then the parsing stops, @a error may be set and <tt>0</tt> is returned
   * 
   * if @a sql is <tt>0</tt>, then the returned Gda::Batch object will contain no statement.
   * @param filename Name of the file to parse.
   * @return A new Gda::Batch object, or <tt>0</tt> if an error occurred.
   */
  Glib::RefPtr<Batch> parse_file_as_batch(const std::string& filename);

  
  #ifdef GLIBMM_PROPERTIES_ENABLED
/** 
   *
   * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
   * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
   * the value of the property changes.
   */
  Glib::PropertyProxy_ReadOnly<int> property_column_error() const;
#endif //#GLIBMM_PROPERTIES_ENABLED


  #ifdef GLIBMM_PROPERTIES_ENABLED
/** 
   *
   * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
   * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
   * the value of the property changes.
   */
  Glib::PropertyProxy_ReadOnly<int> property_line_error() const;
#endif //#GLIBMM_PROPERTIES_ENABLED


  #ifdef GLIBMM_PROPERTIES_ENABLED
/** 
   *
   * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
   * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
   * the value of the property changes.
   */
  Glib::PropertyProxy<int> property_mode() ;
#endif //#GLIBMM_PROPERTIES_ENABLED

#ifdef GLIBMM_PROPERTIES_ENABLED
/** 
   *
   * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
   * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
   * the value of the property changes.
   */
  Glib::PropertyProxy_ReadOnly<int> property_mode() const;
#endif //#GLIBMM_PROPERTIES_ENABLED

  #ifdef GLIBMM_PROPERTIES_ENABLED
/** 
   *
   * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
   * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
   * the value of the property changes.
   */
  Glib::PropertyProxy<int> property_tokenizer_flavour() ;
#endif //#GLIBMM_PROPERTIES_ENABLED

#ifdef GLIBMM_PROPERTIES_ENABLED
/** 
   *
   * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
   * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
   * the value of the property changes.
   */
  Glib::PropertyProxy_ReadOnly<int> property_tokenizer_flavour() const;
#endif //#GLIBMM_PROPERTIES_ENABLED


public:

public:
  //C++ methods used to invoke GTK+ virtual functions:

protected:
  //GTK+ Virtual Functions (override these to change behaviour):

  //Default Signal Handlers::


};

} // namespace Gda
} // namespace Gnome


namespace Glib
{
  /** A Glib::wrap() method for this object.
   * 
   * @param object The C instance.
   * @param take_copy False if the result should take ownership of the C instance. True if it should take a new copy or ref.
   * @result A C++ instance that wraps this C instance.
   *
   * @relates Gnome::Gda::SqlParser
   */
  Glib::RefPtr<Gnome::Gda::SqlParser> wrap(GdaSqlParser* object, bool take_copy = false);
}


#endif /* _LIBGDAMM_SQLPARSER_H */