Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:6242 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 99842 invoked by uid 1010); 5 Dec 2003 23:41:27 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 99782 invoked from network); 5 Dec 2003 23:41:26 -0000 Received: from unknown (HELO smtp3.pp.htv.fi) (213.243.153.173) by pb1.pair.com with SMTP; 5 Dec 2003 23:41:26 -0000 Received: from localhost.localdomain (cs181008.pp.htv.fi [213.243.181.8]) by smtp3.pp.htv.fi (Postfix) with ESMTP id 3276D27ADE5; Sat, 6 Dec 2003 01:41:25 +0200 (EET) Received: from localhost (localhost.localdomain [127.0.0.1]) by localhost.localdomain (8.12.10/8.12.10) with ESMTP id hB5NfNZK018742; Sat, 6 Dec 2003 01:41:23 +0200 Date: Sat, 6 Dec 2003 01:41:23 +0200 (EET) Reply-To: Jani Taskinen To: Maxim Maletsky Cc: Wez Furlong , internals@lists.php.net In-Reply-To: <20031205170502.0A3F.MAXIM@maxim.cx> Message-ID: References: <20031205163044.130c88ed.tony2001@phpclub.net> <006f01c3bb34$efb22970$8802a8c0@obsidian> <20031205170502.0A3F.MAXIM@maxim.cx> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Subject: Re: [PHP-DEV] [PATCH] for oci8 and some improvement proposals From: sniper@iki.fi (Jani Taskinen) I had the impression that the 'other' oracle extension is somewhat deprecated and unsupported already? (next one to be moved to sibe..PECL ? :) --Jani On Fri, 5 Dec 2003, Maxim Maletsky wrote: > >it's been a while as I was mentioning that the naming convention for >OCI8* functions should change into something like oracle_*. Problem is >that there is also an old ora_* set of functions. > >I think this is something like rewriting the whole thingie ;) > >if notbody else minds we could think of applying the patch. > >m > > >On Fri, 5 Dec 2003 13:37:29 -0000 >"Wez Furlong" wrote: > >> Would it make sense to expose this stuff as a stream using >> the streams API, so the user would be able to fread($lob) etc? >> >> You could still add functions for those things that aren't >> covered already by streams (the erase() call). >> >> One of the benefits would be avoiding adding more functions to >> the global namespace, and also side stepping any naming convention >> wars that might arise. >> >> --Wez. >> >> ----- Original Message ----- >> From: "Antony Dovgal" >> To: >> Cc: ; ; >> Sent: Friday, December 05, 2003 1:30 PM >> Subject: [PHP-DEV] [PATCH] for oci8 and some improvement proposals >> >> >> > Hi, all! >> > >> > I want to propose a patch, that will add functions listed below to OCI8 >> extension. >> > Similar functions exist in Postgres & Informix extensions, but they are >> absent in OCI8 module. >> > The patch is being used on 4 my servers (development, test & 2 production >> servers) about a week and seems to be (almost? =)) bug-free. >> > >> > ocitelllob(); [ OCI_Lob->tell(); ] - ftell(); analogue >> for Lobs >> > ociwritelob(); [ OCI_Lob->write(); ] - fwrite(); analogue >> for Lobs >> > ocitruncatelob(); [ OCI_Lob->truncate(); ] - ftruncate(); >> analogue for Lobs >> > ocieraselob(); [ OCI_Lob->erase(); ] - erases specified >> part of a Lob (for BLOBs it means zero-filling, for CLOBs - space-filling) >> > ociflushlob(); [ OCI_Lob->flush(); ] - flushes Lob buffer >> (if buffering was enabled before) >> > ocisetbufferinglob(); [ OCI_Lob->setBuffering(); ] - turns on/off >> buffering for the current Lob >> > ocigetbufferinglob(); [ OCI_Lob->getBuffering(); ] - gets buffering' >> current state >> > ocirewindlob(); [ OCI_Lob->rewind(); ] - rewind(); analogue >> for Lobs >> > ocireadlob(); [ OCI_Lob->read(); ] - fread(); analogue >> for Lobs >> > ocieoflob(); [ OCI_Lob->eof(); ] - feof(); analogue for >> Lobs >> > ociseeklob(); [ OCI_Lob->seek(); ] - fseek(); analogue >> for Lobs >> > ocilobgetlength(); [ OCI_Lob->getLength(); ] - filesize(); analogue >> for Lobs >> > >> > ociappendlob(); - appends data from a Lob to another Lob >> > ocicopylob(); - copies data from a Lob to another Lob >> > ociisequallob(); - compares 2 Lobs and checks if they are equal >> > >> > All OCI-Lob methods could be rewritten to receive Lob as parameter, when >> they aren't called as methods, but currently this is not done (should I do >> it?). >> > >> > As you can see, I've added this check: >> > if (oci_lobgetlen(descr->conn,descr,&len) == 0 && descr->lob_size >= 0) >> > to almost all new functions. >> > I propose to add this check to already existing functions (I mean, to >> replace calls of CALL_OCI_RETURN()), >> > 'cause at this moment they get Lob's length from Oracle each time they are >> called and it's not the best decision imho. >> > >> > And there is another one thing I want to ask you about: >> > ALL functions, which wrap database API's in PHP, are called like this: >> ___, >> > but only OCI8 wrappers are called in another way: oci >> > Maybe it's time to declare this style deprecated and to change it to >> oci___? >> > (especially after that endless discussion about studlyCaps =)) > > >