2 # This file is part of duit.
4 # duit is free software; you can redistribute it and/or modify
5 # it under the terms of the GNU Lesser General Public License as published by
6 # the Free Software Foundation; either version 2.1 of the License, or
7 # (at your option) any later version.
9 # duit is distributed in the hope that it will be useful,
10 # but WITHOUT ANY WARRANTY; without even the implied warranty of
11 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 # GNU Lesser General Public License for more details.
14 # You should have received a copy of the GNU Lesser General Public License
15 # along with duit; if not, write to the Free Software
16 # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
23 # Definitions for wrapping GDA
32 public import gtkc.glibtypes;
33 public import gtkc.gobjecttypes;
34 public import glib.Str;
47 public struct GdaConnection{}
48 public struct GdaError{}
49 public struct GdaTransaction{}
50 public struct GdaDataModelArray{}
52 public struct GdaDataModelHash{}
54 public struct GdaDataModelList{}
56 public struct xmlNodePtr{}
57 public struct GdaExport{}
59 public struct GdaSelect{}
60 public struct GdaTable{}
66 public struct Timestamp{}
68 public struct ValueList{}
69 public struct Numeric{}
70 public struct GeometricPoint{}
72 struct _GdaProviderInfo {
76 GList *gda_params; /* A list of GdaProviderParameterInfo pointers */
97 # must start with wrap
103 file: libgda-libgda.html
106 import: glib.HashTable
108 import: gda.ParameterList
116 * Initializes the GDA library.
118 * name of the program.
120 * revision number of the program.
124 public static void init(char[] appId, char[] versio, char[][] args)
126 // void gda_init (const gchar *app_id, const gchar *version, gint nargs, gchar *args[]);
127 gchar*[] argv = (new char*[args.length]);
129 foreach (char[] p; args)
131 argv[argc++] = cast(gchar*)p;
134 gda_init(Str.toStringz(appId), Str.toStringz(versio), argc, argv);
145 #file: libgda-gda-util.html
148 file: libgda-gda-util.html
149 structWrap: GdaParameterList* ParameterList
150 structWrap: GHashTable* HashTable
151 structWrap: GList* ListG
158 file: libgda-gda-blob.html
162 structWrap: GdaBlob* Blob
165 file: libgda-GdaClient.html
169 structWrap: GdaConnection* Connection
170 import: gda.Connection
171 nocode: gda_client_open_connection
174 * Establishes a connection to a data source. The connection will be opened
175 * if no identical connection is available in the GdaClient connection pool,
176 * and re-used if available. If you dont want to share the connection,
177 * specify GDA_CONNECTION_OPTIONS_DONT_SHARE as one of the flags in
178 * the options parameter.
179 * This function is the way of opening database connections with libgda.
181 * a GdaClient object.
187 * password for username.
189 * options for the connection (see GdaConnectionOptions).
191 * the opened connection if successful, NULL if there is
194 public Connection openConnection(char[] dsn, char[] username, char[] password, GdaConnectionOptions options)
196 // GdaConnection* gda_client_open_connection (GdaClient *client, const gchar *dsn, const gchar *username, const gchar *password, GdaConnectionOptions options);
197 GdaConnection* connection = gda_client_open_connection(gdaClient, Str.toStringz(dsn), Str.toStringz(username), Str.toStringz(password), options);
198 return connection ? new Connection( connection) : null;
204 file: libgda-GdaConnection.html
205 struct: GdaConnection
207 prefix: gda_connection_
208 structWrap: GdaClient* Client
209 structWrap: GdaCommand* Command
210 structWrap: GdaParameterList* ParameterList
211 structWrap: GList* ListG
214 import: gda.ParameterList
219 file: libgda-gda-command.html
223 structWrap: GdaTransaction* Transaction
224 structWrap: GdaCommand* Command
225 import: gda.Transaction
228 file: libgda-gda-config.html
232 noprefix: gda_data_source_
233 noprefix: gda_provider_
234 structWrap: GList* ListG
235 nostruct: GdaDataSourceInfo
236 nostruct: GdaProviderInfo
238 structWrap: GdaDataSourceInfo DataSourceInfo
242 file: libgda-gda-config.html
243 struct: GdaDataSourceInfo
244 noprefix: gda_config_
245 noprefix: gda_provider_
246 nostruct: GdaProviderInfo
247 nocode: GdaConfigListenerFunc
248 class: DataSourceInfo
249 prefix: gda_data_source_
254 this.gdaDataSourceInfo = cast(GdaDataSourceInfo *) glist.data;
256 char[] name() { return std.string.toString(this.gdaDataSourceInfo.name); }
257 char[] provider() { return std.string.toString(this.gdaDataSourceInfo.provider); }
258 char[] cncString() { return std.string.toString(this.gdaDataSourceInfo.cncString); }
259 char[] description() { return std.string.toString(this.gdaDataSourceInfo.description); }
260 char[] username() { return std.string.toString(this.gdaDataSourceInfo.username); }
261 char[] password() { return std.string.toString(this.gdaDataSourceInfo.password); }
265 outFile: DataSourceInfo
267 file: libgda-gda-config.html
268 struct: GdaProviderInfo
271 noprefix: gda_config_
272 noprefix: gda_data_source_
273 prefix: gda_provider_
274 nostruct: GdaDataSourceInfo
275 nocode: GdaConfigListenerFunc
281 this.gdaProviderInfo = cast(GdaProviderInfo *) glist.data;
283 char[] id() { return std.string.toString((cast(_GdaProviderInfo*)this.gdaProviderInfo).id); }
284 char[] location() { return std.string.toString((cast(_GdaProviderInfo*)this.gdaProviderInfo).location); }
285 char[] description() { return std.string.toString((cast(_GdaProviderInfo*)this.gdaProviderInfo).description); }
286 ListG gda_params() { return new ListG((cast(_GdaProviderInfo*)this.gdaProviderInfo).gda_params); }
291 outFile: ProviderInfo
298 file: libgda-GdaDataModelArray.html
299 struct: GdaDataModelArray
300 class: DataModelArray
301 prefix: gda_data_model_array_
302 structWrap: GdaDataModel* DataModel
303 import: gda.DataModel
304 outFile: DataModelArray
307 file: libgda-GdaDataModelHash.html
308 struct: GdaDataModelHash
310 prefix: gda_data_model_hash_
311 structWrap: GdaDataModel* DataModel
312 import: gda.DataModel
313 outFile: DataModelHash
315 file: libgda-GdaDataModelList.html
316 struct: GdaDataModelList
318 prefix: gda_data_model_list_
319 structWrap: GdaDataModel* DataModel
320 structWrap: GdaRow* Row
321 structWrap: GdaValue* Value
322 structWrap: GList* ListG
323 import: gda.DataModel
327 outFile: DataModelList
330 file: libgda-GdaDataModel.html
333 prefix: gda_data_model_
334 structWrap: GdaDataModel* DataModel
335 structWrap: GdaFieldAttributes* FieldAttributes
336 structWrap: GdaRow* Row
337 structWrap: GdaValue* Value
338 structWrap: GList* ListG
341 import: gda.FieldAttributes
346 this.gdaDataModel = cast(GdaDataModel *) glist.data;
353 file: libgda-GdaError.html
357 structWrap: GList* ListG
362 this.gdaError = cast(GdaError *) glist.data;
369 file: libgda-GdaExport.html
373 structWrap: GList* ListG
374 structWrap: GdaConnection* Connection
376 import: gda.Connection
380 file: libgda-gda-field.html
381 struct: GdaFieldAttributes
382 class: FieldAttributes
383 prefix: gda_field_attributes_
384 structWrap: GList* ListG
385 structWrap: GdaConnection* Connection
386 structWrap: GdaFieldAttributes* FieldAttributes
387 structWrap: GdaValue* Value
390 outFile: FieldAttributes
392 file: libgda-gda-log.html
399 file: libgda-gda-parameter.html
402 prefix: gda_parameter_
403 noprefix: gda_parameter_list_
404 structWrap: GList* ListG
405 structWrap: GdaValue* Value
406 structWrap: GdaParameter* Parameter
411 nocode: gda_parameter_list_get_type
412 nocode: gda_parameter_list_new
413 nocode: gda_parameter_list_free
414 nocode: gda_parameter_list_copy
415 nocode: gda_parameter_list_add_parameter
416 nocode: gda_parameter_list_get_names
417 nocode: gda_parameter_list_find
418 nocode: gda_parameter_list_clear
419 nocode: gda_parameter_list_get_length
424 struct: GdaParameterList
426 prefix: gda_parameter_list_
429 structWrap: GList* ListG
430 structWrap: GdaValue* Value
431 structWrap: GdaParameter* Parameter
432 structWrap: GdaParameterList* ParameterList
433 import: gda.Parameter
435 nocode: gda_parameter_get_type
436 nocode: gda_parameter_new_from_value
437 nocode: gda_parameter_new_boolean
438 nocode: gda_parameter_new_double
439 nocode: gda_parameter_new_gobject
440 nocode: gda_parameter_new_string
441 nocode: gda_parameter_copy
442 nocode: gda_parameter_free
443 nocode: gda_parameter_get_name
444 nocode: gda_parameter_set_name
445 nocode: gda_parameter_get_value
446 nocode: gda_parameter_set_value
448 outFile: ParameterList
451 file: libgda-gda-quark-list.html
454 prefix: gda_quark_list_
455 structWrap: GList* ListG
456 structWrap: GdaQuarkList* QuarkList
461 file: libgda-gda-row.html
465 structWrap: GdaDataModel* DataModel
466 structWrap: GdaRow* Row
467 structWrap: GdaValue* Value
469 import: gda.DataModel
473 file: libgda-GdaSelect.html
477 structWrap: GdaDataModel* DataModel
478 structWrap: GdaSelect* Select
479 import: gda.DataModel
483 file: libgda-GdaTable.html
487 structWrap: GdaDataModel* DataModel
488 structWrap: GdaTable* Table
489 structWrap: GdaFieldAttributes* FieldAttributes
490 import: gda.DataModel
491 import: gda.FieldAttributes
494 file: libgda-GdaTransaction.html
495 struct: GdaTransaction
497 prefix: gda_transaction_
498 structWrap: GdaDataModel* DataModel
499 structWrap: GdaTransaction* Transaction
500 structWrap: GdaFieldAttributes* FieldAttributes
503 file: libgda-gda-value.html
507 structWrap: GdaValue* Value
508 #structWrap: GdaMoney* Money
509 #structWrap: GdaNumeric* Numeric
510 #structWrap: GdaDate* Date
511 #structWrap: GdaTime* Time
512 #structWrap: GdaTimestamp* Timestamp
513 #structWrap: GdaGeometricPoint* GeometricPoint
514 structWrap: GObject* ObjectG
515 #structWrap: GdaBlob* Blob
516 #structWrap: GdaValueList* ValueList
517 import: gobject.ObjectG
519 nocode: gda_value_new_boolean
520 nocode: gda_value_new_timestamp_from_timet
521 nocode: gda_value_new_tinyint
522 nocode: gda_value_new_tinyuint
523 nocode: gda_value_new_uinteger
526 public this (bool val)
528 // GdaValue* gda_value_new_boolean (gboolean val);
529 this(cast(GdaValue*)gda_value_new_boolean(val) );