[libgda] Added the new index information fetching to all the providers



commit 9b00a422f1b4f856b3506b55038d6aef50eb992f
Author: Vivien Malerba <malerba gnome-db org>
Date:   Sun Dec 13 20:38:25 2009 +0100

    Added the new index information fetching to all the providers
    
    
    real implementation needs to be added to each one

 libgda/sqlite/gda-sqlite-meta.c                    |   36 ++++++
 libgda/sqlite/gda-sqlite-meta.h                    |   15 +++
 libgda/sqlite/gda-sqlite-provider.c                |    4 +
 providers/jdbc/gda-jdbc-meta.c                     |   40 +++++++-
 providers/jdbc/gda-jdbc-meta.h                     |   14 +++
 providers/jdbc/gda-jdbc-provider.c                 |    6 +-
 providers/mysql/gda-mysql-provider.c               |    5 +-
 providers/oracle/gda-oracle-meta.c                 |   36 ++++++
 providers/oracle/gda-oracle-meta.h                 |   18 +++-
 providers/oracle/gda-oracle-provider.c             |    4 +
 providers/reuseable/mysql/gda-mysql-meta.c         |   37 +++++++
 providers/reuseable/mysql/gda-mysql-meta.h         |   15 +++
 providers/reuseable/mysql/gda-mysql-reuseable.c    |    6 +-
 providers/skel-implementation/capi/gda-capi-meta.c |   38 +++++++-
 providers/skel-implementation/capi/gda-capi-meta.h |   16 +++-
 .../skel-implementation/capi/gda-capi-provider.c   |    6 +-
 providers/web/gda-web-meta.c                       |  114 ++++++++++++++++++--
 providers/web/gda-web-meta.h                       |   14 +++
 providers/web/gda-web-provider.c                   |    4 +
 19 files changed, 411 insertions(+), 17 deletions(-)
---
diff --git a/libgda/sqlite/gda-sqlite-meta.c b/libgda/sqlite/gda-sqlite-meta.c
index 731b20a..cdadb4c 100644
--- a/libgda/sqlite/gda-sqlite-meta.c
+++ b/libgda/sqlite/gda-sqlite-meta.c
@@ -2240,6 +2240,42 @@ _gda_sqlite_meta_routine_par (GdaServerProvider *prov, GdaConnection *cnc,
 	return TRUE;
 }
 
+gboolean
+_gda_sqlite_meta__indexes_tab (GdaServerProvider *prov, GdaConnection *cnc, 
+			       GdaMetaStore *store, GdaMetaContext *context, GError **error)
+{
+	//TO_IMPLEMENT;
+	return TRUE;
+}
+
+gboolean
+_gda_sqlite_meta_indexes_tab (GdaServerProvider *prov, GdaConnection *cnc, 
+			      GdaMetaStore *store, GdaMetaContext *context, GError **error,
+			      const GValue *table_catalog, const GValue *table_schema, const GValue *table_name,
+			      const GValue *index_name_n)
+{
+	//TO_IMPLEMENT;
+	return TRUE;
+}
+
+gboolean
+_gda_sqlite_meta__index_cols (GdaServerProvider *prov, GdaConnection *cnc, 
+			      GdaMetaStore *store, GdaMetaContext *context, GError **error)
+{
+	//TO_IMPLEMENT;
+	return TRUE;
+}
+
+gboolean
+_gda_sqlite_meta_index_cols (GdaServerProvider *prov, GdaConnection *cnc, 
+			     GdaMetaStore *store, GdaMetaContext *context, GError **error,
+			     const GValue *table_catalog, const GValue *table_schema,
+			     const GValue *table_name, const GValue *index_name)
+{
+	//TO_IMPLEMENT;
+	return TRUE;
+}
+
 /*
  * @...: a list of TRUE/FALSE, GValue*  -- if TRUE then the following GValue must be freed
  */
diff --git a/libgda/sqlite/gda-sqlite-meta.h b/libgda/sqlite/gda-sqlite-meta.h
index 003f525..7e11ac5 100644
--- a/libgda/sqlite/gda-sqlite-meta.h
+++ b/libgda/sqlite/gda-sqlite-meta.h
@@ -190,6 +190,21 @@ gboolean _gda_sqlite_meta_routine_par      (GdaServerProvider *prov, GdaConnecti
 					    const GValue *rout_catalog, const GValue *rout_schema, 
 					    const GValue *rout_name);
 
+/* _table_indexes */
+gboolean _gda_sqlite_meta__indexes_tab     (GdaServerProvider *prov, GdaConnection *cnc, 
+					    GdaMetaStore *store, GdaMetaContext *context, GError **error);
+gboolean _gda_sqlite_meta_indexes_tab      (GdaServerProvider *prov, GdaConnection *cnc, 
+					    GdaMetaStore *store, GdaMetaContext *context, GError **error,
+					    const GValue *table_catalog, const GValue *table_schema, const GValue *table_name,
+					    const GValue *index_name_n);
+
+/* _index_column_usage */
+gboolean _gda_sqlite_meta__index_cols      (GdaServerProvider *prov, GdaConnection *cnc, 
+					    GdaMetaStore *store, GdaMetaContext *context, GError **error);
+gboolean _gda_sqlite_meta_index_cols       (GdaServerProvider *prov, GdaConnection *cnc, 
+					    GdaMetaStore *store, GdaMetaContext *context, GError **error,
+					    const GValue *table_catalog, const GValue *table_schema,
+					    const GValue *table_name, const GValue *index_name);
 
 G_END_DECLS
 
diff --git a/libgda/sqlite/gda-sqlite-provider.c b/libgda/sqlite/gda-sqlite-provider.c
index fa11f11..086e6e8 100644
--- a/libgda/sqlite/gda-sqlite-provider.c
+++ b/libgda/sqlite/gda-sqlite-provider.c
@@ -415,6 +415,10 @@ gda_sqlite_provider_class_init (GdaSqliteProviderClass *klass)
 	provider_class->meta_funcs.routine_col = _gda_sqlite_meta_routine_col;
 	provider_class->meta_funcs._routine_par = _gda_sqlite_meta__routine_par;
 	provider_class->meta_funcs.routine_par = _gda_sqlite_meta_routine_par;
+	provider_class->meta_funcs._indexes_tab = _gda_sqlite_meta__indexes_tab;
+        provider_class->meta_funcs.indexes_tab = _gda_sqlite_meta_indexes_tab;
+        provider_class->meta_funcs._index_cols = _gda_sqlite_meta__index_cols;
+        provider_class->meta_funcs.index_cols = _gda_sqlite_meta_index_cols;	
 
 	/* SQLite doe not support distributed transactions */
 	provider_class->xa_funcs = NULL;
diff --git a/providers/jdbc/gda-jdbc-meta.c b/providers/jdbc/gda-jdbc-meta.c
index 7abce74..7afd081 100644
--- a/providers/jdbc/gda-jdbc-meta.c
+++ b/providers/jdbc/gda-jdbc-meta.c
@@ -1,5 +1,5 @@
 /* GDA jdbc provider
- * Copyright (C) 2008 The GNOME Foundation.
+ * Copyright (C) 2008 - 2009 The GNOME Foundation.
  *
  * AUTHORS:
  *      Vivien Malerba <malerba gnome-db org>
@@ -144,7 +144,7 @@ _gda_jdbc_meta_udt (GdaServerProvider *prov, GdaConnection *cnc,
 		    GdaMetaStore *store, GdaMetaContext *context, GError **error,
 		    const GValue *udt_catalog, const GValue *udt_schema)
 {
-	GdaDataModel *model;
+	GdaDataModel *model = NULL;
 	gboolean retval = TRUE;
 
 	TO_IMPLEMENT;
@@ -729,3 +729,39 @@ _gda_jdbc_meta_routine_par (GdaServerProvider *prov, GdaConnection *cnc,
 	TO_IMPLEMENT;
 	return TRUE;
 }
+
+gboolean
+_gda_mysql_meta__indexes_tab (GdaServerProvider *prov, GdaConnection *cnc, 
+			      GdaMetaStore *store, GdaMetaContext *context, GError **error)
+{
+	TO_IMPLEMENT;
+	return TRUE;
+}
+
+gboolean
+_gda_jdbc_meta_indexes_tab (GdaServerProvider *prov, GdaConnection *cnc, 
+			    GdaMetaStore *store, GdaMetaContext *context, GError **error,
+			    const GValue *table_catalog, const GValue *table_schema, const GValue *table_name,
+			    const GValue *index_name_n)
+{
+	TO_IMPLEMENT;
+	return TRUE;
+}
+
+gboolean
+_gda_jdbc_meta__index_cols (GdaServerProvider *prov, GdaConnection *cnc, 
+			    GdaMetaStore *store, GdaMetaContext *context, GError **error)
+{
+	TO_IMPLEMENT;
+	return TRUE;
+}
+
+gboolean
+_gda_jdbc_meta_index_cols (GdaServerProvider *prov, GdaConnection *cnc, 
+			   GdaMetaStore *store, GdaMetaContext *context, GError **error,
+			   const GValue *table_catalog, const GValue *table_schema,
+			   const GValue *table_name, const GValue *index_name)
+{
+	TO_IMPLEMENT;
+	return TRUE;
+}
diff --git a/providers/jdbc/gda-jdbc-meta.h b/providers/jdbc/gda-jdbc-meta.h
index d51a6a4..6487302 100644
--- a/providers/jdbc/gda-jdbc-meta.h
+++ b/providers/jdbc/gda-jdbc-meta.h
@@ -190,7 +190,21 @@ gboolean _gda_jdbc_meta_routine_par      (GdaServerProvider *prov, GdaConnection
 					  const GValue *rout_catalog, const GValue *rout_schema, 
 					  const GValue *rout_name);
 
+/* _table_indexes */
+gboolean _gda_jdbc_meta__indexes_tab     (GdaServerProvider *prov, GdaConnection *cnc, 
+					  GdaMetaStore *store, GdaMetaContext *context, GError **error);
+gboolean _gda_jdbc_meta_indexes_tab      (GdaServerProvider *prov, GdaConnection *cnc, 
+					  GdaMetaStore *store, GdaMetaContext *context, GError **error,
+					  const GValue *table_catalog, const GValue *table_schema, const GValue *table_name,
+					  const GValue *index_name_n);
 
+/* _index_column_usage */
+gboolean _gda_jdbc_meta__index_cols      (GdaServerProvider *prov, GdaConnection *cnc, 
+					  GdaMetaStore *store, GdaMetaContext *context, GError **error);
+gboolean _gda_jdbc_meta_index_cols       (GdaServerProvider *prov, GdaConnection *cnc, 
+					  GdaMetaStore *store, GdaMetaContext *context, GError **error,
+					  const GValue *table_catalog, const GValue *table_schema,
+					  const GValue *table_name, const GValue *index_name);
 G_END_DECLS
 
 #endif
diff --git a/providers/jdbc/gda-jdbc-provider.c b/providers/jdbc/gda-jdbc-provider.c
index 327a60f..10fcae9 100644
--- a/providers/jdbc/gda-jdbc-provider.c
+++ b/providers/jdbc/gda-jdbc-provider.c
@@ -1,5 +1,5 @@
 /* GDA Jdbc provider
- * Copyright (C) 2008 The GNOME Foundation.
+ * Copyright (C) 2008 - 2009 The GNOME Foundation.
  *
  * AUTHORS:
  *      Vivien Malerba <malerba gnome-db org>
@@ -238,6 +238,10 @@ gda_jdbc_provider_class_init (GdaJdbcProviderClass *klass)
 	provider_class->meta_funcs.routine_col = _gda_jdbc_meta_routine_col;
 	provider_class->meta_funcs._routine_par = _gda_jdbc_meta__routine_par;
 	provider_class->meta_funcs.routine_par = _gda_jdbc_meta_routine_par;
+	provider_class->meta_funcs._indexes_tab = _gda_jdbc_meta__indexes_tab;
+        provider_class->meta_funcs.indexes_tab = _gda_jdbc_meta_indexes_tab;
+        provider_class->meta_funcs._index_cols = _gda_jdbc_meta__index_cols;
+        provider_class->meta_funcs.index_cols = _gda_jdbc_meta_index_cols;
 
 	/* distributed transactions: if not supported, then provider_class->xa_funcs should be set to NULL */
 	provider_class->xa_funcs = g_new0 (GdaServerProviderXa, 1);
diff --git a/providers/mysql/gda-mysql-provider.c b/providers/mysql/gda-mysql-provider.c
index 4e5aeae..ba02d13 100644
--- a/providers/mysql/gda-mysql-provider.c
+++ b/providers/mysql/gda-mysql-provider.c
@@ -329,7 +329,10 @@ gda_mysql_provider_class_init (GdaMysqlProviderClass  *klass)
         provider_class->meta_funcs.routine_col = _gda_mysql_meta_routine_col;
         provider_class->meta_funcs._routine_par = _gda_mysql_meta__routine_par;
         provider_class->meta_funcs.routine_par = _gda_mysql_meta_routine_par;
-	
+	provider_class->meta_funcs._indexes_tab = _gda_mysql_meta__indexes_tab;
+        provider_class->meta_funcs.indexes_tab = _gda_mysql_meta_indexes_tab;
+        provider_class->meta_funcs._index_cols = _gda_mysql_meta__index_cols;
+        provider_class->meta_funcs.index_cols = _gda_mysql_meta_index_cols;
 
 	/* distributed transactions: if not supported, then provider_class->xa_funcs should be set to NULL */
 	provider_class->xa_funcs = g_new0 (GdaServerProviderXa, 1);
diff --git a/providers/oracle/gda-oracle-meta.c b/providers/oracle/gda-oracle-meta.c
index 7bdd1a3..06c3315 100644
--- a/providers/oracle/gda-oracle-meta.c
+++ b/providers/oracle/gda-oracle-meta.c
@@ -1118,3 +1118,39 @@ _gda_oracle_meta_routine_par (GdaServerProvider *prov, GdaConnection *cnc,
 	TO_IMPLEMENT;
 	return TRUE;
 }
+
+gboolean
+_gda_oracle_meta__indexes_tab (GdaServerProvider *prov, GdaConnection *cnc, 
+			       GdaMetaStore *store, GdaMetaContext *context, GError **error)
+{
+	TO_IMPLEMENT;
+	return TRUE;
+}
+
+gboolean
+_gda_oracle_meta_indexes_tab (GdaServerProvider *prov, GdaConnection *cnc, 
+			      GdaMetaStore *store, GdaMetaContext *context, GError **error,
+			      const GValue *table_catalog, const GValue *table_schema, const GValue *table_name,
+			      const GValue *index_name_n)
+{
+	TO_IMPLEMENT;
+	return TRUE;
+}
+
+gboolean
+_gda_oracle_meta__index_cols (GdaServerProvider *prov, GdaConnection *cnc, 
+			      GdaMetaStore *store, GdaMetaContext *context, GError **error)
+{
+	TO_IMPLEMENT;
+	return TRUE;
+}
+
+gboolean
+_gda_oracle_meta_index_cols (GdaServerProvider *prov, GdaConnection *cnc, 
+			     GdaMetaStore *store, GdaMetaContext *context, GError **error,
+			     const GValue *table_catalog, const GValue *table_schema,
+			     const GValue *table_name, const GValue *index_name)
+{
+	TO_IMPLEMENT;
+	return TRUE;
+}
diff --git a/providers/oracle/gda-oracle-meta.h b/providers/oracle/gda-oracle-meta.h
index 5e03cb2..4459f90 100644
--- a/providers/oracle/gda-oracle-meta.h
+++ b/providers/oracle/gda-oracle-meta.h
@@ -1,5 +1,5 @@
 /* GDA oracle provider
- * Copyright (C) 2008 The GNOME Foundation.
+ * Copyright (C) 2008 - 2009 The GNOME Foundation.
  *
  * AUTHORS:
  *      Vivien Malerba <malerba gnome-db org>
@@ -190,7 +190,21 @@ gboolean _gda_oracle_meta_routine_par      (GdaServerProvider *prov, GdaConnecti
 					  const GValue *rout_catalog, const GValue *rout_schema, 
 					  const GValue *rout_name);
 
-
+/* _table_indexes */
+gboolean _gda_oracle_meta__indexes_tab     (GdaServerProvider *prov, GdaConnection *cnc, 
+					    GdaMetaStore *store, GdaMetaContext *context, GError **error);
+gboolean _gda_oracle_meta_indexes_tab      (GdaServerProvider *prov, GdaConnection *cnc, 
+					    GdaMetaStore *store, GdaMetaContext *context, GError **error,
+					    const GValue *table_catalog, const GValue *table_schema, const GValue *table_name,
+					    const GValue *index_name_n);
+
+/* _index_column_usage */
+gboolean _gda_oracle_meta__index_cols      (GdaServerProvider *prov, GdaConnection *cnc, 
+					    GdaMetaStore *store, GdaMetaContext *context, GError **error);
+gboolean _gda_oracle_meta_index_cols       (GdaServerProvider *prov, GdaConnection *cnc, 
+					    GdaMetaStore *store, GdaMetaContext *context, GError **error,
+					    const GValue *table_catalog, const GValue *table_schema,
+					    const GValue *table_name, const GValue *index_name);
 G_END_DECLS
 
 #endif
diff --git a/providers/oracle/gda-oracle-provider.c b/providers/oracle/gda-oracle-provider.c
index 903fe1a..71881d4 100644
--- a/providers/oracle/gda-oracle-provider.c
+++ b/providers/oracle/gda-oracle-provider.c
@@ -248,6 +248,10 @@ gda_oracle_provider_class_init (GdaOracleProviderClass *klass)
 	provider_class->meta_funcs.routine_col = _gda_oracle_meta_routine_col;
 	provider_class->meta_funcs._routine_par = _gda_oracle_meta__routine_par;
 	provider_class->meta_funcs.routine_par = _gda_oracle_meta_routine_par;
+	provider_class->meta_funcs._indexes_tab = _gda_oracle_meta__indexes_tab;
+        provider_class->meta_funcs.indexes_tab = _gda_oracle_meta_indexes_tab;
+        provider_class->meta_funcs._index_cols = _gda_oracle_meta__index_cols;
+        provider_class->meta_funcs.index_cols = _gda_oracle_meta_index_cols;
 
 	/* distributed transactions: if not supported, then provider_class->xa_funcs should be set to NULL */
 	provider_class->xa_funcs = g_new0 (GdaServerProviderXa, 1);
diff --git a/providers/reuseable/mysql/gda-mysql-meta.c b/providers/reuseable/mysql/gda-mysql-meta.c
index 9bf1006..be940dc 100644
--- a/providers/reuseable/mysql/gda-mysql-meta.c
+++ b/providers/reuseable/mysql/gda-mysql-meta.c
@@ -1803,3 +1803,40 @@ _gda_mysql_meta_routine_par (GdaServerProvider  *prov,
 	//TO_IMPLEMENT;
 	return TRUE;
 }
+
+gboolean
+_gda_mysql_meta__indexes_tab (GdaServerProvider *prov, GdaConnection *cnc, 
+			      GdaMetaStore *store, GdaMetaContext *context, GError **error)
+{
+	//TO_IMPLEMENT;
+	return TRUE;
+}
+
+gboolean
+_gda_mysql_meta_indexes_tab (GdaServerProvider *prov, GdaConnection *cnc, 
+			     GdaMetaStore *store, GdaMetaContext *context, GError **error,
+			     const GValue *table_catalog, const GValue *table_schema, const GValue *table_name,
+			     const GValue *index_name_n)
+{
+	//TO_IMPLEMENT;
+	return TRUE;
+}
+
+gboolean
+_gda_mysql_meta__index_cols (GdaServerProvider *prov, GdaConnection *cnc, 
+			     GdaMetaStore *store, GdaMetaContext *context, GError **error)
+{
+	//TO_IMPLEMENT;
+	return TRUE;
+}
+
+gboolean
+_gda_mysql_meta_index_cols (GdaServerProvider *prov, GdaConnection *cnc, 
+			    GdaMetaStore *store, GdaMetaContext *context, GError **error,
+			    const GValue *table_catalog, const GValue *table_schema,
+			    const GValue *table_name, const GValue *index_name)
+{
+	//TO_IMPLEMENT;
+	return TRUE;
+}
+
diff --git a/providers/reuseable/mysql/gda-mysql-meta.h b/providers/reuseable/mysql/gda-mysql-meta.h
index b9e78a1..e6cfd86 100644
--- a/providers/reuseable/mysql/gda-mysql-meta.h
+++ b/providers/reuseable/mysql/gda-mysql-meta.h
@@ -383,6 +383,21 @@ _gda_mysql_meta_routine_par      (GdaServerProvider  *prov,
 				  const GValue       *rout_schema, 
 				  const GValue       *rout_name);
 
+/* _table_indexes */
+gboolean _gda_mysql_meta__indexes_tab     (GdaServerProvider *prov, GdaConnection *cnc, 
+					   GdaMetaStore *store, GdaMetaContext *context, GError **error);
+gboolean _gda_mysql_meta_indexes_tab      (GdaServerProvider *prov, GdaConnection *cnc, 
+					   GdaMetaStore *store, GdaMetaContext *context, GError **error,
+					   const GValue *table_catalog, const GValue *table_schema, const GValue *table_name,
+					   const GValue *index_name_n);
+
+/* _index_column_usage */
+gboolean _gda_mysql_meta__index_cols      (GdaServerProvider *prov, GdaConnection *cnc, 
+					   GdaMetaStore *store, GdaMetaContext *context, GError **error);
+gboolean _gda_mysql_meta_index_cols       (GdaServerProvider *prov, GdaConnection *cnc, 
+					   GdaMetaStore *store, GdaMetaContext *context, GError **error,
+					   const GValue *table_catalog, const GValue *table_schema,
+					   const GValue *table_name, const GValue *index_name);
 
 G_END_DECLS
 
diff --git a/providers/reuseable/mysql/gda-mysql-reuseable.c b/providers/reuseable/mysql/gda-mysql-reuseable.c
index 25e713b..d544027 100644
--- a/providers/reuseable/mysql/gda-mysql-reuseable.c
+++ b/providers/reuseable/mysql/gda-mysql-reuseable.c
@@ -82,7 +82,11 @@ _gda_mysql_reuseable = {
 		._routine_col = _gda_mysql_meta__routine_col,
 		.routine_col = _gda_mysql_meta_routine_col,
 		._routine_par = _gda_mysql_meta__routine_par,
-		.routine_par = _gda_mysql_meta_routine_par
+		.routine_par = _gda_mysql_meta_routine_par,
+		._indexes_tab = _gda_mysql_meta__indexes_tab,
+		.indexes_tab = _gda_mysql_meta_indexes_tab,
+		._index_cols = _gda_mysql_meta__index_cols,
+		.index_cols = _gda_mysql_meta_index_cols
 	}
 };
 
diff --git a/providers/skel-implementation/capi/gda-capi-meta.c b/providers/skel-implementation/capi/gda-capi-meta.c
index 94021c2..5757754 100644
--- a/providers/skel-implementation/capi/gda-capi-meta.c
+++ b/providers/skel-implementation/capi/gda-capi-meta.c
@@ -1,5 +1,5 @@
 /* GDA capi provider
- * Copyright (C) 2008 The GNOME Foundation.
+ * Copyright (C) 2008 - 2009 The GNOME Foundation.
  *
  * AUTHORS:
  *      TO_ADD: your name and email
@@ -498,3 +498,39 @@ _gda_capi_meta_routine_par (GdaServerProvider *prov, GdaConnection *cnc,
 	TO_IMPLEMENT;
 	return TRUE;
 }
+
+gboolean
+_gda_capi_meta__indexes_tab (GdaServerProvider *prov, GdaConnection *cnc, 
+			     GdaMetaStore *store, GdaMetaContext *context, GError **error)
+{
+	TO_IMPLEMENT;
+	return TRUE;
+}
+
+gboolean
+_gda_capi_meta_indexes_tab (GdaServerProvider *prov, GdaConnection *cnc, 
+			    GdaMetaStore *store, GdaMetaContext *context, GError **error,
+			    const GValue *table_catalog, const GValue *table_schema, const GValue *table_name,
+			    const GValue *index_name_n)
+{
+	TO_IMPLEMENT;
+	return TRUE;
+}
+
+gboolean
+_gda_capi_meta__index_cols (GdaServerProvider *prov, GdaConnection *cnc, 
+			    GdaMetaStore *store, GdaMetaContext *context, GError **error)
+{
+	TO_IMPLEMENT;
+	return TRUE;
+}
+
+gboolean
+_gda_capi_meta_index_cols (GdaServerProvider *prov, GdaConnection *cnc, 
+			   GdaMetaStore *store, GdaMetaContext *context, GError **error,
+			   const GValue *table_catalog, const GValue *table_schema,
+			   const GValue *table_name, const GValue *index_name)
+{
+	TO_IMPLEMENT;
+	return TRUE;
+}
diff --git a/providers/skel-implementation/capi/gda-capi-meta.h b/providers/skel-implementation/capi/gda-capi-meta.h
index b652414..797c923 100644
--- a/providers/skel-implementation/capi/gda-capi-meta.h
+++ b/providers/skel-implementation/capi/gda-capi-meta.h
@@ -1,5 +1,5 @@
 /* GDA capi provider
- * Copyright (C) 2008 The GNOME Foundation.
+ * Copyright (C) 2008 - 2009 The GNOME Foundation.
  *
  * AUTHORS:
  *      TO_ADD: your name and email
@@ -190,7 +190,21 @@ gboolean _gda_capi_meta_routine_par      (GdaServerProvider *prov, GdaConnection
 					  const GValue *rout_catalog, const GValue *rout_schema, 
 					  const GValue *rout_name);
 
+/* _table_indexes */
+gboolean _gda_capi_meta__indexes_tab     (GdaServerProvider *prov, GdaConnection *cnc, 
+					  GdaMetaStore *store, GdaMetaContext *context, GError **error);
+gboolean _gda_capi_meta_indexes_tab      (GdaServerProvider *prov, GdaConnection *cnc, 
+					  GdaMetaStore *store, GdaMetaContext *context, GError **error,
+					  const GValue *table_catalog, const GValue *table_schema, const GValue *table_name,
+					  const GValue *index_name_n);
 
+/* _index_column_usage */
+gboolean _gda_capi_meta__index_cols      (GdaServerProvider *prov, GdaConnection *cnc, 
+					  GdaMetaStore *store, GdaMetaContext *context, GError **error);
+gboolean _gda_capi_meta_index_cols       (GdaServerProvider *prov, GdaConnection *cnc, 
+					  GdaMetaStore *store, GdaMetaContext *context, GError **error,
+					  const GValue *table_catalog, const GValue *table_schema,
+					  const GValue *table_name, const GValue *index_name);
 G_END_DECLS
 
 #endif
diff --git a/providers/skel-implementation/capi/gda-capi-provider.c b/providers/skel-implementation/capi/gda-capi-provider.c
index d1c41d4..0617605 100644
--- a/providers/skel-implementation/capi/gda-capi-provider.c
+++ b/providers/skel-implementation/capi/gda-capi-provider.c
@@ -1,5 +1,5 @@
 /* GDA Capi provider
- * Copyright (C) 2008 The GNOME Foundation.
+ * Copyright (C) 2008 - 2009 The GNOME Foundation.
  *
  * AUTHORS:
  *      TO_ADD: your name and email
@@ -236,6 +236,10 @@ gda_capi_provider_class_init (GdaCapiProviderClass *klass)
 	provider_class->meta_funcs.routine_col = _gda_capi_meta_routine_col;
 	provider_class->meta_funcs._routine_par = _gda_capi_meta__routine_par;
 	provider_class->meta_funcs.routine_par = _gda_capi_meta_routine_par;
+	provider_class->meta_funcs._indexes_tab = _gda_capi_meta__indexes_tab;
+        provider_class->meta_funcs.indexes_tab = _gda_capi_meta_indexes_tab;
+        provider_class->meta_funcs._index_cols = _gda_capi_meta__index_cols;
+        provider_class->meta_funcs.index_cols = _gda_capi_meta_index_cols;
 
 	/* distributed transactions: if not supported, then provider_class->xa_funcs should be set to NULL */
 	provider_class->xa_funcs = g_new0 (GdaServerProviderXa, 1);
diff --git a/providers/web/gda-web-meta.c b/providers/web/gda-web-meta.c
index e4bc0a3..c978f19 100644
--- a/providers/web/gda-web-meta.c
+++ b/providers/web/gda-web-meta.c
@@ -726,14 +726,14 @@ _gda_web_meta_tables_views (GdaServerProvider *prov, GdaConnection *cnc,
 		return FALSE;
 
 	if (table_name_n)
-		tables_model = run_meta_command_args (cnc, cdata, "views", error,
-						      "table_catalog", g_value_get_string (table_catalog),
-						      "table_schema", g_value_get_string (table_schema),
-						      "table_name", g_value_get_string (table_name_n), NULL);
+		views_model = run_meta_command_args (cnc, cdata, "views", error,
+						     "table_catalog", g_value_get_string (table_catalog),
+						     "table_schema", g_value_get_string (table_schema),
+						     "table_name", g_value_get_string (table_name_n), NULL);
 	else
-		tables_model = run_meta_command_args (cnc, cdata, "views", error,
-						      "table_catalog", g_value_get_string (table_catalog),
-						      "table_schema", g_value_get_string (table_schema), NULL);
+		views_model = run_meta_command_args (cnc, cdata, "views", error,
+						     "table_catalog", g_value_get_string (table_catalog),
+						     "table_schema", g_value_get_string (table_schema), NULL);
 	if (!views_model) {
 		g_object_unref (tables_model);
 		return FALSE;
@@ -1380,3 +1380,103 @@ _gda_web_meta_routine_par (GdaServerProvider *prov, GdaConnection *cnc,
 	/* no default method */
 	return TRUE;
 }
+
+gboolean
+_gda_web_meta__indexes_tab (GdaServerProvider *prov, GdaConnection *cnc, 
+			    GdaMetaStore *store, GdaMetaContext *context, GError **error)
+{
+	WebConnectionData *cdata;
+
+	cdata = (WebConnectionData*) gda_connection_internal_get_provider_data (cnc);
+	if (!cdata) 
+		return FALSE;
+
+	/* use reuseable methods if available */
+	if (cdata->reuseable) {
+		if (cdata->reuseable->operations->re_meta_funcs._indexes_tab)
+			return cdata->reuseable->operations->re_meta_funcs._indexes_tab (NULL, cnc, store,
+											 context, error);
+		else
+			return TRUE;
+	}
+
+	/* no default method */
+	return TRUE;
+}
+
+gboolean
+_gda_web_meta_indexes_tab (GdaServerProvider *prov, GdaConnection *cnc, 
+			   GdaMetaStore *store, GdaMetaContext *context, GError **error,
+			   const GValue *table_catalog, const GValue *table_schema, const GValue *table_name,
+			   const GValue *index_name_n)
+{
+	WebConnectionData *cdata;
+
+	cdata = (WebConnectionData*) gda_connection_internal_get_provider_data (cnc);
+	if (!cdata) 
+		return FALSE;
+
+	/* use reuseable methods if available */
+	if (cdata->reuseable) {
+		if (cdata->reuseable->operations->re_meta_funcs.indexes_tab)
+			return cdata->reuseable->operations->re_meta_funcs.indexes_tab (NULL, cnc, store,
+											context, error,
+											table_catalog, table_schema, 
+											table_name, index_name_n);
+		else
+			return TRUE;
+	}
+
+	/* no default method */
+	return TRUE;
+}
+
+gboolean
+_gda_web_meta__index_cols (GdaServerProvider *prov, GdaConnection *cnc, 
+			   GdaMetaStore *store, GdaMetaContext *context, GError **error)
+{
+	WebConnectionData *cdata;
+
+	cdata = (WebConnectionData*) gda_connection_internal_get_provider_data (cnc);
+	if (!cdata) 
+		return FALSE;
+
+	/* use reuseable methods if available */
+	if (cdata->reuseable) {
+		if (cdata->reuseable->operations->re_meta_funcs._index_cols)
+			return cdata->reuseable->operations->re_meta_funcs._index_cols (NULL, cnc, store,
+											context, error);
+		else
+			return TRUE;
+	}
+
+	/* no default method */
+	return TRUE;
+}
+
+gboolean
+_gda_web_meta_index_cols (GdaServerProvider *prov, GdaConnection *cnc, 
+			  GdaMetaStore *store, GdaMetaContext *context, GError **error,
+			  const GValue *table_catalog, const GValue *table_schema,
+			  const GValue *table_name, const GValue *index_name)
+{
+	WebConnectionData *cdata;
+
+	cdata = (WebConnectionData*) gda_connection_internal_get_provider_data (cnc);
+	if (!cdata) 
+		return FALSE;
+
+	/* use reuseable methods if available */
+	if (cdata->reuseable) {
+		if (cdata->reuseable->operations->re_meta_funcs.index_cols)
+			return cdata->reuseable->operations->re_meta_funcs.index_cols (NULL, cnc, store,
+										       context, error,
+										       table_catalog, table_schema,
+										       table_name, index_name);
+		else
+			return TRUE;
+	}
+
+	/* no default method */
+	return TRUE;
+}
diff --git a/providers/web/gda-web-meta.h b/providers/web/gda-web-meta.h
index 9476955..e09b60a 100644
--- a/providers/web/gda-web-meta.h
+++ b/providers/web/gda-web-meta.h
@@ -190,7 +190,21 @@ gboolean _gda_web_meta_routine_par      (GdaServerProvider *prov, GdaConnection
 					 const GValue *rout_catalog, const GValue *rout_schema, 
 					 const GValue *rout_name);
 
+/* _table_indexes */
+gboolean _gda_web_meta__indexes_tab     (GdaServerProvider *prov, GdaConnection *cnc, 
+					 GdaMetaStore *store, GdaMetaContext *context, GError **error);
+gboolean _gda_web_meta_indexes_tab      (GdaServerProvider *prov, GdaConnection *cnc, 
+					 GdaMetaStore *store, GdaMetaContext *context, GError **error,
+					 const GValue *table_catalog, const GValue *table_schema, const GValue *table_name,
+					 const GValue *index_name_n);
 
+/* _index_column_usage */
+gboolean _gda_web_meta__index_cols      (GdaServerProvider *prov, GdaConnection *cnc, 
+					 GdaMetaStore *store, GdaMetaContext *context, GError **error);
+gboolean _gda_web_meta_index_cols       (GdaServerProvider *prov, GdaConnection *cnc, 
+					 GdaMetaStore *store, GdaMetaContext *context, GError **error,
+					 const GValue *table_catalog, const GValue *table_schema,
+					 const GValue *table_name, const GValue *index_name);
 G_END_DECLS
 
 #endif
diff --git a/providers/web/gda-web-provider.c b/providers/web/gda-web-provider.c
index 4e41ae0..02514b2 100644
--- a/providers/web/gda-web-provider.c
+++ b/providers/web/gda-web-provider.c
@@ -211,6 +211,10 @@ gda_web_provider_class_init (GdaWebProviderClass *klass)
 	provider_class->meta_funcs.routine_col = _gda_web_meta_routine_col;
 	provider_class->meta_funcs._routine_par = _gda_web_meta__routine_par;
 	provider_class->meta_funcs.routine_par = _gda_web_meta_routine_par;
+	provider_class->meta_funcs._indexes_tab = _gda_web_meta__indexes_tab;
+        provider_class->meta_funcs.indexes_tab = _gda_web_meta_indexes_tab;
+        provider_class->meta_funcs._index_cols = _gda_web_meta__index_cols;
+        provider_class->meta_funcs.index_cols = _gda_web_meta_index_cols;
 
 	/* distributed transactions: if not supported, then provider_class->xa_funcs should be set to NULL */
 	provider_class->xa_funcs = NULL;



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]