nstcl  >  Documentation  >  nstcl-database  >  load_driver

Tcl Powered!

load_driver

NAME

load_driver — Load a database driver

SYNOPSIS

package require nstcl-database ?1.0?
package require nstcl ?1.0?

::nstcl::load_driver driver ?shared_lib? ?packageName?

DESCRIPTION

This command loads a supported database driver, which, in turn, requires a working Tcl database extension.

As of this version, nstcl supports the following databases: Oracle (with oratcl), Postgres (with libpgtcl), Solid (with soltcl), Sybase (with sybtcl), Sqlite (with tclsqlite), MySQL (with libmysqltcl), ODBC (with TclODBC). Also provided for testing are two pseudo-drivers, devnull and echo, which probably won't be of general interest.

This command is not exported from the nstcl namespace.

IMPLEMENTING A NEW DRIVER

To implement a new database driver for nstcl, you need to create a mere 8 wrapper functions (load_driver, bindrow, close, dbtype, exec, flush, gethandle, and getrow) around the Tcl extension for the new database. Consult the existing drivers to see how they are implemented.

SEE ALSO

configure_pool

KEYWORDS

database, nstcl