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
1.1
% namespace import xotcl::*
% lappend auto_path .
/opt/tcl845-debug//lib/tcl8.4 /opt/tcl845-debug/lib /opt/tcl845-debug//lib .
% package require xdobry::sql
0.55
% Sqlinterface loadInterface mysqltcl
MySql
% MySql create sql
::sql
% sql connect {user root dbank xotcllib}
1
% 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 127.0.0.1}"
XOSQL interface choose dialog
XOSQL uniform conneciton dialog
[artur@localhost xosql]$ /opt/tcl85/bin/tclsh8.5 
% package require Tk
8.5.2
% package require XOTcl
1.6.1
%  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
0.63
% set connection [IDEDBConnectDialog setConnectionOn {}]
::xotcl::__#2

Supported Databases and Tcl-Interfaces

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

Requirements

Downloads

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