Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
93 changes: 93 additions & 0 deletions reference/pgsql/functions/pg-enter-pipeline-mode.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,93 @@
<?xml version="1.0" encoding="utf-8"?>
<refentry xml:id="function.pg-enter-pipeline-mode" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
<refnamediv>
<refname>pg_enter_pipeline_mode</refname>
<refpurpose>Causes a connection to enter pipeline mode if it is currently idle.</refpurpose>
</refnamediv>

<refsect1 role="description">
&reftitle.description;
<methodsynopsis>
<type>bool</type><methodname>pg_enter_pipeline_mode</methodname>
<methodparam><type>PgSql\Connection</type><parameter>connection</parameter></methodparam>
</methodsynopsis>
<para>
Causes a connection to enter pipeline mode if it is currently idle.
</para>
</refsect1>

<refsect1 role="parameters">
&reftitle.parameters;
<para>
<variablelist>
<varlistentry>
<term><parameter>connection</parameter></term>
<listitem>
&pgsql.parameter.connection;
</listitem>
</varlistentry>
</variablelist>
</para>
</refsect1>

<refsect1 role="returnvalues">
&reftitle.returnvalues;
<para>
Returns &true; if it succeeds to enter in pipeline mode or &false;
</para>
</refsect1>

<refsect1 role="examples">
&reftitle.examples;
<example xml:id="function.pg-enter-pipeline-mode.example.basic">
<title><function>pg_enter_pipeline_mode</function> example</title>
<programlisting role="php">
<![CDATA[
<?php
$dbconn = pg_connect("host=localhost port=5432 dbname=mary")
or die("Could not connect");
echo pg_enter_pipeline_node($dbconn);
pg_close($dbconn);
?>
]]>
</programlisting>
&example.outputs;
<screen>
<![CDATA[
false
]]>
</screen>
</example>
</refsect1>

<refsect1 role="seealso">
&reftitle.seealso;
<simplelist>
<member><function>pg_exit_pipeline_mode</function></member>
<member><function>pg_connect</function></member>
<member><function>pg_connect_poll</function></member>
<member><function>pg_flush</function></member>
</simplelist>
</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
indent-tabs-mode:nil
sgml-parent-document:nil
sgml-default-dtd-file:"~/.phpdoc/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
-->
95 changes: 95 additions & 0 deletions reference/pgsql/functions/pg-exit-pipeline-mode.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,95 @@
<?xml version="1.0" encoding="utf-8"?>
<refentry xml:id="function.pg-exit-pipeline-mode" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
<refnamediv>
<refname>pg_exit_pipeline_mode</refname>
<refpurpose>Causes a connection to exit pipeline mode</refpurpose>
</refnamediv>

<refsect1 role="description">
&reftitle.description;
<methodsynopsis>
<type>bool</type><methodname>pg_exit_pipeline_mode</methodname>
<methodparam><type>PgSql\Connection</type><parameter>connection</parameter></methodparam>
</methodsynopsis>
<para>
Causes a connection to exit pipeline mode if it is currently in pipeline mode with an empty queue and no pending results.
</para>
</refsect1>

<refsect1 role="parameters">
&reftitle.parameters;
<para>
<variablelist>
<varlistentry>
<term><parameter>connection</parameter></term>
<listitem>
&pgsql.parameter.connection;
</listitem>
</varlistentry>
</variablelist>
</para>
</refsect1>

<refsect1 role="returnvalues">
&reftitle.returnvalues;
<para>
Returns &true; if it succeeds to exit the pipeline mode, assuming
it was in this mode via <function>pg_enter_pipeline_mode</function>,
&false; otherwise.
</para>
</refsect1>

<refsect1 role="examples">
&reftitle.examples;
<example xml:id="function.pg-exit-pipeline-mode.example.basic">
<title><function>pg_exit_pipeline_mode</function> example</title>
<programlisting role="php">
<![CDATA[
<?php
$dbconn = pg_connect("host=localhost port=5432 dbname=mary")
or die("Could not connect");
echo pg_exit_pipeline_node($dbconn);
pg_close($dbconn);
?>
]]>
</programlisting>
&example.outputs;
<screen>
<![CDATA[
false
]]>
</screen>
</example>
</refsect1>

<refsect1 role="seealso">
&reftitle.seealso;
<simplelist>
<member><function>pg_enter_pipeline_mode</function></member>
<member><function>pg_connect</function></member>
<member><function>pg_connect_poll</function></member>
<member><function>pg_flush</function></member>
</simplelist>
</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
indent-tabs-mode:nil
sgml-parent-document:nil
sgml-default-dtd-file:"~/.phpdoc/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
-->
95 changes: 95 additions & 0 deletions reference/pgsql/functions/pg-pipeline-status.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,95 @@
<?xml version="1.0" encoding="utf-8"?>
<refentry xml:id="function.pg-pipeline-status" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
<refnamediv>
<refname>pg_pipeline_status</refname>
<refpurpose>Returns the current pipeline mode status of the libpq connection.</refpurpose>
</refnamediv>

<refsect1 role="description">
&reftitle.description;
<methodsynopsis>
<type>int</type><methodname>pg_pipeline_status</methodname>
<methodparam><type>PgSql\Connection</type><parameter>connection</parameter></methodparam>
</methodsynopsis>
<para>
Returns the current pipeline mode status of the libpq connection.
</para>
</refsect1>

<refsect1 role="parameters">
&reftitle.parameters;
<para>
<variablelist>
<varlistentry>
<term><parameter>connection</parameter></term>
<listitem>
&pgsql.parameter.connection;
</listitem>
</varlistentry>
</variablelist>
</para>
</refsect1>

<refsect1 role="returnvalues">
&reftitle.returnvalues;
<para>
Returns one of the following status:
<constant>PGSQL_PIPELINE_ON</constant>, <constant>PGSQL_PIPELINE_OFF</constant> or
<constant>PGSQL_PIPELINE_ABORTED</constant>.
</para>
</refsect1>

<refsect1 role="examples">
&reftitle.examples;
<example xml:id="function.pg-pipeline-status.example.basic">
<title><function>pg_pipeline_status</function> example</title>
<para>
Description.
</para>
<programlisting role="php">
<![CDATA[
<?php
$dbconn = pg_connect("host=localhost port=5432 dbname=mary")
or die("Could not connect");
pg_enter_pipeline_node($dbconn);
echo pg_pipeline_status($dbconn);
pg_close($dbconn);
?>
]]>
</programlisting>
&example.outputs;
<screen>
<![CDATA[
0
]]>
</screen>
</example>
</refsect1>

<refsect1 role="seealso">
&reftitle.seealso;
<simplelist>
<member><function>pg_enter_pipeline_mode</function></member>
</simplelist>
</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
indent-tabs-mode:nil
sgml-parent-document:nil
sgml-default-dtd-file:"~/.phpdoc/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
-->
96 changes: 96 additions & 0 deletions reference/pgsql/functions/pg-pipeline-sync.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,96 @@
<?xml version="1.0" encoding="utf-8"?>
<refentry xml:id="function.pg-pipeline-sync" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
<refnamediv>
<refname>pg_pipeline_sync</refname>
<refpurpose>Marks a synchronization point in a pipeline by sending a sync message and flushing the send buffer.</refpurpose>
</refnamediv>

<refsect1 role="description">
&reftitle.description;
<methodsynopsis>
<type>bool</type><methodname>pg_pipeline_sync</methodname>
<methodparam><type>PgSql\Connection</type><parameter>connection</parameter></methodparam>
</methodsynopsis>
<para>
Marks a synchronization point in a pipeline by sending a sync message and flushing the send buffer.
</para>
</refsect1>

<refsect1 role="parameters">
&reftitle.parameters;
<para>
<variablelist>
<varlistentry>
<term><parameter>connection</parameter></term>
<listitem>
&pgsql.parameter.connection;
</listitem>
</varlistentry>
</variablelist>
</para>
</refsect1>

<refsect1 role="returnvalues">
&reftitle.returnvalues;
<para>
Returns &true; on success or &false;
</para>
</refsect1>

<refsect1 role="examples">
&reftitle.examples;
<example xml:id="function.pg-pipeline-sync.example.basic">
<title><function>pg_pipeline_sync</function> example</title>
<para>
Description.
</para>
<programlisting role="php">
<![CDATA[
<?php
$dbconn = pg_connect("host=localhost port=5432 dbname=publisher")
or die("Could not connect");
pg_enter_pipeline_node($dbconn);
pg_send_query($dbconn, "select * from authors; select count(*) from authors;");
pg_flush($dbconn);
echo pg_pipeline_sync($dbconn);
pg_close($dbconn);
?>
]]>
</programlisting>
&example.outputs;
<screen>
<![CDATA[
false
]]>
</screen>
</example>
</refsect1>

<refsect1 role="seealso">
&reftitle.seealso;
<simplelist>
<member><function>pg_enter_pipeline_mode</function></member>
<member><function>pg_pipeline_status</function></member>
</simplelist>
</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
indent-tabs-mode:nil
sgml-parent-document:nil
sgml-default-dtd-file:"~/.phpdoc/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
-->
Loading