cvs: peardoc /en/package/structures/structures-datagrid streaming.xml
| From: | Mark Wiesemann | Date: | Tue, 21 Nov 2006 21:17:01 +0000 |
| Subject: | cvs: peardoc /en/package/structures/structures-datagrid streaming.xml | ||
| Groups: | php.pear.doc | ||
| Request: | Send a blank email to pear-doc+get-8857@lists.php.net to get a copy of this message | ||
wiesemann Tue Nov 21 21:17:01 2006 UTC
Added files:
/peardoc/en/package/structures/structures-datagrid streaming.xml
Log:
- forgot to add this file
http://cvs.php.net/viewvc.cgi/peardoc/en/package/structures/structures-datagrid/streaming.xml?view=markup&rev=1.1
Index: peardoc/en/package/structures/structures-datagrid/streaming.xml
+++ peardoc/en/package/structures/structures-datagrid/streaming.xml
<?xml version="1.0" encoding="iso-8859-1" ?>
<!-- $Revision: 1.1 $ -->
<refentry id="package.structures.structures-datagrid.streaming">
<refnamediv>
<refname>Streaming</refname>
<refpurpose>How to stream large recordsets</refpurpose>
</refnamediv>
<refsect1>
<title>Description</title>
<para>
Large recordsets can exceed PHP's memory limit. Structures_DataGrid offers
streaming support with many DataSource drivers and some Renderer drivers
to avoid problems with the memory limit.
</para>
</refsect1>
<refsect1>
<title>How do I use streaming?</title>
<para>
Streaming can be enabled by calling the <function>enableStreaming</function>
method of the Structures_DataGrid object. An optimal parameter allows to
set the number of records that should be read and written on each stream
iteration. The default buffer size is 500 records.
</para>
<para>
Once streaming is enabled, only up to the number of records specified in the
buffer size records will be fetched and rendered. This will be repeated until
this was done for all records.
</para>
<example>
<title>Enabling streaming with buffer size of 1,000 records</title>
<programlisting role="php">
<![CDATA[
<?php
require 'Structures/DataGrid.php';
// Instantiate the DataGrid
$datagrid =& new Structures_DataGrid();
// Enable streaming and set buffer size to 1,000 records
$datagrid->enableStreaming(1000);
// ... e.g. bind(), render() calls as usual
?>
]]>
</programlisting>
</example>
</refsect1>
<refsect1>
<title>Driver support for streaming</title>
<para>
Although streaming can be used with every DataSource driver, only the
following drivers support streaming in a meaningful way: DataObject, DBQuery,
DB_Table and MDB2. Streaming support is planned to be added also to the CSV
and XML DataSources.
</para>
<para>
Streaming support is also compatible with every Renderer driver but can
currently be used only with CSV and XML Renderers in a meaningful way.
Other Renderers might be rewritten in the future for streaming support.
</para>
</refsect1>
</refentry>
<!-- Keep this comment at the end of the file
Local variables:
mode: sgml
sgml-omittag:t
sgml-shorttag:t
sgml-minimize-attributes:nil
sgml-always-quote-attributes:t
sgml-indent-step:1
sgml-indent-data:t
sgml-parent-document:nil
sgml-default-dtd-file:"../../../../manual.ced"
sgml-exposed-tags:nil
sgml-local-catalogs:nil
sgml-local-ecat-files:nil
End:
vim600: syn=xml fen fdm=syntax fdl=2 si
vim: et tw=78 syn=sgml
vi: ts=1 sw=1
-->