Skip to content

Commit

Permalink
Remove oid_id field usage. Refs midgardprojectgh-185
Browse files Browse the repository at this point in the history
  • Loading branch information
piotras committed Apr 19, 2013
1 parent 46a6cb1 commit 52fb8f0
Showing 1 changed file with 2 additions and 27 deletions.
29 changes: 2 additions & 27 deletions src/midgard_repligard.c
Original file line number Diff line number Diff line change
Expand Up @@ -117,16 +117,6 @@ midgard_repligard_create_object_info (MidgardRepligard *self, MidgardObject *obj
g_clear_error (&err);
return FALSE;
}
/* workspace_oid */
gda_set_set_holder_value (params, &err, "midgard_ws_oid_id", MGD_OBJECT_WS_ID (object));
if (err) {
g_set_error (error, MIDGARD_GENERIC_ERROR, MIDGARD_GENERIC_ERROR_INTERNAL,
"Failed to set midgard_ws_oid_id INSERT parameter: %s.",
err && err->message ? err->message : "Unknown reason");
g_clear_error (&err);
return FALSE;
}

}

if (MGD_CNC_DEBUG (mgd)) {
Expand Down Expand Up @@ -428,8 +418,8 @@ __initialize_statement_insert_query_string (MidgardDBObjectClass *klass, gboolea
if (!add_workspace) {
g_string_append (sql, "(guid, typename, object_action) VALUES (##guid::string, ##typename::string, ##object_action::guint)");
} else {
g_string_append (sql, "(guid, typename, object_action, midgard_ws_id, midgard_ws_oid_id) "
"VALUES (##guid::string, ##typename::string, ##object_action::guint, ##midgard_ws_id::guint, ##midgard_ws_oid_id::guint)");
g_string_append (sql, "(guid, typename, object_action, midgard_ws_id) "
"VALUES (##guid::string, ##typename::string, ##object_action::guint, ##midgard_ws_id::guint)");
}

return g_string_free (sql, FALSE);
Expand Down Expand Up @@ -643,21 +633,6 @@ static void _midgard_repligard_class_init(
g_hash_table_insert (type_attr->prophash, g_strdup ((gchar *)property_name), prop_attr);
type_attr->_properties_list = g_slist_append (type_attr->_properties_list, (gpointer) property_name);

/* Workspace OID */
property_name = "workspaceoid";
pspec = g_param_spec_uint (property_name,
"Workspace OID",
"",
0, G_MAXUINT32, 0, G_PARAM_READWRITE);
g_object_class_install_property (gobject_class, PROPERTY_WORKSPACE_ID, pspec);
prop_attr = midgard_core_schema_type_property_attr_new();
prop_attr->gtype = MGD_TYPE_UINT;
prop_attr->field = g_strdup ("midgard_ws_oid_id");
prop_attr->table = g_strdup (MGD_REPLIGARD_TABLE);
prop_attr->tablefield = g_strjoin (".", MGD_REPLIGARD_TABLE, "midgard_ws_oid_id", NULL);
g_hash_table_insert (type_attr->prophash, g_strdup ((gchar *)property_name), prop_attr);
type_attr->_properties_list = g_slist_append (type_attr->_properties_list, (gpointer) property_name);

MIDGARD_DBOBJECT_CLASS (klass)->dbpriv = midgard_core_dbobject_private_new ();
MIDGARD_DBOBJECT_CLASS (klass)->dbpriv->storage_data = type_attr;
MIDGARD_DBOBJECT_CLASS (klass)->dbpriv->storage_data->table = g_strdup (MGD_REPLIGARD_TABLE);
Expand Down

0 comments on commit 52fb8f0

Please sign in to comment.