ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/PApp-SQL/SQL.pm
(Generate patch)

Comparing PApp-SQL/SQL.pm (file contents):
Revision 1.25 by root, Sat Apr 13 00:58:39 2002 UTC vs.
Revision 1.30 by stefan, Wed Jan 28 19:50:38 2004 UTC

44use DBI (); 44use DBI ();
45 45
46BEGIN { 46BEGIN {
47 use base qw(Exporter DynaLoader); 47 use base qw(Exporter DynaLoader);
48 48
49 $VERSION = 0.131; 49 $VERSION = 0.143;
50 @EXPORT = qw( 50 @EXPORT = qw(
51 sql_exec sql_fetch sql_fetchall sql_exists sql_insertid $sql_exec 51 sql_exec sql_fetch sql_fetchall sql_exists sql_insertid $sql_exec
52 sql_uexec sql_ufetch sql_ufetchall sql_uexists 52 sql_uexec sql_ufetch sql_ufetchall sql_uexists
53 ); 53 );
54 @EXPORT_OK = qw( 54 @EXPORT_OK = qw(
232... and it's still quite fast unless you fetch large amounts of data. 232... and it's still quite fast unless you fetch large amounts of data.
233 233
234C<sql_ufetch> is similar to C<sql_fetch> but upgrades all input values to 234C<sql_ufetch> is similar to C<sql_fetch> but upgrades all input values to
235utf8 and forces all result values to utf8 (this does I<not> include result 235utf8 and forces all result values to utf8 (this does I<not> include result
236parameters, only return values. Using bind variables in cinjunction with 236parameters, only return values. Using bind variables in cinjunction with
237sql_u* functions results in undefined behaviour). 237sql_u* functions results in undefined behaviour - we use utf8_on on
238bind-variables and it seems to work on DBD::mysql which just means
239that that DBD-driver is broken).
238 240
239=item sql_fetchall <see sql_exec> 241=item sql_fetchall <see sql_exec>
240 242
241=item sql_ufetchall <see sql_uexec> 243=item sql_ufetchall <see sql_uexec>
242 244
318 320
319=item [old-size] = cachesize [new-size] 321=item [old-size] = cachesize [new-size]
320 322
321Returns (and possibly changes) the LRU cache size used by C<sql_exec>. The 323Returns (and possibly changes) the LRU cache size used by C<sql_exec>. The
322default is somewhere around 50 (= the 50 last recently used statements 324default is somewhere around 50 (= the 50 last recently used statements
323will be cached). It shouldn't be too large, since a simple linear listed 325will be cached). It shouldn't be too large, since a simple linear list
324is used for the cache at the moment (which, for small (<100) cache sizes 326is used for the cache at the moment (which, for small (<100) cache sizes
325is actually quite fast). 327is actually quite fast).
326 328
327The function always returns the cache size in effect I<before> the call, 329The function always returns the cache size in effect I<before> the call,
328so, to nuke the cache (for example, when a database connection has died 330so, to nuke the cache (for example, when a database connection has died

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines