nowlin@iwtqg.att.com (10/19/90)
We've prototyped an interface to Informix that contains a single function called sql(). This function is a generator that's passed an SQL statement. It either fails or generates results. If the SQL statement passed is a "select" statement the sql() procedure generates a series of Icon tables that correspond to the records selected. The keys to the tables are the field names selected and the values are the corresponding values from the database. If the SQL statement passed isn't a "select" statement the result generated is the integer number of records in the database affected by the SQL statement. For example, a "delete" statement with a where clause that deleted 12 records from a database table would generate the single integer 12 before failing. Right now this Informix interface is implemented as an Icon procedure that calls a C program written with ESQL. We plan to eventually implement it as a built-in function using a pi. It would certainly be possible to use Oracle or most any database that supports SQL the same way. There's a definite advantage to being able to manipulate the results of a database query with Icon instead of C. Jerry Nowlin (...!att!iwtqg!nowlin)