XOSql

What: XDobry

Where: http://www.xdobry.de/xosql

Description: XOSql is XOTcl general wrapper for many Tcl SQL interfaces. It was primarily used to provide db-independent SQL access in projects XOTclIDE and xdobry. It does not try to implement new, general, low-level access, but reuse known Tcl SQL interfaces.

Updated: 01/2004.

Contact: mailto:[email protected] (Artur Trzewik)

Supported Tcl SQL interfaces:

  1. mysqltcl
  2. tclodbc
  3. PostgreSQL throw pgtcl
  4. sqlite
  5. Oratcl

Features:

  1. introspection of connect parameters
  2. schema queries (getTables)
  3. Tk connecting dialog
  4. real OO interface; queries are XOTcl objects

Sample interactive XOSql usage

   % package require XOTcl
   1.1
   % namespace import xotcl::*
   % package require xdobry::sql
   0.55
   % Sqlinterface loadInterface mysqltcl
   MySql
   % MySql create mysql
   ::mysql
   % mysql getconnectargs
   {hostname text localhost} {socket text {}} {port integer 3306} {user text {}} {password password {}} {dbank text {}}
   % mysql connect {user root dbank xotcllib}
   1
   % mysql getTables
   Component ComponentObject ComponentRequire Configmap ConfigmapChildren ConfigmapComponent Info Method Mysequence Object ObjectMethod     Userlib
   % mysql query {select * from Component}
   ::mysql::__#0
   % ::mysql::__#0 rows
   436
   % ::mysql::__#0 columnNames
   componentid name defcounter basedon timestamp versioninfo isclosed userid infoid
   % ::mysql::__# fetch
   46 xdobry::FormServer 1 {} 20011017183902 {[import] 1.0} 1 1 {}
   % ::mysql::__#0 destroy
   % mysql disconnect
   0