Added helper functions to get uri path for a node, and other related resources.
Added description to cms content type. Fixed initialization of node module to create test bed nodes.
This commit is contained in:
@@ -163,6 +163,20 @@ feature -- Helper
|
||||
-- FIXME: find better solution
|
||||
end
|
||||
|
||||
sql_table_items_count (a_table_name: READABLE_STRING_8): INTEGER_64
|
||||
-- Number of items in table `a_table_name'?
|
||||
local
|
||||
l_params: STRING_TABLE [detachable ANY]
|
||||
do
|
||||
reset_error
|
||||
create l_params.make (1)
|
||||
l_params.force (a_table_name, "tbname")
|
||||
sql_query ("SELECT count(*) FROM :tbname ;", l_params)
|
||||
if not has_error then
|
||||
Result := sql_read_integer_64 (1)
|
||||
end
|
||||
end
|
||||
|
||||
feature -- Access
|
||||
|
||||
sql_rows_count: INTEGER
|
||||
|
||||
@@ -48,7 +48,7 @@ feature -- Persistence
|
||||
l_parameters.put (a_node.revision, "revision")
|
||||
|
||||
sql_query (sql_select_page_data, l_parameters)
|
||||
if has_error then
|
||||
if not has_error then
|
||||
if sql_rows_count = 1 then
|
||||
l_previous_parent_id := sql_read_integer_64 (3)
|
||||
l_update := True
|
||||
|
||||
Reference in New Issue
Block a user