apm_guess_db_type package_key path
Guesses and returns the database type key corresponding to a particular path (or an empty string if none is known).
$pathshould be relative to the package directory (e.g.,
/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.
- Partial Call Graph (max 5 caller/called nodes):