On Feb 10, 2004, at 9:36 AM, [EMAIL PROTECTED] wrote:

Can you be more specific as to how you might break backward's compatibility? The AOLserver db drivers implement a common core API that greatly simplifies life for those of us who write code to support more than one RDBMS, as is true of OpenACS.


I really didn't plan on changing the ns_db interface if that is what you are getting at. Off the top of my head one issue I've always had, and this is ns_db's fault, is the inability to have two or more statements associated to a single db handle. It has required us to fetch all rows and then move on. This is not always the most efficient way to write code. In our environment it sometimes requires looping over data as many as three times. Once to actually fetch it into a local array, once to do some post processing of the data, and then finally to output html. With that said something more like oratcl's API would be nice. It'd be nice to be able to handle multiple REF CURSORS also. So perhaps an API like the following would work for *me*:

ns_ora define statement column-name variable ?type?
ns_ora bind statement placeholder variable length ?type?
ns_ora execute statement ?mode?
ns_ora describe
ns_ora rowcount statement
ns_ora numcols statement
ns_ora fetch statement
ns_ora fetchinto statement variable ?type?
ns_ora fetchstatement statement variable
ns_ora statementtype statement
ns_ora freecursor statement

ns_ora commit handle
ns_ora rollback handle
ns_ora newcursor handle
ns_ora parse handle query
ns_ora error handle
ns_ora debug on|off

ns_ora gethandle
ns_ora releasehandle

Thats just me be crazy though.  In reality I'd just like to be able to
do the following regardless if the API has to change or not:

Batch error processing on array dml
Bind multiple REF CURSORS in PL/SQL
Execute multiple statements using a single db handle (connection)
Ability to use scrollable cursors (Oracle 9i feature)
Perhaps better ability to handle PL/SQL types such as arrays, or maybe
even custom object types.

This is what I can think of right now.  I'm working on a TODO list that
I'll put in nsoracle soon.

Does that help at all?  Keep in mind none of this is set in stone, I'm
just trying to think out loud so people have an idea of where I'd like
to see the Oracle driver go since I wasn't very clear in the beginning.

Also, Jeff Davis of the OpenACS crew has been de facto maintainer of
the
driver - do you plan to talk to him before moving forward?  We've not
made
many changes in either the Oracle or Postgres driver the past couple of
years or more because they meet our needs and AFAIK the needs of
others.


Huh, well its meets our needs too but that doesn't mean it cannot get better.


-- AOLserver - http://www.aolserver.com/

To Remove yourself from this list, simply send an email to <[EMAIL PROTECTED]> with the
body of "SIGNOFF AOLSERVER" in the email message. You can leave the Subject: field of 
your email blank.

Reply via email to