|
load_driver Load a database driver
package require nstcl-database ?1.0?
package require nstcl ?1.0?
::nstcl::load_driver driver ?shared_lib ? ?packageName ?
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.
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.
configure_pool
database, nstcl