[gom] gom: Remove fetching the generated SQL for a command
- From: Bastien Nocera <hadess src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gom] gom: Remove fetching the generated SQL for a command
- Date: Tue, 15 Apr 2014 22:34:55 +0000 (UTC)
commit 0a4463e67f0e6fd87502e4be80383605f05f5e96
Author: Bastien Nocera <hadess hadess net>
Date: Tue Apr 15 12:25:23 2014 +0200
gom: Remove fetching the generated SQL for a command
We ultimately want to get rid of SQL in the public API, so start
with not making the generated SQL command readable.
gom/gom-command.c | 13 +------------
gom/gom-command.h | 1 -
2 files changed, 1 insertions(+), 13 deletions(-)
---
diff --git a/gom/gom-command.c b/gom/gom-command.c
index e2bdad2..8996c24 100644
--- a/gom/gom-command.c
+++ b/gom/gom-command.c
@@ -142,13 +142,6 @@ gom_command_bind_params (GomCommand *command)
}
}
-const gchar *
-gom_command_get_sql (GomCommand *command)
-{
- g_return_val_if_fail(GOM_IS_COMMAND(command), NULL);
- return command->priv->sql;
-}
-
void
gom_command_set_sql (GomCommand *command,
const gchar *sql)
@@ -161,7 +154,6 @@ gom_command_set_sql (GomCommand *command,
g_free(priv->sql);
priv->sql = g_strdup(sql);
- g_object_notify_by_pspec(G_OBJECT(command), gParamSpecs[PROP_SQL]);
}
static void
@@ -417,9 +409,6 @@ gom_command_get_property (GObject *object,
case PROP_ADAPTER:
g_value_set_object(value, gom_command_get_adapter(command));
break;
- case PROP_SQL:
- g_value_set_string(value, gom_command_get_sql(command));
- break;
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID(object, prop_id, pspec);
}
@@ -485,7 +474,7 @@ gom_command_class_init (GomCommandClass *klass)
_("SQL"),
_("The SQL for the command."),
NULL,
- G_PARAM_READWRITE);
+ G_PARAM_WRITABLE);
g_object_class_install_property(object_class, PROP_SQL,
gParamSpecs[PROP_SQL]);
}
diff --git a/gom/gom-command.h b/gom/gom-command.h
index 57f1089..d3f0cc0 100644
--- a/gom/gom-command.h
+++ b/gom/gom-command.h
@@ -63,7 +63,6 @@ gboolean gom_command_execute (GomCommand *command,
GomCursor **cursor,
GError **error);
GType gom_command_get_type (void) G_GNUC_CONST;
-const gchar *gom_command_get_sql (GomCommand *command);
void gom_command_set_sql (GomCommand *command,
const gchar *sql);
gint gom_command_get_param_index (GomCommand *command,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]