]> saetta.ns0.it Git - libgdaex/commitdiff
Missing implementation of function gdaex_data_model_get_field_value_gdatetime_at.
authorAndrea Zagli <azagli@libero.it>
Sat, 9 Jul 2011 10:31:39 +0000 (12:31 +0200)
committerAndrea Zagli <azagli@libero.it>
Sat, 9 Jul 2011 10:31:39 +0000 (12:31 +0200)
docs/reference/libgdaex-decl-list.txt [deleted file]
docs/reference/libgdaex-decl.txt [deleted file]
src/gdaex.c

diff --git a/docs/reference/libgdaex-decl-list.txt b/docs/reference/libgdaex-decl-list.txt
deleted file mode 100644 (file)
index 6eb7503..0000000
+++ /dev/null
@@ -1,43 +0,0 @@
-<SECTION>
-<FILE>libgdaex</FILE>
-<TITLE>GdaEx</TITLE>
-TYPE_GDAEX
-GDAEX
-GDAEX_CLASS
-IS_GDAEX
-IS_GDAEX_CLASS
-GDAEX_GET_CLASS
-GdaEx
-GdaExClass
-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_field_value_tm_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_data_model_get_value_tm_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
deleted file mode 100644 (file)
index 261e399..0000000
+++ /dev/null
@@ -1,197 +0,0 @@
-<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;
-
-               guint before_execute_signal_id;
-               guint after_execute_signal_id;
-       };
-</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, const gchar *username, const gchar *password 
-</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_field_value_tm_at</NAME>
-<RETURNS>struct tm *</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_data_model_get_value_tm_at</NAME>
-<RETURNS>struct tm *</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>
index 70529c7f9a4277a4ce0318110e67c28ddb8d4189..7f1bce6be2d68d00fb7c5a788fc7bae61448229e 100644 (file)
@@ -886,6 +886,40 @@ GDate
        return value;
 }
 
+/**
+ * gdaex_data_model_get_field_value_gdatetime_at:
+ * @data_model: a #GdaDataModel object.
+ * @row:
+ * @field_name: the field's name.
+ *
+ * Returns: the @field_name's #GValue as #GDateTime.
+ */
+GDateTime
+*gdaex_data_model_get_field_value_gdatetime_at (GdaDataModel *data_model,
+                                           gint row,
+                                           const gchar *field_name)
+{
+       GDateTime *value;
+       gint col;
+
+       col = gda_data_model_get_column_index (data_model, field_name);
+
+       if (col >= 0)
+               {
+                       value = gdaex_data_model_get_value_gdatetime_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».", field_name);
+                       value = NULL;
+               }
+
+       return value;
+}
 
 /**
  * gdaex_data_model_get_field_value_tm_at: