[libgda] Adding RENAME INDEX operation
- From: Pavlo Solntsev <psolntsev src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [libgda] Adding RENAME INDEX operation
- Date: Sun, 12 Jul 2020 03:40:03 +0000 (UTC)
commit 1aeed1764386d8247bb65cf5d74af8e920853a72
Author: Pavlo Solntsev <p sun fun gmail com>
Date: Thu May 28 13:19:31 2020 -0500
Adding RENAME INDEX operation
libgda/gda-server-operation.c | 4 ++++
libgda/gda-server-operation.h | 1 +
libgda/gda-server-provider.c | 8 ++++++++
3 files changed, 13 insertions(+)
---
diff --git a/libgda/gda-server-operation.c b/libgda/gda-server-operation.c
index e320af2c4..36969a96e 100644
--- a/libgda/gda-server-operation.c
+++ b/libgda/gda-server-operation.c
@@ -1319,6 +1319,8 @@ gda_server_operation_op_type_to_string (GdaServerOperationType type)
return "CREATE_INDEX";
case GDA_SERVER_OPERATION_DROP_INDEX:
return "DROP_INDEX";
+ case GDA_SERVER_OPERATION_RENAME_INDEX:
+ return "RENAME_INDEX";
case GDA_SERVER_OPERATION_RENAME_TABLE:
return "RENAME_TABLE";
case GDA_SERVER_OPERATION_COMMENT_TABLE:
@@ -1379,6 +1381,8 @@ gda_server_operation_string_to_op_type (const gchar *str)
operation_type = GDA_SERVER_OPERATION_DROP_INDEX;
else if (! g_ascii_strcasecmp (str, "RENAME_TABLE"))
operation_type = GDA_SERVER_OPERATION_RENAME_TABLE;
+ else if (! g_ascii_strcasecmp (str, "RENAME_INDEX"))
+ operation_type = GDA_SERVER_OPERATION_RENAME_INDEX;
else if (! g_ascii_strcasecmp (str, "COMMENT_TABLE"))
operation_type = GDA_SERVER_OPERATION_COMMENT_TABLE;
else if (! g_ascii_strcasecmp (str, "ADD_COLUMN"))
diff --git a/libgda/gda-server-operation.h b/libgda/gda-server-operation.h
index cb5c084d0..a9c6f24cd 100644
--- a/libgda/gda-server-operation.h
+++ b/libgda/gda-server-operation.h
@@ -52,6 +52,7 @@ typedef enum {
GDA_SERVER_OPERATION_CREATE_INDEX,
GDA_SERVER_OPERATION_DROP_INDEX,
+ GDA_SERVER_OPERATION_RENAME_INDEX,
GDA_SERVER_OPERATION_CREATE_VIEW,
GDA_SERVER_OPERATION_DROP_VIEW,
diff --git a/libgda/gda-server-provider.c b/libgda/gda-server-provider.c
index 97556ad20..3090ba858 100644
--- a/libgda/gda-server-provider.c
+++ b/libgda/gda-server-provider.c
@@ -869,6 +869,13 @@ static OpReq op_req_CREATE_INDEX [] = {
{NULL, 0, 0}
};
+static OpReq op_req_RENAME_INDEX [] = {
+ {"/INDEX_DEF_P/INDEX_NAME", GDA_SERVER_OPERATION_NODE_PARAM, G_TYPE_STRING},
+ {"/INDEX_DEF_P/INDEX_ON_TABLE", GDA_SERVER_OPERATION_NODE_PARAM, G_TYPE_STRING},
+ {"/INDEX_DEF_P/INDEX_NAME_NEW", GDA_SERVER_OPERATION_NODE_PARAM, G_TYPE_STRING},
+ {NULL, 0, 0}
+};
+
static OpReq op_req_DROP_INDEX [] = {
{"/INDEX_DESC_P/INDEX_NAME", GDA_SERVER_OPERATION_NODE_PARAM, G_TYPE_STRING},
{NULL, 0, 0}
@@ -950,6 +957,7 @@ gda_server_provider_create_operation (GdaServerProvider *provider, GdaConnection
op_req_table [GDA_SERVER_OPERATION_CREATE_INDEX] = op_req_CREATE_INDEX;
op_req_table [GDA_SERVER_OPERATION_DROP_INDEX] = op_req_DROP_INDEX;
+ op_req_table [GDA_SERVER_OPERATION_RENAME_INDEX] = op_req_RENAME_INDEX;
op_req_table [GDA_SERVER_OPERATION_CREATE_VIEW] = op_req_CREATE_VIEW;
op_req_table [GDA_SERVER_OPERATION_DROP_VIEW] = op_req_DROP_VIEW;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]