#40975 [Opn->Csd]: PDO: Mode for autoloading of LOBs
| From: | spatar at mail dot nnov dot ru | Date: | Tue, 17 Apr 2007 06:28:04 +0000 |
| Subject: | #40975 [Opn->Csd]: PDO: Mode for autoloading of LOBs | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-111580@lists.php.net to get a copy of this message | ||
ID: 40975
User updated by: spatar at mail dot nnov dot ru
Reported By: spatar at mail dot nnov dot ru
-Status: Open
+Status: Closed
Bug Type: Feature/Change Request
Operating System: All
PHP Version: 5.2.1
New Comment:
I found that this feature is already implemented but not documented:
$dbh->setAttribute(PDO::ATTR_STRINGIFY_FETCHES, true);
Previous Comments:
------------------------------------------------------------------------
[2007-04-02 11:12:57] spatar at mail dot nnov dot ru
Description:
------------
Many applications use CLOBs for storing not very big data, but more
than varchar2 can store. For such applications it isn't handy to deal
with streams.
Also sometimes it's impossible for table with CLOB column to do
$stmt->fetchAll(), because the number of simultaneously opened LOBs is
limited in a database (300 in Oracle by default) and only one correct
way is to do $stmt->fetch() in a loop and check if a column is
resource.
I request to add a fetching mode when PDO loads every LOB in a cursor
automatically in its C++ code. PHP code will look like this:
$result = $stmt->fetchAll(PDO::FETCH_ASSOC | PDO::LOB_AUTO_LOAD);
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=40975&edit=1