[libgda/LIBGDA_5.2] Vala: add bindings for variadic methods
- From: Daniel Espinosa Ortiz <despinosa src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [libgda/LIBGDA_5.2] Vala: add bindings for variadic methods
- Date: Sun, 8 Nov 2020 05:30:21 +0000 (UTC)
commit 2d79b46e9faad18451e02cfd049682bc76b855ef
Author: Daniel Espinosa <esodan gmail com>
Date: Sat Nov 7 23:29:35 2020 -0600
Vala: add bindings for variadic methods
Improves API from Vala by adding bindings for
variadic methods
libgda/Gda-5.0-custom.vala | 16 ++++++++++++++--
libgda/Gda-5.0.metadata | 16 ++++++++++++++++
libgda/gda-connection.c | 6 +++---
libgda/gda-data-model-array.c | 2 +-
libgda/gda-meta-store.c | 2 +-
libgda/gda-server-operation.c | 4 ++--
libgda/gda-set.c | 2 +-
libgda/gda-sql-builder.c | 6 +++---
8 files changed, 41 insertions(+), 13 deletions(-)
---
diff --git a/libgda/Gda-5.0-custom.vala b/libgda/Gda-5.0-custom.vala
index 3cdee9fd4..957d4763f 100644
--- a/libgda/Gda-5.0-custom.vala
+++ b/libgda/Gda-5.0-custom.vala
@@ -1,6 +1,18 @@
namespace Gda {
public class ServerOperation : GLib.Object {
- [Version (since = "4.2.3")]
- public static Gda.ServerOperation? prepare_create_table (Gda.Connection cnc, string table_name, ...)
throws GLib.Error;
+ [CCode (cname = "gda_server_operation_get_value_at")]
+ public unowned GLib.Value? get_value_at_format (string path_format, ...);
+ }
+ public class DataModelArray : GLib.Object, Gda.DataModel {
+ [CCode (cname = "gda_data_model_array_new_with_g_types")]
+ public static Gda.DataModel new_with_g_types (int cols, ...);
+ }
+ public class Set : GLib.Object {
+ [CCode (cname = "gda_set_new_inline")]
+ public static Gda.Set new_inline (int nb, ...);
+ }
+ public class MetaStore : GLib.Object {
+ [CCode (cname = "gda_meta_store_extract")]
+ public Gda.DataModel? extract_v (Gda.MetaStore store, string select_sql, ...) throws GLib.Error;
}
}
diff --git a/libgda/Gda-5.0.metadata b/libgda/Gda-5.0.metadata
index 65a9598a7..8a7651541 100644
--- a/libgda/Gda-5.0.metadata
+++ b/libgda/Gda-5.0.metadata
@@ -13,4 +13,20 @@ Numeric.get_string nullable=true
MetaStore.extract_v name="extract"
ServerOperation.set_value_at_path name="set_value_at"
ServerOperation.get_value_at_path name="get_value_at"
+// Fails but the method states a custom position of GLib.Error
+// so it is unbindable
+Connection.get_meta_store_data skip=false
+Connection.update_row_in_table skip=false
+Connection.statement_execute_select_fullv skip=false
+Connection.insert_row_into_table skip=false
+
+
+ServerOperation.prepare_create_table skip=false
+ServerOperation.get_node_info skip=false
+
+
+SqlBuilder.add_expr skip=false
+SqlBuilder.add_function skip=false
+SqlBuilder.add_case skip=false
+SqlBuilder.add_field_value skip=false
diff --git a/libgda/gda-connection.c b/libgda/gda-connection.c
index a971394d8..43911e96a 100644
--- a/libgda/gda-connection.c
+++ b/libgda/gda-connection.c
@@ -2068,7 +2068,7 @@ gda_connection_get_date_format (GdaConnection *cnc, GDateDMY *out_first,
}
/**
- * gda_connection_insert_row_into_table: (skip)
+ * gda_connection_insert_row_into_table:
* @cnc: an opened connection
* @table: table's name to insert into
* @error: a place to store errors, or %NULL
@@ -2234,7 +2234,7 @@ gda_connection_insert_row_into_table_v (GdaConnection *cnc, const gchar *table,
}
/**
- * gda_connection_update_row_in_table: (skip)
+ * gda_connection_update_row_in_table:
* @cnc: an opened connection
* @table: the table's name with the row's values to be updated
* @condition_column_name: the name of the column to used in the WHERE condition clause
@@ -5743,7 +5743,7 @@ prepare_meta_statements_hash (void)
}
/**
- * gda_connection_get_meta_store_data: (skip)
+ * gda_connection_get_meta_store_data:
* @cnc: a #GdaConnection object.
* @meta_type: describes which data to get.
* @error: a place to store errors, or %NULL
diff --git a/libgda/gda-data-model-array.c b/libgda/gda-data-model-array.c
index 481df8792..b9ecd5008 100644
--- a/libgda/gda-data-model-array.c
+++ b/libgda/gda-data-model-array.c
@@ -291,7 +291,7 @@ gda_data_model_array_new (gint cols)
}
/**
- * gda_data_model_array_new_with_g_types: (skip)
+ * gda_data_model_array_new_with_g_types: (rename-to gda_data_model_array_new_with_g_types_v)
* @cols: number of columns for rows in this data model.
* @...: types of the columns of the model to create as #GType, as many as indicated by @cols
*
diff --git a/libgda/gda-meta-store.c b/libgda/gda-meta-store.c
index a09e4b10f..259aba301 100644
--- a/libgda/gda-meta-store.c
+++ b/libgda/gda-meta-store.c
@@ -2704,7 +2704,7 @@ gda_meta_store_sql_identifier_quote (const gchar *id, GdaConnection *cnc)
}
/**
- * gda_meta_store_extract: (skip)
+ * gda_meta_store_extract:
* @store: a #GdaMetaStore object
* @select_sql: a SELECT statement
* @error: (nullable): a place to store errors, or %NULL
diff --git a/libgda/gda-server-operation.c b/libgda/gda-server-operation.c
index f990a0a55..3d765eb09 100644
--- a/libgda/gda-server-operation.c
+++ b/libgda/gda-server-operation.c
@@ -1083,7 +1083,7 @@ gda_server_operation_new (GdaServerOperationType op_type, const gchar *xml_file)
}
/**
- * gda_server_operation_get_node_info: (skip)
+ * gda_server_operation_get_node_info:
* @op: a #GdaServerOperation object
* @path_format: a complete path to a node (starting with "/") as a format string, similar to
g_strdup_printf()'s argument
* @...: the arguments to insert into the format string
@@ -2058,7 +2058,7 @@ gda_server_operation_get_value_at_path (GdaServerOperation *op, const gchar *pat
}
/**
- * gda_server_operation_get_value_at: (skip)
+ * gda_server_operation_get_value_at: (rename-to gda_server_operation_get_value_at_format)
* @op: a #GdaServerOperation object
* @path_format: a complete path to a node (starting with "/")
* @...: arguments to use with @path_format to make a complete path
diff --git a/libgda/gda-set.c b/libgda/gda-set.c
index e1147ba6f..456f9348b 100644
--- a/libgda/gda-set.c
+++ b/libgda/gda-set.c
@@ -1092,7 +1092,7 @@ gda_set_copy (GdaSet *set)
}
/**
- * gda_set_new_inline: (skip)
+ * gda_set_new_inline:
* @nb: the number of value holders which will be contained in the new #GdaSet
* @...: a serie of a (const gchar*) id, (GType) type, and value
*
diff --git a/libgda/gda-sql-builder.c b/libgda/gda-sql-builder.c
index d93fed49a..a70b3ce28 100644
--- a/libgda/gda-sql-builder.c
+++ b/libgda/gda-sql-builder.c
@@ -603,7 +603,7 @@ create_typed_value (GType type, va_list *ap)
}
/**
- * gda_sql_builder_add_field_value: (skip)
+ * gda_sql_builder_add_field_value:
* @builder: a #GdaSqlBuilder object
* @field_name: a field name
* @type: the GType of the following argument
@@ -1623,7 +1623,7 @@ gda_sql_builder_select_group_by (GdaSqlBuilder *builder, GdaSqlBuilderId expr_id
}
/**
- * gda_sql_builder_add_function: (skip)
+ * gda_sql_builder_add_function:
* @builder: a #GdaSqlBuilder object
* @func_name: the functions's name
* @...: a list, terminated with %0, of each function's argument's ID
@@ -1842,7 +1842,7 @@ gda_sql_builder_compound_add_sub_select_from_builder (GdaSqlBuilder *builder, Gd
}
/**
- * gda_sql_builder_add_case: (skip)
+ * gda_sql_builder_add_case:
* @builder: a #GdaSqlBuilder object
* @test_expr: the expression ID representing the test of the CASE, or %0
* @else_expr: the expression ID representing the ELSE expression, or %0
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]