Index: openacs-4/packages/acs-bootstrap-installer/acs-bootstrap-installer.info
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/acs-bootstrap-installer/acs-bootstrap-installer.info,v
diff -u -r1.1 -r1.2
--- openacs-4/packages/acs-bootstrap-installer/acs-bootstrap-installer.info 12 Apr 2001 16:58:18 -0000 1.1
+++ openacs-4/packages/acs-bootstrap-installer/acs-bootstrap-installer.info 15 Apr 2001 23:09:55 -0000 1.2
@@ -38,6 +38,7 @@
+
Index: openacs-4/packages/acs-bootstrap-installer/installer/create-administrator-postgresql.xql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/acs-bootstrap-installer/installer/Attic/create-administrator-postgresql.xql,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/acs-bootstrap-installer/installer/create-administrator-postgresql.xql 15 Apr 2001 23:09:55 -0000 1.1
@@ -0,0 +1,11 @@
+
+
+postgresql7.1
+
+
+
+select email from cc_users limit 1
+
+
+
+
Index: openacs-4/packages/acs-tcl/tcl/apm-install-procs-postgresql.xql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/acs-tcl/tcl/apm-install-procs-postgresql.xql,v
diff -u -r1.1 -r1.2
--- openacs-4/packages/acs-tcl/tcl/apm-install-procs-postgresql.xql 5 Apr 2001 18:23:38 -0000 1.1
+++ openacs-4/packages/acs-tcl/tcl/apm-install-procs-postgresql.xql 15 Apr 2001 23:09:55 -0000 1.2
@@ -1,5 +1,7 @@
+postgresql7.1
+
select apm_package_version__version_name_greater(service_version, :dependency_version) as version_p
@@ -10,14 +12,12 @@
and v.installed_p = 't'
and a.package_key = v.package_key
-postgresql7.1
SELECT apm_package_version__enable(:version_id);
-postgresql7.1
@@ -31,7 +31,6 @@
:spec_file_path,
:spec_file_mtime);
-postgresql7.1
@@ -45,7 +44,6 @@
:spec_file_path,
:spec_file_mtime);
-postgresql7.1
@@ -55,7 +53,6 @@
where package_key = :package_key
and version_id = apm_package__highest_version(:package_key)
-postgresql7.1
@@ -74,7 +71,6 @@
't',
't');
-postgresql7.1
@@ -90,7 +86,6 @@
acs__magic_object_id('default_context')
)
-postgresql7.1
Index: openacs-4/packages/acs-tcl/tcl/db-query-dispatcher-procs.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/acs-tcl/tcl/Attic/db-query-dispatcher-procs.tcl,v
diff -u -r1.3 -r1.4
--- openacs-4/packages/acs-tcl/tcl/db-query-dispatcher-procs.tcl 4 Apr 2001 21:44:48 -0000 1.3
+++ openacs-4/packages/acs-tcl/tcl/db-query-dispatcher-procs.tcl 15 Apr 2001 23:09:55 -0000 1.4
@@ -163,7 +163,7 @@
# Get the URL and remove the .tcl
set url [ns_conn url]
- regsub {.tcl$} $url {} url
+ regsub {\.tcl$} $url {} url
# Change all dots to colons, and slashes to dots
regsub -all {\.} $url {:} url
@@ -278,7 +278,13 @@
set parsing_state [db_fullquery_internal_parse_init $whole_file]
ns_log Notice "QD = parsing state - $parsing_state"
-
+
+ # We need this for queries with relative paths
+ set acs_file_path [ad_make_relative_path $file_tag]
+ set queryname_root [db_fullquery_internal_get_queryname_root $acs_file_path]
+
+ ns_log Notice "QD = queryname root is $queryname_root"
+
while {1} {
set result [db_fullquery_internal_parse_one_query $parsing_state]
@@ -294,6 +300,23 @@
ns_log Notice "QD = loaded one query - [db_fullquery_get_name $one_query]"
+ # Relative Path for the Query
+ if {[string range [db_fullquery_get_name $one_query] 0 0] == "."} {
+ set new_name "acs.${queryname_root}[db_fullquery_get_name $one_query]"
+
+ set new_fullquery [db_fullquery_create \
+ $new_name \
+ [db_fullquery_get_querytext $one_query] \
+ [db_fullquery_get_bind_vars $one_query] \
+ [db_fullquery_get_query_type $one_query] \
+ [db_fullquery_get_rdbms $one_query] \
+ [db_fullquery_get_load_location $one_query]]
+
+ set one_query $new_fullquery
+
+ ns_log Notice "QD = relative path, replaced name with $new_name"
+ }
+
# Store the query
db_fullquery_internal_store_cache $one_query
}
@@ -361,7 +384,26 @@
}
+##
+## NAMING
+##
+proc db_fullquery_internal_get_queryname_root {relative_path} {
+ # remove the prepended "/packages/" string
+ regsub {^\/?packages\/} $relative_path {} relative_path
+
+ # remove the last component, the file name, since we're just looking for the root path
+ regsub {/[^/]*$} $relative_path {} relative_path
+
+ # Change all . to :
+ regsub -all {\.} $relative_path {:} relative_path
+
+ # Change all / to . (hah, no reference to News for Nerds)
+ regsub -all {/} $relative_path {.} relative_path
+
+ return $relative_path
+}
+
##
## PARSING
##
@@ -392,6 +434,7 @@
set rdbms_nodes [xml_find_child_nodes $root_node rdbms]
if {[llength $rdbms_nodes] > 0} {
set default_rdbms [db_rdbms_parse_from_xml_node [lindex $rdbms_nodes 0]]
+ ns_log Notice "QD = Detected DEFAULT RDBMS for whole queryset: $default_rdbms"
} else {
set default_rdbms ""
}
@@ -439,7 +482,7 @@
# Update the parsing state so we know
# what to parse next
- set parsing_state [list $index $node_list [lindex $parsing_state 2]]
+ set parsing_state [list $index $node_list [lindex $parsing_state 2] $default_rdbms]
# Parse the actual query from XML
set one_query [db_fullquery_internal_parse_one_query_from_xml_node $one_query_xml $default_rdbms]
@@ -469,6 +512,7 @@
# If we have no RDBMS specified, use the default
if {[llength $rdbms_nodes] == 0} {
+ ns_log Notice "QD = Wow, Nelly, no RDBMS for this query, using default rdbms $default_rdbms"
set rdbms $default_rdbms
} else {
set rdbms_node [lindex $rdbms_nodes 0]