On Aug 10, 1:54 pm, Carl Sturtivant <c...@[EMAIL PROTECTED]
> wrote:
> Is there any interest in the following? I am thinking of making a
> distribution to go in the ipl/pack directory of the standard source
> distribution of icon, so that the following would be generally
available.
>
> I wrote a C function called mysqldb providing access to MySQL database
> servers from icon (using icon's loadfunc facility which is not available
on
> cygwin, but is available on unix platforms).
>
> mysqldb represents a database record as an icon list with string and
> numeric entries, and the result of a SELECT query is a list of such
lists.
> It also represents any MySQL error message as a list containing the
error
> number and error text.
>
> The implementation is overtly garbage collection safe, and uses a handy
> general technique to write such code for the current icon
implementation,
> making it relatively easy to add dynamically loadable external
> functionality in C through loadfunc that uses or constructs complex icon
> data structures such as lists, sets and tables, by calling the C
> implementation of icon's own functions and operators for such in a
garbage
> collection safe way. Reading the C code for mysqldb will reveal the
whole
> technique.
>
> I also wrote an icon wrapper web.icn for mysqldb containing a set of
> natural functions to interact with a database server (connecting,
> disconnected, querying and checking for errors), along with a function
for
> web scripts to grab CGI parameters returning a table mapping each
parameter
> name to the corresponding list of values (usually a list of length 1).
>
> This package makes it easy to write a typical web script in icon. I
wrote
> it for myself, and am making a lot of use of it, and if there is some
> interest then I will pass it to the icon project in a form suitable for
> ipl/pack, so please reply to this post if you'd like to use this.
This would be of use to me, and I would like to get a distribution of
your library routines.
Also of greater use would be a direct implementation of Oracle access,
in the manner of Perl.
This would make Icon a truly useable language for bioinformatics,
instead of having do use Perl for database access.
Unicon supposedly has an implemention through ODBC, but this depends
on a the system having a particular ODBC configuration and Unicon
sup****t appears pretty spotty.


|