XOSql - XOTcl library for uniform sql-database access

XOTclIDE - new life for Tcl.
  • interactive
  • introspective
  • object oriented
  • syntax checking
  • version control
XOSql is a facade library for uniform access to different tcl sql-interfaces.

Provided functionality

API Documentation

Generated form source with XOTclIDE XOSQL API

Installing XOSQL

The best way is to extract the archive to Tcl lib directory. It is normally the parent directory of director in Tcl global variable Tcl_library.

Extract XOSql archive in any place but load the directory to Tcl auto_path global variable.
Here an example of quick shell installation and usage

[artur@localhost artur]$ tar -xzf /home/joachim/public_html/xosql/xosql-0.61.tar.gz
[artur@localhost artur]$ cd xosql/
[artur@localhost xosql]$ /opt/tcl845-debug/bin/tclsh8.4
% package require XOTcl
% namespace import xotcl::*
% lappend auto_path .
/opt/tcl845-debug//lib/tcl8.4 /opt/tcl845-debug/lib /opt/tcl845-debug//lib .
% package require xdobry::sql
% Sqlinterface loadInterface mysqltcl
% MySql create sql
% sql connect {user root dbank xotcllib}
% sql queryList {select * from Userlib}
{1 artur {Artur Trzewik}} {2 joachim {Joachim Trzewik}}

Tk Connection Dialog

XOSql has small Tk connection dialog to use common dialog for DB connection. It supports also passing arguments as defaults. For connect mysql use "IDEDBConnectDialog setConnectionOn MySql". If parameter is empty the user can choose the interface "IDEDBConnectDialog setConnectionOn {}". You can also pass some default values (as returned from getconnectionargs) "IDEDBConnectDialog setConnectionOn MySql {user root host}"
XOSQL interface choose dialog
XOSQL uniform conneciton dialog
[artur@localhost xosql]$ /opt/tcl85/bin/tclsh8.5 
% package require Tk
% package require XOTcl
%  namespace import xotcl::*       
% lappend auto_path .
/usr/local/lib/tcl8.5 /usr/local/lib /opt/tcl85/lib /opt/tcl85/lib/tcllib1.10 .
% package require xdobry::sql
% set connection [IDEDBConnectDialog setConnectionOn {}]

Supported Databases and Tcl-Interfaces

Following databases are currently supported. Consider you must download and install underlying database and Tcl base interface separately



Related software that use XOSql

XOSql was developed with XOTclIDE

Other Tcl DB Api

Author and License

The program was written by Artur Trzewik and is GNU Lesser General Public License.
Artur Trzewik