Talk About Network



Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Programming > Icon > MySQL access fo...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 1 of 12 Topic 158 of 181
Post > Topic >>

MySQL access for icon

by Carl Sturtivant <carl@[EMAIL PROTECTED] > Aug 10, 2007 at 03:54 PM

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.




 12 Posts in Topic:
MySQL access for icon
Carl Sturtivant <carl@  2007-08-10 15:54:59 
Re: MySQL access for icon
Steve Wampler <swample  2007-08-10 14:20:14 
Re: MySQL access for icon
Carl Sturtivant <carl@  2007-08-10 23:36:15 
Re: MySQL access for icon
Steve Wampler <swample  2007-08-13 08:49:52 
Re: MySQL access for icon
Carl Sturtivant <carl@  2007-08-15 12:17:26 
Re: MySQL access for icon
Carl Sturtivant <carl@  2007-08-30 13:24:42 
Re: MySQL access for icon
"Shmuel (Seymour J.)  2007-08-12 10:39:21 
Re: MySQL access for icon
Carl Sturtivant <carl@  2007-08-12 19:15:15 
Re: MySQL access for icon
"Shmuel (Seymour J.)  2007-08-13 08:17:27 
Re: MySQL access for icon
Joel <boloniji@[EMAIL   2007-08-13 12:04:42 
Re: MySQL access for icon
Carl Sturtivant <carl@  2007-08-15 11:11:10 
Re: MySQL access for icon
Cheyenne Wills <cwills  2007-09-06 12:48:06 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Wed May 14 17:11:46 CDT 2008.