mirror of
https://github.com/php/doc-es.git
synced 2026-03-26 00:12:06 +01:00
git-svn-id: https://svn.php.net/repository/phpdoc/es/trunk@329001 c90b9560-bf6c-de11-be94-00142212c4b1
126 lines
3.2 KiB
XML
126 lines
3.2 KiB
XML
<?xml version="1.0" encoding="utf-8"?>
|
|
<!-- $Revision$ -->
|
|
<!-- EN-Revision: 897acdc42fbdea82aea8f4a3ce6f550080fb6f31 Maintainer: seros Status: ready -->
|
|
<!-- Reviewed: no -->
|
|
|
|
<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>Crea un archivo chdb</refpurpose>
|
|
</refnamediv>
|
|
|
|
<refsect1 role="description">
|
|
&reftitle.description;
|
|
<methodsynopsis>
|
|
<type>bool</type><methodname>chdb_create</methodname>
|
|
<methodparam><type>string</type><parameter>pathname</parameter></methodparam>
|
|
<methodparam><type>array</type><parameter>data</parameter></methodparam>
|
|
</methodsynopsis>
|
|
<para>
|
|
<function>chdb_create</function> crea un archivo que contiene los pares
|
|
clave-valor especificados.
|
|
</para>
|
|
<note>
|
|
<para>
|
|
Los archivos chdb no son portables a través de entornos little-endian y
|
|
big-endian. Excepto por esto, son portables a través de diferentes
|
|
arquitecturas. También, la compatibilidad a través de diferentes versiones de chdb no está
|
|
garantizada.
|
|
</para>
|
|
</note>
|
|
</refsect1>
|
|
|
|
<refsect1 role="parameters">
|
|
&reftitle.parameters;
|
|
<variablelist>
|
|
<varlistentry>
|
|
<term><parameter>pathname</parameter></term>
|
|
<listitem>
|
|
<para>
|
|
El nombre del archivo a crear.
|
|
</para>
|
|
<para>
|
|
Si un archivo con el mismo nombre ya existe se sobrescribirá.
|
|
</para>
|
|
</listitem>
|
|
</varlistentry>
|
|
<varlistentry>
|
|
<term><parameter>data</parameter></term>
|
|
<listitem>
|
|
<para>
|
|
Una matriz que contiene los pares clave-valor a almacenar en el archivo chdb.
|
|
</para>
|
|
<para>
|
|
Las claves y los valores son convertidos a cadenas antes de ser escritos al archivo,
|
|
ya que chdb sólo soporta el tipo string. Observe que las cadenas binarias también
|
|
están soportadas, tanto para claves como para valores.
|
|
</para>
|
|
</listitem>
|
|
</varlistentry>
|
|
</variablelist>
|
|
</refsect1>
|
|
|
|
<refsect1 role="returnvalues">
|
|
&reftitle.returnvalues;
|
|
<para>
|
|
&return.success;
|
|
</para>
|
|
</refsect1>
|
|
|
|
<refsect1 role="errors">
|
|
&reftitle.errors;
|
|
<para>
|
|
Lanza una excepción en caso de que el archivo chdb no haya sido creado con éxito.
|
|
</para>
|
|
</refsect1>
|
|
|
|
<refsect1 role="examples">
|
|
&reftitle.examples;
|
|
<example>
|
|
<title>Ejemplo de <function>chdb_create</function></title>
|
|
<programlisting role="php">
|
|
<![CDATA[
|
|
<?php
|
|
|
|
$data = array(
|
|
'clave1' => 'valor1',
|
|
'clave2' => 'valor2',
|
|
// ...
|
|
);
|
|
chdb_create('data.chdb', $data);
|
|
|
|
?>
|
|
]]>
|
|
</programlisting>
|
|
<para>
|
|
El ejemplo de arriba generará un archivo file llamado
|
|
<literal>data.chdb</literal> que contiene los pares clave-valor definidos en
|
|
<varname>$data</varname>.
|
|
</para>
|
|
</example>
|
|
</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
|
|
-->
|