]> saetta.ns0.it Git - libgdaex/commitdiff
Updated to libgda 4.
authorAndrea Zagli <azagli@libero.it>
Sun, 26 Jul 2009 08:38:44 +0000 (10:38 +0200)
committerAndrea Zagli <azagli@libero.it>
Sun, 26 Jul 2009 08:38:44 +0000 (10:38 +0200)
24 files changed:
.gitignore
docs/reference/libgdaex-decl-list.txt [new file with mode: 0644]
docs/reference/libgdaex-decl.txt [new file with mode: 0644]
docs/reference/libgdaex-docs.sgml [new file with mode: 0644]
docs/reference/libgdaex-overrides.txt [new file with mode: 0644]
docs/reference/libgdaex-sections.txt [new file with mode: 0644]
docs/reference/libgdaex-undeclared.txt [new file with mode: 0644]
docs/reference/libgdaex-undocumented.txt [new file with mode: 0644]
docs/reference/libgdaex-unused.txt [new file with mode: 0644]
docs/reference/libgdaex.args [new file with mode: 0644]
docs/reference/libgdaex.hierarchy [new file with mode: 0644]
docs/reference/libgdaex.interfaces [new file with mode: 0644]
docs/reference/libgdaex.prerequisites [new file with mode: 0644]
docs/reference/libgdaex.signals [new file with mode: 0644]
docs/reference/libgdaoj-docs.sgml [deleted file]
docs/reference/libgdaoj-overrides.txt [deleted file]
docs/reference/libgdaoj-sections.txt [deleted file]
docs/reference/libgdaoj-undocumented.txt [deleted file]
docs/reference/tmpl/libgdaex-unused.sgml [new file with mode: 0644]
docs/reference/tmpl/libgdaex.sgml [new file with mode: 0644]
docs/reference/tmpl/libgdaobj.sgml
docs/reference/tmpl/libgdaoj-unused.sgml [deleted file]
src/gdaex.c
src/libgdaex.h

index 3364fb61bc2ee53f745daab06b059d2ec23bdf0e..7ac4dbc5f3f1bc2f2c482868b1531db87137b32f 100644 (file)
@@ -27,3 +27,11 @@ src/.deps/
 src/Makefile
 src/Makefile.in
 stamp-h1
+*.stamp
+docs/reference/html/
+docs/reference/xml/
+src/.libs/
+src/gdaex.lo
+src/gdaex.o
+src/libgdaex.la
+*.bak
diff --git a/docs/reference/libgdaex-decl-list.txt b/docs/reference/libgdaex-decl-list.txt
new file mode 100644 (file)
index 0000000..b8046e8
--- /dev/null
@@ -0,0 +1,40 @@
+<SECTION>
+<FILE>libgdaex</FILE>
+TYPE_GDAEX
+GDAEX
+GDAEX_CLASS
+IS_GDAEX
+IS_GDAEX_CLASS
+GDAEX_GET_CLASS
+<TITLE>GdaEx</TITLE>
+GdaEx
+gdaex_get_type
+gdaex_new_from_dsn
+gdaex_new_from_string
+gdaex_new_from_connection
+gdaex_get_gdaconnection
+gdaex_get_provider
+gdaex_query
+gdaex_data_model_get_field_value_stringify_at
+gdaex_data_model_get_field_value_integer_at
+gdaex_data_model_get_field_value_float_at
+gdaex_data_model_get_field_value_double_at
+gdaex_data_model_get_field_value_boolean_at
+gdaex_data_model_get_field_value_gdatimestamp_at
+gdaex_data_model_get_field_value_gdate_at
+gdaex_data_model_get_value_stringify_at
+gdaex_data_model_get_value_integer_at
+gdaex_data_model_get_value_float_at
+gdaex_data_model_get_value_double_at
+gdaex_data_model_get_value_boolean_at
+gdaex_data_model_get_value_gdatimestamp_at
+gdaex_data_model_get_value_gdate_at
+gdaex_begin
+gdaex_execute
+gdaex_commit
+gdaex_rollback
+gdaex_free
+gdaex_strescape
+gdaex_get_chr_quoting
+</SECTION>
+
diff --git a/docs/reference/libgdaex-decl.txt b/docs/reference/libgdaex-decl.txt
new file mode 100644 (file)
index 0000000..b6c2902
--- /dev/null
@@ -0,0 +1,184 @@
+<MACRO>
+<NAME>TYPE_GDAEX</NAME>
+#define TYPE_GDAEX                 (gdaex_get_type ())
+</MACRO>
+<MACRO>
+<NAME>GDAEX</NAME>
+#define GDAEX(obj)                 (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_GDAEX, GdaEx))
+</MACRO>
+<MACRO>
+<NAME>GDAEX_CLASS</NAME>
+#define GDAEX_CLASS(klass)         (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_GDAEX, GdaExClass))
+</MACRO>
+<MACRO>
+<NAME>IS_GDAEX</NAME>
+#define IS_GDAEX(obj)              (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_GDAEX))
+</MACRO>
+<MACRO>
+<NAME>IS_GDAEX_CLASS</NAME>
+#define IS_GDAEX_CLASS(klass)      (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_GDAEX))
+</MACRO>
+<MACRO>
+<NAME>GDAEX_GET_CLASS</NAME>
+#define GDAEX_GET_CLASS(obj)       (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_GDAEX, GdaExClass))
+</MACRO>
+<STRUCT>
+<NAME>GdaEx</NAME>
+</STRUCT>
+<STRUCT>
+<NAME>GdaExClass</NAME>
+</STRUCT>
+<STRUCT>
+<NAME>GdaEx</NAME>
+struct _GdaEx
+       {
+               GObject parent;
+       };
+</STRUCT>
+<STRUCT>
+<NAME>GdaExClass</NAME>
+struct _GdaExClass
+       {
+               GObjectClass parent_class;
+       };
+</STRUCT>
+<FUNCTION>
+<NAME>gdaex_get_type</NAME>
+<RETURNS>GType </RETURNS>
+void
+</FUNCTION>
+<FUNCTION>
+<NAME>gdaex_new_from_dsn</NAME>
+<RETURNS>GdaEx *</RETURNS>
+const gchar *dsn
+</FUNCTION>
+<FUNCTION>
+<NAME>gdaex_new_from_string</NAME>
+<RETURNS>GdaEx *</RETURNS>
+const gchar *cnc_string
+</FUNCTION>
+<FUNCTION>
+<NAME>gdaex_new_from_connection</NAME>
+<RETURNS>GdaEx *</RETURNS>
+GdaConnection *conn
+</FUNCTION>
+<FUNCTION>
+<NAME>gdaex_get_gdaconnection</NAME>
+<RETURNS>const GdaConnection *</RETURNS>
+GdaEx *gdaex
+</FUNCTION>
+<FUNCTION>
+<NAME>gdaex_get_provider</NAME>
+<RETURNS>const gchar *</RETURNS>
+GdaEx *gdaex
+</FUNCTION>
+<FUNCTION>
+<NAME>gdaex_query</NAME>
+<RETURNS>GdaDataModel *</RETURNS>
+GdaEx *gdaex, const gchar *sql
+</FUNCTION>
+<FUNCTION>
+<NAME>gdaex_data_model_get_field_value_stringify_at</NAME>
+<RETURNS>gchar *</RETURNS>
+GdaDataModel *data_model,gint row,const gchar *field_name
+</FUNCTION>
+<FUNCTION>
+<NAME>gdaex_data_model_get_field_value_integer_at</NAME>
+<RETURNS>gint </RETURNS>
+GdaDataModel *data_model,gint row,const gchar *field_name
+</FUNCTION>
+<FUNCTION>
+<NAME>gdaex_data_model_get_field_value_float_at</NAME>
+<RETURNS>gfloat </RETURNS>
+GdaDataModel *data_model,gint row,const gchar *field_name
+</FUNCTION>
+<FUNCTION>
+<NAME>gdaex_data_model_get_field_value_double_at</NAME>
+<RETURNS>gdouble </RETURNS>
+GdaDataModel *data_model,gint row,const gchar *field_name
+</FUNCTION>
+<FUNCTION>
+<NAME>gdaex_data_model_get_field_value_boolean_at</NAME>
+<RETURNS>gboolean </RETURNS>
+GdaDataModel *data_model,gint row,const gchar *field_name
+</FUNCTION>
+<FUNCTION>
+<NAME>gdaex_data_model_get_field_value_gdatimestamp_at</NAME>
+<RETURNS>GdaTimestamp *</RETURNS>
+GdaDataModel *data_model,gint row,const gchar *field_name
+</FUNCTION>
+<FUNCTION>
+<NAME>gdaex_data_model_get_field_value_gdate_at</NAME>
+<RETURNS>GDate *</RETURNS>
+GdaDataModel *data_model,gint row,const gchar *field_name
+</FUNCTION>
+<FUNCTION>
+<NAME>gdaex_data_model_get_value_stringify_at</NAME>
+<RETURNS>gchar *</RETURNS>
+GdaDataModel *data_model,gint row,gint col
+</FUNCTION>
+<FUNCTION>
+<NAME>gdaex_data_model_get_value_integer_at</NAME>
+<RETURNS>gint </RETURNS>
+GdaDataModel *data_model,gint row,gint col
+</FUNCTION>
+<FUNCTION>
+<NAME>gdaex_data_model_get_value_float_at</NAME>
+<RETURNS>gfloat </RETURNS>
+GdaDataModel *data_model,gint row,gint col
+</FUNCTION>
+<FUNCTION>
+<NAME>gdaex_data_model_get_value_double_at</NAME>
+<RETURNS>gdouble </RETURNS>
+GdaDataModel *data_model,gint row,gint col
+</FUNCTION>
+<FUNCTION>
+<NAME>gdaex_data_model_get_value_boolean_at</NAME>
+<RETURNS>gboolean </RETURNS>
+GdaDataModel *data_model,gint row,gint col
+</FUNCTION>
+<FUNCTION>
+<NAME>gdaex_data_model_get_value_gdatimestamp_at</NAME>
+<RETURNS>GdaTimestamp *</RETURNS>
+GdaDataModel *data_model,gint row,gint col
+</FUNCTION>
+<FUNCTION>
+<NAME>gdaex_data_model_get_value_gdate_at</NAME>
+<RETURNS>GDate *</RETURNS>
+GdaDataModel *data_model,gint row,gint col
+</FUNCTION>
+<FUNCTION>
+<NAME>gdaex_begin</NAME>
+<RETURNS>gboolean </RETURNS>
+GdaEx *gdaex
+</FUNCTION>
+<FUNCTION>
+<NAME>gdaex_execute</NAME>
+<RETURNS>gint </RETURNS>
+GdaEx *gdaex, const gchar *sql
+</FUNCTION>
+<FUNCTION>
+<NAME>gdaex_commit</NAME>
+<RETURNS>gboolean </RETURNS>
+GdaEx *gdaex
+</FUNCTION>
+<FUNCTION>
+<NAME>gdaex_rollback</NAME>
+<RETURNS>gboolean </RETURNS>
+GdaEx *gdaex
+</FUNCTION>
+<FUNCTION>
+<NAME>gdaex_free</NAME>
+<RETURNS>void </RETURNS>
+GdaEx *gdaex
+</FUNCTION>
+<FUNCTION>
+<NAME>gdaex_strescape</NAME>
+<RETURNS>gchar *</RETURNS>
+const gchar *source, const gchar *exceptions
+</FUNCTION>
+<FUNCTION>
+<NAME>gdaex_get_chr_quoting</NAME>
+<RETURNS>gchar </RETURNS>
+GdaEx *gdaex
+</FUNCTION>
diff --git a/docs/reference/libgdaex-docs.sgml b/docs/reference/libgdaex-docs.sgml
new file mode 100644 (file)
index 0000000..11b5bdc
--- /dev/null
@@ -0,0 +1,32 @@
+<?xml version="1.0"?>
+<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.3//EN"
+               "http://www.oasis-open.org/docbook/xml/4.3/docbookx.dtd"
+[
+  <!ENTITY % local.common.attrib "xmlns:xi  CDATA  #FIXED 'http://www.w3.org/2003/XInclude'">
+]>
+<book id="index">
+  <bookinfo>
+    <title>libgdaex Reference Manual</title>
+    <releaseinfo>
+      for libgdaex [VERSION]
+      The latest version of this documentation can be found on-line at
+      <ulink role="online-location" url="http://[SERVER]/libgdaex/index.html">http://[SERVER]/libgdaex/</ulink>.
+    </releaseinfo>
+  </bookinfo>
+
+  <chapter>
+    <title>[Insert title here]</title>
+        <xi:include href="xml/libgdaobj.xml"/>
+
+  </chapter>
+  <chapter id="object-tree">
+    <title>Object Hierarchy</title>
+     <xi:include href="xml/tree_index.sgml"/>
+  </chapter>
+  <index id="api-index-full">
+    <title>API Index</title>
+    <xi:include href="xml/api-index-full.xml"><xi:fallback /></xi:include>
+  </index>
+
+  <xi:include href="xml/annotation-glossary.xml"><xi:fallback /></xi:include>
+</book>
diff --git a/docs/reference/libgdaex-overrides.txt b/docs/reference/libgdaex-overrides.txt
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/docs/reference/libgdaex-sections.txt b/docs/reference/libgdaex-sections.txt
new file mode 100644 (file)
index 0000000..5a6b590
--- /dev/null
@@ -0,0 +1,29 @@
+<SECTION>
+<FILE>libgdaobj</FILE>
+GdaO
+gdao_new
+gdao_new_from_string
+gdao_new_from_connection
+gdao_get_gdaclient
+gdao_get_gdaconnection
+gdao_get_provider
+gdao_query
+gdao_data_model_get_field_value_stringify_at
+gdao_data_model_get_field_value_integer_at
+gdao_data_model_get_field_value_float_at
+gdao_data_model_get_field_value_double_at
+gdao_data_model_get_field_value_boolean_at
+gdao_data_model_get_field_value_gdate_at
+gdao_data_model_get_value_stringify_at
+gdao_data_model_get_value_integer_at
+gdao_data_model_get_value_float_at
+gdao_data_model_get_value_double_at
+gdao_data_model_get_value_boolean_at
+gdao_data_model_get_value_gdate_at
+gdao_begin
+gdao_execute
+gdao_commit
+gdao_rollback
+gdao_free
+</SECTION>
+
diff --git a/docs/reference/libgdaex-undeclared.txt b/docs/reference/libgdaex-undeclared.txt
new file mode 100644 (file)
index 0000000..4035c48
--- /dev/null
@@ -0,0 +1,25 @@
+GdaO
+gdao_begin
+gdao_commit
+gdao_data_model_get_field_value_boolean_at
+gdao_data_model_get_field_value_double_at
+gdao_data_model_get_field_value_float_at
+gdao_data_model_get_field_value_gdate_at
+gdao_data_model_get_field_value_integer_at
+gdao_data_model_get_field_value_stringify_at
+gdao_data_model_get_value_boolean_at
+gdao_data_model_get_value_double_at
+gdao_data_model_get_value_float_at
+gdao_data_model_get_value_gdate_at
+gdao_data_model_get_value_integer_at
+gdao_data_model_get_value_stringify_at
+gdao_execute
+gdao_free
+gdao_get_gdaclient
+gdao_get_gdaconnection
+gdao_get_provider
+gdao_new
+gdao_new_from_connection
+gdao_new_from_string
+gdao_query
+gdao_rollback
diff --git a/docs/reference/libgdaex-undocumented.txt b/docs/reference/libgdaex-undocumented.txt
new file mode 100644 (file)
index 0000000..11dd57a
--- /dev/null
@@ -0,0 +1,27 @@
+36% symbol docs coverage.
+10 symbols documented.
+1 symbols incomplete.
+18 not documented.
+
+
+gdaex_data_model_get_field_value_boolean_at (row, field_name)
+gdaex_data_model_get_field_value_double_at
+gdaex_data_model_get_field_value_float_at
+gdaex_data_model_get_field_value_gdate_at
+gdaex_data_model_get_field_value_gdatimestamp_at
+gdaex_data_model_get_field_value_integer_at
+gdaex_data_model_get_field_value_stringify_at
+gdaex_data_model_get_value_boolean_at
+gdaex_data_model_get_value_double_at
+gdaex_data_model_get_value_float_at
+gdaex_data_model_get_value_gdate_at
+gdaex_data_model_get_value_gdatimestamp_at
+gdaex_data_model_get_value_integer_at
+gdaex_data_model_get_value_stringify_at
+gdaex_get_chr_quoting
+gdaex_get_gdaconnection
+gdaex_get_provider
+gdaex_new_from_string
+
+
+libgdaobj:Short_Description
diff --git a/docs/reference/libgdaex-unused.txt b/docs/reference/libgdaex-unused.txt
new file mode 100644 (file)
index 0000000..3ba3918
--- /dev/null
@@ -0,0 +1,36 @@
+GDAEX
+GDAEX_CLASS
+GDAEX_GET_CLASS
+GdaEx
+GdaExClass
+IS_GDAEX
+IS_GDAEX_CLASS
+TYPE_GDAEX
+gdaex_begin
+gdaex_commit
+gdaex_data_model_get_field_value_boolean_at
+gdaex_data_model_get_field_value_double_at
+gdaex_data_model_get_field_value_float_at
+gdaex_data_model_get_field_value_gdate_at
+gdaex_data_model_get_field_value_gdatimestamp_at
+gdaex_data_model_get_field_value_integer_at
+gdaex_data_model_get_field_value_stringify_at
+gdaex_data_model_get_value_boolean_at
+gdaex_data_model_get_value_double_at
+gdaex_data_model_get_value_float_at
+gdaex_data_model_get_value_gdate_at
+gdaex_data_model_get_value_gdatimestamp_at
+gdaex_data_model_get_value_integer_at
+gdaex_data_model_get_value_stringify_at
+gdaex_execute
+gdaex_free
+gdaex_get_chr_quoting
+gdaex_get_gdaconnection
+gdaex_get_provider
+gdaex_get_type
+gdaex_new_from_connection
+gdaex_new_from_dsn
+gdaex_new_from_string
+gdaex_query
+gdaex_rollback
+gdaex_strescape
diff --git a/docs/reference/libgdaex.args b/docs/reference/libgdaex.args
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/docs/reference/libgdaex.hierarchy b/docs/reference/libgdaex.hierarchy
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/docs/reference/libgdaex.interfaces b/docs/reference/libgdaex.interfaces
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/docs/reference/libgdaex.prerequisites b/docs/reference/libgdaex.prerequisites
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/docs/reference/libgdaex.signals b/docs/reference/libgdaex.signals
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/docs/reference/libgdaoj-docs.sgml b/docs/reference/libgdaoj-docs.sgml
deleted file mode 100644 (file)
index 3655b24..0000000
+++ /dev/null
@@ -1,16 +0,0 @@
-<?xml version="1.0"?>
-<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN" 
-               "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd" [
-<!ENTITY version SYSTEM "version.xml">
-]>
-<book id="index" xmlns:xi="http://www.w3.org/2003/XInclude">
-  <bookinfo>
-    <title>libgdaobj Reference Manual</title>
-    <releaseinfo>for libgdaobj &version;</releaseinfo>
-  </bookinfo>
-
-  <chapter>
-    <title>libgdaobj</title>
-    <xi:include href="xml/libgdaobj.xml"/>
-  </chapter>
-</book>
diff --git a/docs/reference/libgdaoj-overrides.txt b/docs/reference/libgdaoj-overrides.txt
deleted file mode 100644 (file)
index e69de29..0000000
diff --git a/docs/reference/libgdaoj-sections.txt b/docs/reference/libgdaoj-sections.txt
deleted file mode 100644 (file)
index 5a6b590..0000000
+++ /dev/null
@@ -1,29 +0,0 @@
-<SECTION>
-<FILE>libgdaobj</FILE>
-GdaO
-gdao_new
-gdao_new_from_string
-gdao_new_from_connection
-gdao_get_gdaclient
-gdao_get_gdaconnection
-gdao_get_provider
-gdao_query
-gdao_data_model_get_field_value_stringify_at
-gdao_data_model_get_field_value_integer_at
-gdao_data_model_get_field_value_float_at
-gdao_data_model_get_field_value_double_at
-gdao_data_model_get_field_value_boolean_at
-gdao_data_model_get_field_value_gdate_at
-gdao_data_model_get_value_stringify_at
-gdao_data_model_get_value_integer_at
-gdao_data_model_get_value_float_at
-gdao_data_model_get_value_double_at
-gdao_data_model_get_value_boolean_at
-gdao_data_model_get_value_gdate_at
-gdao_begin
-gdao_execute
-gdao_commit
-gdao_rollback
-gdao_free
-</SECTION>
-
diff --git a/docs/reference/libgdaoj-undocumented.txt b/docs/reference/libgdaoj-undocumented.txt
deleted file mode 100644 (file)
index 7e74d4d..0000000
+++ /dev/null
@@ -1,30 +0,0 @@
-30% symbol docs coverage.
-8 symbols documented.
-3 symbols incomplete.
-19 not documented.
-
-
-GdaO
-gdao_begin (Returns)
-gdao_commit (Returns)
-gdao_data_model_get_field_value_boolean_at
-gdao_data_model_get_field_value_double_at
-gdao_data_model_get_field_value_float_at
-gdao_data_model_get_field_value_gdate_at
-gdao_data_model_get_field_value_integer_at
-gdao_data_model_get_field_value_stringify_at
-gdao_data_model_get_value_boolean_at
-gdao_data_model_get_value_double_at
-gdao_data_model_get_value_float_at
-gdao_data_model_get_value_gdate_at
-gdao_data_model_get_value_integer_at
-gdao_data_model_get_value_stringify_at
-gdao_free
-gdao_get_gdaclient
-gdao_get_gdaconnection
-gdao_get_provider
-gdao_new_from_string
-gdao_rollback (Returns)
-
-
-libgdaobj:Short_Description
diff --git a/docs/reference/tmpl/libgdaex-unused.sgml b/docs/reference/tmpl/libgdaex-unused.sgml
new file mode 100644 (file)
index 0000000..fe9fd42
--- /dev/null
@@ -0,0 +1,24 @@
+<!-- ##### SECTION ./tmpl/libgdaex.sgml:Long_Description ##### -->
+<para>
+
+</para>
+
+
+<!-- ##### SECTION ./tmpl/libgdaex.sgml:See_Also ##### -->
+<para>
+
+</para>
+
+
+<!-- ##### SECTION ./tmpl/libgdaex.sgml:Short_Description ##### -->
+
+
+
+<!-- ##### SECTION ./tmpl/libgdaex.sgml:Stability_Level ##### -->
+
+
+
+<!-- ##### SECTION ./tmpl/libgdaex.sgml:Title ##### -->
+libgdaobj
+
+
diff --git a/docs/reference/tmpl/libgdaex.sgml b/docs/reference/tmpl/libgdaex.sgml
new file mode 100644 (file)
index 0000000..7711c83
--- /dev/null
@@ -0,0 +1,19 @@
+<!-- ##### SECTION Title ##### -->
+libgdaobj
+
+<!-- ##### SECTION Short_Description ##### -->
+
+
+<!-- ##### SECTION Long_Description ##### -->
+<para>
+
+</para>
+
+<!-- ##### SECTION See_Also ##### -->
+<para>
+
+</para>
+
+<!-- ##### SECTION Stability_Level ##### -->
+
+
index 85c734219f4f92719c7629f78203db8e93996a89..7711c83e56b7470e86614b27cc4684545d029510 100644 (file)
@@ -17,256 +17,3 @@ libgdaobj
 <!-- ##### SECTION Stability_Level ##### -->
 
 
-<!-- ##### STRUCT GdaO ##### -->
-<para>
-
-</para>
-
-@parent: 
-
-<!-- ##### FUNCTION gdao_new ##### -->
-<para>
-
-</para>
-
-@gda_client: 
-@datasource: 
-@username: 
-@password: 
-@Returns: 
-
-
-<!-- ##### FUNCTION gdao_new_from_string ##### -->
-<para>
-
-</para>
-
-@gda_client: 
-@provider_id: 
-@cnc_string: 
-@Returns: 
-
-
-<!-- ##### FUNCTION gdao_new_from_connection ##### -->
-<para>
-
-</para>
-
-@conn: 
-@Returns: 
-
-
-<!-- ##### FUNCTION gdao_get_gdaclient ##### -->
-<para>
-
-</para>
-
-@gdao: 
-@Returns: 
-
-
-<!-- ##### FUNCTION gdao_get_gdaconnection ##### -->
-<para>
-
-</para>
-
-@gdao: 
-@Returns: 
-
-
-<!-- ##### FUNCTION gdao_get_provider ##### -->
-<para>
-
-</para>
-
-@gdao: 
-@Returns: 
-
-
-<!-- ##### FUNCTION gdao_query ##### -->
-<para>
-
-</para>
-
-@gdao: 
-@sql: 
-@Returns: 
-
-
-<!-- ##### FUNCTION gdao_data_model_get_field_value_stringify_at ##### -->
-<para>
-
-</para>
-
-@data_model: 
-@row: 
-@field_name: 
-@Returns: 
-
-
-<!-- ##### FUNCTION gdao_data_model_get_field_value_integer_at ##### -->
-<para>
-
-</para>
-
-@data_model: 
-@row: 
-@field_name: 
-@Returns: 
-
-
-<!-- ##### FUNCTION gdao_data_model_get_field_value_float_at ##### -->
-<para>
-
-</para>
-
-@data_model: 
-@row: 
-@field_name: 
-@Returns: 
-
-
-<!-- ##### FUNCTION gdao_data_model_get_field_value_double_at ##### -->
-<para>
-
-</para>
-
-@data_model: 
-@row: 
-@field_name: 
-@Returns: 
-
-
-<!-- ##### FUNCTION gdao_data_model_get_field_value_boolean_at ##### -->
-<para>
-
-</para>
-
-@data_model: 
-@row: 
-@field_name: 
-@Returns: 
-
-
-<!-- ##### FUNCTION gdao_data_model_get_field_value_gdate_at ##### -->
-<para>
-
-</para>
-
-@data_model: 
-@row: 
-@field_name: 
-@Returns: 
-
-
-<!-- ##### FUNCTION gdao_data_model_get_value_stringify_at ##### -->
-<para>
-
-</para>
-
-@data_model: 
-@row: 
-@col: 
-@Returns: 
-
-
-<!-- ##### FUNCTION gdao_data_model_get_value_integer_at ##### -->
-<para>
-
-</para>
-
-@data_model: 
-@row: 
-@col: 
-@Returns: 
-
-
-<!-- ##### FUNCTION gdao_data_model_get_value_float_at ##### -->
-<para>
-
-</para>
-
-@data_model: 
-@row: 
-@col: 
-@Returns: 
-
-
-<!-- ##### FUNCTION gdao_data_model_get_value_double_at ##### -->
-<para>
-
-</para>
-
-@data_model: 
-@row: 
-@col: 
-@Returns: 
-
-
-<!-- ##### FUNCTION gdao_data_model_get_value_boolean_at ##### -->
-<para>
-
-</para>
-
-@data_model: 
-@row: 
-@col: 
-@Returns: 
-
-
-<!-- ##### FUNCTION gdao_data_model_get_value_gdate_at ##### -->
-<para>
-
-</para>
-
-@data_model: 
-@row: 
-@col: 
-@Returns: 
-
-
-<!-- ##### FUNCTION gdao_begin ##### -->
-<para>
-
-</para>
-
-@gdao: 
-@Returns: 
-
-
-<!-- ##### FUNCTION gdao_execute ##### -->
-<para>
-
-</para>
-
-@gdao: 
-@sql: 
-@Returns: 
-
-
-<!-- ##### FUNCTION gdao_commit ##### -->
-<para>
-
-</para>
-
-@gdao: 
-@Returns: 
-
-
-<!-- ##### FUNCTION gdao_rollback ##### -->
-<para>
-
-</para>
-
-@gdao: 
-@Returns: 
-
-
-<!-- ##### FUNCTION gdao_free ##### -->
-<para>
-
-</para>
-
-@gdao: 
-
-
diff --git a/docs/reference/tmpl/libgdaoj-unused.sgml b/docs/reference/tmpl/libgdaoj-unused.sgml
deleted file mode 100644 (file)
index e69de29..0000000
index 208621e9c06b900df5c04cb405f11c180168b54b..897a8ded2417d7c5d0d1ffe509437f232aa21f59 100644 (file)
@@ -47,7 +47,6 @@ typedef struct _GdaExPrivate GdaExPrivate;
 struct _GdaExPrivate
        {
                GdaConnection *gda_conn;
-               GdaTransaction *gda_trans;
        };
 
 G_DEFINE_TYPE (GdaEx, gdaex, G_TYPE_OBJECT)
@@ -67,8 +66,6 @@ static void
 gdaex_init (GdaEx *gdaex)
 {
        GdaExPrivate *priv = GDAEX_GET_PRIVATE (gdaex);
-
-       priv->gda_trans = NULL;
 }
 
 static GdaEx
@@ -93,9 +90,7 @@ static GdaEx
  * Return value: the newly created #GdaEx.
  */
 GdaEx
-*gdaex_new_from_dsn (const gchar *dsn,
-                     const gchar *username,
-                     const gchar *password)
+*gdaex_new_from_dsn (const gchar *dsn)
 {
        GdaEx *gdaex;
        GdaExPrivate *priv;
@@ -121,8 +116,7 @@ GdaEx
        /* open database connection */
        error = NULL;
        priv->gda_conn = gda_connection_open_from_dsn (dsn,
-                                                      username,
-                                                   password,
+                                                      NULL,
                                                       GDA_CONNECTION_OPTIONS_NONE,
                                                       &error);
        if (error != NULL)
@@ -144,6 +138,7 @@ GdaEx
 GdaEx
 *gdaex_new_from_string (const gchar *cnc_string)
 {
+       GError *error;
        GdaEx *gdaex;
        GdaExPrivate *priv;
 
@@ -164,10 +159,11 @@ GdaEx
        priv = GDAEX_GET_PRIVATE (gdaex);
 
        /* open database connection */
+       error = NULL;
        priv->gda_conn = gda_connection_open_from_string (NULL,
                                                          cnc_string,
                                                          NULL,
-                                                         GDA_CONNECTION_OPTIONS_NONE
+                                                         GDA_CONNECTION_OPTIONS_NONE,
                                                       &error);
        if (error != NULL)
                {
@@ -233,7 +229,7 @@ const gchar
 
        GdaExPrivate *priv = GDAEX_GET_PRIVATE (gdaex);
 
-       return gda_connection_get_provider (priv->gda_conn);
+       return gda_server_provider_get_name (gda_connection_get_provider (priv->gda_conn));
 }
 
 /**
@@ -243,56 +239,72 @@ const gchar
  *
  * Execute a selection query (SELECT).
  *
- * Return value: a #GdaDataModel, or NULL if query fails.
+ * Return value: a #GdaDataModel, or #NULL if query fails.
  */
 GdaDataModel
 *gdaex_query (GdaEx *gdaex, const gchar *sql)
 {
+       GError *error;
+
        g_return_val_if_fail (IS_GDAEX (gdaex), NULL);
 
        GdaExPrivate *priv = GDAEX_GET_PRIVATE (gdaex);
 
-       GdaCommand *gda_comm = gda_command_new (sql, GDA_COMMAND_TYPE_SQL, GDA_COMMAND_OPTION_STOP_ON_ERRORS);
-       GdaDataModel *dm = gda_connection_execute_single_command (priv->gda_conn, gda_comm, NULL);
+       error = NULL;
+       GdaDataModel *dm = gda_execute_select_command (priv->gda_conn, sql, &error);
 
-       if (dm == NULL)
+       if (error != NULL)
                {
-                       g_fprintf (stderr, "SQL: %s\n", sql);
-                       get_errors (priv->gda_conn);
+                       g_warning ("Errror executing selection query: %s\n%s\n",
+                                  error->message, sql);
+                       return NULL;
                }
 
-       gda_command_free (gda_comm);
-
        return dm;
 }
 
-/* TO DO - define as macro */
-/* TO DO - catch error for gda_data_model_get_column_position */
 /**
- * return the field_name's GdaValue as gchar (stringify)
+ * gdaex_data_model_get_field_value_stringify_at:
+ * @data_model: a #GdaDataModel object.
+ * @row:
+ * @field_name:
+ *
+ * Returns: the field_name's #GValue as #gchar (stringify)
  */
 gchar
 *gdaex_data_model_get_field_value_stringify_at (GdaDataModel *data_model,
                                                gint row,
                                                const gchar *field_name)
 {
-       gchar *value = "";
+       gchar *value;
        gint col;
 
-       col = gda_data_model_get_column_position (data_model, field_name);
+       col = gda_data_model_get_column_index (data_model, field_name);
 
        if (col >= 0)
                {
                        value = gdaex_data_model_get_value_stringify_at (data_model, row, col);
+                       if (value == NULL)
+                               {
+                                       g_warning ("Error retrieving Â«%s»'s value.", field_name);
+                               }
+               }
+       else
+               {
+                       g_warning ("No column found with name Â«%s»\n", field_name);
+                       value = NULL;
                }
 
        return value;
 }
 
-/* TO DO - define as macro */
-/* TO DO - catch error for gda_data_model_get_column_position */
 /**
- * return the field_name's GdaValue as gint
+ * gdaex_data_model_get_field_value_integer_at:
+ * @data_model: a #GdaDataModel object.
+ * @row:
+ * @field_name:
+ *
+ * Returns: the field_name's #GValue as #gint
  */
 gint
 gdaex_data_model_get_field_value_integer_at (GdaDataModel *data_model,
@@ -302,20 +314,27 @@ gdaex_data_model_get_field_value_integer_at (GdaDataModel *data_model,
        gint value = 0;
        gint col;
 
-       col = gda_data_model_get_column_position (data_model, field_name);
+       col = gda_data_model_get_column_index (data_model, field_name);
 
        if (col >= 0)
                {
                        value = gdaex_data_model_get_value_integer_at (data_model, row, col);
                }
+       else
+               {
+                       g_warning ("No column found with name Â«%s»\n", field_name);
+               }
 
        return value;
 }
 
-/* TO DO - define as macro */
-/* TO DO - catch error for gda_data_model_get_column_position */
 /**
- * return the field_name's GdaValue as gfloat
+ * gdaex_data_model_get_field_value_float_at:
+ * @data_model: a #GdaDataModel object.
+ * @row:
+ * @field_name:
+ *
+ * Returns: the field_name's #GValue as #gfloat
  */
 gfloat
 gdaex_data_model_get_field_value_float_at (GdaDataModel *data_model,
@@ -325,20 +344,27 @@ gdaex_data_model_get_field_value_float_at (GdaDataModel *data_model,
        gfloat value = 0.0f;
        gint col;
 
-       col = gda_data_model_get_column_position (data_model, field_name);
+       col = gda_data_model_get_column_index (data_model, field_name);
 
        if (col >= 0)
                {
                        value = gdaex_data_model_get_value_float_at (data_model, row, col);
                }
+       else
+               {
+                       g_warning ("No column found with name Â«%s»\n", field_name);
+               }
 
        return value;
 }
 
-/* TO DO - define as macro */
-/* TO DO - catch error for gda_data_model_get_column_position */
 /**
- * return the field_name's GdaValue as gdouble
+ * gdaex_data_model_get_field_value_double_at:
+ * @data_model: a #GdaDataModel object.
+ * @row:
+ * @field_name:
+ *
+ * Returns: the field_name's #GValue as #gdouble
  */
 gdouble
 gdaex_data_model_get_field_value_double_at (GdaDataModel *data_model,
@@ -348,20 +374,27 @@ gdaex_data_model_get_field_value_double_at (GdaDataModel *data_model,
        gdouble value = 0.0;
        gint col;
 
-       col = gda_data_model_get_column_position (data_model, field_name);
+       col = gda_data_model_get_column_index (data_model, field_name);
 
        if (col >= 0)
                {
                        value = gdaex_data_model_get_value_double_at (data_model, row, col);
                }
+       else
+               {
+                       g_warning ("No column found with name Â«%s»\n", field_name);
+               }
 
        return value;
 }
 
-/* TO DO - define as macro */
-/* TO DO - catch error for gda_data_model_get_column_position */
 /**
- * return the field_name's GdaValue as gboolean
+ * gdaex_data_model_get_field_value_boolean_at:
+ * @data_model: a #GdaDataModel object.
+ * @row:
+ * @field_name:
+ *
+ * return the field_name's #GValue as #gboolean
  */
 gboolean
 gdaex_data_model_get_field_value_boolean_at (GdaDataModel *data_model,
@@ -371,34 +404,85 @@ gdaex_data_model_get_field_value_boolean_at (GdaDataModel *data_model,
        gboolean value = FALSE;
        gint col;
 
-       col = gda_data_model_get_column_position (data_model, field_name);
+       col = gda_data_model_get_column_index (data_model, field_name);
 
        if (col >= 0)
                {
                        value = gdaex_data_model_get_value_boolean_at (data_model, row, col);
                }
+       else
+               {
+                       g_warning ("No column found with name Â«%s»\n", field_name);
+               }
 
        return value;
 }
 
-/* TO DO - define as macro */
-/* TO DO - catch error for gda_data_model_get_column_position */
 /**
- * return the field_name's GdaValue as GDate
+ * gdaex_data_model_get_field_value_gdatimestamp_at:
+ * @data_model: a #GdaDataModel object.
+ * @row:
+ * @field_name:
+ *
+ * Returns: the field_name's #GValue as #GdaTimestamp.
+ */
+GdaTimestamp
+*gdaex_data_model_get_field_value_gdatimestamp_at (GdaDataModel *data_model,
+                                           gint row,
+                                           const gchar *field_name)
+{
+       const GdaTimestamp *value;
+       gint col;
+
+       col = gda_data_model_get_column_index (data_model, field_name);
+
+       if (col >= 0)
+               {
+                       value = gdaex_data_model_get_value_gdatimestamp_at (data_model, row, col);
+                       if (value == NULL)
+                               {
+                                       g_warning ("Error retrieving Â«%s»'s value.", field_name);
+                               }
+               }
+       else
+               {
+                       g_warning ("No column found with name Â«%s»\n", field_name);
+                       value = NULL;
+               }
+
+       return gda_timestamp_copy ((gpointer)value);
+}
+
+/**
+ * gdaex_data_model_get_field_value_gdate_at:
+ * @data_model: a #GdaDataModel object.
+ * @row:
+ * @field_name:
+ *
+ * Returns: the field_name's #GValue as #GDate.
  */
 GDate
 *gdaex_data_model_get_field_value_gdate_at (GdaDataModel *data_model,
                                            gint row,
                                            const gchar *field_name)
 {
-       GDate *value = NULL;
+       GDate *value;
        gint col;
 
-       col = gda_data_model_get_column_position (data_model, field_name);
+       col = gda_data_model_get_column_index (data_model, field_name);
 
        if (col >= 0)
                {
                        value = gdaex_data_model_get_value_gdate_at (data_model, row, col);
+                       if (value == NULL)
+                               {
+                                       g_warning ("Error retrieving Â«%s»'s value.", field_name);
+                               }
+               }
+       else
+               {
+                       g_warning ("No column found with name Â«%s»\n", field_name);
+                       value = NULL;
                }
 
        return value;
@@ -410,18 +494,28 @@ GDate
  * @row: row number.
  * @col: col number.
  *
- * Return value: the #GdaValue as #gchar (stringify).
+ * Returns: the #GValue as #gchar (stringify).
  */
 gchar
 *gdaex_data_model_get_value_stringify_at (GdaDataModel *data_model, gint row, gint col)
 {
-       gchar *ret = "";
+       gchar *ret;
+       const GValue *v;
+       GError *error;
+
+       error = NULL;
 
-       GdaValue *v = (GdaValue *)gda_data_model_get_value_at (data_model, col, row);
-       if (!gda_value_is_null (v))
+       v = gda_data_model_get_value_at (data_model, col, row, &error);
+       if (v != NULL && error == NULL)
                {
                        ret = g_strdup (gda_value_stringify (v));
                }
+       else
+               {
+                       g_warning ("Error on retrieving field's value: %s\n",
+                                  error->message);
+                       ret = NULL;
+               }
 
        return ret;
 }
@@ -432,24 +526,28 @@ gchar
  * @row: row number.
  * @col: col number.
  *
- * Return value: the #GdaValue as #gint.
+ * Returns: the #GValue as #gint.
  */
 gint
 gdaex_data_model_get_value_integer_at (GdaDataModel *data_model, gint row, gint col)
 {
        gint ret = 0;
+       const GValue *v;
+       GError *error;
+
+       error = NULL;
 
-       GdaValue *v = (GdaValue *)gda_data_model_get_value_at (data_model, col, row);
-       if (v == NULL)
+       v = gda_data_model_get_value_at (data_model, col, row, &error);
+       if (v == NULL || error != NULL)
                {
-                       /* TO DO */
-                       /* trap errors */
+                       g_warning ("Error on retrieving field's value: %s\n",
+                                  error->message);
                }
        else if (!gda_value_is_null (v))
                {
-                       if (gda_value_isa (v, GDA_VALUE_TYPE_INTEGER))
+                       if (gda_value_isa (v, G_TYPE_INT))
                                {
-                                       ret = gda_value_get_integer (v);
+                                       ret = g_value_get_int (v);
                                }
                        else
                                {
@@ -466,17 +564,33 @@ gdaex_data_model_get_value_integer_at (GdaDataModel *data_model, gint row, gint
  * @row: row number.
  * @col: col number.
  *
- * Return value: the #GdaValue as #gfloat.
+ * Returns: the #GValue as #gfloat.
  */
 gfloat
 gdaex_data_model_get_value_float_at (GdaDataModel *data_model, gint row, gint col)
 {
        gfloat ret = 0.0f;
+       const GValue *v;
+       GError *error;
+
+       error = NULL;
 
-       GdaValue *v = (GdaValue *)gda_data_model_get_value_at (data_model, col, row);
-       if (!gda_value_is_null (v))
+       v = gda_data_model_get_value_at (data_model, col, row, &error);
+       if (v == NULL || error != NULL)
                {
-                       ret = gda_value_get_single (v);
+                       g_warning ("Error on retrieving field's value: %s\n",
+                                  error->message);
+               }
+       else if (!gda_value_is_null (v))
+               {
+                       if (gda_value_isa (v, G_TYPE_FLOAT))
+                               {
+                                       ret = g_value_get_float (v);
+                               }
+                       else
+                               {
+                                       ret = g_strtod (gda_value_stringify (v), NULL);
+                               }
                }
 
        return ret;
@@ -488,17 +602,33 @@ gdaex_data_model_get_value_float_at (GdaDataModel *data_model, gint row, gint co
  * @row: row number.
  * @col: col number.
  *
- * Return value: the #GdaValue as #gdouble.
+ * Returns: the #GValue as #gdouble.
  */
 gdouble
 gdaex_data_model_get_value_double_at (GdaDataModel *data_model, gint row, gint col)
 {
        gdouble ret = 0.0;
+       const GValue *v;
+       GError *error;
 
-       GdaValue *v = (GdaValue *)gda_data_model_get_value_at (data_model, col, row);
-       if (!gda_value_is_null (v))
+       error = NULL;
+
+       v = gda_data_model_get_value_at (data_model, col, row, &error);
+       if (v == NULL || error != NULL)
                {
-                       ret = gda_value_get_double (v);
+                       g_warning ("Error on retrieving field's value: %s\n",
+                                  error->message);
+               }
+       else if (!gda_value_is_null (v))
+               {
+                       if (gda_value_isa (v, G_TYPE_DOUBLE))
+                               {
+                                       ret = g_value_get_double (v);
+                               }
+                       else
+                               {
+                                       ret = g_strtod (gda_value_stringify (v), NULL);
+                               }
                }
 
        return ret;
@@ -510,24 +640,28 @@ gdaex_data_model_get_value_double_at (GdaDataModel *data_model, gint row, gint c
  * @row: row number.
  * @col: col number.
  *
- * Return value: the #GdaValue as #gboolean.
+ * Returns: the #GValue as #gboolean.
  */
 gboolean
 gdaex_data_model_get_value_boolean_at (GdaDataModel *data_model, gint row, gint col)
 {
        gboolean ret = FALSE;
+       const GValue *v;
+       GError *error;
+
+       error = NULL;
 
-       GdaValue *v = (GdaValue *)gda_data_model_get_value_at (data_model, col, row);
-       if (v == NULL)
+       v = gda_data_model_get_value_at (data_model, col, row, &error);
+       if (v == NULL || error != NULL)
                {
-                       /* TO DO */
-                       /* trap errors */
+                       g_warning ("Error on retrieving field's value: %s\n",
+                                  error->message);
                }
        else if (!gda_value_is_null (v))
                {
-                       if (gda_value_isa (v, GDA_VALUE_TYPE_BOOLEAN))
+                       if (gda_value_isa (v, G_TYPE_BOOLEAN))
                                {
-                                       ret = gda_value_get_boolean (v);
+                                       ret = g_value_get_boolean (v);
                                }
                        else
                                {
@@ -540,33 +674,81 @@ gdaex_data_model_get_value_boolean_at (GdaDataModel *data_model, gint row, gint
                                                {
                                                        ret = TRUE;
                                                }
+                                       else
+                                               {
+                                                       ret = FALSE;
+                                               }
                                }
                }
 
        return ret;
 }
 
+/**
+ * gdaex_data_model_get_value_gdatimestamp_at:
+ * @data_model: a #GdaDataModel object.
+ * @row: row number.
+ * @col: col number.
+ *
+ * Returns: the #GValue as #GdaTimestamp.
+ */
+GdaTimestamp
+*gdaex_data_model_get_value_gdatimestamp_at (GdaDataModel *data_model, gint row, gint col)
+{
+       const GdaTimestamp *gdatimestamp = NULL;
+       const GValue *v;
+       GError *error;
+
+       error = NULL;
+
+       v = gda_data_model_get_value_at (data_model, col, row, &error);
+       if (v == NULL || error != NULL)
+               {
+                       g_warning ("Error on retrieving field's value: %s\n",
+                                  error->message);
+               }
+       else if (!gda_value_is_null (v))
+               {
+                       gdatimestamp = gda_value_get_timestamp (v);
+               }
+
+       return (GdaTimestamp *)gda_timestamp_copy ((gpointer)gdatimestamp);
+}
+
 /**
  * gdaex_data_model_get_value_gdate_at:
  * @data_model: a #GdaDataModel object.
  * @row: row number.
  * @col: col number.
  *
- * Return value: the #GdaValue as #GDate.
+ * Returns: the #GValue as #GDate without time information.
  */
 GDate
 *gdaex_data_model_get_value_gdate_at (GdaDataModel *data_model, gint row, gint col)
 {
        GDate *ret = NULL;
-       const GdaDate *gdadate;
+       const GdaTimestamp *gdatimestamp;
+       const GValue *v;
+       GError *error;
+
+       error = NULL;
 
-       GdaValue *v = (GdaValue *)gda_data_model_get_value_at (data_model, col, row);
-       if (!gda_value_is_null (v))
+       v = gda_data_model_get_value_at (data_model, col, row, &error);
+       if (v == NULL || error != NULL)
                {
-                       gdadate = gda_value_get_date (v);
-                       if (g_date_valid_dmy ((GDateDay)gdadate->day, (GDateMonth)gdadate->month, (GDateYear)gdadate->year))
+                       g_warning ("Error on retrieving field's value: %s\n",
+                                  error->message);
+               }
+       else if (!gda_value_is_null (v))
+               {
+                       gdatimestamp = gda_value_get_timestamp (v);
+                       if (g_date_valid_dmy ((GDateDay)gdatimestamp->day,
+                                             (GDateMonth)gdatimestamp->month,
+                                             (GDateYear)gdatimestamp->year))
                                {
-                                       ret = g_date_new_dmy ((GDateDay)gdadate->day, (GDateMonth)gdadate->month, (GDateYear)gdadate->year);
+                                       ret = g_date_new_dmy ((GDateDay)gdatimestamp->day,
+                                                             (GDateMonth)gdatimestamp->month,
+                                                             (GDateYear)gdatimestamp->year);
                                }
                }
 
@@ -582,15 +764,25 @@ GDate
 gboolean
 gdaex_begin (GdaEx *gdaex)
 {
+       GError *error;
+       gboolean ret;
+
        g_return_val_if_fail (IS_GDAEX (gdaex), FALSE);
 
        GdaExPrivate *priv = GDAEX_GET_PRIVATE (gdaex);
 
-       priv->gda_trans = gda_transaction_new ("gdaex");
-       gda_transaction_set_isolation_level (priv->gda_trans,
-                                            GDA_TRANSACTION_ISOLATION_SERIALIZABLE);
+       error = NULL;
+       ret = gda_connection_begin_transaction (priv->gda_conn, "gdaex",
+                                               GDA_TRANSACTION_ISOLATION_SERIALIZABLE,
+                                               &error);
+
+       if (error != NULL)
+               {
+                       g_warning ("Errror opening transaction: %s\n",
+                                  error->message);
+               }
 
-       return gda_connection_begin_transaction (priv->gda_conn, priv->gda_trans);
+       return ret;
 }
 
 /**
@@ -605,28 +797,23 @@ gdaex_begin (GdaEx *gdaex)
 gint
 gdaex_execute (GdaEx *gdaex, const gchar *sql)
 {
-       GdaCommand *gda_comm;
+       GError *error;
        gint nrecs;
 
        g_return_val_if_fail (IS_GDAEX (gdaex), -1);
 
        GdaExPrivate *priv = GDAEX_GET_PRIVATE (gdaex);
 
-       gda_comm = gda_command_new (sql, GDA_COMMAND_TYPE_SQL, GDA_COMMAND_OPTION_STOP_ON_ERRORS);
-       if (priv->gda_trans != NULL)
-               {
-                       gda_command_set_transaction (gda_comm, priv->gda_trans);
-               }
-       nrecs = gda_connection_execute_non_query (priv->gda_conn, gda_comm, NULL);
+       error = NULL;
+       nrecs = gda_execute_non_select_command (priv->gda_conn, sql, &error);
 
-       if (nrecs == -1)
+       if (error != NULL)
                {
-                       g_fprintf (stderr, "SQL: %s\n", sql);
-                       get_errors (priv->gda_conn);
+                       g_warning ("Errror executing command query: %s\n%s\n",
+                                  error->message, sql);
+                       return -1;
                }
 
-       gda_command_free (gda_comm);
-
        return nrecs;
 }
 
@@ -640,20 +827,31 @@ gboolean
 gdaex_commit (GdaEx *gdaex)
 {
        gboolean ret;
+       GError *error;
+       GdaExPrivate *priv;
+       GdaTransactionStatus *tstatus;
 
        g_return_val_if_fail (IS_GDAEX (gdaex), FALSE);
 
-       GdaExPrivate *priv = GDAEX_GET_PRIVATE (gdaex);
+       priv = GDAEX_GET_PRIVATE (gdaex);
+
+       tstatus = gda_connection_get_transaction_status (priv->gda_conn);
 
-       if (priv->gda_trans == NULL)
+       if (tstatus == NULL)
                {
-                       ret = FALSE;
+                       ret = TRUE;
                }
        else
                {
-                       ret = gda_connection_commit_transaction (priv->gda_conn, priv->gda_trans);
-                       g_object_unref (priv->gda_trans);
-                       priv->gda_trans = NULL;
+                       error = NULL;
+                       ret = gda_connection_commit_transaction (priv->gda_conn, "gdaex", &error);
+
+                       if (error != NULL)
+                               {
+                                       g_warning ("Errror committing transaction: %s\n",
+                                                          error->message);
+                                       ret = FALSE;
+                               }
                }
 
        return ret;
@@ -669,20 +867,31 @@ gboolean
 gdaex_rollback (GdaEx *gdaex)
 {
        gboolean ret;
+       GError *error;
+       GdaExPrivate *priv;
+       GdaTransactionStatus *tstatus;
 
        g_return_val_if_fail (IS_GDAEX (gdaex), FALSE);
 
-       GdaExPrivate *priv = GDAEX_GET_PRIVATE (gdaex);
+       priv = GDAEX_GET_PRIVATE (gdaex);
 
-       if (priv->gda_trans == NULL)
+       tstatus = gda_connection_get_transaction_status (priv->gda_conn);
+
+       if (tstatus == NULL)
                {
-                       ret = FALSE;
+                       ret = TRUE;
                }
        else
                {
-                       ret = gda_connection_rollback_transaction (priv->gda_conn, priv->gda_trans);
-                       g_object_unref (priv->gda_trans);
-                       priv->gda_trans = NULL;
+                       error = NULL;
+                       ret = gda_connection_rollback_transaction (priv->gda_conn, "gdaex", &error);
+
+                       if (error != NULL)
+                               {
+                                       g_warning ("Errror rollbacking transaction: %s\n",
+                                                          error->message);
+                                       ret = FALSE;
+                               }
                }
 
        return ret;
@@ -701,8 +910,6 @@ gdaex_free (GdaEx *gdaex)
                {
                        gda_connection_close (priv->gda_conn);
                }
-
-       /*g_free (gdaex);*/
 }
 
 /* UTILITY'S FUNCTIONS */
index 57d1ede9d69b26f540af56f87e51930d4771762a..addc069e03a57941d1dbc640621a131beafff8f3 100644 (file)
@@ -55,9 +55,7 @@ struct _GdaExClass
 GType gdaex_get_type (void) G_GNUC_CONST;
 
 
-GdaEx *gdaex_new_from_dsn (const gchar *dsn,
-                           const gchar *username,
-                           const gchar *password);
+GdaEx *gdaex_new_from_dsn (const gchar *dsn);
 GdaEx *gdaex_new_from_string (const gchar *cnc_string);
 GdaEx *gdaex_new_from_connection (GdaConnection *conn);
 
@@ -81,6 +79,9 @@ gdouble gdaex_data_model_get_field_value_double_at (GdaDataModel *data_model,
 gboolean gdaex_data_model_get_field_value_boolean_at (GdaDataModel *data_model,
                                                      gint row,
                                                      const gchar *field_name);
+GdaTimestamp *gdaex_data_model_get_field_value_gdatimestamp_at (GdaDataModel *data_model,
+                                                 gint row,
+                                                 const gchar *field_name);
 GDate *gdaex_data_model_get_field_value_gdate_at (GdaDataModel *data_model,
                                                  gint row,
                                                  const gchar *field_name);
@@ -100,6 +101,9 @@ gdouble gdaex_data_model_get_value_double_at (GdaDataModel *data_model,
 gboolean gdaex_data_model_get_value_boolean_at (GdaDataModel *data_model,
                                                gint row,
                                                gint col);
+GdaTimestamp *gdaex_data_model_get_value_gdatimestamp_at (GdaDataModel *data_model,
+                                                          gint row,
+                                                          gint col);
 GDate *gdaex_data_model_get_value_gdate_at (GdaDataModel *data_model,
                                            gint row,
                                            gint col);