Index: openacs-4/packages/ams/tcl/ams-list-procs-postgresql.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ams/tcl/ams-list-procs-postgresql.xql,v diff -u -r1.1 -r1.2 --- openacs-4/packages/ams/tcl/ams-list-procs-postgresql.xql 18 May 2005 17:11:48 -0000 1.1 +++ openacs-4/packages/ams/tcl/ams-list-procs-postgresql.xql 3 Jun 2005 01:17:56 -0000 1.2 @@ -1,95 +1,127 @@ - - - - - - - select * - from ams_lists - where list_id = :list_id - - - - - - - select attribute_id - from ams_list_attribute_map - where list_id = :list_id - - - - - - - select '1' - from ams_lists - where package_key = :package_key - and object_type = :object_type - and list_name = :list_name - - - - - - select list_id - from ams_lists - where package_key = :package_key - and object_type = :object_type - and list_name = :list_name - - - - - - - select ams_list__attribute_map ( - :list_id, - :attribute_id, - :sort_order, - :required_p, - :section_heading - ) - - - - - - select sort_order - from ams_list_attribute_map - where list_id = :list_id - order by sort_order desc - limit 1 - - - - - - delete from ams_list_attribute_map - where list_id = :list_id - and attribute_id = :attribute_id - - - - - - update ams_list_attribute_map - set required_p = 't' - where list_id = :list_id - and attribute_id = :attribute_id - - - - - - update ams_list_attribute_map - set required_p = 'f' - where list_id = :list_id - and attribute_id = :attribute_id - - - - - - - + + + + + + + select * + from ams_lists + where list_id = :list_id + + + + + + + select attribute_id + from ams_list_attribute_map + where list_id = :list_id + + + + + + select pretty_name, + description, + description_mime_type + from ams_lists + where list_id = :from_id + + + + + + insert into ams_list_attribute_map + (list_id,attribute_id,sort_order,required_p,section_heading) + ( select :to_id, + attribute_id, + sort_order, + required_p, + section_heading + from ams_list_attribute_map + where list_id = :from_id ) + + + + + + select '1' + from ams_list_attribute_map + where list_id = :to_id + limit 1 + + + + + + select '1' + from ams_lists + where package_key = :package_key + and object_type = :object_type + and list_name = :list_name + + + + + + select list_id + from ams_lists + where package_key = :package_key + and object_type = :object_type + and list_name = :list_name + + + + + + + select ams_list__attribute_map ( + :list_id, + :attribute_id, + :sort_order, + :required_p, + :section_heading + ) + + + + + + select sort_order + from ams_list_attribute_map + where list_id = :list_id + order by sort_order desc + limit 1 + + + + + + delete from ams_list_attribute_map + where list_id = :list_id + and attribute_id = :attribute_id + + + + + + update ams_list_attribute_map + set required_p = 't' + where list_id = :list_id + and attribute_id = :attribute_id + + + + + + update ams_list_attribute_map + set required_p = 'f' + where list_id = :list_id + and attribute_id = :attribute_id + + + + + + +