2
// Generated by gtkmmproc -- DO NOT MODIFY!
3
#ifndef _LIBGDAMM_CONNECTION_H
4
#define _LIBGDAMM_CONNECTION_H
7
#include <glibmm/ustring.h>
8
#include <sigc++/sigc++.h>
10
/* $Id: connection.hg,v 1.35 2006/11/30 06:58:55 murrayc Exp $ */
15
* Copyright 2003 libgdamm Development Team
17
* This library is free software; you can redistribute it and/or
18
* modify it under the terms of the GNU Lesser General Public
19
* License as published by the Free Software Foundation; either
20
* version 2.1 of the License, or (at your option) any later version.
22
* This library is distributed in the hope that it will be useful,
23
* but WITHOUT ANY WARRANTY; without even the implied warranty of
24
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
25
* Lesser General Public License for more details.
27
* You should have received a copy of the GNU Lesser General Public
28
* License along with this library; if not, write to the Free
29
* Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
32
#include <libgdamm/transactionstatus.h>
33
#include <libgdamm/connectionevent.h>
34
#include <libgdamm/datamodel.h>
35
#include <libgdamm/statement.h>
36
#include <libgdamm/sqlbuilder.h>
37
#include <libgdamm/sqlparser.h>
38
#include <libgdamm/serveroperation.h>
39
#include <libgdamm/serverprovider.h> //For ServerProviderError, sometimes thrown by *execute*().
40
#include <libgdamm/value.h>
43
#ifndef DOXYGEN_SHOULD_SKIP_THIS
44
typedef struct _GdaConnection GdaConnection;
45
typedef struct _GdaConnectionClass GdaConnectionClass;
46
#endif /* DOXYGEN_SHOULD_SKIP_THIS */
53
{ class Connection_Class; } // namespace Gda
64
typedef GdaServerProviderInfo ServerProviderInfo;
66
/** Exception class for Gda connection errors.
68
class ConnectionError : public Glib::Error
73
CONNECTION_DSN_NOT_FOUND_ERROR,
74
CONNECTION_PROVIDER_NOT_FOUND_ERROR,
75
CONNECTION_PROVIDER_ERROR,
76
CONNECTION_NO_CNC_SPEC_ERROR,
77
CONNECTION_NO_PROVIDER_SPEC_ERROR,
78
CONNECTION_OPEN_ERROR,
79
CONNECTION_STATEMENT_TYPE_ERROR,
80
CONNECTION_CANT_LOCK_ERROR,
81
CONNECTION_TASK_NOT_FOUND_ERROR,
82
CONNECTION_UNSUPPORTED_THREADS_ERROR,
83
CONNECTION_CLOSED_ERROR,
84
CONNECTION_META_DATA_CONTEXT_ERROR
87
ConnectionError(Code error_code, const Glib::ustring& error_message);
88
explicit ConnectionError(GError* gobject);
91
#ifndef DOXYGEN_SHOULD_SKIP_THIS
94
static void throw_func(GError* gobject);
96
friend void wrap_init(); // uses throw_func()
98
#endif //DOXYGEN_SHOULD_SKIP_THIS
105
#ifndef DOXYGEN_SHOULD_SKIP_THIS
110
class Value<Gnome::Gda::ConnectionError::Code> : public Glib::Value_Enum<Gnome::Gda::ConnectionError::Code>
113
static GType value_type() G_GNUC_CONST;
117
#endif /* DOXYGEN_SHOULD_SKIP_THIS */
127
/** @addtogroup libgdammEnums libgdamm Enums and Flags */
130
* @ingroup libgdammEnums
131
* @par Bitwise operators:
132
* <tt>%ConnectionOptions operator|(ConnectionOptions, ConnectionOptions)</tt><br>
133
* <tt>%ConnectionOptions operator&(ConnectionOptions, ConnectionOptions)</tt><br>
134
* <tt>%ConnectionOptions operator^(ConnectionOptions, ConnectionOptions)</tt><br>
135
* <tt>%ConnectionOptions operator~(ConnectionOptions)</tt><br>
136
* <tt>%ConnectionOptions& operator|=(ConnectionOptions&, ConnectionOptions)</tt><br>
137
* <tt>%ConnectionOptions& operator&=(ConnectionOptions&, ConnectionOptions)</tt><br>
138
* <tt>%ConnectionOptions& operator^=(ConnectionOptions&, ConnectionOptions)</tt><br>
140
enum ConnectionOptions
142
CONNECTION_OPTIONS_NONE = 0x0,
143
CONNECTION_OPTIONS_READ_ONLY = 1 << 0,
144
CONNECTION_OPTIONS_SQL_IDENTIFIERS_CASE_SENSITIVE = 1 << 1,
145
CONNECTION_OPTIONS_THREAD_SAFE = 1 << 2,
146
CONNECTION_OPTIONS_THREAD_ISOLATED = 1 << 3,
147
CONNECTION_OPTIONS_AUTO_META_DATA = 1 << 4
150
/** @ingroup libgdammEnums */
151
inline ConnectionOptions operator|(ConnectionOptions lhs, ConnectionOptions rhs)
152
{ return static_cast<ConnectionOptions>(static_cast<unsigned>(lhs) | static_cast<unsigned>(rhs)); }
154
/** @ingroup libgdammEnums */
155
inline ConnectionOptions operator&(ConnectionOptions lhs, ConnectionOptions rhs)
156
{ return static_cast<ConnectionOptions>(static_cast<unsigned>(lhs) & static_cast<unsigned>(rhs)); }
158
/** @ingroup libgdammEnums */
159
inline ConnectionOptions operator^(ConnectionOptions lhs, ConnectionOptions rhs)
160
{ return static_cast<ConnectionOptions>(static_cast<unsigned>(lhs) ^ static_cast<unsigned>(rhs)); }
162
/** @ingroup libgdammEnums */
163
inline ConnectionOptions operator~(ConnectionOptions flags)
164
{ return static_cast<ConnectionOptions>(~static_cast<unsigned>(flags)); }
166
/** @ingroup libgdammEnums */
167
inline ConnectionOptions& operator|=(ConnectionOptions& lhs, ConnectionOptions rhs)
168
{ return (lhs = static_cast<ConnectionOptions>(static_cast<unsigned>(lhs) | static_cast<unsigned>(rhs))); }
170
/** @ingroup libgdammEnums */
171
inline ConnectionOptions& operator&=(ConnectionOptions& lhs, ConnectionOptions rhs)
172
{ return (lhs = static_cast<ConnectionOptions>(static_cast<unsigned>(lhs) & static_cast<unsigned>(rhs))); }
174
/** @ingroup libgdammEnums */
175
inline ConnectionOptions& operator^=(ConnectionOptions& lhs, ConnectionOptions rhs)
176
{ return (lhs = static_cast<ConnectionOptions>(static_cast<unsigned>(lhs) ^ static_cast<unsigned>(rhs))); }
183
#ifndef DOXYGEN_SHOULD_SKIP_THIS
188
class Value<Gnome::Gda::ConnectionOptions> : public Glib::Value_Flags<Gnome::Gda::ConnectionOptions>
191
static GType value_type() G_GNUC_CONST;
195
#endif /* DOXYGEN_SHOULD_SKIP_THIS */
205
* @ingroup libgdammEnums
207
enum ConnectionMetaType
209
CONNECTION_META_NAMESPACES,
210
CONNECTION_META_TYPES,
211
CONNECTION_META_TABLES,
212
CONNECTION_META_VIEWS,
213
CONNECTION_META_FIELDS,
214
CONNECTION_META_INDEXES
222
#ifndef DOXYGEN_SHOULD_SKIP_THIS
227
class Value<Gnome::Gda::ConnectionMetaType> : public Glib::Value_Enum<Gnome::Gda::ConnectionMetaType>
230
static GType value_type() G_GNUC_CONST;
234
#endif /* DOXYGEN_SHOULD_SKIP_THIS */
244
/** Manages a connection to a data source.
245
* This class offers access to all operations involving an opened connection to a database.
246
* Connection objects are obtained via the Client class.
248
* Once obtained, applications can use a Connection to execute commands, run transactions, and get information about all
249
* objects stored in the underlying database.
251
* @ingroup Connections
254
class Connection : public Glib::Object
257
#ifndef DOXYGEN_SHOULD_SKIP_THIS
260
typedef Connection CppObjectType;
261
typedef Connection_Class CppClassType;
262
typedef GdaConnection BaseObjectType;
263
typedef GdaConnectionClass BaseClassType;
265
private: friend class Connection_Class;
266
static CppClassType connection_class_;
270
Connection(const Connection&);
271
Connection& operator=(const Connection&);
274
explicit Connection(const Glib::ConstructParams& construct_params);
275
explicit Connection(GdaConnection* castitem);
277
#endif /* DOXYGEN_SHOULD_SKIP_THIS */
280
virtual ~Connection();
282
#ifndef DOXYGEN_SHOULD_SKIP_THIS
283
static GType get_type() G_GNUC_CONST;
286
static GType get_base_type() G_GNUC_CONST;
289
///Provides access to the underlying C GObject.
290
GdaConnection* gobj() { return reinterpret_cast<GdaConnection*>(gobject_); }
292
///Provides access to the underlying C GObject.
293
const GdaConnection* gobj() const { return reinterpret_cast<GdaConnection*>(gobject_); }
295
///Provides access to the underlying C instance. The caller is responsible for unrefing it. Use when directly setting fields in structs.
296
GdaConnection* gobj_copy();
307
static Glib::RefPtr<Connection> create();
310
static Glib::RefPtr<Connection> create_from_string(const Glib::ustring& provider_name, const Glib::ustring& cnc_string, const Glib::ustring& auth_string = Glib::ustring(), ConnectionOptions options = CONNECTION_OPTIONS_NONE);
312
/* This throws an error which we don't want to do in a constructor */
314
/** Opens a connection given a provider ID and a connection string. This
315
* allows applications to open connections without having to create
316
* a data source (DSN) in the configuration. The format of @a cnc_string is
317
* similar to PostgreSQL and MySQL connection strings. It is a semicolumn-separated
318
* series of <key>=<value> pairs, where each key and value are encoded as per RFC 1738,
319
* see gda_rfc1738_encode() for more information.
321
* The possible keys depend on the provider, the "gda-sql-4.0 -L" command
322
* can be used to list the actual keys for each installed database provider.
324
* For example the connection string to open an SQLite connection to a database
325
* file named "my_data.db" in the current directory would be <tt>"DB_DIR=.;DB_NAME=my_data"</tt>.
327
* The @a cnc_string string must have the following format:
328
* "[<provider>://][<username>[:<password>]@]<connection_params>"
329
* (if <username> and/or <password> are provided, and @a auth_string is <tt>0</tt>, then these username
330
* and passwords will be used, and if <provider> is provided and @a provider_name is <tt>0</tt> then this
331
* provider will be used). Note that if provided, <username>, <password> and <provider>
332
* must be encoded as per RFC 1738, see gda_rfc1738_encode() for more information.
334
* The @a auth_string must contain the authentication information for the server
335
* to accept the connection. It is a string containing semi-colon seperated named values, usually
336
* like "USERNAME=...;PASSWORD=..." where the ... are replaced by actual values. Note that each
337
* name and value must be encoded as per RFC 1738, see gda_rfc1738_encode() for more information.
339
* The actual named parameters required depend on the provider being used, and that list is available
340
* as the <parameter>auth_params</parameter> member of the Gda::ProviderInfo structure for each installed
341
* provider (use Gda::Config::get_provider_info() to get it). Similarly to the format of the connection
342
* string, use the "gda-sql-4.0 -L" command to list the possible named parameters.
344
* Additionally, it is possible to have the connection string
345
* respect the "<provider_name>://<real cnc string>" format, in which case the provider name
346
* and the real connection string will be extracted from that string (note that if @a provider_name
347
* is not <tt>0</tt> then it will still be used as the provider ID).\
349
* This method may fail with a GDA_CONNECTION_ERROR domain error (see the Gda::ConnectionError error codes)
350
* or a Gda::CONFIG_ERROR domain error (see the Gda::ConfigError error codes).
351
* @param provider_name Provider ID to connect to, or <tt>0</tt>.
352
* @param cnc_string Connection string.
353
* @param auth_string Authentication string, or <tt>0</tt>.
354
* @param options Options for the connection (see Gda::ConnectionOptions).
355
* @return A new Gda::Connection if connection opening was sucessfull or <tt>0</tt> if there was an error.
358
static Glib::RefPtr<Connection> open_from_string(const Glib::ustring& provider_name,
359
const Glib::ustring& cnc_string,
360
const Glib::ustring& auth_string = Glib::ustring(),
361
ConnectionOptions options = CONNECTION_OPTIONS_NONE);
364
/** Tries to open the connection.
365
* @return <tt>true</tt> if the connection is opened, and <tt>false</tt> otherwise.
369
/** Closes the connection to the underlying data source, but first emits the "conn_to_close" signal.
374
/** Checks whether a connection is open or not.
375
* @return <tt>true</tt> if the connection is open, <tt>false</tt> if it's not.
377
bool is_opened() const;
380
/** Gets the Gda::ConnectionOptions used to open this connection.
381
* @return The connection options.
383
ConnectionOptions get_options() const;
387
* @return The data source name the connection object is connected
390
Glib::ustring get_dsn() const;
392
/** Gets the connection string used to open this connection.
394
* The connection string is the string sent over to the underlying
395
* database provider, which describes the parameters to be used
396
* to open a connection on the underlying data source.
397
* @return The connection string used when opening the connection.
399
Glib::ustring get_cnc_string() const;
402
/** This function lets you clear the list of Gda::ConnectionEvent's of the
405
void clear_events_list();
408
/** Executes @a stmt.
410
* As @a stmt can, by desing (and if not abused), contain only one SQL statement, the
411
* return object will either be:
413
* <listitem>a Gda::DataSelect object (which is also a Gda::DataModel) if @a stmt is a SELECT statement
414
* (usually a GDA_SQL_STATEMENT_SELECT, see Gda::SqlStatementType)
415
* containing the results of the SELECT. The resulting data model is by default read only, but
416
* modifications can be enabled, see the Gda::DataSelect's documentation for more information.</listitem>
417
* <listitem>a Gda::Set for any other SQL statement which correctly executed. In this case
418
* (if the provider supports it), then the Gda::Set may contain value holders named:
420
* <listitem>a (<tt>int</tt>) Gda::Holder named "IMPACTED_ROWS"</listitem>
421
* <listitem>a (GObject) Gda::Holder named "EVENT" which contains a Gda::ConnectionEvent</listitem>
422
* </itemizedlist></listitem>
425
* If @a last_insert_row is not <tt>0</tt> and @a stmt is an INSERT statement, then it will contain (if the
426
* provider used by @a cnc supports it) a new Gda::Set object composed of value holders named "+<column number>"
427
* starting at column 0 which contain the actual inserted values. For example if a table is composed of an 'id' column
428
* which is auto incremented and a 'name' column then the execution of a "INSERT INTO mytable (name) VALUES ('joe')"
429
* query will return a Gda::Set with two holders:
431
* <listitem>one with the '+0' ID which may for example contain 1 (note that its "name" property should be "id")</listitem>
432
* <listitem>one with the '+1' ID which will contain 'joe' (note that its "name" property should be "name")</listitem>
435
* This method may fail with a Gda::SERVER_PROVIDER_ERROR domain error (see the Gda::ServerProviderError error codes).
437
* @note If @a stmt is a SELECT statement which has some parameters and if @params is <tt>0</tt>, then the statement can't
438
* be executed and this method will return <tt>0</tt>.
440
* @note If @a stmt is a SELECT statement which has some parameters and if @params is not <tt>0</tt> but contains some
441
* invalid parameters, then the statement can't be executed and this method will return <tt>0</tt>, unless the
442
* @a model_usage has the GDA_STATEMENT_MODEL_ALLOW_NOPARAM flag.
444
* @note If @a stmt is a SELECT statement which has some parameters and if @params is not <tt>0</tt> but contains some
445
* invalid parameters and if @a model_usage has the GDA_STATEMENT_MODEL_ALLOW_NOPARAM flag, then the returned
446
* data model will contain no row but will have all the correct columns (even though some of the columns might
447
* report as GDA_TYPE_<tt>0</tt>). In this case, if (after this method call) any of @params' parameters change
448
* then the resulting data model will re-run itself, see the GdaDataSelect's
449
* auto-reset property for more information.
451
* @note if @a model_usage does not contain the GDA_STATEMENT_MODEL_RANDOM_ACCESS or
452
* GDA_STATEMENT_MODEL_CURSOR_FORWARD flags, then the default will be to return a random access data model
454
* @note If @a stmt is a SELECT statement which returns blob values (of type Gda::TYPE_BLOB), then an implicit
455
* transaction will have been started by the database provider, and it's up to the caller to close the transaction
456
* (which will then be locked) once all the blob ressources have been
457
* liberated (when the returned data model is destroyed). See the section about
458
* Binary large objects (BLOBs) for more information.
460
* Also see the provider's limitations, and the
461
* Advanced GdaDataSelect usage sections.
462
* @param stmt A Gda::Statement object.
463
* @param params A Gda::Set object (which can be obtained using Gda::Statement::get_parameters()), or <tt>0</tt>.
464
* @param model_usage In the case where @a stmt is a SELECT statement, specifies how the returned data model will be used.
465
* @param last_insert_row A place to store a new Gda::Set object which contains the values of the last inserted row, or <tt>0</tt>.
466
* @return A Object, or <tt>0</tt> if an error occurred.
469
Glib::RefPtr<Glib::Object> statement_execute(const Glib::RefPtr<const Statement>& stmt, const Glib::RefPtr<const Set>& params, StatementModelUsage model_usage, Glib::RefPtr<const Set>& last_insert_row);
471
//TODO: Documentation:
472
Glib::RefPtr<Glib::Object> statement_execute(const Glib::RefPtr<const Statement>& stmt, StatementModelUsage model_usage = STATEMENT_MODEL_RANDOM_ACCESS);
475
Glib::RefPtr<Glib::Object> statement_execute(const Glib::ustring& sql, StatementModelUsage model_usage = STATEMENT_MODEL_RANDOM_ACCESS);
477
//_WRAP_METHOD(Glib::RefPtr<DataModel> statement_execute_select(const Glib::RefPtr<const Statement>& stmt, const Glib::RefPtr<const Set>& params), gda_connection_statement_execute_select, errthrow)
478
//We instead create a version that can take an optional usage parameter too.
481
/** Executes a selection command on the given connection.
483
* This function returns a Gda::DataModel resulting from the SELECT statement, or <tt>0</tt>
484
* if an error occurred.
486
* This function is just a convenience function around the statement_execute()
489
* See the documentation of the statement_execute() for information
490
* about the @params list of parameters.
491
* @param stmt A Gda::Statement object.
492
* @param params A Gda::Set object (which can be obtained using Gda::Statement::get_parameters()), or <tt>0</tt>.
493
* @param model_usage Specifies how the returned data model will be used as a Gda::StatementModelUsage enum.
494
* @param col_types An array of GType to request each returned Gda::DataModel's column's GType, terminated with the G_TYPE_NONE
495
* value. Any value left to 0 will make the database provider determine the real GType. @a col_types can also be <tt>0</tt> if no
496
* column type is specified.
497
* @return A Gda::DataModel containing the data returned by the
498
* data source, or <tt>0</tt> if an error occurred.
500
Glib::RefPtr<DataModel> statement_execute_select(const Glib::RefPtr<const Statement>& stmt, const Glib::RefPtr<const Set>& params, StatementModelUsage model_usage, const std::vector<GType>& col_types);
503
//This custom-written method has more optional methods than gda_connection_execute_select_command().
504
//TODO: Documentation:
505
Glib::RefPtr<DataModel> statement_execute_select(const Glib::RefPtr<const Statement>& stmt, StatementModelUsage model_usage = STATEMENT_MODEL_RANDOM_ACCESS);
506
Glib::RefPtr<DataModel> statement_execute_select(const Glib::ustring& sql, StatementModelUsage model_usage = STATEMENT_MODEL_RANDOM_ACCESS);
508
//This custom-written method has more optional methods than gda_connection_execute_select_command().
509
//TODO: Documentation:
510
Glib::RefPtr<DataModel> statement_execute_select(const Glib::RefPtr<const Statement>& stmt, const Glib::RefPtr<const Set>& params, StatementModelUsage model_usage = STATEMENT_MODEL_RANDOM_ACCESS);
511
Glib::RefPtr<DataModel> statement_execute_select(const Glib::ustring& sql, const Glib::RefPtr<const Set>& params, StatementModelUsage model_usage = STATEMENT_MODEL_RANDOM_ACCESS);
514
//TODO: Documentation:
515
//Note that we add the prefix _builder() because overloading on different RefPtr<> types seems to be ambiguous.
516
Glib::RefPtr<DataModel> statement_execute_select_builder(const Glib::RefPtr<const SqlBuilder>& stmt, StatementModelUsage model_usage = STATEMENT_MODEL_RANDOM_ACCESS);
518
//TODO: Documentation:
519
//Note that we add the prefix _builder() because overloading on different RefPtr<> types seems to be ambiguous.
520
Glib::RefPtr<DataModel> statement_execute_select_builder(const Glib::RefPtr<const SqlBuilder>& stmt, const Glib::RefPtr<const Set>& params, StatementModelUsage model_usage = STATEMENT_MODEL_RANDOM_ACCESS);
523
/** Executes a non-selection statement on the given connection. The gda_execute_non_select_command() method can be easier
524
* to use if one prefers to use some SQL directly.
526
* This function returns the number of rows affected by the execution of @a stmt, or -1
527
* if an error occurred, or -2 if the connection's provider does not return the number of rows affected.
529
* This function is just a convenience function around the statement_execute()
531
* See the documentation of the statement_execute() for information
532
* about the @params list of parameters.
534
* See statement_execute() form more information about @a last_insert_row.
535
* @param stmt A Gda::Statement object.
536
* @param params A Gda::Set object (which can be obtained using Gda::Statement::get_parameters()), or <tt>0</tt>.
537
* @param last_insert_row A place to store a new Gda::Set object which contains the values of the last inserted row, or <tt>0</tt>.
538
* @return The number of rows affected (>=0) or -1 or -2.
541
//TODO: Documentation:
542
//TODO: It's not nice that these two method overloads differ only by the constness of the set.
543
int statement_execute_non_select(const Glib::RefPtr<const Statement>& stmt, const Glib::RefPtr<const Set>& params, Glib::RefPtr<const Set>& last_insert_row);
545
//TODO: Documentation:
546
int statement_execute_non_select(const Glib::RefPtr<const Statement>& stmt, const Glib::RefPtr<const Set>& params);
548
//TODO: Documentation:
549
int statement_execute_non_select(const Glib::RefPtr<const Statement>& stmt);
552
int statement_execute_non_select(const Glib::ustring& sql);
554
//TODO: Documentation:
555
int statement_execute_non_select_builder(const Glib::RefPtr<const SqlBuilder>& builder);
557
//TODO: Documentation:
558
int statement_execute_non_select_builder(const Glib::RefPtr<const SqlBuilder>& builder, const Glib::RefPtr<const Set>& params);
561
/** This method is similar to statement_execute() but is asynchronous as it method returns
562
* immediately with a task ID. It's up to the caller to use async_fetch_result() regularly to check
563
* if the statement's execution is finished.
565
* It is possible to call the method several times to request several statements to be executed asynchronously, the
566
* statements will be executed in the order in which they were requested.
568
* The parameters, if present, are copied and can be discarded or modified before the statement is actually executed.
569
* The @a stmt object is not copied but simply referenced (for performance reasons), and if it is modified before
570
* it is actually executed, then its execution will not occur. It is however safe to call Glib::object_unref() on it if
571
* it's not needed anymore.
573
* The execution failure of any statement has no impact on the execution of other statements except for example if
574
* the connection has a transaction started and the failure invalidates the transaction (as decided by the database
578
* @param stmt A Gda::Statement object.
579
* @param params A Gda::Set object (which can be obtained using Gda::Statement::get_parameters()), or <tt>0</tt>.
580
* @param model_usage In the case where @a stmt is a SELECT statement, specifies how the returned data model will be used.
581
* @param col_types An array of GType to request each returned Gda::DataModel's column's GType, terminated with the G_TYPE_NONE.
582
* @param need_last_insert_row <tt>true</tt> if the values of the last interted row must be computed.
583
* @return A task ID, or 0 if an error occurred (not an error regarding @a stmt itself as its execution has not yet started
584
* but any other error).
586
guint async_statement_execute(const Glib::RefPtr<const Statement>& stmt, const Glib::RefPtr<const Set>& params, StatementModelUsage model_usage, const std::vector<GType>& col_types, bool need_last_insert_row = false);
588
//TODO: Wrap the last_insert_row parameter properly and add an overload without it:
590
/** Use this method to obtain the result of the execution of a statement which has been executed asynchronously by
591
* calling async_statement_execute(). This function is non locking and will return <tt>0</tt> (and no
592
* error will be set) if the statement has not been executed yet.
594
* If the statement has been executed, this method returns the same value as statement_execute()
595
* would have if the statement had been
596
* executed synchronously.
599
* @param task_id A task ID returned by async_statement_execute().
600
* @param last_insert_row A place to store a new Gda::Set object which contains the values of the last inserted row, or <tt>0</tt>.
601
* @return A Object, or <tt>0</tt> if an error occurred.
603
Glib::RefPtr<Glib::Object> async_fetch_result(guint task_id, GdaSet ** last_insert_row);
605
/** Requests that a task be cancelled. This operation may of may not have any effect
606
* depending on the task's status, even if it returns <tt>true</tt>. If it returns <tt>false</tt>,
607
* then the task has not been cancelled.
610
* @param task_id A task ID returned by async_statement_execute().
611
* @return <tt>true</tt> if no error occurred.
613
bool async_cancel(guint task_id);
615
//TODO: #m4 __CONVERSION(`GSList*',`std::vector<Glib::Object>',`$2(Glib::SListHandler<Glib::RefPtr<const Statement> >::slist_to_vector((GSList*)$3, Glib::OWNERSHIP_DEEP))')
616
// _WRAP_METHOD(std::vector<Glib::Object> repetitive_statement_execute(GdaRepetitiveStatement *rstmt, StatementModelUsage model_usage, const std::vector<GType>& col_types, gboolean stop_on_error = true), gda_connection_repetitive_statement_execute, errthrow)
618
//Note that we do not add a non-const version of this because the documentation says that it should not be modified:
620
/** Get the status of @a cnc regarding transactions. The returned object should not be modified
621
* or destroyed; however it may be modified or destroyed by the connection itself.
623
* If <tt>0</tt> is returned, then no transaction has been associated with @a cnc
624
* @return A Gda::TransactionStatus object, or <tt>0</tt>.
626
Glib::RefPtr<const TransactionStatus> get_transaction_status() const;
629
/** Starts a transaction on the data source, identified by the
632
* Before starting a transaction, you can check whether the underlying
633
* provider does support transactions or not by using the
634
* supports_feature() function.
635
* @param name The name of the transation to start, or <tt>0</tt>.
636
* @param level The requested transaction level (Gda::TRANSACTION_ISOLATION_UNKNOWN if not specified).
637
* @return <tt>true</tt> if the transaction was started successfully, <tt>false</tt>
640
bool begin_transaction(const Glib::ustring& name, TransactionIsolation level);
642
/** Commits the given transaction to the backend database. You need to call
643
* begin_transaction() first.
644
* @param name The name of the transation to commit, or <tt>0</tt>.
645
* @return <tt>true</tt> if the transaction was finished successfully,
646
* <tt>false</tt> otherwise.
648
bool commit_transaction(const Glib::ustring& name);
650
/** Rollbacks the given transaction. This means that all changes
651
* made to the underlying data source since the last call to
652
* #begin_transaction() or #commit_transaction()
654
* @param name The name of the transation to commit, or <tt>0</tt>.
655
* @return <tt>true</tt> if the operation was successful, <tt>false</tt> otherwise.
657
bool rollback_transaction(const Glib::ustring& name);
660
/** Adds a SAVEPOINT named @a name.
661
* @param name Name of the savepoint to add.
662
* @return <tt>true</tt> if no error occurred.
664
bool add_savepoint(const Glib::ustring& name);
666
/** Rollback all the modifications made after the SAVEPOINT named @a name.
667
* @param name Name of the savepoint to rollback to.
668
* @return <tt>true</tt> if no error occurred.
670
bool rollback_savepoint(const Glib::ustring& name);
672
/** Delete the SAVEPOINT named @a name when not used anymore.
673
* @param name Name of the savepoint to delete.
674
* @return <tt>true</tt> if no error occurred.
676
bool delete_savepoint(const Glib::ustring& name);
679
//Use a special conversion here, because we should not own any part of the returned GList,
680
//according to the documentation for gda_connection_get_events(),
681
//and because we need to unconst the GList.:
684
/** Retrieves a list of the last errors occurred during the connection. The returned list is
685
* chronologically ordered such as that the most recent event is the Gda::ConnectionEvent of the first node.
687
* Warning: the @a cnc object may change the list if connection events occur
688
* @return A List of Gda::ConnectionEvent objects (the list should not be modified).
690
std::vector< Glib::RefPtr<ConnectionEvent> > get_events();
692
/** Retrieves a list of the last errors occurred during the connection. The returned list is
693
* chronologically ordered such as that the most recent event is the Gda::ConnectionEvent of the first node.
695
* Warning: the @a cnc object may change the list if connection events occur
696
* @return A List of Gda::ConnectionEvent objects (the list should not be modified).
698
std::vector< Glib::RefPtr<const ConnectionEvent> > get_events() const;
701
bool insert_row_into_table(const Glib::ustring& table, const std::vector<Glib::ustring>& col_names, const std::vector<Value>& values);
704
bool update_row_in_table(const Glib::ustring& table, const Glib::ustring& condition_column_name, const Value& condition_value, const std::vector<Glib::ustring>& col_names, const std::vector<Value>& values);
707
bool delete_row_from_table(const Glib::ustring& table, const Glib::ustring& condition_column_name, const Value& condition_value);
710
/** Produces a fully quoted and escaped string from a GValue
711
* @param from Value to convert from.
712
* @return Escaped and quoted value or <tt>0</tt> if not supported.
714
Glib::ustring value_to_sql_string(const Value& from) const;
717
/** Asks the underlying provider for if a specific feature is supported.
718
* @param feature Feature to ask for.
719
* @return <tt>true</tt> if the provider supports it, <tt>false</tt> if not.
721
bool supports_feature(ConnectionFeature feature) const;
724
/** Gets the user name used to open this connection.
725
* @return The user name.
727
Glib::ustring get_authentication() const;
729
//TODO: Wrap the GdaSet** output parameter:
730
//_WRAP_METHOD(Glib::RefPtr<Statement> parse_sql_string(const Glib::ustring& sql, GdaSet** params), gda_connection_parse_sql_string, errthrow)
732
/** This helps to parse a SQL string.
734
* @param sql An SQL command to parse.
735
* @result A Statement representing the SQL command or an empty RefPtr if an error occurred.
737
Glib::RefPtr<Statement> parse_sql_string(const Glib::ustring& sql);
740
/** Creates a new parser object able to parse the SQL dialect understood by @a cnc.
741
* If the Gda::ServerProvider object internally used by @a cnc does not have its own parser,
742
* then <tt>0</tt> is returned, and a general SQL parser can be obtained
743
* using Gda::SqlParser::new().
744
* @return A new Gda::SqlParser object, or <tt>0</tt>.
746
Glib::RefPtr<SqlParser> create_parser();
749
/** Gets the name (identifier) of the database provider used by @a cnc
750
* @return A non modifiable string.
752
Glib::ustring get_provider_name() const;
754
/** Update the full meta store information.
756
* Note that this may take some time for big databases
757
* @return <tt>true</tt> if no error occurred.
759
bool update_meta_store();
761
/** Update the meta store information @a id
763
* This can speed up the update of the meta store if you only need a
764
* specific information
765
* @param id An id for the information to update (see http://library.gnome.org/devel/libgda/unstable/information_schema.html)
766
* @return <tt>true</tt> if no error occurred.
768
bool update_meta_store(const Glib::ustring& id);
771
/** Update the meta store information for the table named @a table_name
773
* This can speed up the update of the meta store if you only need the information
774
* for a specific table
775
* @param table_name Name of the table where the information is needed
776
* @param schema_name Name of the schema @table_name is in, or "" to update
777
* all tables with the given name. As with update_meta_store_table_names(),
778
* specifying a non-empty schema_name speeds up the operation, just not as
779
* significantly as with update_meta_store_table_names() because the
780
* operation itself is already pretty quick.
781
* @return <tt>true</tt> if no error occurred.
783
bool update_meta_store_table(const Glib::ustring& table_name, const Glib::ustring& schema_name = Glib::ustring());
785
/** Update the meta store information for the table names.
787
* This can speed up the update of the meta store if you only need the list of table names.
789
* @param schema_name Name of the schema whose tables to update, or "" to
790
* update all tables. For example, for postgresql this function takes a
791
* considerable amount of time when doing this. If you don't need
792
* information about internal postgresql tables, then you can speed up the
793
* process by only updating the tables for the "public" schema.
794
* Unfortunately, schema names are not common between different database
796
* @return <tt>true</tt> if no error occurred.
798
bool update_meta_store_table_names(const Glib::ustring& schema_name = Glib::ustring());
800
/** Update the meta store information for the data types.
802
* This can speed up the update of the meta store if you only need the data types.
804
* @return <tt>true</tt> if no error occurred.
806
bool update_meta_store_data_types();
809
/** Ask the database accessed through the @a cnc connection to prepare the usage of @a stmt. This is only useful
810
* if @a stmt will be used more than once (however some database providers may always prepare statements
811
* before executing them).
813
* This function is also useful to make sure @a stmt is fully understood by the database before actually executing it.
815
* Note however that it is also possible that statement_prepare() fails when
816
* statement_execute() does not fail (this will usually be the case with statements such as
817
* <![CDATA["SELECT * FROM ##tablename::string"]]> because database usually don't allow variables to be used in place of a
819
* @param stmt A Gda::Statement object.
820
* @return <tt>true</tt> if no error occurred.
822
bool statement_prepare(const Glib::RefPtr<const Statement>& stmt);
825
/** see #gda_connection_get_meta_store_data
826
* @param meta_type Describes which data to get.
827
* @param filters A List of Gda::Holder objects.
828
* @return A Gda::DataModel containing the data required. The caller is responsible
829
* for freeing the returned model using Glib::object_unref().
831
Glib::RefPtr<DataModel> get_meta_store_data(ConnectionMetaType meta_type, const std::vector< Glib::RefPtr<Holder> >& filters);
834
Glib::RefPtr<DataModel> get_meta_store_data(ConnectionMetaType meta_type);
837
/** Get or initializes the Gda::MetaStore associated to @a cnc
838
* @return A Gda::MetaStore object.
840
Glib::RefPtr<MetaStore> get_meta_store();
842
/** Get or initializes the Gda::MetaStore associated to @a cnc
843
* @return A Gda::MetaStore object.
845
Glib::RefPtr<const MetaStore> get_meta_store() const;
848
/** Executes all the statements contained in @a batch (in the order in which they were added to @a batch), and
849
* returns a list of Object objects, at most one Object for each statement; see statement_execute()
850
* for details about the returned objects.
852
* If one of the statement fails, then none of the subsequent statement will be executed, and the method returns
853
* the list of Object created by the correct execution of the previous statements. If a transaction is required,
854
* then it should be started before calling this method.
855
* @param batch A Gda::Batch object which contains all the statements to execute.
856
* @param params A Gda::Set object (which can be obtained using Gda::Batch::get_parameters()), or <tt>0</tt>.
857
* @param model_usage Specifies how the returned data model(s) will be used, as a Gda::StatementModelUsage enum.
858
* @return A new list of Object objects.
860
std::vector< Glib::RefPtr<Glib::Object> > batch_execute(const Glib::RefPtr<Batch>& batch, const Glib::RefPtr<const Set>& params, StatementModelUsage model_usage);
863
/** Creates a new Gda::ServerOperation object which can be modified in order
864
* to perform the type type of action. It is a wrapper around the Gda::ServerProvider::create_operation()
866
* @param type The type of operation requested.
867
* @param options An optional list of parameters.
868
* @return A new Gda::ServerOperation object, or <tt>0</tt> in the connection's provider does not support the @a type type
869
* of operation or if an error occurred.
871
Glib::RefPtr<ServerOperation> create_operation(ServerOperationType type, const Glib::RefPtr<const Set>& options);
873
/** Performs the operation described by @a op (which should have been created using
874
* create_operation()). It is a wrapper around the Gda::ServerProvider::perform_operation()
876
* @param op A Gda::ServerOperation object.
877
* @return <tt>true</tt> if no error occurred.
879
bool perform_operation(const Glib::RefPtr<ServerOperation>& op);
882
/** Gets a pointer to the Gda::ServerProvider object used to access the database
883
* @return The Gda::ServerProvider (NEVER <tt>0</tt>).
885
Glib::RefPtr<ServerProvider> get_provider();
887
/** Gets a pointer to the Gda::ServerProvider object used to access the database
888
* @return The Gda::ServerProvider (NEVER <tt>0</tt>).
890
Glib::RefPtr<const ServerProvider> get_provider() const;
893
/** Use this method to get a correctly quoted (if necessary) SQL identifier which can be used
894
* in SQL statements, from @a id. If @a id is already correctly quoted for @a cnc, then a copy of @a id
897
* This method may add double quotes (or other characters) around @a id:
899
* <listitem>if @a id is a reserved SQL keyword (such as SELECT, INSERT, ...)</listitem>
900
* <listitem>if @a id contains non allowed characters such as spaces, or if it starts with a digit</listitem>
901
* <listitem>in any other event as necessary for @a cnc, depending on the the options passed when opening the @a cnc
902
* connection, and specifically the
903
* GDA_CONNECTION_OPTIONS_SQL_IDENTIFIERS_CASE_SENSITIVE option.</listitem>
906
* One can safely pass an already quoted @a id to this method, either with quoting characters allowed by @a cnc or using the
907
* double quote (") character.
910
* @param id An SQL identifier.
911
* @return A new string, to free with Glib::free() once not needed anymore.
913
Glib::ustring quote_sql_identifier(const Glib::ustring& id) const;
916
/** Renders @a stmt as an SQL statement, adapted to the SQL dialect used by @a cnc
917
* @param stmt A Gda::Statement object.
918
* @param params A Gda::Set object (which can be obtained using Gda::Statement::get_parameters()), or <tt>0</tt>.
919
* @param flags SQL rendering flags, as Gda::StatementSqlFlag OR'ed values.
920
* @param params_used A place to store the list of individual Gda::Holder objects within @params which have been used.
921
* @return A new string, or <tt>0</tt> if an error occurred.
925
//TODO: What errors does this really throw? Document that in libgda.
926
//TODO: Add an overload without the params_used.
927
/** Renders a Statement as a SQL statement string, adapted to the SQL dialect used by the connection.
929
* @param stmt A Statement object.
930
* @param A Set object (which can be obtained using Statement::get_parameters()).
931
* @param flags SQL rendering flags, as StatementSqlFlag OR'ed values
932
* @param params_used A place to store the list of individual Holder objects within @a params which have been used.
933
* @throws ConnectionError
935
Glib::ustring statement_to_sql(const Glib::RefPtr<const Statement>& stmt, const Glib::RefPtr<const Set>& params, StatementSqlFlag flags, std::vector< Glib::RefPtr<Holder> >& params_used) const;
937
/** Renders a Statement as a SQL statement string, adapted to the SQL dialect used by the connection.
939
* @param stmt A Statement object.
940
* @param A Set object (which can be obtained using Statement::get_parameters()).
941
* @param flags SQL rendering flags, as StatementSqlFlag OR'ed values
942
* @throws ConnectionError
944
Glib::ustring statement_to_sql(const Glib::RefPtr<const Statement>& stmt, const Glib::RefPtr<const Set>& params, StatementSqlFlag flags = STATEMENT_SQL_PARAMS_AS_VALUES) const;
946
/** Renders a Statement as a SQL statement string, adapted to the SQL dialect used by the connection.
948
* @param stmt A Statement object..
949
* @param flags SQL rendering flags, as StatementSqlFlag OR'ed values
950
* @throws ConnectionError
952
Glib::ustring statement_to_sql(const Glib::RefPtr<const Statement>& stmt, StatementSqlFlag flags = STATEMENT_SQL_PARAMS_AS_VALUES) const;
957
* <tt>void on_my_%error(const Glib::RefPtr<ConnectionEvent>& error)</tt>
960
Glib::SignalProxy1< void,const Glib::RefPtr<ConnectionEvent>& > signal_error();
965
* <tt>void on_my_%conn_opened()</tt>
968
Glib::SignalProxy0< void > signal_conn_opened();
973
* <tt>void on_my_%conn_to_close()</tt>
976
Glib::SignalProxy0< void > signal_conn_to_close();
981
* <tt>void on_my_%conn_closed()</tt>
984
Glib::SignalProxy0< void > signal_conn_closed();
989
* <tt>void on_my_%dsn_changed()</tt>
992
Glib::SignalProxy0< void > signal_dsn_changed();
997
* <tt>void on_my_%transaction_status_changed()</tt>
1000
Glib::SignalProxy0< void > signal_transaction_status_changed();
1003
#ifdef GLIBMM_PROPERTIES_ENABLED
1004
/** Provider to use.
1006
* You rarely need to use properties because there are get_ and set_ methods for almost all of them.
1007
* @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
1008
* the value of the property changes.
1010
Glib::PropertyProxy< Glib::RefPtr<ServerProvider> > property_provider() ;
1011
#endif //#GLIBMM_PROPERTIES_ENABLED
1013
#ifdef GLIBMM_PROPERTIES_ENABLED
1014
/** Provider to use.
1016
* You rarely need to use properties because there are get_ and set_ methods for almost all of them.
1017
* @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
1018
* the value of the property changes.
1020
Glib::PropertyProxy_ReadOnly< Glib::RefPtr<ServerProvider> > property_provider() const;
1021
#endif //#GLIBMM_PROPERTIES_ENABLED
1023
#ifdef GLIBMM_PROPERTIES_ENABLED
1024
/** Authentication string to use.
1026
* You rarely need to use properties because there are get_ and set_ methods for almost all of them.
1027
* @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
1028
* the value of the property changes.
1030
Glib::PropertyProxy<Glib::ustring> property_auth_string() ;
1031
#endif //#GLIBMM_PROPERTIES_ENABLED
1033
#ifdef GLIBMM_PROPERTIES_ENABLED
1034
/** Authentication string to use.
1036
* You rarely need to use properties because there are get_ and set_ methods for almost all of them.
1037
* @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
1038
* the value of the property changes.
1040
Glib::PropertyProxy_ReadOnly<Glib::ustring> property_auth_string() const;
1041
#endif //#GLIBMM_PROPERTIES_ENABLED
1043
#ifdef GLIBMM_PROPERTIES_ENABLED
1044
/** Connection string to use.
1046
* You rarely need to use properties because there are get_ and set_ methods for almost all of them.
1047
* @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
1048
* the value of the property changes.
1050
Glib::PropertyProxy<Glib::ustring> property_cnc_string() ;
1051
#endif //#GLIBMM_PROPERTIES_ENABLED
1053
#ifdef GLIBMM_PROPERTIES_ENABLED
1054
/** Connection string to use.
1056
* You rarely need to use properties because there are get_ and set_ methods for almost all of them.
1057
* @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
1058
* the value of the property changes.
1060
Glib::PropertyProxy_ReadOnly<Glib::ustring> property_cnc_string() const;
1061
#endif //#GLIBMM_PROPERTIES_ENABLED
1063
#ifdef GLIBMM_PROPERTIES_ENABLED
1066
* You rarely need to use properties because there are get_ and set_ methods for almost all of them.
1067
* @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
1068
* the value of the property changes.
1070
Glib::PropertyProxy<Glib::ustring> property_dsn() ;
1071
#endif //#GLIBMM_PROPERTIES_ENABLED
1073
#ifdef GLIBMM_PROPERTIES_ENABLED
1076
* You rarely need to use properties because there are get_ and set_ methods for almost all of them.
1077
* @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
1078
* the value of the property changes.
1080
Glib::PropertyProxy_ReadOnly<Glib::ustring> property_dsn() const;
1081
#endif //#GLIBMM_PROPERTIES_ENABLED
1083
#ifdef GLIBMM_PROPERTIES_ENABLED
1084
/** GdaMetaStore used by the connection.
1086
* You rarely need to use properties because there are get_ and set_ methods for almost all of them.
1087
* @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
1088
* the value of the property changes.
1090
Glib::PropertyProxy< Glib::RefPtr<MetaStore> > property_meta_store() ;
1091
#endif //#GLIBMM_PROPERTIES_ENABLED
1093
#ifdef GLIBMM_PROPERTIES_ENABLED
1094
/** GdaMetaStore used by the connection.
1096
* You rarely need to use properties because there are get_ and set_ methods for almost all of them.
1097
* @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
1098
* the value of the property changes.
1100
Glib::PropertyProxy_ReadOnly< Glib::RefPtr<MetaStore> > property_meta_store() const;
1101
#endif //#GLIBMM_PROPERTIES_ENABLED
1103
#ifdef GLIBMM_PROPERTIES_ENABLED
1106
* You rarely need to use properties because there are get_ and set_ methods for almost all of them.
1107
* @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
1108
* the value of the property changes.
1110
Glib::PropertyProxy<ConnectionOptions> property_options() ;
1111
#endif //#GLIBMM_PROPERTIES_ENABLED
1113
#ifdef GLIBMM_PROPERTIES_ENABLED
1116
* You rarely need to use properties because there are get_ and set_ methods for almost all of them.
1117
* @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
1118
* the value of the property changes.
1120
Glib::PropertyProxy_ReadOnly<ConnectionOptions> property_options() const;
1121
#endif //#GLIBMM_PROPERTIES_ENABLED
1123
#ifdef GLIBMM_PROPERTIES_ENABLED
1124
/** Tells if the connection acts as a thread wrapper around another connection, making it completely thread safe.
1126
* You rarely need to use properties because there are get_ and set_ methods for almost all of them.
1127
* @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
1128
* the value of the property changes.
1130
Glib::PropertyProxy_ReadOnly<bool> property_is_wrapper() const;
1131
#endif //#GLIBMM_PROPERTIES_ENABLED
1134
#ifdef GLIBMM_PROPERTIES_ENABLED
1135
/** Make the connection set up a monitoring function in the mainloop to monitor the wrapped connection.
1137
* You rarely need to use properties because there are get_ and set_ methods for almost all of them.
1138
* @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
1139
* the value of the property changes.
1141
Glib::PropertyProxy<bool> property_monitor_wrapped_in_mainloop() ;
1142
#endif //#GLIBMM_PROPERTIES_ENABLED
1144
#ifdef GLIBMM_PROPERTIES_ENABLED
1145
/** Make the connection set up a monitoring function in the mainloop to monitor the wrapped connection.
1147
* You rarely need to use properties because there are get_ and set_ methods for almost all of them.
1148
* @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
1149
* the value of the property changes.
1151
Glib::PropertyProxy_ReadOnly<bool> property_monitor_wrapped_in_mainloop() const;
1152
#endif //#GLIBMM_PROPERTIES_ENABLED
1154
//We ignore the thread-owner property because it is strange and should only be used (well, modified) by provider implementations.
1155
#ifdef GLIBMM_PROPERTIES_ENABLED
1158
* You rarely need to use properties because there are get_ and set_ methods for almost all of them.
1159
* @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
1160
* the value of the property changes.
1162
Glib::PropertyProxy<int> property_events_history_size() ;
1163
#endif //#GLIBMM_PROPERTIES_ENABLED
1165
#ifdef GLIBMM_PROPERTIES_ENABLED
1168
* You rarely need to use properties because there are get_ and set_ methods for almost all of them.
1169
* @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
1170
* the value of the property changes.
1172
Glib::PropertyProxy_ReadOnly<int> property_events_history_size() const;
1173
#endif //#GLIBMM_PROPERTIES_ENABLED
1179
//C++ methods used to invoke GTK+ virtual functions:
1182
//GTK+ Virtual Functions (override these to change behaviour):
1184
//Default Signal Handlers::
1185
virtual void on_error(const Glib::RefPtr<ConnectionEvent>& error);
1186
virtual void on_conn_opened();
1187
virtual void on_conn_to_close();
1188
virtual void on_conn_closed();
1189
virtual void on_dsn_changed();
1190
virtual void on_transaction_status_changed();
1196
} // namespace Gnome
1201
/** A Glib::wrap() method for this object.
1203
* @param object The C instance.
1204
* @param take_copy False if the result should take ownership of the C instance. True if it should take a new copy or ref.
1205
* @result A C++ instance that wraps this C instance.
1207
* @relates Gnome::Gda::Connection
1209
Glib::RefPtr<Gnome::Gda::Connection> wrap(GdaConnection* object, bool take_copy = false);
1213
#endif /* _LIBGDAMM_CONNECTION_H */