apm_guess_db_type (public)
apm_guess_db_type package_key path
Defined in packages/acs-bootstrap-installer/tcl/30-apm-load-procs.tcl
Guesses and returns the database type key corresponding to a particular path (or an empty string if none is known).
$path
should be relative to the package directory (e.g.,www/index.tcl
for/packages/bboard/admin-www/index.tcl
). We consider two cases: 1. Data model files. If the path contains a string matching "sql/" followed by a database type known to this version of OpenACS, the file is assumed to be specific to that database type. The empty string is returned for all other data model files. Example: "sql/postgresql/apm-create.sql" is assumed to be the PostgreSQL-specific file used to create the APM datamodel. If the path contains a string matching "sql/common" the file is assumed to be compatible with all supported RDBMS's and a blank db_type is returned. Otherwise "oracle" is returned. This is a hardwired kludge to allow us to handle legacy ACS 4 packages. 2. Other files. If it is a .tcl, .xql, or .sqlj file not under the "sql" dir and whose name ends in a dash and database type, the file is assumed to be specific to that database type. Example: "tcl/10-database-postgresql-proc.tcl" is assumed to be the file that defines the PostgreSQL-specific portions of the database API.
- Parameters:
- package_key (required)
- path (required)
- Partial Call Graph (max 5 caller/called nodes):
- Testcases:
- files__check_upgrade_ordering