Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[PHP 8.4] Add manual for pg_result_memory_syze() #145

Merged
merged 4 commits into from
Nov 7, 2024
Merged
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
95 changes: 95 additions & 0 deletions reference/pgsql/functions/pg-result-memory-size.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,95 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- $Revision$ -->
<!-- EN-Revision: 0e3624a28232422c0e6741b93f93599726479bb3 Maintainer: KentarouTakeda Status: ready -->
<!-- CREDITS: KentarouTakeda -->
<refentry xml:id="function.pg-result-memory-size" xmlns="http://docbook.org/ns/docbook">
<refnamediv>
<refname>pg_result_memory_size</refname>
<refpurpose>クエリーの結果に割り当てられたメモリ使用量を返します</refpurpose>
</refnamediv>

<refsect1 role="description">
&reftitle.description;
<methodsynopsis>
<type>int</type><methodname>pg_result_memory_size</methodname>
<methodparam><type>PgSql\Result</type><parameter>result</parameter></methodparam>
</methodsynopsis>
<simpara>
指定されたクエリ結果 <classname>PgSql\Result</classname> インスタンスに割り当てられたメモリ使用量をバイト単位で返します。
この値は、 <function>pg_free_result</function> によって解放されるメモリ使用量と同じです。
</simpara>
</refsect1>

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

<refsect1 role="returnvalues">
&reftitle.returnvalues;
<simpara>
メモリ使用量をバイト単位で返します。
</simpara>
</refsect1>

<refsect1 role="examples">
&reftitle.examples;
<example>
<title><function>pg_result_memory_size</function> の例</title>
<programlisting role="php">
<![CDATA[
<?php
$db = pg_connect("dbname=users user=me");

$res = pg_query($db, 'SELECT 1');

$size = pg_result_memory_size($res);

var_dump($size);
?>
]]>
</programlisting>
&example.outputs.similar;
<screen>
<![CDATA[
int(3288)
]]>
</screen>
</example>
</refsect1>

<refsect1 role="seealso">
&reftitle.seealso;
<simplelist>
<member><function>pg_free_result</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
-->