|| gda_data_model_get_n_rows (data_model) < 1);
}
+GValue
+*gdaex_data_model_get_field_value_at (GdaDataModel *data_model,
+ gint row,
+ const gchar *field_name)
+{
+ gint col;
+
+ col = gda_data_model_get_column_index (data_model, field_name);
+
+ return gdaex_data_model_get_value_at (data_model, row, col);
+}
+
/**
* gdaex_data_model_get_field_value_stringify_at:
* @data_model: a #GdaDataModel object.
return value;
}
+GValue
+*gdaex_data_model_get_value_at (GdaDataModel *data_model, gint row, gint col)
+{
+ const GValue *v;
+ GValue *ret;
+ GError *error;
+
+ error = NULL;
+
+ v = gda_data_model_get_value_at (data_model, col, row, &error);
+ if (v != NULL && error == NULL)
+ {
+ ret = gda_value_new_null ();
+ }
+ else
+ {
+ ret = g_new0 (GValue, 1);
+ ret = g_value_init (ret, G_VALUE_TYPE (v));
+ g_value_copy (v, ret);
+ }
+
+ return ret;
+}
+
/**
* gdaex_data_model_get_value_stringify_at:
* @data_model: a #GdaDataModel object.
gboolean gdaex_data_model_is_empty (GdaDataModel *data_model);
+GValue *gdaex_data_model_get_field_value_at (GdaDataModel *data_model,
+ gint row,
+ const gchar *field_name);
gchar *gdaex_data_model_get_field_value_stringify_at (GdaDataModel *data_model,
gint row,
const gchar *field_name);
gint row,
const gchar *field_name);
+GValue *gdaex_data_model_get_value_at (GdaDataModel *data_model,
+ gint row,
+ gint col);
gchar *gdaex_data_model_get_value_stringify_at (GdaDataModel *data_model,
gint row,
gint col);