Index: openacs-4/contrib/obsolete-packages/acs-workflow/tcl/workflow-procs-postgresql.xql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/contrib/obsolete-packages/acs-workflow/tcl/workflow-procs-postgresql.xql,v
diff -u -r1.1 -r1.2
--- openacs-4/contrib/obsolete-packages/acs-workflow/tcl/workflow-procs-postgresql.xql 25 Apr 2001 04:52:44 -0000 1.1
+++ openacs-4/contrib/obsolete-packages/acs-workflow/tcl/workflow-procs-postgresql.xql 27 Apr 2001 01:41:12 -0000 1.2
@@ -56,7 +56,7 @@
- fullquery name="wf_case_info.case">
+
select case_id,
@@ -198,7 +198,7 @@
-
+
select workflow_case__add_manual_assignment(
Index: openacs-4/packages/acs-admin/tcl/apm-admin-procs-oracle.xql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/acs-admin/tcl/Attic/apm-admin-procs-oracle.xql,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/acs-admin/tcl/apm-admin-procs-oracle.xql 27 Apr 2001 01:41:12 -0000 1.1
@@ -0,0 +1,22 @@
+
+
+
+ oracle8.1.6
+
+
+
+
+ declare
+ v_version_name varchar(4000);
+ begin
+ select version_name into v_version_name
+ from apm_package_versions where
+ version_id = apm_package.highest_version(:package_key);
+ :1 := apm_package_version.version_name_greater(:version_name, v_version_name);
+ end;
+
+
+
+
+
+
Index: openacs-4/packages/acs-admin/tcl/apm-admin-procs-postgresql.xql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/acs-admin/tcl/Attic/apm-admin-procs-postgresql.xql,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/acs-admin/tcl/apm-admin-procs-postgresql.xql 27 Apr 2001 01:41:12 -0000 1.1
@@ -0,0 +1,22 @@
+
+
+
+ postgresql7.1
+
+
+
+ FIX ME PLSQL
+ declare
+ v_version_name varchar(4000);
+ begin
+ select version_name into v_version_name
+ from apm_package_versions where
+ version_id = apm_package.highest_version(:package_key);
+ :1 := apm_package_version.version_name_greater(:version_name, v_version_name);
+ end;
+
+
+
+
+
+
Index: openacs-4/packages/acs-admin/tcl/apm-admin-procs.xql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/acs-admin/tcl/apm-admin-procs.xql,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/acs-admin/tcl/apm-admin-procs.xql 27 Apr 2001 01:41:12 -0000 1.1
@@ -0,0 +1,15 @@
+
+
+
+
+
+
+ select distinct(section_name)
+ from apm_parameters
+ where package_key = :package_key
+
+
+
+
+
+
Index: openacs-4/packages/acs-admin/www/index.xql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/acs-admin/www/index.xql,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/acs-admin/www/index.xql 27 Apr 2001 01:41:12 -0000 1.1
@@ -0,0 +1,16 @@
+
+
+
+
+
+
+ select site_node.url(node_id) || 'admin/' subsite_admin_url, instance_name
+ from site_nodes s, apm_packages p
+ where s.object_id = p.package_id
+ and p.package_key = 'acs-subsite'
+
+
+
+
+
+
Index: openacs-4/packages/acs-admin/www/apm/bulk-intall.xql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/acs-admin/www/apm/Attic/bulk-intall.xql,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/acs-admin/www/apm/bulk-intall.xql 27 Apr 2001 01:41:12 -0000 1.1
@@ -0,0 +1,15 @@
+
+
+
+
+
+
+ select pretty_name, version_name, package_key
+ from apm_package_version_info i
+ where version_id = :version_id
+
+
+
+
+
+
Index: openacs-4/packages/acs-admin/www/apm/cvs-status.xql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/acs-admin/www/apm/Attic/cvs-status.xql,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/acs-admin/www/apm/cvs-status.xql 27 Apr 2001 01:41:12 -0000 1.1
@@ -0,0 +1,33 @@
+
+
+
+
+
+ select email from parties where user_id = [ad_get_user_id]
+
+
+
+
+
+
+
+ select v.package_key, v.version_id, v.package_name, v.version_name
+ from apm_package_version_info v, apm_package_owners o
+ where o.owner_url = :email
+ and v.version_id = o.version_id
+ and v.installed_p = 't'
+ order by upper(package_name)
+
+
+
+
+
+
+
+ select path from apm_package_files where version_id = :version_id
+
+
+
+
+
+
Index: openacs-4/packages/acs-admin/www/apm/file-add-2.xql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/acs-admin/www/apm/Attic/file-add-2.xql,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/acs-admin/www/apm/file-add-2.xql 27 Apr 2001 01:41:12 -0000 1.1
@@ -0,0 +1,15 @@
+
+
+
+
+
+
+ select count(*) from apm_package_files
+ where version_id = :version_id
+ and path = :index_path
+
+
+
+
+
+
Index: openacs-4/packages/acs-admin/www/apm/file-add.xql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/acs-admin/www/apm/Attic/file-add.xql,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/acs-admin/www/apm/file-add.xql 27 Apr 2001 01:41:12 -0000 1.1
@@ -0,0 +1,13 @@
+
+
+
+
+
+
+ select path from apm_package_files where version_id = :version_id
+
+
+
+
+
+
Index: openacs-4/packages/acs-admin/www/apm/file-remove.xql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/acs-admin/www/apm/Attic/file-remove.xql,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/acs-admin/www/apm/file-remove.xql 27 Apr 2001 01:41:12 -0000 1.1
@@ -0,0 +1,22 @@
+
+
+
+
+
+
+select distinct version_id
+from apm_package_files
+where file_id in ([join $file_id ","])
+
+
+
+
+
+
+ delete from apm_package_files
+ where file_id in ([join $file_id ","])
+
+
+
+
+
Index: openacs-4/packages/acs-admin/www/apm/file-watch.xql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/acs-admin/www/apm/Attic/file-watch.xql,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/acs-admin/www/apm/file-watch.xql 27 Apr 2001 01:41:12 -0000 1.1
@@ -0,0 +1,28 @@
+
+
+
+
+
+
+ select t.package_key, t.pretty_name,
+ v.version_name, v.package_key, v.installed_p,
+ f.path, f.version_id
+ from apm_package_types t, apm_package_versions v, apm_package_files f
+ where f.file_id = :file_id
+ and f.version_id = v.version_id
+ and v.package_key = t.package_key
+
+
+
+
+
+
+
+
+ select path from apm_package_files where file_id = :file_id
+
+
+
+
+
+
Index: openacs-4/packages/acs-admin/www/apm/index-oracle.xql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/acs-admin/www/apm/index-oracle.xql,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/acs-admin/www/apm/index-oracle.xql 27 Apr 2001 01:41:12 -0000 1.1
@@ -0,0 +1,14 @@
+
+
+ oracle8.1.6
+
+
+
+
+ select email from parties where party_id = :user_id
+
+
+
+
+
+
Index: openacs-4/packages/acs-admin/www/apm/index-postgresql.xql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/acs-admin/www/apm/index-postgresql.xql,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/acs-admin/www/apm/index-postgresql.xql 27 Apr 2001 01:41:12 -0000 1.1
@@ -0,0 +1,26 @@
+
+
+ postgresql7.1
+
+
+
+
+ select v.version_id, v.package_key, t.pretty_name, v.version_name, v.enabled_p,
+ v.installed_p, v.distribution_uri,
+ (select count(*) from apm_package_files f where f.version_id = v.version_id) as n_files,
+ (select count(*) from apm_package_versions v2
+ where v2.package_key = v.package_key
+ and v2.installed_p
+ and apm_package_version__sortable_version_name(v2.version_name) >
+ apm_package_version__sortable_version_name(v.version_name)) as superseded_p,
+ (select count(*) where distribution_tarball is not null) as tarball_p
+ from apm_package_versions v, apm_package_types t
+ where t.package_key = v.package_key
+ [ad_dimensional_sql $dimensional_list where and]
+ [ad_order_by_from_sort_spec $orderby $table_def]
+
+
+
+
+
+
Index: openacs-4/packages/acs-admin/www/apm/index.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/acs-admin/www/apm/index.tcl,v
diff -u -r1.2 -r1.3
--- openacs-4/packages/acs-admin/www/apm/index.tcl 24 Apr 2001 22:39:18 -0000 1.2
+++ openacs-4/packages/acs-admin/www/apm/index.tcl 27 Apr 2001 01:41:12 -0000 1.3
@@ -91,23 +91,8 @@
doc_body_flush
-set sql_qry "
- select v.version_id, v.package_key, t.pretty_name, v.version_name, v.enabled_p,
- v.installed_p, v.distribution_uri,
- (select count(*) from apm_package_files f where f.version_id = v.version_id) as n_files,
- (select count(*) from apm_package_versions v2
- where v2.package_key = v.package_key
- and v2.installed_p = 't'
- and apm_package_version.sortable_version_name(v2.version_name) > apm_package_version.sortable_version_name(v.version_name)) as superseded_p,
- (select count(*) from dual where distribution_tarball is not null) as tarball_p
- from apm_package_versions v, apm_package_types t
- where t.package_key = v.package_key
- [ad_dimensional_sql $dimensional_list where and]
- [ad_order_by_from_sort_spec $orderby $table_def]
- "
+set table [ad_table -Torderby $orderby -Tmissing_text $missing_text "apm_table" "" $table_def]
-set table [ad_table -Torderby $orderby -Tmissing_text $missing_text "apm_table" $sql_qry $table_def]
-
db_release_unused_handles
doc_body_append "Packages
$table
Index: openacs-4/packages/acs-admin/www/apm/index.xql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/acs-admin/www/apm/Attic/index.xql,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/acs-admin/www/apm/index.xql 27 Apr 2001 01:41:12 -0000 1.1
@@ -0,0 +1,24 @@
+
+
+
+
+
+
+ select v.version_id, v.package_key, t.pretty_name, v.version_name, v.enabled_p,
+ v.installed_p, v.distribution_uri,
+ (select count(*) from apm_package_files f where f.version_id = v.version_id) as n_files,
+ (select count(*) from apm_package_versions v2
+ where v2.package_key = v.package_key
+ and v2.installed_p = 't'
+ and apm_package_version.sortable_version_name(v2.version_name) > apm_package_version.sortable_version_name(v.version_name)) as superseded_p,
+ (select count(*) from dual where distribution_tarball is not null) as tarball_p
+ from apm_package_versions v, apm_package_types t
+ where t.package_key = v.package_key
+ [ad_dimensional_sql $dimensional_list where and]
+ [ad_order_by_from_sort_spec $orderby $table_def]
+
+
+
+
+
+
Index: openacs-4/packages/acs-admin/www/apm/package-add-2.xql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/acs-admin/www/apm/package-add-2.xql,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/acs-admin/www/apm/package-add-2.xql 27 Apr 2001 01:41:12 -0000 1.1
@@ -0,0 +1,49 @@
+
+
+
+
+
+ select case when count(*) > 0 then 0 else 1 end from apm_package_types
+ where pretty_plural = :pretty_plural
+
+
+
+
+
+
+
+ select case when count(*) > 0 then 0 else 1 end from apm_package_types
+ where pretty_name = :pretty_name
+
+
+
+
+
+
+
+ select case when count(*) > 0 then 0 else 1 end from apm_package_types
+ where package_uri = :package_uri
+
+
+
+
+
+
+
+ select case when count(*) > 0 then 0 else 1 end from apm_package_versions
+ where version_uri = :version_uri
+
+
+
+
+
+
+
+ select case when count(*) > 0 then 0 else 1 end from apm_package_versions
+ where version_id = :version_id
+
+
+
+
+
+
Index: openacs-4/packages/acs-admin/www/apm/package-add.xql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/acs-admin/www/apm/Attic/package-add.xql,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/acs-admin/www/apm/package-add.xql 27 Apr 2001 01:41:12 -0000 1.1
@@ -0,0 +1,13 @@
+
+
+
+
+
+
+ select first_names || ' ' || last_name user_name, email from cc_users where user_id = :user_id
+
+
+
+
+
+
Index: openacs-4/packages/acs-admin/www/apm/package-delete-2.xql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/acs-admin/www/apm/Attic/package-delete-2.xql,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/acs-admin/www/apm/package-delete-2.xql 27 Apr 2001 01:41:12 -0000 1.1
@@ -0,0 +1,15 @@
+
+
+
+
+
+
+ select path from apm_package_files
+ where file_id in ([join $sql_drop_scripts \",\"])
+ and file_type='data_model_drop'
+
+
+
+
+
+
Index: openacs-4/packages/acs-admin/www/apm/package-delete.xql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/acs-admin/www/apm/Attic/package-delete.xql,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/acs-admin/www/apm/package-delete.xql 27 Apr 2001 01:41:12 -0000 1.1
@@ -0,0 +1,17 @@
+
+
+
+
+
+
+ select file_id, path
+ from apm_package_files
+ where version_id = :version_id
+ and file_type = 'data_model_drop'
+ and (db_type is null or db_type = :db_type)
+
+
+
+
+
+
Index: openacs-4/packages/acs-admin/www/apm/packages-install-3.xql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/acs-admin/www/apm/Attic/packages-install-3.xql,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/acs-admin/www/apm/packages-install-3.xql 27 Apr 2001 01:41:12 -0000 1.1
@@ -0,0 +1,15 @@
+
+
+
+
+
+
+ select version_name from apm_package_versions
+ where package_key = :package_key
+ and version_id = apm_package.highest_version(:package_key)
+
+
+
+
+
+
Index: openacs-4/packages/acs-admin/www/apm/parameter-add-2.xql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/acs-admin/www/apm/parameter-add-2.xql,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/acs-admin/www/apm/parameter-add-2.xql 27 Apr 2001 01:41:12 -0000 1.1
@@ -0,0 +1,23 @@
+
+
+
+
+
+ select case when count(*) > 0 then 0 else 1 end
+ from apm_parameters
+ where parameter_name = :parameter_name
+
+
+
+
+
+
+
+
+ select 1 from apm_parameters where parameter_id = :parameter_id
+
+
+
+
+
+
Index: openacs-4/packages/acs-admin/www/apm/parameter-add.xql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/acs-admin/www/apm/parameter-add.xql,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/acs-admin/www/apm/parameter-add.xql 27 Apr 2001 01:41:12 -0000 1.1
@@ -0,0 +1,15 @@
+
+
+
+
+
+
+ select package_key, pretty_name, version_name, acs_object_id_seq.nextval as parameter_id
+ from apm_package_version_info
+ where version_id = :version_id
+
+
+
+
+
+
Index: openacs-4/packages/acs-admin/www/apm/parameter-edit.xql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/acs-admin/www/apm/parameter-edit.xql,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/acs-admin/www/apm/parameter-edit.xql 27 Apr 2001 01:41:12 -0000 1.1
@@ -0,0 +1,27 @@
+
+
+
+
+
+
+ select parameter_name, datatype, description, default_value, min_n_values, max_n_values, parameter_id,
+ section_name, default_value
+ from apm_parameters
+ where parameter_id = :parameter_id
+
+
+
+
+
+
+
+
+ select pretty_name, version_name, package_key
+ from apm_package_version_info
+ where version_id = :version_id
+
+
+
+
+
+
Index: openacs-4/packages/acs-admin/www/apm/version-dependencies-oracle.xql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/acs-admin/www/apm/version-dependencies-oracle.xql,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/acs-admin/www/apm/version-dependencies-oracle.xql 27 Apr 2001 01:41:12 -0000 1.1
@@ -0,0 +1,40 @@
+
+
+ oracle8.1.6
+
+
+
+
+ select package_key, pretty_name, version_name, installed_p
+ from apm_package_version_info
+ where version_id = :version_id
+
+
+
+
+
+
+
+
+ select dependency_id, service_uri, service_version
+ from apm_package_dependencies
+ where version_id = :version_id
+ and dependency_type = :dependency_type_prep
+ order by service_uri
+
+
+
+
+
+
+select t.pretty_name dep_pretty_name, v.version_name dep_version_name, v.version_id dep_version_id
+from apm_package_versions v, apm_package_dependencies d, apm_package_types t
+where d.service_uri = :service_uri
+and d.dependency_type = :other_dependency_type_prep
+and d.version_id = v.version_id
+and t.package_key = v.package_key
+and apm_package_version.sortable_version_name(d.service_version) $sign apm_package_version.sortable_version_name(:service_version)
+
+
+
+
Index: openacs-4/packages/acs-admin/www/apm/version-dependencies-postgresql.xql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/acs-admin/www/apm/version-dependencies-postgresql.xql,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/acs-admin/www/apm/version-dependencies-postgresql.xql 27 Apr 2001 01:41:12 -0000 1.1
@@ -0,0 +1,28 @@
+
+
+ postgresql7.1
+
+
+
+
+ select package_key, pretty_name, version_name, installed_p
+ from apm_package_version_info
+ where version_id = :version_id
+
+
+
+
+
+
+
+
+ select dependency_id, service_uri, service_version
+ from apm_package_dependencies
+ where version_id = :version_id
+ and dependency_type = :dependency_type_prep
+ order by service_uri
+
+
+
+
+
Index: openacs-4/packages/acs-admin/www/apm/version-dependencies.xql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/acs-admin/www/apm/version-dependencies.xql,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/acs-admin/www/apm/version-dependencies.xql 27 Apr 2001 01:41:12 -0000 1.1
@@ -0,0 +1,27 @@
+
+
+
+
+
+
+ select package_key, pretty_name, version_name, installed_p
+ from apm_package_version_info
+ where version_id = :version_id
+
+
+
+
+
+
+
+
+ select dependency_id, service_uri, service_version
+ from apm_package_dependencies
+ where version_id = :version_id
+ and dependency_type = :dependency_type_prep
+ order by service_uri
+
+
+
+
+
Index: openacs-4/packages/acs-admin/www/apm/version-dependency-add-2.xql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/acs-admin/www/apm/version-dependency-add-2.xql,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/acs-admin/www/apm/version-dependency-add-2.xql 27 Apr 2001 01:41:12 -0000 1.1
@@ -0,0 +1,14 @@
+
+
+
+
+
+
+ select count(*) from apm_package_dependencies
+ where dependency_id = :dependency_id
+
+
+
+
+
+
Index: openacs-4/packages/acs-admin/www/apm/version-dependency-add-oracle.xql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/acs-admin/www/apm/version-dependency-add-oracle.xql,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/acs-admin/www/apm/version-dependency-add-oracle.xql 27 Apr 2001 01:41:12 -0000 1.1
@@ -0,0 +1,14 @@
+
+
+ oracle8.1.6
+
+
+ select distinct service_uri, service_version
+ from apm_package_dependencies
+ order by service_uri, apm_package_version.sortable_version_name(service_version)
+
+
+
+
+
+
Index: openacs-4/packages/acs-admin/www/apm/version-dependency-add-postgresql.xql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/acs-admin/www/apm/version-dependency-add-postgresql.xql,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/acs-admin/www/apm/version-dependency-add-postgresql.xql 27 Apr 2001 01:41:12 -0000 1.1
@@ -0,0 +1,15 @@
+
+
+ postgresql7.1
+
+
+
+ select distinct service_uri, service_version
+ from apm_package_dependencies
+ order by service_uri, apm_package_version__sortable_version_name(service_version)
+
+
+
+
+
+
Index: openacs-4/packages/acs-admin/www/apm/version-dependency-add.xql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/acs-admin/www/apm/version-dependency-add.xql,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/acs-admin/www/apm/version-dependency-add.xql 27 Apr 2001 01:41:12 -0000 1.1
@@ -0,0 +1,16 @@
+
+
+
+
+
+
+ select p.package_key, p.package_uri,
+ p.pretty_name, v.version_name
+ from apm_package_types p, apm_package_versions v
+ where v.version_id = :version_id
+ and v.package_key = p.package_key
+
+
+
+
+
Index: openacs-4/packages/acs-admin/www/apm/version-edit-2.xql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/acs-admin/www/apm/version-edit-2.xql,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/acs-admin/www/apm/version-edit-2.xql 27 Apr 2001 01:41:12 -0000 1.1
@@ -0,0 +1,24 @@
+
+
+
+
+
+ select case when count(*) > 0 then 0 else 1 end from apm_package_versions
+ where version_uri = :version_uri
+
+
+
+
+
+
+
+
+ select version_name old_version_name, version_uri old_version_uri
+ from apm_package_versions
+ where version_id = $version_id
+
+
+
+
+
+
Index: openacs-4/packages/acs-admin/www/apm/version-edit.xql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/acs-admin/www/apm/version-edit.xql,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/acs-admin/www/apm/version-edit.xql 27 Apr 2001 01:41:12 -0000 1.1
@@ -0,0 +1,26 @@
+
+
+
+
+
+
+ select version_id, package_key, package_uri, pretty_name, version_name, version_uri,
+ summary, description_format, description, release_date, vendor, vendor_uri,
+ enabled_p, installed_p, tagged_p, imported_p, data_model_loaded_p, activation_date, tarball_length,
+ deactivation_date, distribution_uri, distribution_date
+ from apm_package_version_info where version_id = :version_id
+
+
+
+
+
+
+
+
+ select owner_name, owner_uri from apm_package_owners where version_id = :version_id
+
+
+
+
+
+
Index: openacs-4/packages/acs-admin/www/apm/version-files.xql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/acs-admin/www/apm/Attic/version-files.xql,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/acs-admin/www/apm/version-files.xql 27 Apr 2001 01:41:12 -0000 1.1
@@ -0,0 +1,35 @@
+
+
+
+
+
+
+ select pretty_name, version_name, package_key, installed_p, distribution_uri,
+ tagged_p
+ from apm_package_version_info where version_id = :version_id
+
+
+
+
+
+
+
+ select ftd.file_id, ftd.path, ftd.file_type, coalesce(ftd.pretty_name, 'Unknown type') as file_pretty_name,
+ ftd.db_type, coalesce(ftd.pretty_db_name, 'All') as db_pretty_name
+ from ((apm_package_files f left join apm_package_file_types t on (f.file_type = t.file_type_key))
+ left join apm_package_db_types d on (f.db_type = d.db_type_key)) ftd
+ where ftd.version_id = :version_id
+ order by ftd.path
+
+
+
+
+
+
+
+
+
+
+
+
+
Index: openacs-4/packages/acs-admin/www/apm/version-fs-scan.xql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/acs-admin/www/apm/Attic/version-fs-scan.xql,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/acs-admin/www/apm/version-fs-scan.xql 27 Apr 2001 01:41:12 -0000 1.1
@@ -0,0 +1,16 @@
+
+
+
+
+
+
+ select p.package_key, p.package_url, v.package_name, v.version_name, v.package_id
+ from apm_packages p, apm_package_versions v
+ where v.version_id = :version_id
+ and v.package_id = p.package_id
+
+
+
+
+
+
Index: openacs-4/packages/acs-admin/www/apm/version-generate-diffs.xql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/acs-admin/www/apm/Attic/version-generate-diffs.xql,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/acs-admin/www/apm/version-generate-diffs.xql 27 Apr 2001 01:41:12 -0000 1.1
@@ -0,0 +1,13 @@
+
+
+
+
+
+
+ select package_name, version_name, package_id from apm_package_version_info where version_id = :version_id
+
+
+
+
+
+
Index: openacs-4/packages/acs-admin/www/apm/version-parameter-values.xql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/acs-admin/www/apm/Attic/version-parameter-values.xql,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/acs-admin/www/apm/version-parameter-values.xql 27 Apr 2001 01:41:12 -0000 1.1
@@ -0,0 +1,34 @@
+
+
+
+
+
+
+ select package_name, version_name, package_id from apm_package_version_info where version_id = :version_id
+
+
+
+
+
+
+
+
+select element_id, element_name, description
+from ad_parameter_elements
+where version_id = :version_id
+order by element_name
+
+
+
+
+
+
+
+
+ select value from ad_parameter_values where element_id = :element_id
+
+
+
+
+
+
Index: openacs-4/packages/acs-admin/www/apm/version-parameters.xql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/acs-admin/www/apm/version-parameters.xql,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/acs-admin/www/apm/version-parameters.xql 27 Apr 2001 01:41:12 -0000 1.1
@@ -0,0 +1,15 @@
+
+
+
+
+
+
+ select pretty_name, version_name, package_key
+ from apm_package_version_info
+ where version_id = :version_id
+
+
+
+
+
+
Index: openacs-4/packages/acs-admin/www/apm/version-tag.xql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/acs-admin/www/apm/Attic/version-tag.xql,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/acs-admin/www/apm/version-tag.xql 27 Apr 2001 01:41:12 -0000 1.1
@@ -0,0 +1,45 @@
+
+
+
+
+
+
+ select package_name, version_name, package_id
+ from apm_package_version_info where version_id = :version_id
+
+
+
+
+
+
+
+
+ select path from apm_package_files where version_id = :version_id order by path
+
+
+
+
+
+
+
+
+ update apm_package_versions
+ set tagged_p = 'f'
+ where version_id = :version_id
+
+
+
+
+
+
+
+
+ update apm_package_versions
+ set tagged_p = 't'
+ where version_id = :version_id
+
+
+
+
+
+
Index: openacs-4/packages/acs-admin/www/apm/version-view-oracle.xql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/acs-admin/www/apm/version-view-oracle.xql,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/acs-admin/www/apm/version-view-oracle.xql 27 Apr 2001 01:41:12 -0000 1.1
@@ -0,0 +1,35 @@
+
+
+
+ oracle8.1.6
+
+
+
+ select version_id as installed_version_id, version_name as installed_version_name,
+ enabled_p as installed_enabled_p,
+ apm_package_version.version_name_greater(version_name, :version_name) as version_name_greater
+ from apm_package_versions
+ where package_key = :package_key
+ and installed_p = 't'
+ and rownum = 1
+
+
+
+
+
+
+
+ select data_model_installed_version from (
+ select version_name as data_model_installed_version
+ from apm_package_versions
+ where package_key = :package_key
+ and data_model_loaded_p = 't'
+ order by apm_package_version.sortable_version_name(version_name) desc
+ )
+ where rownum = 1
+
+
+
+
+
+
Index: openacs-4/packages/acs-admin/www/apm/version-view-postgresql.xql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/acs-admin/www/apm/version-view-postgresql.xql,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/acs-admin/www/apm/version-view-postgresql.xql 27 Apr 2001 01:41:12 -0000 1.1
@@ -0,0 +1,34 @@
+
+
+
+ postgresql7.1
+
+
+
+ select version_id as installed_version_id, version_name as installed_version_name,
+ enabled_p as installed_enabled_p,
+ apm_package_version__version_name_greater(version_name, :version_name) as version_name_greater
+ from apm_package_versions
+ where package_key = :package_key
+ and installed_p = 't'
+ limit 1
+
+
+
+
+
+
+ select data_model_installed_version from (
+ select version_name as data_model_installed_version
+ from apm_package_versions
+ where package_key = :package_key
+ and data_model_loaded_p = 't'
+ order by apm_package_version__sortable_version_name(version_name) desc
+ ) as bad_postgres_needs_this
+ limit 1
+
+
+
+
+
+
Index: openacs-4/packages/acs-admin/www/apm/version-view.xql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/acs-admin/www/apm/version-view.xql,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/acs-admin/www/apm/version-view.xql 27 Apr 2001 01:41:12 -0000 1.1
@@ -0,0 +1,54 @@
+
+
+
+
+
+
+ select version_id, package_key, package_uri, pretty_name, version_name, version_uri,
+ summary, description_format, description,
+ to_char(release_date, 'Month DD, YYYY') as release_date , vendor, vendor_uri,
+ enabled_p, installed_p, tagged_p, imported_p, data_model_loaded_p,
+ to_char(activation_date, 'Month DD, YYYY') as activation_date,
+ tarball_length, distribution_uri,
+ to_char(deactivation_date, 'Month DD, YYYY') as deactivation_date,
+ to_char(distribution_date, 'Month DD, YYYY') as distribution_date
+ from apm_package_version_info
+ where version_id = :version_id
+
+
+
+
+
+
+
+
+ select count(*) as n_files from apm_package_files where version_id = :version_id
+
+
+
+
+
+
+
+
+ select pretty_db_name
+ from apm_package_db_types
+ where exists (select 1
+ from apm_package_files
+ where version_id = :version_id
+ and db_type = db_type_key)
+
+
+
+
+
+
+
+
+ select owner_uri, owner_name from apm_package_owners where version_id = :version_id
+
+
+
+
+
+
Index: openacs-4/packages/acs-admin/www/apm/view-unattached-files.xql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/acs-admin/www/apm/Attic/view-unattached-files.xql,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/acs-admin/www/apm/view-unattached-files.xql 27 Apr 2001 01:41:12 -0000 1.1
@@ -0,0 +1,13 @@
+
+
+
+
+
+
+ select distinct path from apm_package_files
+
+
+
+
+
+
Index: openacs-4/packages/acs-admin/www/apm/write-all-specs.xql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/acs-admin/www/apm/write-all-specs.xql,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/acs-admin/www/apm/write-all-specs.xql 27 Apr 2001 01:41:12 -0000 1.1
@@ -0,0 +1,17 @@
+
+
+
+
+
+
+ select version_id, version_name, pretty_name, distribution_uri, v.package_key
+ from apm_package_versions v, apm_package_types t
+ where installed_p = 't'
+ and v.package_key = t.package_key
+ order by upper(pretty_name)
+
+
+
+
+
+
Index: openacs-4/packages/acs-admin/www/test/signed-cookies-test-2.xql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/acs-admin/www/test/Attic/signed-cookies-test-2.xql,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/acs-admin/www/test/signed-cookies-test-2.xql 27 Apr 2001 01:41:12 -0000 1.1
@@ -0,0 +1,14 @@
+
+
+
+
+
+
+ select token from secret_tokens
+ where token_id = :token_id
+
+
+
+
+
+
Index: openacs-4/packages/acs-admin/www/tests/db-api-acceptance-test-oracle.xql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/acs-admin/www/tests/Attic/db-api-acceptance-test-oracle.xql,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/acs-admin/www/tests/db-api-acceptance-test-oracle.xql 27 Apr 2001 01:41:12 -0000 1.1
@@ -0,0 +1,207 @@
+
+
+
+ oracle8.1.6
+
+
+
+
+ select asdf as i, sysdate as datestr from footest
+
+
+
+
+
+
+
+
+ select asdf as j, sysdate as datestr2 from footest
+
+
+
+
+
+
+
+ select sysdate from dual
+
+
+
+
+
+
+ select sysdate from dual
+
+
+
+
+
+
+
+ select asdf, sysdate as datestr from footest
+
+
+
+
+
+
+
+
+ select asdf, sysdate as datestr, 42 as jkl from footest
+
+
+
+
+
+
+
+ select sysdate from dual
+
+
+
+
+
+
+
+ select asdf, sysdate as datestr from footest
+
+
+
+
+
+
+
+
+ select asdf, sysdate as datestr, 42 as jkl from footest
+
+
+
+
+
+
+
+ select asdf, sysdate as datestr from footest where asdf = :asdf
+
+
+
+
+
+
+ select asdf, sysdate as datestr from footest where asdf > :asdf
+
+
+
+
+
+
+ select asdf, sysdate as datestr from footest where asdf < :asdf
+
+
+
+
+
+
+ select asdf, sysdate as datestr from footest where asdf = :asdf
+
+
+
+
+
+
+ select asdf, sysdate as datestr from footest where asdf = :asdf
+
+
+
+
+
+
+ select asdf, sysdate as datestr from footest where asdf = :asdf
+
+
+
+
+
+
+ select asdf, sysdate as datestr from footest where asdf > :asdf
+
+
+
+
+
+
+ select asdf, sysdate as datestr from footest where asdf < :asdf
+
+
+
+
+
+
+ select asdf, sysdate as datestr from footest where asdf = :asdf
+
+
+
+
+
+
+ select asdf, sysdate as datestr from footest where asdf = :asdf
+
+
+
+
+
+
+ select asdf, sysdate as datestr from footest where asdf = :asdf
+
+
+
+
+
+
+ select asdf, sysdate as datestr from footest where asdf > :asdf
+
+
+
+
+
+
+ select asdf, sysdate as datestr from footest where asdf < :asdf
+
+
+
+
+
+
+ select asdf, sysdate as datestr from footest where asdf = :asdf
+
+
+
+
+
+
+ select asdf, sysdate as datestr from footest where asdf = :asdf
+
+
+
+
+
+
+ BEGIN select count(*) into :1 from footest; END;
+
+
+
+
+
+
+ BEGIN select * into :1 from footest; END;
+
+
+
+
+
+
+ select sysdate from dual
+
+
+
+
+
Index: openacs-4/packages/acs-admin/www/tests/db-api-acceptance-test-postgresql.xql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/acs-admin/www/tests/Attic/db-api-acceptance-test-postgresql.xql,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/acs-admin/www/tests/db-api-acceptance-test-postgresql.xql 27 Apr 2001 01:41:12 -0000 1.1
@@ -0,0 +1,207 @@
+
+
+
+ postgresql7.1
+
+
+
+
+ select asdf as i, current_time as datestr from footest
+
+
+
+
+
+
+
+
+ select asdf as j, current_time as datestr2 from footest
+
+
+
+
+
+
+
+ select current_time
+
+
+
+
+
+
+ select current_time
+
+
+
+
+
+
+
+ select asdf, current_time as datestr from footest
+
+
+
+
+
+
+
+
+ select asdf, current_time as datestr, 42 as jkl from footest
+
+
+
+
+
+
+
+ select current_time
+
+
+
+
+
+
+
+ select asdf, current_time as datestr from footest
+
+
+
+
+
+
+
+
+ select asdf, current_time as datestr, 42 as jkl from footest
+
+
+
+
+
+
+
+ select asdf, current_time as datestr from footest where asdf = :asdf
+
+
+
+
+
+
+ select asdf, current_time as datestr from footest where asdf > :asdf
+
+
+
+
+
+
+ select asdf, current_time as datestr from footest where asdf < :asdf
+
+
+
+
+
+
+ select asdf, current_time as datestr from footest where asdf = :asdf
+
+
+
+
+
+
+ select asdf, current_time as datestr from footest where asdf = :asdf
+
+
+
+
+
+
+ select asdf, current_time as datestr from footest where asdf = :asdf
+
+
+
+
+
+
+ select asdf, current_time as datestr from footest where asdf > :asdf
+
+
+
+
+
+
+ select asdf, current_time as datestr from footest where asdf < :asdf
+
+
+
+
+
+
+ select asdf, current_time as datestr from footest where asdf = :asdf
+
+
+
+
+
+
+ select asdf, current_time as datestr from footest where asdf = :asdf
+
+
+
+
+
+
+ select asdf, current_time as datestr from footest where asdf = :asdf
+
+
+
+
+
+
+ select asdf, current_time as datestr from footest where asdf > :asdf
+
+
+
+
+
+
+ select asdf, current_time as datestr from footest where asdf < :asdf
+
+
+
+
+
+
+ select asdf, current_time as datestr from footest where asdf = :asdf
+
+
+
+
+
+
+ select asdf, current_time as datestr from footest where asdf = :asdf
+
+
+
+
+
+
+ FIX ME PLSQL BEGIN select count(*) into :1 from footest; END;
+
+
+
+
+
+
+ FIX ME PLSQL BEGIN select * into :1 from footest; END;
+
+
+
+
+
+
+ select current_time
+
+
+
+
+
Index: openacs-4/packages/acs-admin/www/tests/db-api-acceptance-test.xql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/acs-admin/www/tests/Attic/db-api-acceptance-test.xql,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/acs-admin/www/tests/db-api-acceptance-test.xql 27 Apr 2001 01:41:12 -0000 1.1
@@ -0,0 +1,721 @@
+
+
+
+
+
+ drop table footest
+
+
+
+
+
+
+ drop table bartest
+
+
+
+
+
+
+ drop sequence footest_seq
+
+
+
+
+
+
+ create sequence footest_seq
+
+
+
+
+
+
+ create table footest (asdf integer unique)
+
+
+
+
+
+
+ create table bartest (asdf varchar(10) unique)
+
+
+
+
+
+
+ delete from footest
+
+
+
+
+
+
+
+ }
+ incr count
+}
+
+if { $count != 1 } { report_error "db_transaction did not continue processing with db_continue_transaction present." }
+
+set count 0
+db_dml db_api_acceptance_test_delete_footest "delete from footest"
+
+db_transaction {
+ db_dml db_api_acceptance_test_insert_into_footest "insert into footest values (0)"
+ error "db_transaction error"
+} on_error {
+ db_continue_transaction
+}
+
+if [db_string db_api_acceptance_test_select_from_footest "select asdf from footest" -default 1] { report_error "db_transaction did not commit with db_continue_transaction present." }
+
+db_dml db_api_acceptance_test_delete_from_footest "delete from footest"
+
+set count 0
+db_transaction {
+ db_transaction {
+ db_abort_transaction
+ } on_error {
+ incr count
+ }
+ report_error "db_transaction running code after abort"
+} on_error {
+ incr count
+}
+
+if { $count != 2 } { report_error "db_transaction did not propagate error with on_error block present" }
+
+db_dml db_api_acceptance_test_delete_from_footest_again "delete from footest"
+
+set count 0
+db_transaction {
+ db_dml test "nonsense"
+} on_error {
+ incr count
+}
+
+if { $count != 1 } { report_error "db_transaction did not execute on_error block." }
+
+proc ::replace_the_foo { col } {
+ db_transaction {
+ db_dml test "delete from footest"
+ db_dml test "insert into footest values (:col)"
+ }
+}
+
+proc ::print_the_foo {} {
+ return [db_string db_api_acceptance_test_print_food_test "select asdf from footest" -default 0]
+}
+
+replace_the_foo 8
+if { [string compare "8" [print_the_foo]] } { report_error "db_transaction did not succeed."}
+
+db_transaction {
+ replace_the_foo 14
+ if { [string compare "14" [print_the_foo]] } { report_error "db_transaction did not succeed 2."}
+ db_abort_transaction
+} on_error {
+}
+if { [string compare "8" [print_the_foo]] } { report_error "db_transaction did not succeed 3."}
+
+set count 0
+db_dml db_api_acceptance_test_delete_from_footest_once_again "delete from footest"
+db_transaction {
+ db_dml db_api_acceptance_test_insert_into_footest_val_1 {insert into footest values(1)}
+ incr count
+ nonsense
+ db_dml db_api_acceptance_test_insert_into_footes_val_2 {insert into footest values(2)}
+ incr count
+} on_error {
+
+}
+if { $count != 1 || [string compare [db_string test "select asdf from footest" -default 0] 0]} {
+ report_error "db_transaction did not succeed: $count, [db_string test "select asdf from footest" -default 0]"
+}
+
+
+db_transaction {
+ db_dml db_api_acceptance_test_insert_into_footest_again_with_val_1 {insert into footest values(1)}
+ db_transaction {
+ db_dml db_api_acceptance_test_insert_into_footest_again_with_val_2
+
+
+
+
+
+
+ delete from footest
+
+
+
+
+
+
+ insert into footest values (0)
+
+
+
+
+
+
+ select asdf from footest
+
+
+
+
+
+
+ delete from footest
+
+
+
+
+
+
+ on_error
+
+
+
+
+
+
+ delete from footest
+
+
+
+
+
+
+ nonsense
+
+
+
+
+
+
+ nonsense
+
+
+
+
+
+
+ nonsense
+
+
+
+
+
+
+ select asdf from footest
+
+
+
+
+
+
+ delete from footest
+
+
+
+
+
+
+ insert into footest values(1)
+
+
+
+
+
+
+ insert into footest values(2)
+
+
+
+
+
+
+ select asdf from footest
+
+
+
+
+
+
+ select asdf from footest
+
+
+
+
+
+
+ insert into footest values(1)
+
+
+
+
+
+
+ insert into footest values(2)
+
+
+
+
+
+
+ on_error
+
+
+
+
+
+
+ insert into footest values(3)
+
+
+
+
+
+
+ select asdf from footest
+
+
+
+
+
+
+ delete from footest
+
+
+
+
+
+
+ insert into footest values (4)
+
+
+
+
+
+
+ insert into footest values (4)
+
+
+
+
+
+
+ insert into footest values (1)
+
+
+
+
+
+
+ insert into footest values (2)
+
+
+
+
+
+
+ select * from footest
+
+
+
+
+
+
+ insert into footest values (1)
+
+
+
+
+
+
+ insert into footest values (2)
+
+
+
+
+
+
+ select * from footest
+
+
+
+
+
+
+ insert into footest values (1)
+
+
+
+
+
+
+ insert into footest values (2)
+
+
+
+
+
+
+ insert into footest values (2)
+
+
+
+
+
+
+ $correct_p == "0"
+
+
+
+
+
+
+ select * from footest
+
+
+
+
+
+
+ insert into footest values(1)
+
+
+
+
+
+
+ insert into footest values(2)
+
+
+
+
+
+
+ insert into footest values(3)
+
+
+
+
+
+
+ delete from footest
+
+
+
+
+
+
+ delete from footest
+
+
+
+
+
+
+ on_error
+
+
+
+
+
+
+ insert into footest values(1)
+
+
+
+
+
+
+ insert into footest values(2)
+
+
+
+
+
+
+ insert into footest values(3)
+
+
+
+
+
+
+ select asdf from footest
+
+
+
+
+
+
+ select * from footest where asdf = 0
+
+
+
+
+
+
+ select * from footest
+
+
+
+
+
+
+
+ select asdf as i from footest where asdf < :asdf
+
+
+
+
+
+
+
+
+ select asdf as i from footest where asdf < :asdf
+
+
+
+
+
+
+
+
+ select asdf as i from footest where asdf > :asdf
+
+
+
+
+
+
+
+
+ select asdf from footest
+
+
+
+
+
+
+
+
+ select asdf from footest
+
+
+
+
+
+
+
+ on_error
+
+
+
+
+
+
+ insert into footest values(1)
+
+
+
+
+
+
+ insert into footest values(2)
+
+
+
+
+
+
+ insert into footest values(3)
+
+
+
+
+
+
+ insert into footest values(1)
+
+
+
+
+
+
+ insert into footest values(2)
+
+
+
+
+
+
+ insert into footest values(3)
+
+
+
+
+
+
+ select asdf from footest where asdf = :asdf
+
+
+
+
+
+
+ select 2 as jkl, asdf from footest where asdf = 1
+
+
+
+
+
+
+ select 2 as jkl, asdf from footest where asdf = :asdf
+
+
+
+
+
+
+ select 2 as jkl, asdf from footest where asdf = :asdf
+
+
+
+
+
+
+ select 2 as jkl, asdf from footest where asdf = :asdf
+
+
+
+
+
+
+ insert into footest values(1)
+
+
+
+
+
+
+ insert into footest values(2)
+
+
+
+
+
+
+ insert into footest values(3)
+
+
+
+
+
+
+ insert into footest values(1)
+
+
+
+
+
+
+ insert into footest values(2)
+
+
+
+
+
+
+ insert into footest values(3)
+
+
+
+
+
+
+
+ select * from footest
+
+
+
+
+
+
+
+
+ select asdf as jkl from footest
+
+
+
+
+
+
+
+ delete from footest
+
+
+
+
+
+
+ insert into footest values (:asdf)
+
+
+
+
+
+
+ select count(*) from footest where asdf is null
+
+
+
+
+
+
+ delete from bartest
+
+
+
+
+
+
+ insert into bartest values (:asdf)
+
+
+
+
+
+
+ select count(*) from bartest where asdf = 'a'
+
+
+
+
+
+
+ insert into bartest values (:asdf)
+
+
+
+
+
+
+ select count(*) from bartest where asdf is null
+
+
+
+
+
+
+ delete from footest
+
+
+
+
+
Index: openacs-4/packages/acs-admin/www/users/become.xql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/acs-admin/www/users/Attic/become.xql,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/acs-admin/www/users/become.xql 27 Apr 2001 01:41:12 -0000 1.1
@@ -0,0 +1,11 @@
+
+
+
+
+
+ select password from users where user_id=$user_id
+
+
+
+
+
Index: openacs-4/packages/acs-admin/www/users/complex-search.xql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/acs-admin/www/users/complex-search.xql,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/acs-admin/www/users/complex-search.xql 27 Apr 2001 01:41:12 -0000 1.1
@@ -0,0 +1,11 @@
+
+
+
+
+
+ select group_name from groups where group_id = :limit_to_users_in_group_id
+
+
+
+
+
Index: openacs-4/packages/acs-admin/www/users/index.xql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/acs-admin/www/users/index.xql,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/acs-admin/www/users/index.xql 27 Apr 2001 01:41:12 -0000 1.1
@@ -0,0 +1,36 @@
+
+
+
+
+
+ FIX ME DECODE (USE SQL92 CASE) select
+ count(*) as n_users,
+ sum(decode(member_state,'deleted',1,0)) as n_deleted_users,
+ max(creation_date) as last_registration
+ from cc_users
+ where email not in ('anonymous', 'system')
+
+
+
+
+
+
+
+select groups.group_id,
+ groups.group_name,
+ m.num as n_members,
+ c.num as n_components
+from groups,
+ (select group_id, count(*) as num
+ from group_member_map group by group_id) m,
+ (select group_id, count(*) as num
+ from group_component_map group by group_id) c
+where groups.group_id=m.group_id
+ and groups.group_id = c.group_id
+order by group_name
+
+
+
+
+
+
Index: openacs-4/packages/acs-admin/www/users/member-state-change-oracle.xql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/acs-admin/www/users/Attic/member-state-change-oracle.xql,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/acs-admin/www/users/member-state-change-oracle.xql 27 Apr 2001 01:41:12 -0000 1.1
@@ -0,0 +1,15 @@
+
+
+
+ oracle8.1.6
+
+
+
+ select email_verified_p email_verified_p_old, member_state member_state_old, first_names || ' ' || last_name as name, email, rel_id, rowid
+from cc_users
+where user_id = :user_id
+
+
+
+
+
Index: openacs-4/packages/acs-admin/www/users/member-state-change-postgresql.xql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/acs-admin/www/users/Attic/member-state-change-postgresql.xql,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/acs-admin/www/users/member-state-change-postgresql.xql 27 Apr 2001 01:41:12 -0000 1.1
@@ -0,0 +1,15 @@
+
+
+
+ postgresql7.1
+
+
+
+ select email_verified_p email_verified_p_old, member_state member_state_old, first_names || ' ' || last_name as name, email, rel_id, rowid
+from cc_users
+where user_id = :user_id
+
+
+
+
+
Index: openacs-4/packages/acs-admin/www/users/member-state-change.xql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/acs-admin/www/users/Attic/member-state-change.xql,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/acs-admin/www/users/member-state-change.xql 27 Apr 2001 01:41:12 -0000 1.1
@@ -0,0 +1,11 @@
+
+
+
+
+
+ select email from parties where party_id = :admin_user_id
+
+
+
+
+
Index: openacs-4/packages/acs-admin/www/users/one.xql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/acs-admin/www/users/one.xql,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/acs-admin/www/users/one.xql 27 Apr 2001 01:41:12 -0000 1.1
@@ -0,0 +1,36 @@
+
+
+
+
+
+ select first_names, last_name, email, coalesce(screen_name,'< none set up >') as screen_name, creation_date, creation_ip, last_visit, member_state, email_verified_p
+from cc_users
+where user_id = :user_id
+
+
+
+
+
+
+ select live_revision as revision_id, coalesce(title,'view this portrait') portrait_title
+from acs_rels a, cr_items c, cr_revisions cr
+where a.object_id_two = c.item_id
+and c.live_revision = cr.revision_id
+and a.object_id_one = :user_id
+and a.rel_type = 'user_portrait_rel'
+
+
+
+
+
+
+ select at.pretty_name, at.pretty_plural, a.creation_date, acs_object.name(a.object_id) object_name
+from acs_objects a, acs_object_types at
+where a.object_type = at.object_type
+and a.creation_user = :user_id
+order by object_name, creation_date
+
+
+
+
+
Index: openacs-4/packages/acs-admin/www/users/registration-history.xql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/acs-admin/www/users/registration-history.xql,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/acs-admin/www/users/registration-history.xql 27 Apr 2001 01:41:12 -0000 1.1
@@ -0,0 +1,16 @@
+
+
+
+
+
+ select to_char(creation_date,'YYYYMM') as sort_key, rtrim(to_char(creation_date,'Month')) as pretty_month, to_char(creation_date,'YYYY') as pretty_year, count(*) as n_new
+from users, acs_objects
+where users.user_id = acs_objects.object_id
+and creation_date is not null
+group by to_char(creation_date,'YYYYMM'), to_char(creation_date,'Month'), to_char(creation_date,'YYYY')
+order by 1
+
+
+
+
+
Index: openacs-4/packages/acs-admin/www/users/search.xql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/acs-admin/www/users/search.xql,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/acs-admin/www/users/search.xql 27 Apr 2001 01:41:12 -0000 1.1
@@ -0,0 +1,11 @@
+
+
+
+
+
+ select group_name from user_groups where group_id = :limit_to_users_in_group_id
+
+
+
+
+
Index: openacs-4/packages/acs-admin/www/users/user-add-2.xql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/acs-admin/www/users/Attic/user-add-2.xql,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/acs-admin/www/users/user-add-2.xql 27 Apr 2001 01:41:12 -0000 1.1
@@ -0,0 +1,31 @@
+
+
+
+
+
+ select count(email)
+from parties where upper(email) = :upper_email
+and party_id <> :user_id
+
+
+
+
+
+
+ select count(email)
+from parties where upper(email) = :upper_email
+and party_id <> :user_id
+
+
+
+
+
+
+ select count(email)
+from parties where upper(email) = :upper_email
+and party_id <> :user_id
+
+
+
+
+
Index: openacs-4/packages/acs-admin/www/users/user-add-3.xql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/acs-admin/www/users/user-add-3.xql,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/acs-admin/www/users/user-add-3.xql 27 Apr 2001 01:41:12 -0000 1.1
@@ -0,0 +1,12 @@
+
+
+
+
+
+ select email from
+parties where party_id = :admin_user_id
+
+
+
+
+
Index: openacs-4/packages/acs-tcl/tcl/apm-procs.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/acs-tcl/tcl/apm-procs.tcl,v
diff -u -r1.10 -r1.11
--- openacs-4/packages/acs-tcl/tcl/apm-procs.tcl 26 Apr 2001 05:38:54 -0000 1.10
+++ openacs-4/packages/acs-tcl/tcl/apm-procs.tcl 27 Apr 2001 01:41:12 -0000 1.11
@@ -305,59 +305,26 @@
where enabled_p='t'
}]
- # DRB: We only want to load those files that match our database
- # type or no type at all (i.e. works for any database). I'm doing
- # this mostly because it is how things will be done when we do
- # them RIGHT (i.e. using the package file info in the RDBMS).
-
- set exclude_strings [list]
- foreach known_database_type [nsv_get ad_known_database_types .] {
- if { ![string match [lindex $known_database_type 0] [db_type]] } {
- lappend exclude_strings "*-[lindex $known_database_type 0].*"
- }
- }
-
# Scan the package directory for files to source.
set files [list]
foreach package $packages {
- set base "[acs_root_dir]/packages/$package/"
- set base_len [string length $base]
- # For now we expect the SQL files to be in parallel with the Tcl files
+ set files [ad_find_all_files [acs_root_dir]/packages/$package]
+ if { [llength $files] == 0 } {
+ error "Unable to locate [acs_root_dir]/packages/$package/*."
+ }
- # DRB: without the quotes ${base}www turns into the two element list
- # {${base} www}, not what was wanted...
-
- # SDW: look in www and all it's subdirectories
- set dirs [apm_subdirs "${base}www"]
- set paths [list]
+ foreach file [lsort $files] {
- # DRB: For now just slurp all .xql files
- foreach dir $dirs {
- set paths [concat $paths [glob -nocomplain [file join $dir *.xql]]]
- }
-
- foreach path [lsort $paths] {
- set rel_path [string range $path $base_len end]
- # DRB: db_fullquery_internal_load_cache expects the full pathname...
- set load_query_file 1
- foreach exclude_string $exclude_strings {
- if { [string match $exclude_string $path] } {
- set load_query_file 0
- break
- }
- }
- if { $load_query_file } {
- lappend files "$base/$rel_path"
- }
- }
+ set file_db_type [apm_guess_db_type $package $file]
+ set file_type [apm_guess_file_type $package $file]
+
+ if {[string equal $file_type query_file] &&
+ ([empty_string_p $file_db_type] || [string equal $file_db_type [db_type]])} {
+ db_qd_load_query_file $file
+ }
+ }
}
-
- # Load up each file
- ns_log Notice "APM/QD = looping through files to load queries from"
- foreach file $files {
- db_qd_load_query_file $file
- }
ns_log Notice "APM/QD = DONE looping through files to load queries from"
}
Index: openacs-4/packages/acs-tcl/tcl/apm-procs.xql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/acs-tcl/tcl/apm-procs.xql,v
diff -u -r1.2 -r1.3
--- openacs-4/packages/acs-tcl/tcl/apm-procs.xql 24 Apr 2001 22:38:12 -0000 1.2
+++ openacs-4/packages/acs-tcl/tcl/apm-procs.xql 27 Apr 2001 01:41:12 -0000 1.3
@@ -1,6 +1,15 @@
+
+
+
+ select case when count(*) > 0 then 0 else 1 end from apm_package_versions
+ where version_id = :version_id
+ and enabled_p = 't'
+
+
+
select package_key from apm_package_version_info where version_id = :version_id
Index: openacs-4/packages/acs-tcl/tcl/apm-xml-procs.xql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/acs-tcl/tcl/apm-xml-procs.xql,v
diff -u -r1.1 -r1.2
--- openacs-4/packages/acs-tcl/tcl/apm-xml-procs.xql 24 Apr 2001 06:02:27 -0000 1.1
+++ openacs-4/packages/acs-tcl/tcl/apm-xml-procs.xql 27 Apr 2001 01:41:12 -0000 1.2
@@ -17,7 +17,7 @@
- select unique db_type
+ select distinct db_type
from apm_package_files
where db_type is not null