Skip to Content.
Sympa Menu

freetds - Re: [freetds] Has FreeTDS been SWIG'd?

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: Dossy <dossy AT panoptic.com>
  • To: FreeTDS Development Group <freetds AT lists.ibiblio.org>
  • Subject: Re: [freetds] Has FreeTDS been SWIG'd?
  • Date: Tue, 23 Dec 2003 21:07:02 -0500

On 2003.12.23, Nathaniel Talbott <nathaniel AT talbott.ws> wrote:
>
> What is it about DB drivers that makes them not SWIG well? I'm
> definitely dealing outside of my comfort zone here...

SWIG as I understand it makes the task of exposing C functions to
higher-level languages easier. However, most programmers don't want to
be bogged down by the intricacies of establishing DB connection handles,
initializing them, invoking the DB connection code, then setting up DB
statement handles, setting the SQL statement inside it, invoking the
query code, processing the DB resultset handle, writing code to iterate
over the resultset, cleaning up any allocated memory or state, releasing
the necessary handles and then disconnecting from the DB.

Most programmers of higher-level languages just want to be able to say:

db = freetds.connect('database', 'username', 'password')
db.query('SELECT * FROM foo').each { |row|
puts row.column('abbazabba')
}
db.close

Just my two cents.

-- Dossy

--
Dossy Shiobara mail: dossy AT panoptic.com
Panoptic Computer Network web: http://www.panoptic.com/
"He realized the fastest way to change is to laugh at your own
folly -- then you can let go and quickly move on." (p. 70)




Archive powered by MHonArc 2.6.24.

Top of Page