acs::db::require_dc (private)

 acs::db::require_dc [ -backend backend ] [ -driver driver ] \
    [ -name name ]

Defined in packages/acs-tcl/tcl/acs-db-00-procs.tcl

Select the driver based on the specified argument (either DB or DBI) or based on the defaults for the configuration. This function can be used to switch the driver as well dynamically.

Switches:
-backend (optional)
"postgresql" or "oracle" or empty. When empty, determine backed from db_driverkey.
-driver (optional)
"nsdb" or "nsdbi" or empty. When empty, assume "nsdb" unless "preferdbi" is set.
-name (optional, defaults to "::acs::dc")
of the interface object (defaults to "::acs::dc")
Returns:
database interface object

Partial Call Graph (max 5 caller/called nodes):
%3 db_driverkey db_driverkey (public) acs::db::require_dc acs::db::require_dc acs::db::require_dc->db_driverkey

Testcases:
No testcase defined.
Source code:
        if {$backend eq ""} {
            set backend [db_driverkey ""]
        }
        if {$driver eq ""} {
            set driver nsdb
            if {[info exists ::acs::preferdbi]} {
                set driver nsdbi
            }
        }

        return [::acs::db::$driver-$backend create $name  -backend $backend  -driver $driver {
                        #
                        # Database connection object, configured via
                        # ::acs::db::require_dc.  For definiting
                        # connections to multiple databases forover
                        # potentially different drivers, define
                        # multiple database base connection objects.
                        #
                        # the column values corresponding to the values of the tuples
                        # returned by the provided SQL query.
                        #
                        # @see ::acs::db::require_dc
                        # @see Class ::acs::db::nsdb-postgresql
                        # @see Class ::acs::db::nsdb-oracle
                    }]
XQL Not present:
Generic, PostgreSQL, Oracle
[ hide source ] | [ make this the default ]
Show another procedure: