- added new function.

git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@328924 c90b9560-bf6c-de11-be94-00142212c4b1
This commit is contained in:
Yoshinari Takaoka 2012-12-30 20:34:16 +00:00
parent 9f152cfe78
commit ba95dea8fe

View file

@ -4,7 +4,7 @@
<refentry xml:id="function.chdb-create" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
<refnamediv>
<refname>chdb_create</refname>
<refpurpose>Creates a chdb file</refpurpose>
<refpurpose>chdb ファイルを作成する</refpurpose>
</refnamediv>
<refsect1 role="description">
@ -15,15 +15,11 @@
<methodparam><type>array</type><parameter>data</parameter></methodparam>
</methodsynopsis>
<para>
<function>chdb_create</function> creates a chdb file containing the
specified key-value pairs.
<function>chdb_create</function> 関数は、特定のキーと値のペアを含む chdb ファイルを作成します。
</para>
<note>
<para>
chdb files are not portable across little-endian and big-endian
environments. Except for that, they are portable across different
architectures. Also compatibility across different versions of chdb is not
guaranteed.
エンディアンが異なる環境で作られた chdb ファイルは移植性がありません。それを除けば、異なるアーキテクチャ上であっても移植性があります。また、バージョンが異なる chdb 間の互換性は保証されません。
</para>
</note>
</refsect1>
@ -35,10 +31,10 @@
<term><parameter>pathname</parameter></term>
<listitem>
<para>
The name of the file to create.
作成する chdb のファイルパス名
</para>
<para>
If a file with the same name already exists, it is overwritten.
指定されたパスと同じファイルが既にある場合は上書きされます。
</para>
</listitem>
</varlistentry>
@ -46,12 +42,10 @@
<term><parameter>data</parameter></term>
<listitem>
<para>
An array containing the key-value pairs to store in the chdb file.
chdb ファイルに格納するキーと値のペアを含んだ配列
</para>
<para>
Keys and values are converted to strings before being written to the file,
as chdb only support the string type. Note that binary strings are
supported as well, both as keys and values.
キーと値はファイルに書き出される前に文字列に変換されます。これは chdb が文字列型しかサポートしていないからです。キーにも値にも、バイナリ文字列を使えることに注意してください。
</para>
</listitem>
</varlistentry>
@ -68,14 +62,14 @@
<refsect1 role="errors">
&reftitle.errors;
<para>
Throws an exception in case the chdb file hasn't been successfully created.
chdb ファイルの作成に失敗した場合は例外がスローされます
</para>
</refsect1>
<refsect1 role="examples">
&reftitle.examples;
<example>
<title><function>chdb_create</function> example</title>
<title><function>chdb_create</function> の例</title>
<programlisting role="php">
<![CDATA[
<?php
@ -91,9 +85,7 @@ chdb_create('data.chdb', $data);
]]>
</programlisting>
<para>
The above example will generate a chdb file named
<literal>data.chdb</literal> and containing the key-value pairs defined in
<varname>$data</varname>.
上の例は <literal>data.chdb</literal> という名前の chdb ファイルを生成します。このファイルには <varname>$data</varname> に定義されたキーと値のペアが含まれています。
</para>
</example>
</refsect1>