mirror of
https://github.com/sigmasternchen/php-doc-en
synced 2025-03-16 00:48:54 +00:00
importing tokyo_tyrant docs
git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@287567 c90b9560-bf6c-de11-be94-00142212c4b1
This commit is contained in:
parent
1901c7be3f
commit
e89883610a
60 changed files with 6280 additions and 0 deletions
1
reference/tokyo_tyrant/.cvsignore
Normal file
1
reference/tokyo_tyrant/.cvsignore
Normal file
|
@ -0,0 +1 @@
|
|||
entities.*.xml
|
54
reference/tokyo_tyrant/book.xml
Normal file
54
reference/tokyo_tyrant/book.xml
Normal file
|
@ -0,0 +1,54 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- $Revision: $ -->
|
||||
|
||||
<book xml:id="book.tokyo-tyrant" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
<title>tokyo_tyrant</title>
|
||||
<titleabbrev>tokyo_tyrant</titleabbrev>
|
||||
|
||||
<preface xml:id="intro.tokyo-tyrant">
|
||||
&reftitle.intro;
|
||||
<para>
|
||||
tokyo_tyrant extension provides a wrapper for Tokyo Tyrant client libraries. The extension
|
||||
contains the normal key-value API and the table API.
|
||||
</para>
|
||||
<para>
|
||||
<literal>
|
||||
"Tokyo Tyrant is a package of network interface to the DBM called Tokyo Cabinet. Though the DBM has high performance, you might bother in case that multiple processes share the same database, or remote processes access the database. Thus, Tokyo Tyrant is provided for concurrent and remote connections to Tokyo Cabinet. It is composed of the server process managing a database and its access library for client applications." --Tokyo Tyrant documentation
|
||||
</literal>
|
||||
</para>
|
||||
<para>
|
||||
Tokyo Tyrant is written by Mikio Hirabayashi and is licensed under GNU Lesser General Public License.
|
||||
</para>
|
||||
</preface>
|
||||
|
||||
&reference.tokyo-tyrant.setup;
|
||||
&reference.tokyo-tyrant.constants;
|
||||
&reference.tokyo-tyrant.examples;
|
||||
|
||||
&reference.tokyo-tyrant.tokyotyrant;
|
||||
&reference.tokyo-tyrant.tokyotyranttable;
|
||||
&reference.tokyo-tyrant.tokyotyrantquery;
|
||||
|
||||
</book>
|
||||
|
||||
<!-- 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:"../../../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
|
||||
-->
|
||||
|
104
reference/tokyo_tyrant/configure.xml
Normal file
104
reference/tokyo_tyrant/configure.xml
Normal file
|
@ -0,0 +1,104 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- $Revision: $ -->
|
||||
|
||||
<section xml:id="tokyo-tyrant.installation" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
&reftitle.install;
|
||||
|
||||
<para>
|
||||
&pecl.info;
|
||||
<link xlink:href="&url.pecl.package;tokyo_tyrant">&url.pecl.package;tokyo_tyrant</link>
|
||||
</para>
|
||||
|
||||
<section xml:id="tokyo-tyrant.configure-options">
|
||||
<title>Configure options</title>
|
||||
<simplelist>
|
||||
<member><literal>--with-tokyo-tyrant[=DIR]</literal> DIR is the prefix to the Tokyo Tyrant installation</member>
|
||||
<member><literal>--with-tokyo-cabinet-dir[=DIR]</literal> DIR is the prefix to the Tokyo Cabinet installation</member>
|
||||
<member><literal>--disable-tokyo-tyrant-session</literal> Disable Tokyo Tyrant session handler support</member>
|
||||
</simplelist>
|
||||
</section>
|
||||
|
||||
<section xml:id="tokyo-tyrant.enabling-the-extension">
|
||||
<title>Enabling the extension</title>
|
||||
<para>
|
||||
The extension can be enabled by adding <literal>extension=tokyo_tyrant.so</literal> to the INI-configuration
|
||||
</para>
|
||||
</section>
|
||||
|
||||
<section xml:id="tokyo-tyrant.session-running">
|
||||
<title>Running Tokyo Tyrant for the session handler</title>
|
||||
<para>
|
||||
<literal>ttserver -port 2000 -ext /path/to/expire.lua -extpc expire 30.0 '/tmp/sessions.tct#idx=ts:dec'</literal>
|
||||
</para>
|
||||
<note>
|
||||
<simpara>
|
||||
expire.lua is included in the tokyo_tyrant extension source distribution
|
||||
</simpara>
|
||||
</note>
|
||||
</section>
|
||||
|
||||
<section xml:id="tokyo-tyrant.configuring-session-handler">
|
||||
<title>Configuring session handler</title>
|
||||
<para>
|
||||
<simplelist>
|
||||
<member>tokyo_tyrant.session_salt="randomlongstring"</member>
|
||||
<member>session.save_handler=tokyo_tyrant</member>
|
||||
<member>session.save_path="tcp://hostname1:2000,tcp://hostname2:2000"</member>
|
||||
</simplelist>
|
||||
</para>
|
||||
<note>
|
||||
<simpara>
|
||||
It is important to make sure that <link linkend="ini.tokyo-tyrant.session-salt">tokyo_tyrant.session_salt</link> matches on all servers.
|
||||
</simpara>
|
||||
</note>
|
||||
</section>
|
||||
|
||||
<section xml:id="tokyo-tyrant.how-session-handler-works">
|
||||
<title>How it works?</title>
|
||||
<para>
|
||||
The session handler creates a session id like the following:
|
||||
8b0e27a823fa4a6cf7246945b82c1d51-a5eadbbed1f2075952900628456bfd6830541629-0-5460
|
||||
</para>
|
||||
|
||||
<para>
|
||||
The parts from left to right:
|
||||
</para>
|
||||
|
||||
<simplelist>
|
||||
<member><literal>Session id</literal> - Generated session id</member>
|
||||
<member><literal>Checksum</literal> - Checksum of session salt, session id, node id and primary key</member>
|
||||
<member><literal>Node id</literal> - The id of the node where the session maps to</member>
|
||||
<member><literal>Primary key</literal> - The primary key of the row where the session is stored</member>
|
||||
</simplelist>
|
||||
|
||||
<para>
|
||||
The checksum contains SHA1 sum of the node id, primary key, session id and the salt which is known only on the server side. This allows quick mapping of session id to node and primary key since there is no need to do an additional search. During session id regeneration only the parts 1 and 2 change but the mapping to the node and primary key stays constant.
|
||||
</para>
|
||||
<para>
|
||||
In case some of the nodes fail <link linkend="ini.tokyo-tyrant.allow-failover">tokyo_tyrant.allow_failover</link>, <link linkend="ini.tokyo-tyrant.fail-threshold">tokyo_tyrant.fail_threshold</link> and <link linkend="ini.tokyo-tyrant.health-check-divisor">tokyo_tyrant.health_check_divisor</link> INI-settings control the behavior during failover. If failover is allowed the session handler will map the session to a healthy node and creates a new empty session.
|
||||
</para>
|
||||
</section>
|
||||
|
||||
</section>
|
||||
|
||||
|
||||
<!-- 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:"../../../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
|
||||
-->
|
31
reference/tokyo_tyrant/constants.xml
Normal file
31
reference/tokyo_tyrant/constants.xml
Normal file
|
@ -0,0 +1,31 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- $Revision: $ -->
|
||||
|
||||
<appendix xml:id="tokyo-tyrant.constants" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
&reftitle.constants;
|
||||
<para>
|
||||
<link linkend="tokyotyrant.constants.types">TokyoTyrant constant</link>
|
||||
</para>
|
||||
</appendix>
|
||||
|
||||
<!-- 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:"../../../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
|
||||
-->
|
||||
|
21
reference/tokyo_tyrant/entities.tokyotyrant.xml
Normal file
21
reference/tokyo_tyrant/entities.tokyotyrant.xml
Normal file
|
@ -0,0 +1,21 @@
|
|||
&reference.tokyo-tyrant.tokyotyrant.add;
|
||||
&reference.tokyo-tyrant.tokyotyrant.connect;
|
||||
&reference.tokyo-tyrant.tokyotyrant.connecturi;
|
||||
&reference.tokyo-tyrant.tokyotyrant.construct;
|
||||
&reference.tokyo-tyrant.tokyotyrant.copy;
|
||||
&reference.tokyo-tyrant.tokyotyrant.ext;
|
||||
&reference.tokyo-tyrant.tokyotyrant.fwmkeys;
|
||||
&reference.tokyo-tyrant.tokyotyrant.get;
|
||||
&reference.tokyo-tyrant.tokyotyrant.num;
|
||||
&reference.tokyo-tyrant.tokyotyrant.out;
|
||||
&reference.tokyo-tyrant.tokyotyrant.put;
|
||||
&reference.tokyo-tyrant.tokyotyrant.putcat;
|
||||
&reference.tokyo-tyrant.tokyotyrant.putkeep;
|
||||
&reference.tokyo-tyrant.tokyotyrant.putnr;
|
||||
&reference.tokyo-tyrant.tokyotyrant.putshl;
|
||||
&reference.tokyo-tyrant.tokyotyrant.restore;
|
||||
&reference.tokyo-tyrant.tokyotyrant.setmaster;
|
||||
&reference.tokyo-tyrant.tokyotyrant.size;
|
||||
&reference.tokyo-tyrant.tokyotyrant.stat;
|
||||
&reference.tokyo-tyrant.tokyotyrant.sync;
|
||||
&reference.tokyo-tyrant.tokyotyrant.vanish;
|
13
reference/tokyo_tyrant/entities.tokyotyrantquery.xml
Normal file
13
reference/tokyo_tyrant/entities.tokyotyrantquery.xml
Normal file
|
@ -0,0 +1,13 @@
|
|||
&reference.tokyo-tyrant.tokyotyrantquery.addcond;
|
||||
&reference.tokyo-tyrant.tokyotyrantquery.construct;
|
||||
&reference.tokyo-tyrant.tokyotyrantquery.count;
|
||||
&reference.tokyo-tyrant.tokyotyrantquery.current;
|
||||
&reference.tokyo-tyrant.tokyotyrantquery.hint;
|
||||
&reference.tokyo-tyrant.tokyotyrantquery.key;
|
||||
&reference.tokyo-tyrant.tokyotyrantquery.metasearch;
|
||||
&reference.tokyo-tyrant.tokyotyrantquery.next;
|
||||
&reference.tokyo-tyrant.tokyotyrantquery.out;
|
||||
&reference.tokyo-tyrant.tokyotyrantquery.rewind;
|
||||
&reference.tokyo-tyrant.tokyotyrantquery.search;
|
||||
&reference.tokyo-tyrant.tokyotyrantquery.setlimit;
|
||||
&reference.tokyo-tyrant.tokyotyrantquery.valid;
|
11
reference/tokyo_tyrant/entities.tokyotyranttable.xml
Normal file
11
reference/tokyo_tyrant/entities.tokyotyranttable.xml
Normal file
|
@ -0,0 +1,11 @@
|
|||
&reference.tokyo-tyrant.tokyotyranttable.add;
|
||||
&reference.tokyo-tyrant.tokyotyranttable.genuid;
|
||||
&reference.tokyo-tyrant.tokyotyranttable.get;
|
||||
&reference.tokyo-tyrant.tokyotyranttable.getquery;
|
||||
&reference.tokyo-tyrant.tokyotyranttable.out;
|
||||
&reference.tokyo-tyrant.tokyotyranttable.put;
|
||||
&reference.tokyo-tyrant.tokyotyranttable.putcat;
|
||||
&reference.tokyo-tyrant.tokyotyranttable.putkeep;
|
||||
&reference.tokyo-tyrant.tokyotyranttable.putnr;
|
||||
&reference.tokyo-tyrant.tokyotyranttable.putshl;
|
||||
&reference.tokyo-tyrant.tokyotyranttable.setindex;
|
49
reference/tokyo_tyrant/examples.xml
Normal file
49
reference/tokyo_tyrant/examples.xml
Normal file
|
@ -0,0 +1,49 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- $Revision: $ -->
|
||||
|
||||
<chapter xml:id="tokyo-tyrant.examples" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
&reftitle.examples;
|
||||
<para>
|
||||
Basic usage
|
||||
</para>
|
||||
<example>
|
||||
<title>Putting and getting a key-value pair</title>
|
||||
<programlisting role="php">
|
||||
<![CDATA[
|
||||
<?php
|
||||
$tt = new TokyoTyrant("localhost");
|
||||
$tt->put("key", "value");
|
||||
echo $tt->get("key");
|
||||
?>
|
||||
]]>
|
||||
</programlisting>
|
||||
&example.outputs;
|
||||
<screen>
|
||||
<![CDATA[
|
||||
value
|
||||
]]>
|
||||
</screen>
|
||||
</example>
|
||||
</chapter>
|
||||
|
||||
<!-- 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:"../../../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
|
||||
-->
|
||||
|
157
reference/tokyo_tyrant/ini.xml
Normal file
157
reference/tokyo_tyrant/ini.xml
Normal file
|
@ -0,0 +1,157 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- $Revision: $ -->
|
||||
|
||||
<section xml:id="tokyo-tyrant.configuration" xmlns="http://docbook.org/ns/docbook">
|
||||
&reftitle.runtime;
|
||||
&extension.runtime;
|
||||
<para>
|
||||
<table>
|
||||
<title>tokyo_tyrant &ConfigureOptions;</title>
|
||||
<tgroup cols="4">
|
||||
<thead>
|
||||
<row>
|
||||
<entry>&Name;</entry>
|
||||
<entry>&Default;</entry>
|
||||
<entry>&Changeable;</entry>
|
||||
<entry>&Changelog;</entry>
|
||||
</row>
|
||||
</thead>
|
||||
<tbody>
|
||||
<row>
|
||||
<entry>tokyo_tyrant.default_timeout</entry>
|
||||
<entry>2.0</entry>
|
||||
<entry>PHP_INI_ALL</entry>
|
||||
<entry><!-- leave empty, this will be filled by an automatic script --></entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry>tokyo_tyrant.session_salt</entry>
|
||||
<entry>&null;</entry>
|
||||
<entry>PHP_INI_ALL</entry>
|
||||
<entry><!-- leave empty, this will be filled by an automatic script --></entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry>tokyo_tyrant.key_prefix</entry>
|
||||
<entry>&null;</entry>
|
||||
<entry>PHP_INI_ALL</entry>
|
||||
<entry><!-- leave empty, this will be filled by an automatic script --></entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry>tokyo_tyrant.allow_failover</entry>
|
||||
<entry>1</entry>
|
||||
<entry>PHP_INI_ALL</entry>
|
||||
<entry><!-- leave empty, this will be filled by an automatic script --></entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry>tokyo_tyrant.fail_threshold</entry>
|
||||
<entry>5</entry>
|
||||
<entry>PHP_INI_ALL</entry>
|
||||
<entry><!-- leave empty, this will be filled by an automatic script --></entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry>tokyo_tyrant.health_check_divisor</entry>
|
||||
<entry>1000</entry>
|
||||
<entry>PHP_INI_ALL</entry>
|
||||
<entry><!-- leave empty, this will be filled by an automatic script --></entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry>tokyo_tyrant.php_expiration</entry>
|
||||
<entry>0</entry>
|
||||
<entry>PHP_INI_ALL</entry>
|
||||
<entry><!-- leave empty, this will be filled by an automatic script --></entry>
|
||||
</row>
|
||||
</tbody>
|
||||
</tgroup>
|
||||
</table>
|
||||
</para>
|
||||
|
||||
&ini.descriptions.title;
|
||||
|
||||
<para>
|
||||
<variablelist>
|
||||
<varlistentry xml:id="ini.tokyo-tyrant.default-timeout">
|
||||
<term>
|
||||
<parameter>tokyo_tyrant.default_timeout</parameter>
|
||||
<type>integer</type>
|
||||
</term>
|
||||
<listitem>
|
||||
<para>
|
||||
Default timeout when connecting to databases
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry xml:id="ini.tokyo-tyrant.session-salt">
|
||||
<term>
|
||||
<parameter>tokyo_tyrant.session_salt</parameter>
|
||||
<type>string</type>
|
||||
</term>
|
||||
<listitem>
|
||||
<para>
|
||||
The secret that is used to salt session id
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry xml:id="ini.tokyo-tyrant.key-prefix">
|
||||
<term>
|
||||
<parameter>tokyo_tyrant.key_prefix</parameter>
|
||||
<type>string</type>
|
||||
</term>
|
||||
<listitem>
|
||||
<para>
|
||||
Prefix all keys with this string. The prefix is transparent
|
||||
to the developer but helps making sure that keys won't collide if multiple
|
||||
applications are using the same database.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry xml:id="ini.tokyo-tyrant.allow-failover">
|
||||
<term>
|
||||
<parameter>tokyo_tyrant.allow_failover</parameter>
|
||||
<type>integer</type>
|
||||
</term>
|
||||
<listitem>
|
||||
<para>
|
||||
Whether to allow session failover in case a server dies.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry xml:id="ini.tokyo-tyrant.fail-threshold">
|
||||
<term>
|
||||
<parameter>tokyo_tyrant.fail_threshold</parameter>
|
||||
<type>integer</type>
|
||||
</term>
|
||||
<listitem>
|
||||
<para>
|
||||
How many read/write or connection failures is allowed
|
||||
before server is marked as failed.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry xml:id="ini.tokyo-tyrant.health-check-divisor">
|
||||
<term>
|
||||
<parameter>tokyo_tyrant.health_check_divisor</parameter>
|
||||
<type>integer</type>
|
||||
</term>
|
||||
<listitem>
|
||||
<para>
|
||||
Defines the divisor for the health check probability. If there are failed
|
||||
servers and the probability matches, the servers are health checked and
|
||||
in case the server seems healthy, it will be added back to the pool.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry xml:id="ini.tokyo-tyrant.php-expiration">
|
||||
<term>
|
||||
<parameter>tokyo_tyrant.php_expiration</parameter>
|
||||
<type>integer</type>
|
||||
</term>
|
||||
<listitem>
|
||||
<para>
|
||||
Whether to use built in session expiration mechanism or delegate
|
||||
expire.lua like script.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
</variablelist>
|
||||
</para>
|
||||
</section>
|
52
reference/tokyo_tyrant/setup.xml
Normal file
52
reference/tokyo_tyrant/setup.xml
Normal file
|
@ -0,0 +1,52 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- $Revision: $ -->
|
||||
|
||||
<chapter xml:id="tokyo-tyrant.setup" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
&reftitle.setup;
|
||||
|
||||
<section xml:id="tokyo-tyrant.requirements">
|
||||
&reftitle.required;
|
||||
<!-- Use &no.requirement; if there no requirement -->
|
||||
<para>
|
||||
Before using this extension Tokyo Cabinet and Tokyo Tyrant must be installed.
|
||||
</para>
|
||||
</section>
|
||||
|
||||
<!-- {{{ Installation -->
|
||||
&reference.tokyo-tyrant.configure;
|
||||
<!-- or &reference.tokyo-tyrant.configure; -->
|
||||
<!-- }}} -->
|
||||
|
||||
<!-- {{{ Configuration -->
|
||||
&reference.tokyo-tyrant.ini;
|
||||
<!-- or -->
|
||||
<!-- }}} -->
|
||||
|
||||
<section xml:id="tokyo-tyrant.resources">
|
||||
&reftitle.resources;
|
||||
&no.resource;
|
||||
</section>
|
||||
|
||||
</chapter>
|
||||
|
||||
<!-- 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:"../../../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
|
||||
-->
|
||||
|
649
reference/tokyo_tyrant/tokyotyrant.xml
Normal file
649
reference/tokyo_tyrant/tokyotyrant.xml
Normal file
|
@ -0,0 +1,649 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- $Revision: $ -->
|
||||
|
||||
<phpdoc:classref xml:id="class.tokyotyrant" xmlns:phpdoc="http://php.net/ns/phpdoc" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xi="http://www.w3.org/2001/XInclude">
|
||||
|
||||
<title>The TokyoTyrant class</title>
|
||||
<titleabbrev>TokyoTyrant</titleabbrev>
|
||||
|
||||
<partintro>
|
||||
|
||||
<!-- {{{ tokyotyrant intro -->
|
||||
<section xml:id="tokyotyrant.intro">
|
||||
&reftitle.intro;
|
||||
<para>
|
||||
The main Tokyo Tyrant class
|
||||
</para>
|
||||
</section>
|
||||
<!-- }}} -->
|
||||
|
||||
<section xml:id="tokyotyrant.synopsis">
|
||||
&reftitle.classsynopsis;
|
||||
|
||||
<!-- {{{ Synopsis -->
|
||||
<classsynopsis>
|
||||
<ooclass><classname>TokyoTyrant</classname></ooclass>
|
||||
|
||||
<!-- {{{ Class synopsis -->
|
||||
<classsynopsisinfo>
|
||||
<ooclass>
|
||||
<classname>TokyoTyrant</classname>
|
||||
</ooclass>
|
||||
</classsynopsisinfo>
|
||||
<!-- }}} -->
|
||||
<classsynopsisinfo role="comment">Constants</classsynopsisinfo>
|
||||
<fieldsynopsis>
|
||||
<modifier>const</modifier>
|
||||
<type>integer</type>
|
||||
<varname linkend="tokyotyrant.constants.RDBDEF_PORT">TokyoTyrant::RDBDEF_PORT</varname>
|
||||
<initializer>1978</initializer>
|
||||
</fieldsynopsis>
|
||||
<fieldsynopsis>
|
||||
<modifier>const</modifier>
|
||||
<type>integer</type>
|
||||
<varname linkend="tokyotyrant.constants.RDBQC_STREQ">TokyoTyrant::RDBQC_STREQ</varname>
|
||||
<initializer>0</initializer>
|
||||
</fieldsynopsis>
|
||||
<fieldsynopsis>
|
||||
<modifier>const</modifier>
|
||||
<type>integer</type>
|
||||
<varname linkend="tokyotyrant.constants.RDBQC_STRINC">TokyoTyrant::RDBQC_STRINC</varname>
|
||||
<initializer>1</initializer>
|
||||
</fieldsynopsis>
|
||||
<fieldsynopsis>
|
||||
<modifier>const</modifier>
|
||||
<type>integer</type>
|
||||
<varname linkend="tokyotyrant.constants.RDBQC_STRBW">TokyoTyrant::RDBQC_STRBW</varname>
|
||||
<initializer>2</initializer>
|
||||
</fieldsynopsis>
|
||||
<fieldsynopsis>
|
||||
<modifier>const</modifier>
|
||||
<type>integer</type>
|
||||
<varname linkend="tokyotyrant.constants.RDBQC_STREW">TokyoTyrant::RDBQC_STREW</varname>
|
||||
<initializer>3</initializer>
|
||||
</fieldsynopsis>
|
||||
<fieldsynopsis>
|
||||
<modifier>const</modifier>
|
||||
<type>integer</type>
|
||||
<varname linkend="tokyotyrant.constants.RDBQC_STRAND">TokyoTyrant::RDBQC_STRAND</varname>
|
||||
<initializer>4</initializer>
|
||||
</fieldsynopsis>
|
||||
<fieldsynopsis>
|
||||
<modifier>const</modifier>
|
||||
<type>integer</type>
|
||||
<varname linkend="tokyotyrant.constants.RDBQC_STROR">TokyoTyrant::RDBQC_STROR</varname>
|
||||
<initializer>5</initializer>
|
||||
</fieldsynopsis>
|
||||
<fieldsynopsis>
|
||||
<modifier>const</modifier>
|
||||
<type>integer</type>
|
||||
<varname linkend="tokyotyrant.constants.RDBQC_STROREQ">TokyoTyrant::RDBQC_STROREQ</varname>
|
||||
<initializer>6</initializer>
|
||||
</fieldsynopsis>
|
||||
<fieldsynopsis>
|
||||
<modifier>const</modifier>
|
||||
<type>integer</type>
|
||||
<varname linkend="tokyotyrant.constants.RDBQC_STRRX">TokyoTyrant::RDBQC_STRRX</varname>
|
||||
<initializer>7</initializer>
|
||||
</fieldsynopsis>
|
||||
<fieldsynopsis>
|
||||
<modifier>const</modifier>
|
||||
<type>integer</type>
|
||||
<varname linkend="tokyotyrant.constants.RDBQC_NUMEQ">TokyoTyrant::RDBQC_NUMEQ</varname>
|
||||
<initializer>8</initializer>
|
||||
</fieldsynopsis>
|
||||
<fieldsynopsis>
|
||||
<modifier>const</modifier>
|
||||
<type>integer</type>
|
||||
<varname linkend="tokyotyrant.constants.RDBQC_NUMGT">TokyoTyrant::RDBQC_NUMGT</varname>
|
||||
<initializer>9</initializer>
|
||||
</fieldsynopsis>
|
||||
<fieldsynopsis>
|
||||
<modifier>const</modifier>
|
||||
<type>integer</type>
|
||||
<varname linkend="tokyotyrant.constants.RDBQC_NUMGE">TokyoTyrant::RDBQC_NUMGE</varname>
|
||||
<initializer>10</initializer>
|
||||
</fieldsynopsis>
|
||||
<fieldsynopsis>
|
||||
<modifier>const</modifier>
|
||||
<type>integer</type>
|
||||
<varname linkend="tokyotyrant.constants.RDBQC_NUMLT">TokyoTyrant::RDBQC_NUMLT</varname>
|
||||
<initializer>11</initializer>
|
||||
</fieldsynopsis>
|
||||
<fieldsynopsis>
|
||||
<modifier>const</modifier>
|
||||
<type>integer</type>
|
||||
<varname linkend="tokyotyrant.constants.RDBQC_NUMLE">TokyoTyrant::RDBQC_NUMLE</varname>
|
||||
<initializer>12</initializer>
|
||||
</fieldsynopsis>
|
||||
<fieldsynopsis>
|
||||
<modifier>const</modifier>
|
||||
<type>integer</type>
|
||||
<varname linkend="tokyotyrant.constants.RDBQC_NUMBT">TokyoTyrant::RDBQC_NUMBT</varname>
|
||||
<initializer>13</initializer>
|
||||
</fieldsynopsis>
|
||||
<fieldsynopsis>
|
||||
<modifier>const</modifier>
|
||||
<type>integer</type>
|
||||
<varname linkend="tokyotyrant.constants.RDBQC_NUMOREQ">TokyoTyrant::RDBQC_NUMOREQ</varname>
|
||||
<initializer>14</initializer>
|
||||
</fieldsynopsis>
|
||||
<fieldsynopsis>
|
||||
<modifier>const</modifier>
|
||||
<type>integer</type>
|
||||
<varname linkend="tokyotyrant.constants.RDBQC_NEGATE">TokyoTyrant::RDBQC_NEGATE</varname>
|
||||
<initializer>16777216</initializer>
|
||||
</fieldsynopsis>
|
||||
<fieldsynopsis>
|
||||
<modifier>const</modifier>
|
||||
<type>integer</type>
|
||||
<varname linkend="tokyotyrant.constants.RDBQC_NOIDX">TokyoTyrant::RDBQC_NOIDX</varname>
|
||||
<initializer>33554432</initializer>
|
||||
</fieldsynopsis>
|
||||
<fieldsynopsis>
|
||||
<modifier>const</modifier>
|
||||
<type>integer</type>
|
||||
<varname linkend="tokyotyrant.constants.RDBQO_STRASC">TokyoTyrant::RDBQO_STRASC</varname>
|
||||
<initializer>0</initializer>
|
||||
</fieldsynopsis>
|
||||
<fieldsynopsis>
|
||||
<modifier>const</modifier>
|
||||
<type>integer</type>
|
||||
<varname linkend="tokyotyrant.constants.RDBQO_STRDESC">TokyoTyrant::RDBQO_STRDESC</varname>
|
||||
<initializer>1</initializer>
|
||||
</fieldsynopsis>
|
||||
<fieldsynopsis>
|
||||
<modifier>const</modifier>
|
||||
<type>integer</type>
|
||||
<varname linkend="tokyotyrant.constants.RDBQO_NUMASC">TokyoTyrant::RDBQO_NUMASC</varname>
|
||||
<initializer>2</initializer>
|
||||
</fieldsynopsis>
|
||||
<fieldsynopsis>
|
||||
<modifier>const</modifier>
|
||||
<type>integer</type>
|
||||
<varname linkend="tokyotyrant.constants.RDBQO_NUMDESC">TokyoTyrant::RDBQO_NUMDESC</varname>
|
||||
<initializer>3</initializer>
|
||||
</fieldsynopsis>
|
||||
<fieldsynopsis>
|
||||
<modifier>const</modifier>
|
||||
<type>integer</type>
|
||||
<varname linkend="tokyotyrant.constants.RDBIT_LEXICAL">TokyoTyrant::RDBIT_LEXICAL</varname>
|
||||
<initializer>0</initializer>
|
||||
</fieldsynopsis>
|
||||
<fieldsynopsis>
|
||||
<modifier>const</modifier>
|
||||
<type>integer</type>
|
||||
<varname linkend="tokyotyrant.constants.RDBIT_DECIMAL">TokyoTyrant::RDBIT_DECIMAL</varname>
|
||||
<initializer>1</initializer>
|
||||
</fieldsynopsis>
|
||||
<fieldsynopsis>
|
||||
<modifier>const</modifier>
|
||||
<type>integer</type>
|
||||
<varname linkend="tokyotyrant.constants.RDBIT_OPT">TokyoTyrant::RDBIT_OPT</varname>
|
||||
<initializer>9998</initializer>
|
||||
</fieldsynopsis>
|
||||
<fieldsynopsis>
|
||||
<modifier>const</modifier>
|
||||
<type>integer</type>
|
||||
<varname linkend="tokyotyrant.constants.RDBIT_VOID">TokyoTyrant::RDBIT_VOID</varname>
|
||||
<initializer>9999</initializer>
|
||||
</fieldsynopsis>
|
||||
<fieldsynopsis>
|
||||
<modifier>const</modifier>
|
||||
<type>integer</type>
|
||||
<varname linkend="tokyotyrant.constants.RDBIT_KEEP">TokyoTyrant::RDBIT_KEEP</varname>
|
||||
<initializer>16777216</initializer>
|
||||
</fieldsynopsis>
|
||||
|
||||
<fieldsynopsis>
|
||||
<modifier>const</modifier>
|
||||
<type>integer</type>
|
||||
<varname linkend="tokyotyrant.constants.RDBQCFTS_PH">TokyoTyrant::RDBQCFTS_PH</varname>
|
||||
<initializer>15</initializer>
|
||||
</fieldsynopsis>
|
||||
|
||||
<fieldsynopsis>
|
||||
<modifier>const</modifier>
|
||||
<type>integer</type>
|
||||
<varname linkend="tokyotyrant.constants.RDBQCFTS_AND">TokyoTyrant::RDBQCFTS_AND</varname>
|
||||
<initializer>16</initializer>
|
||||
</fieldsynopsis>
|
||||
|
||||
<fieldsynopsis>
|
||||
<modifier>const</modifier>
|
||||
<type>integer</type>
|
||||
<varname linkend="tokyotyrant.constants.RDBQCFTS_OR">TokyoTyrant::RDBQCFTS_OR</varname>
|
||||
<initializer>17</initializer>
|
||||
</fieldsynopsis>
|
||||
|
||||
<fieldsynopsis>
|
||||
<modifier>const</modifier>
|
||||
<type>integer</type>
|
||||
<varname linkend="tokyotyrant.constants.RDBQCFTS_EX">TokyoTyrant::RDBQCFTS_EX</varname>
|
||||
<initializer>18</initializer>
|
||||
</fieldsynopsis>
|
||||
|
||||
<fieldsynopsis>
|
||||
<modifier>const</modifier>
|
||||
<type>integer</type>
|
||||
<varname linkend="tokyotyrant.constants.RDBXOLCK_REC">TokyoTyrant::RDBXO_LCKREC</varname>
|
||||
<initializer>1</initializer>
|
||||
</fieldsynopsis>
|
||||
|
||||
<fieldsynopsis>
|
||||
<modifier>const</modifier>
|
||||
<type>integer</type>
|
||||
<varname linkend="tokyotyrant.constants.RDBXOLCK_GLB">TokyoTyrant::RDBXOLCK_GLB</varname>
|
||||
<initializer>2</initializer>
|
||||
</fieldsynopsis>
|
||||
|
||||
<fieldsynopsis>
|
||||
<modifier>const</modifier>
|
||||
<type>integer</type>
|
||||
<varname linkend="tokyotyrant.constants.RDBREC_INT">TokyoTyrant::RDBREC_INT</varname>
|
||||
<initializer>1</initializer>
|
||||
</fieldsynopsis>
|
||||
|
||||
<fieldsynopsis>
|
||||
<modifier>const</modifier>
|
||||
<type>integer</type>
|
||||
<varname linkend="tokyotyrant.constants.RDBREC_DBL">TokyoTyrant::RDBREC_DBL</varname>
|
||||
<initializer>2</initializer>
|
||||
</fieldsynopsis>
|
||||
|
||||
<fieldsynopsis>
|
||||
<modifier>const</modifier>
|
||||
<type>integer</type>
|
||||
<varname linkend="tokyotyrant.constants.RDBMS_UNION">TokyoTyrant::RDBMS_UNION</varname>
|
||||
<initializer>0</initializer>
|
||||
</fieldsynopsis>
|
||||
|
||||
<fieldsynopsis>
|
||||
<modifier>const</modifier>
|
||||
<type>integer</type>
|
||||
<varname linkend="tokyotyrant.constants.RDBMS_ISECT">TokyoTyrant::RDBMS_ISECT</varname>
|
||||
<initializer>1</initializer>
|
||||
</fieldsynopsis>
|
||||
|
||||
<fieldsynopsis>
|
||||
<modifier>const</modifier>
|
||||
<type>integer</type>
|
||||
<varname linkend="tokyotyrant.constants.RDBMS_DIFF">TokyoTyrant::RDBMS_DIFF</varname>
|
||||
<initializer>2</initializer>
|
||||
</fieldsynopsis>
|
||||
|
||||
<classsynopsisinfo role="comment">Methods</classsynopsisinfo>
|
||||
<xi:include xpointer="xmlns(db=http://docbook.org/ns/docbook) xpointer(id('class.tokyotyrant')/db:refentry/db:refsect1[@role='description']/descendant::db:methodsynopsis[1])" />
|
||||
</classsynopsis>
|
||||
<!-- }}} -->
|
||||
|
||||
</section>
|
||||
|
||||
<!-- {{{ tokyotyrant constants -->
|
||||
<section xml:id="tokyotyrant.constants">
|
||||
&reftitle.constants;
|
||||
<section xml:id="tokyotyrant.constants.types">
|
||||
<title>TokyoTyrant Constants</title>
|
||||
<variablelist>
|
||||
|
||||
<varlistentry xml:id="tokyotyrant.constants.RDBDEF_PORT">
|
||||
<term><constant>TokyoTyrant::RDBDEF_PORT</constant></term>
|
||||
<listitem>
|
||||
<para>The default port of the Tokyo Tyrant database</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry xml:id="tokyotyrant.constants.RDBQC_STREQ">
|
||||
<term><constant>TokyoTyrant::RDBQC_STREQ</constant></term>
|
||||
<listitem>
|
||||
<para>string is equal to</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry xml:id="tokyotyrant.constants.RDBQC_STRINC">
|
||||
<term><constant>TokyoTyrant::RDBQC_STRINC</constant></term>
|
||||
<listitem>
|
||||
<para>string is included in</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry xml:id="tokyotyrant.constants.RDBQC_STRBW">
|
||||
<term><constant>TokyoTyrant::RDBQC_STRBW</constant></term>
|
||||
<listitem>
|
||||
<para>string begins with</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry xml:id="tokyotyrant.constants.RDBQC_STREW">
|
||||
<term><constant>TokyoTyrant::RDBQC_STREW</constant></term>
|
||||
<listitem>
|
||||
<para>string ends with</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry xml:id="tokyotyrant.constants.RDBQC_STRAND">
|
||||
<term><constant>TokyoTyrant::RDBQC_STRAND</constant></term>
|
||||
<listitem>
|
||||
<para>string includes all tokens in</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry xml:id="tokyotyrant.constants.RDBQC_STROR">
|
||||
<term><constant>TokyoTyrant::RDBQC_STROR</constant></term>
|
||||
<listitem>
|
||||
<para>string includes at least one token in</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry xml:id="tokyotyrant.constants.RDBQC_STROREQ">
|
||||
<term><constant>TokyoTyrant::RDBQC_STROREQ</constant></term>
|
||||
<listitem>
|
||||
<para>string is equal to at least one token in</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry xml:id="tokyotyrant.constants.RDBQC_STRRX">
|
||||
<term><constant>TokyoTyrant::RDBQC_STRRX</constant></term>
|
||||
<listitem>
|
||||
<para>string matches regular expressions of</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry xml:id="tokyotyrant.constants.RDBQC_NUMEQ">
|
||||
<term><constant>TokyoTyrant::RDBQC_NUMEQ</constant></term>
|
||||
<listitem>
|
||||
<para>number is equal to</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry xml:id="tokyotyrant.constants.RDBQC_NUMGT">
|
||||
<term><constant>TokyoTyrant::RDBQC_NUMGT</constant></term>
|
||||
<listitem>
|
||||
<para>number is greater than</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry xml:id="tokyotyrant.constants.RDBQC_NUMGE">
|
||||
<term><constant>TokyoTyrant::RDBQC_NUMGE</constant></term>
|
||||
<listitem>
|
||||
<para>number is greater than or equal to</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry xml:id="tokyotyrant.constants.RDBQC_NUMLT">
|
||||
<term><constant>TokyoTyrant::RDBQC_NUMLT</constant></term>
|
||||
<listitem>
|
||||
<para>number is less than</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry xml:id="tokyotyrant.constants.RDBQC_NUMLE">
|
||||
<term><constant>TokyoTyrant::RDBQC_NUMLE</constant></term>
|
||||
<listitem>
|
||||
<para>number is less than or equal to</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry xml:id="tokyotyrant.constants.RDBQC_NUMBT">
|
||||
<term><constant>TokyoTyrant::RDBQC_NUMBT</constant></term>
|
||||
<listitem>
|
||||
<para>number is between two tokens of</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry xml:id="tokyotyrant.constants.RDBQC_NUMOREQ">
|
||||
<term><constant>TokyoTyrant::RDBQC_NUMOREQ</constant></term>
|
||||
<listitem>
|
||||
<para>number is equal to at least one token in</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry xml:id="tokyotyrant.constants.RDBQC_NEGATE">
|
||||
<term><constant>TokyoTyrant::RDBQC_NEGATE</constant></term>
|
||||
<listitem>
|
||||
<para>negation flag</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry xml:id="tokyotyrant.constants.RDBQC_NOIDX">
|
||||
<term><constant>TokyoTyrant::RDBQC_NOIDX</constant></term>
|
||||
<listitem>
|
||||
<para>no index flag</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry xml:id="tokyotyrant.constants.RDBQO_STRASC">
|
||||
<term><constant>TokyoTyrant::RDBQO_STRASC</constant></term>
|
||||
<listitem>
|
||||
<para>string ascending</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry xml:id="tokyotyrant.constants.RDBQO_STRDESC">
|
||||
<term><constant>TokyoTyrant::RDBQO_STRDESC</constant></term>
|
||||
<listitem>
|
||||
<para>string descending</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry xml:id="tokyotyrant.constants.RDBQO_NUMASC">
|
||||
<term><constant>TokyoTyrant::RDBQO_NUMASC</constant></term>
|
||||
<listitem>
|
||||
<para>number ascending</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry xml:id="tokyotyrant.constants.RDBQO_NUMDESC">
|
||||
<term><constant>TokyoTyrant::RDBQO_NUMDESC</constant></term>
|
||||
<listitem>
|
||||
<para>number descending</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry xml:id="tokyotyrant.constants.RDBIT_LEXICAL">
|
||||
<term><constant>TokyoTyrant::RDBIT_LEXICAL</constant></term>
|
||||
<listitem>
|
||||
<para>lexical string</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry xml:id="tokyotyrant.constants.RDBIT_DECIMAL">
|
||||
<term><constant>TokyoTyrant::RDBIT_DECIMAL</constant></term>
|
||||
<listitem>
|
||||
<para>decimal string</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry xml:id="tokyotyrant.constants.RDBIT_OPT">
|
||||
<term><constant>TokyoTyrant::RDBIT_OPT</constant></term>
|
||||
<listitem>
|
||||
<para>optimize</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry xml:id="tokyotyrant.constants.RDBIT_VOID">
|
||||
<term><constant>TokyoTyrant::RDBIT_VOID</constant></term>
|
||||
<listitem>
|
||||
<para>void</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry xml:id="tokyotyrant.constants.RDBIT_KEEP">
|
||||
<term><constant>TokyoTyrant::RDBIT_KEEP</constant></term>
|
||||
<listitem>
|
||||
<para>keep existing index</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry xml:id="tokyotyrant.constants.RDBQCFTS_PH">
|
||||
<term><constant>TokyoTyrant::RDBQCFTS_PH</constant></term>
|
||||
<listitem>
|
||||
<para>full-text search with the phrase of (Tokyo Tyrant >= 1.1.29)</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry xml:id="tokyotyrant.constants.RDBQCFTS_AND">
|
||||
<term><constant>TokyoTyrant::RDBQCFTS_AND</constant></term>
|
||||
<listitem>
|
||||
<para>full-text search with all tokens in (Tokyo Tyrant >= 1.1.29)</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry xml:id="tokyotyrant.constants.RDBQCFTS_OR">
|
||||
<term><constant>TokyoTyrant::RDBQCFTS_OR</constant></term>
|
||||
<listitem>
|
||||
<para>full-text search with at least one token in (Tokyo Tyrant >= 1.1.29)</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry xml:id="tokyotyrant.constants.RDBQCFTS_EX">
|
||||
<term><constant>TokyoTyrant::RDBQCFTS_EX</constant></term>
|
||||
<listitem>
|
||||
<para>full-text search with the compound expression of (Tokyo Tyrant >= 1.1.29)</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry xml:id="tokyotyrant.constants.RDBMS_UNION">
|
||||
<term><constant>TokyoTyrant::RDBQCFTS_AND</constant></term>
|
||||
<listitem>
|
||||
<para>Metasearch union between records (Tokyo Tyrant >= 1.1.33)</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry xml:id="tokyotyrant.constants.RDBMS_ISECT">
|
||||
<term><constant>TokyoTyrant::RDBQCFTS_OR</constant></term>
|
||||
<listitem>
|
||||
<para>Metasearch intersection between records (Tokyo Tyrant >= 1.1.33)</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry xml:id="tokyotyrant.constants.RDBMS_DIFF">
|
||||
<term><constant>TokyoTyrant::RDBQCFTS_EX</constant></term>
|
||||
<listitem>
|
||||
<para>Metasearch difference between records (Tokyo Tyrant >= 1.1.33)</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry xml:id="tokyotyrant.constants.RDBXOLCK_REC">
|
||||
<term><constant>TokyoTyrant::RDBXOLCK_REC</constant></term>
|
||||
<listitem>
|
||||
<para>record locking</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry xml:id="tokyotyrant.constants.RDBXOLCK_GLB">
|
||||
<term><constant>TokyoTyrant::RDBXOLCK_GLB</constant></term>
|
||||
<listitem>
|
||||
<para>global locking</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry xml:id="tokyotyrant.constants.RDBREC_INT">
|
||||
<term><constant>TokyoTyrant::RDBREC_INT</constant></term>
|
||||
<listitem>
|
||||
<para>record type int</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry xml:id="tokyotyrant.constants.RDBREC_DBL">
|
||||
<term><constant>TokyoTyrant::RDBREC_DBL</constant></term>
|
||||
<listitem>
|
||||
<para>record type float (double)</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry xml:id="tokyotyrant.constants.TTE_SUCCESS">
|
||||
<term><constant>TokyoTyrant::TTE_SUCCESS</constant></term>
|
||||
<listitem>
|
||||
<para>success</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry xml:id="tokyotyrant.constants.TTE_INVALID">
|
||||
<term><constant>TokyoTyrant::TTE_INVALID</constant></term>
|
||||
<listitem>
|
||||
<para>invalid operation</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry xml:id="tokyotyrant.constants.TTE_NOHOST">
|
||||
<term><constant>TokyoTyrant::TTE_NOHOST</constant></term>
|
||||
<listitem>
|
||||
<para>host not found</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry xml:id="tokyotyrant.constants.TTE_REFUSED">
|
||||
<term><constant>TokyoTyrant::TTE_REFUSED</constant></term>
|
||||
<listitem>
|
||||
<para>connection refused</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry xml:id="tokyotyrant.constants.TTE_SEND">
|
||||
<term><constant>TokyoTyrant::TTE_SEND</constant></term>
|
||||
<listitem>
|
||||
<para>send error</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry xml:id="tokyotyrant.constants.TTE_RECV">
|
||||
<term><constant>TokyoTyrant::TTE_RECV</constant></term>
|
||||
<listitem>
|
||||
<para>recv error</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry xml:id="tokyotyrant.constants.TTE_KEEP">
|
||||
<term><constant>TokyoTyrant::TTE_KEEP</constant></term>
|
||||
<listitem>
|
||||
<para>record exist</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry xml:id="tokyotyrant.constants.TTE_NOREC">
|
||||
<term><constant>TokyoTyrant::TTE_NOREC</constant></term>
|
||||
<listitem>
|
||||
<para>no record found</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry xml:id="tokyotyrant.constants.TTE_MISC">
|
||||
<term><constant>TokyoTyrant::TTE_MISC</constant></term>
|
||||
<listitem>
|
||||
<para>miscellaneous error</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
</variablelist>
|
||||
</section>
|
||||
</section>
|
||||
<!-- }}} -->
|
||||
|
||||
|
||||
</partintro>
|
||||
|
||||
&reference.tokyo-tyrant.entities.tokyotyrant;
|
||||
|
||||
</phpdoc:classref>
|
||||
|
||||
<!-- 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:"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
|
||||
-->
|
125
reference/tokyo_tyrant/tokyotyrant/add.xml
Normal file
125
reference/tokyo_tyrant/tokyotyrant/add.xml
Normal file
|
@ -0,0 +1,125 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- $Revision: $ -->
|
||||
|
||||
<refentry xml:id="tokyotyrant.add" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
<refnamediv>
|
||||
<refname>TokyoTyrant::add</refname>
|
||||
<refpurpose>Adds to a numeric key</refpurpose>
|
||||
</refnamediv>
|
||||
|
||||
<refsect1 role="description">
|
||||
&reftitle.description;
|
||||
<methodsynopsis>
|
||||
<modifier>public</modifier> <type>int</type><methodname>TokyoTyrant::add</methodname>
|
||||
<methodparam><type>string</type><parameter>key</parameter></methodparam>
|
||||
<methodparam><type>mixed</type><parameter>increment</parameter></methodparam>
|
||||
<methodparam choice="opt"><type>string</type><parameter>type</parameter></methodparam>
|
||||
</methodsynopsis>
|
||||
<para>
|
||||
Adds to a int or double value. This increments the value by the given amount
|
||||
and returns the new value. If the key does not exist a new key is created with
|
||||
initial value of the increment parameter.
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="parameters">
|
||||
&reftitle.parameters;
|
||||
<para>
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term><parameter>key</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
The string key
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>increment</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
The amount to increment
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>type</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
<constant>TokyoTyrant::RDB_RECINT</constant> or <constant>TokyoTyrant::RDB_RECDBL</constant> constant.
|
||||
If this parameter is omitted the type is guessed from the <parameter>increment</parameter>
|
||||
parameters type.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="returnvalues">
|
||||
&reftitle.returnvalues;
|
||||
<para>
|
||||
Returns the new value on success
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="examples">
|
||||
&reftitle.examples;
|
||||
<para>
|
||||
<example>
|
||||
<title><methodname>TokyoTyrant::add</methodname> example</title>
|
||||
<programlisting role="php">
|
||||
<![CDATA[
|
||||
<?php
|
||||
$tt = new TokyoTyrant("localhost", TokyoTyrant::RDBDEF_PORT);
|
||||
/* Adds integer 3 to key and creates a new key */
|
||||
$tt->add("test", 3);
|
||||
|
||||
/* String value is converted to double */
|
||||
echo $tt->add("test", "3.5", TokyoTyrant::RDB_RECDBL);
|
||||
?>
|
||||
]]>
|
||||
</programlisting>
|
||||
&example.outputs.similar;
|
||||
<screen>
|
||||
<![CDATA[
|
||||
6.5
|
||||
]]>
|
||||
</screen>
|
||||
</example>
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="seealso">
|
||||
&reftitle.seealso;
|
||||
<para>
|
||||
<simplelist>
|
||||
<member><methodname>TokyoTyrant::put</methodname></member>
|
||||
<member><methodname>TokyoTyrant::putcat</methodname></member>
|
||||
<member><methodname>TokyoTyrant::putkeep</methodname></member>
|
||||
</simplelist>
|
||||
</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
|
||||
indent-tabs-mode:nil
|
||||
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
|
||||
-->
|
109
reference/tokyo_tyrant/tokyotyrant/connect.xml
Normal file
109
reference/tokyo_tyrant/tokyotyrant/connect.xml
Normal file
|
@ -0,0 +1,109 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- $Revision: $ -->
|
||||
|
||||
<refentry xml:id="tokyotyrant.connect" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
<refnamediv>
|
||||
<refname>TokyoTyrant::connect</refname>
|
||||
<refpurpose>Connect to a database</refpurpose>
|
||||
</refnamediv>
|
||||
|
||||
<refsect1 role="description">
|
||||
&reftitle.description;
|
||||
<methodsynopsis>
|
||||
<modifier>public</modifier> <type>TokyoTyrant</type><methodname>TokyoTyrant::connect</methodname>
|
||||
<methodparam><type>string</type><parameter>host</parameter></methodparam>
|
||||
<methodparam choice="opt"><type>int</type><parameter>port</parameter></methodparam>
|
||||
<methodparam choice="opt"><type>bool</type><parameter>persistent</parameter></methodparam>
|
||||
</methodsynopsis>
|
||||
<para>
|
||||
Connects to a remote database
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="parameters">
|
||||
&reftitle.parameters;
|
||||
<para>
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term><parameter>host</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
The hostname
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>port</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
The port. Default: 1978
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>persistent</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Whether to create a persistent connection. Default: &true;
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="returnvalues">
|
||||
&reftitle.returnvalues;
|
||||
<para>
|
||||
This method returns the current object and throws TokyoTyrantException on failure.
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="examples">
|
||||
&reftitle.examples;
|
||||
<para>
|
||||
<example>
|
||||
<title><methodname>TokyoTyrant::connect</methodname> example</title>
|
||||
<programlisting role="php">
|
||||
<![CDATA[
|
||||
<?php
|
||||
$tt = new TokyoTyrant();
|
||||
$tt->connect("localhost", TokyoTyrant::RDBDEF_PORT)->put("test", "value");
|
||||
?>
|
||||
]]>
|
||||
</programlisting>
|
||||
</example>
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="seealso">
|
||||
&reftitle.seealso;
|
||||
<para>
|
||||
<simplelist>
|
||||
<member><methodname>TokyoTyrant::connectUri</methodname></member>
|
||||
</simplelist>
|
||||
</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
|
||||
indent-tabs-mode:nil
|
||||
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
|
||||
-->
|
91
reference/tokyo_tyrant/tokyotyrant/connecturi.xml
Normal file
91
reference/tokyo_tyrant/tokyotyrant/connecturi.xml
Normal file
|
@ -0,0 +1,91 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- $Revision: $ -->
|
||||
|
||||
<refentry xml:id="tokyotyrant.connecturi" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
<refnamediv>
|
||||
<refname>TokyoTyrant::connectUri</refname>
|
||||
<refpurpose>Connects to a database</refpurpose>
|
||||
</refnamediv>
|
||||
|
||||
<refsect1 role="description">
|
||||
&reftitle.description;
|
||||
<methodsynopsis>
|
||||
<modifier>public</modifier> <type>TokyoTyrant</type><methodname>TokyoTyrant::connectUri</methodname>
|
||||
<methodparam><type>string</type><parameter>uri</parameter></methodparam>
|
||||
</methodsynopsis>
|
||||
<para>
|
||||
Connects to a database using an uri
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="parameters">
|
||||
&reftitle.parameters;
|
||||
<para>
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term><parameter>uri</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
An URI to the database. For example <literal>tcp://localhost:1979/</literal>
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="returnvalues">
|
||||
&reftitle.returnvalues;
|
||||
<para>
|
||||
This method returns the current object and throws TokyoTyrantException on failure.
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="examples">
|
||||
&reftitle.examples;
|
||||
<para>
|
||||
<example>
|
||||
<title><methodname>TokyoTyrant::connectUri</methodname> example</title>
|
||||
<programlisting role="php">
|
||||
<![CDATA[
|
||||
<?php
|
||||
$tt = new TokyoTyrant();
|
||||
$tt->connectUri("tcp://localhost:1978/")->put("test", "hi");
|
||||
?>
|
||||
]]>
|
||||
</programlisting>
|
||||
</example>
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="seealso">
|
||||
&reftitle.seealso;
|
||||
<para>
|
||||
<simplelist>
|
||||
<member><methodname>Classname::Method</methodname></member>
|
||||
</simplelist>
|
||||
</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
|
||||
indent-tabs-mode:nil
|
||||
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
|
||||
-->
|
93
reference/tokyo_tyrant/tokyotyrant/construct.xml
Normal file
93
reference/tokyo_tyrant/tokyotyrant/construct.xml
Normal file
|
@ -0,0 +1,93 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- $Revision: $ -->
|
||||
|
||||
<refentry xml:id="tokyotyrant.__construct" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
<refnamediv>
|
||||
<refname>TokyoTyrant::__construct</refname>
|
||||
<refpurpose>Construct a new TokyoTyrant object</refpurpose>
|
||||
</refnamediv>
|
||||
|
||||
<refsect1 role="description">
|
||||
&reftitle.description;
|
||||
<methodsynopsis>
|
||||
<methodname>TokyoTyrant::__construct</methodname>
|
||||
<methodparam choice="opt"><type>string</type><parameter>host</parameter></methodparam>
|
||||
<methodparam choice="opt"><type>string</type><parameter>port</parameter></methodparam>
|
||||
<methodparam choice="opt"><type>string</type><parameter>persistent</parameter></methodparam>
|
||||
</methodsynopsis>
|
||||
<para>
|
||||
Constructs a new TokyoTyrant object and optionally connects to the database
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="parameters">
|
||||
&reftitle.parameters;
|
||||
<para>
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term><parameter>host</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
The hostname. Default: &null;
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>port</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
The hostname. Default: 1978
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>persistent</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Whether to create a persistent connection. Default: &true;
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="returnvalues">
|
||||
&reftitle.returnvalues;
|
||||
<para>
|
||||
Throws TokyoTyrantException if connection to database fails
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="seealso">
|
||||
&reftitle.seealso;
|
||||
<para>
|
||||
<simplelist>
|
||||
<member><methodname>TokyoTyrant::connect</methodname></member>
|
||||
<member><methodname>TokyoTyrant::connectUri</methodname></member>
|
||||
</simplelist>
|
||||
</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
|
||||
indent-tabs-mode:nil
|
||||
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
|
||||
-->
|
92
reference/tokyo_tyrant/tokyotyrant/copy.xml
Normal file
92
reference/tokyo_tyrant/tokyotyrant/copy.xml
Normal file
|
@ -0,0 +1,92 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- $Revision: $ -->
|
||||
|
||||
<refentry xml:id="tokyotyrant.copy" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
<refnamediv>
|
||||
<refname>TokyoTyrant::copy</refname>
|
||||
<refpurpose>Copies the database</refpurpose>
|
||||
</refnamediv>
|
||||
|
||||
<refsect1 role="description">
|
||||
&reftitle.description;
|
||||
<methodsynopsis>
|
||||
<modifier>public</modifier> <type>TokyoTyrant</type><methodname>TokyoTyrant::copy</methodname>
|
||||
<methodparam><type>string</type><parameter>path</parameter></methodparam>
|
||||
</methodsynopsis>
|
||||
<para>
|
||||
Makes a copy of the current database
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="parameters">
|
||||
&reftitle.parameters;
|
||||
<para>
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term><parameter>path</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Path to where to copy the database. The user running the remote
|
||||
database must have a write access to the directory.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="returnvalues">
|
||||
&reftitle.returnvalues;
|
||||
<para>
|
||||
This method returns the current object and throws TokyoTyrantException on failure.
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="examples">
|
||||
&reftitle.examples;
|
||||
<para>
|
||||
<example>
|
||||
<title><methodname>TokyoTyrant::copy</methodname> example</title>
|
||||
<programlisting role="php">
|
||||
<![CDATA[
|
||||
<?php
|
||||
$tt = new TokyoTyrant("localhost", 1978);
|
||||
$tt->copy("/tmp/foobar.tct");
|
||||
?>
|
||||
]]>
|
||||
</programlisting>
|
||||
</example>
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="seealso">
|
||||
&reftitle.seealso;
|
||||
<para>
|
||||
<simplelist>
|
||||
<member><methodname>TokyoTyrant::restore</methodname></member>
|
||||
</simplelist>
|
||||
</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
|
||||
indent-tabs-mode:nil
|
||||
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
|
||||
-->
|
109
reference/tokyo_tyrant/tokyotyrant/ext.xml
Normal file
109
reference/tokyo_tyrant/tokyotyrant/ext.xml
Normal file
|
@ -0,0 +1,109 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- $Revision: $ -->
|
||||
|
||||
<refentry xml:id="tokyotyrant.ext" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
<refnamediv>
|
||||
<refname>TokyoTyrant::ext</refname>
|
||||
<refpurpose>Execute a remote script</refpurpose>
|
||||
</refnamediv>
|
||||
|
||||
<refsect1 role="description">
|
||||
&reftitle.description;
|
||||
<methodsynopsis>
|
||||
<modifier>public</modifier> <type>string</type><methodname>TokyoTyrant::ext</methodname>
|
||||
<methodparam><type>string</type><parameter>name</parameter></methodparam>
|
||||
<methodparam><type>int</type><parameter>options</parameter></methodparam>
|
||||
<methodparam><type>string</type><parameter>key</parameter></methodparam>
|
||||
<methodparam><type>string</type><parameter>value</parameter></methodparam>
|
||||
</methodsynopsis>
|
||||
<para>
|
||||
Executes a remote script extension.
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="parameters">
|
||||
&reftitle.parameters;
|
||||
<para>
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term><parameter>name</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Name of the function to execute
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>options</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Either <constant>TokyoTyrant::RDBXO_LCKREC</constant> for record locking and
|
||||
<constant>TokyoTyrant::RDBXO_LCKGLB</constant> for global locking.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>key</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
The key to pass to the function
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>value</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
The value to pass to the function
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="returnvalues">
|
||||
&reftitle.returnvalues;
|
||||
<para>
|
||||
Returns the result of the script function
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="examples">
|
||||
&reftitle.examples;
|
||||
<para>
|
||||
<example>
|
||||
<title><methodname>TokyoTyrant::ext</methodname> example</title>
|
||||
<programlisting role="php">
|
||||
<![CDATA[
|
||||
<?php
|
||||
$tt = new TokyoTyrant("localhost", 1978);
|
||||
echo $tt->ext("somefunc", TokyoTyrant::RDBXO_LCKREC, "some_key", "some_value");
|
||||
?>
|
||||
]]>
|
||||
</programlisting>
|
||||
</example>
|
||||
</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
|
||||
indent-tabs-mode:nil
|
||||
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
|
||||
-->
|
121
reference/tokyo_tyrant/tokyotyrant/fwmkeys.xml
Normal file
121
reference/tokyo_tyrant/tokyotyrant/fwmkeys.xml
Normal file
|
@ -0,0 +1,121 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- $Revision: $ -->
|
||||
|
||||
<refentry xml:id="tokyotyrant.fwmkeys" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
<refnamediv>
|
||||
<refname>TokyoTyrant::fwmKeys</refname>
|
||||
<refpurpose>Returns the forward matching keys</refpurpose>
|
||||
</refnamediv>
|
||||
|
||||
<refsect1 role="description">
|
||||
&reftitle.description;
|
||||
<methodsynopsis>
|
||||
<modifier>public</modifier> <type>array</type><methodname>TokyoTyrant::fwmKeys</methodname>
|
||||
<methodparam><type>string</type><parameter>prefix</parameter></methodparam>
|
||||
<methodparam><type>int</type><parameter>max_recs</parameter></methodparam>
|
||||
</methodsynopsis>
|
||||
<para>
|
||||
Returns the forward matching keys from the database
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="parameters">
|
||||
&reftitle.parameters;
|
||||
<para>
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term><parameter>prefix</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Prefix of the keys
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>max_recs</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Maximum records to return
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="returnvalues">
|
||||
&reftitle.returnvalues;
|
||||
<para>
|
||||
Returns an array of matching keys. The values are not returned
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="examples">
|
||||
&reftitle.examples;
|
||||
<para>
|
||||
<example>
|
||||
<title><methodname>TokyoTyrant::fwmKeys</methodname> example</title>
|
||||
<programlisting role="php">
|
||||
<![CDATA[
|
||||
<?php
|
||||
|
||||
$tt = new TokyoTyrant("localhost");
|
||||
|
||||
/* Create 20 macthing keys */
|
||||
for ($i = 0; $i < 20; $i++) {
|
||||
$tt->put("key_" . $i, "value_" . $i);
|
||||
}
|
||||
|
||||
/* Create 20 non-macthing keys */
|
||||
for ($i = 0; $i < 20; $i++) {
|
||||
$tt->put("something_" . $i, "data_" . $i);
|
||||
}
|
||||
|
||||
/* Get five matching keys */
|
||||
var_dump($tt->fwmKeys("key_", 5));
|
||||
?>
|
||||
]]>
|
||||
</programlisting>
|
||||
&example.outputs.similar;
|
||||
<screen>
|
||||
<![CDATA[
|
||||
array(5) {
|
||||
[0]=>
|
||||
string(5) "key_5"
|
||||
[1]=>
|
||||
string(6) "key_14"
|
||||
[2]=>
|
||||
string(5) "key_6"
|
||||
[3]=>
|
||||
string(6) "key_15"
|
||||
[4]=>
|
||||
string(5) "key_7"
|
||||
}
|
||||
]]>
|
||||
</screen>
|
||||
</example>
|
||||
</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
|
||||
indent-tabs-mode:nil
|
||||
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
|
||||
-->
|
110
reference/tokyo_tyrant/tokyotyrant/get.xml
Normal file
110
reference/tokyo_tyrant/tokyotyrant/get.xml
Normal file
|
@ -0,0 +1,110 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- $Revision: $ -->
|
||||
|
||||
<refentry xml:id="tokyotyrant.get" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
<refnamediv>
|
||||
<refname>TokyoTyrant::get</refname>
|
||||
<refpurpose>The get purpose</refpurpose>
|
||||
</refnamediv>
|
||||
|
||||
<refsect1 role="description">
|
||||
&reftitle.description;
|
||||
<methodsynopsis>
|
||||
<modifier>public</modifier> <type>mixed</type><methodname>TokyoTyrant::get</methodname>
|
||||
<methodparam><type>mixed</type><parameter>keys</parameter></methodparam>
|
||||
</methodsynopsis>
|
||||
<para>
|
||||
This method is used to return a value or multiple values. This method accepts a <type>string</type>
|
||||
or an <type>array</type> as a value.
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="parameters">
|
||||
&reftitle.parameters;
|
||||
<para>
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term><parameter>keys</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
A <type>string</type> key or an <type>array</type> of <type>string</type> keys
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="returnvalues">
|
||||
&reftitle.returnvalues;
|
||||
<para>
|
||||
Returns a string or an array based on the given parameters. Throws a TokyoTyrantException
|
||||
on error. If string is passed null is returned if the key is not found. In case an array
|
||||
is given as an parameter only existing keys will be returned. It is not an error to pass
|
||||
a key that does not exist.
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="examples">
|
||||
&reftitle.examples;
|
||||
<para>
|
||||
<example>
|
||||
<title><methodname>TokyoTyrant::get</methodname> example</title>
|
||||
<programlisting role="php">
|
||||
<![CDATA[
|
||||
<?php
|
||||
$tt = new TokyoTyrant("localhost", 1978);
|
||||
$tt->put("key1", "value1");
|
||||
$tt->put("key2", "value2");
|
||||
var_dump($tt->get(array("key1", "key2")));
|
||||
var_dump($tt->get("key1"));
|
||||
?>
|
||||
]]>
|
||||
</programlisting>
|
||||
&example.outputs;
|
||||
<screen>
|
||||
<![CDATA[
|
||||
array(2) {
|
||||
["key1"]=>
|
||||
string(6) "value1"
|
||||
["key2"]=>
|
||||
string(6) "value2"
|
||||
}
|
||||
string(6) "value1"
|
||||
]]>
|
||||
</screen>
|
||||
</example>
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="seealso">
|
||||
&reftitle.seealso;
|
||||
<para>
|
||||
<simplelist>
|
||||
<member><methodname>TokyoTyrant::put</methodname></member>
|
||||
</simplelist>
|
||||
</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
|
||||
indent-tabs-mode:nil
|
||||
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
|
||||
-->
|
89
reference/tokyo_tyrant/tokyotyrant/num.xml
Normal file
89
reference/tokyo_tyrant/tokyotyrant/num.xml
Normal file
|
@ -0,0 +1,89 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- $Revision: $ -->
|
||||
|
||||
<refentry xml:id="tokyotyrant.num" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
<refnamediv>
|
||||
<refname>TokyoTyrant::num</refname>
|
||||
<refpurpose>Number of records in the database</refpurpose>
|
||||
</refnamediv>
|
||||
|
||||
<refsect1 role="description">
|
||||
&reftitle.description;
|
||||
<methodsynopsis>
|
||||
<modifier>public</modifier> <type>int</type><methodname>TokyoTyrant::num</methodname>
|
||||
<void />
|
||||
</methodsynopsis>
|
||||
<para>
|
||||
Returns the number of records in the database
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="parameters">
|
||||
&reftitle.parameters;
|
||||
&no.function.parameters;
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="returnvalues">
|
||||
&reftitle.returnvalues;
|
||||
<para>
|
||||
Returns number of records in the database
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="examples">
|
||||
&reftitle.examples;
|
||||
<para>
|
||||
<example>
|
||||
<title><methodname>TokyoTyrant::num</methodname> example</title>
|
||||
<programlisting role="php">
|
||||
<![CDATA[
|
||||
<?php
|
||||
/* Connect to a database on default port */
|
||||
$tt = new TokyoTyrant("localhost");
|
||||
|
||||
/* Echo the number of records */
|
||||
echo $tt->num();
|
||||
?>
|
||||
]]>
|
||||
</programlisting>
|
||||
&example.outputs.similar;
|
||||
<screen>
|
||||
<![CDATA[
|
||||
1234
|
||||
]]>
|
||||
</screen>
|
||||
</example>
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="seealso">
|
||||
&reftitle.seealso;
|
||||
<para>
|
||||
<simplelist>
|
||||
<member><methodname>TokyoTyrant::stat</methodname></member>
|
||||
</simplelist>
|
||||
</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
|
||||
indent-tabs-mode:nil
|
||||
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
|
||||
-->
|
97
reference/tokyo_tyrant/tokyotyrant/out.xml
Normal file
97
reference/tokyo_tyrant/tokyotyrant/out.xml
Normal file
|
@ -0,0 +1,97 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- $Revision: $ -->
|
||||
|
||||
<refentry xml:id="tokyotyrant.out" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
<refnamediv>
|
||||
<refname>TokyoTyrant::out</refname>
|
||||
<refpurpose>Removes records</refpurpose>
|
||||
</refnamediv>
|
||||
|
||||
<refsect1 role="description">
|
||||
&reftitle.description;
|
||||
<methodsynopsis>
|
||||
<modifier>public</modifier> <type>TokyoTyrant</type><methodname>TokyoTyrant::out</methodname>
|
||||
<methodparam><type>mixed</type><parameter>keys</parameter></methodparam>
|
||||
</methodsynopsis>
|
||||
<para>
|
||||
Removes a record or multiple records. This method accepts a <type>string</type> for a single key
|
||||
or an array of keys for multiple records.
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="parameters">
|
||||
&reftitle.parameters;
|
||||
<para>
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term><parameter>keys</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
A <type>string</type> key or an <type>array</type> of <type>string</type> keys
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="returnvalues">
|
||||
&reftitle.returnvalues;
|
||||
<para>
|
||||
This method returns the current object and throws TokyoTyrantException on failure.
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="examples">
|
||||
&reftitle.examples;
|
||||
<para>
|
||||
<example>
|
||||
<title><methodname>TokyoTyrant::out</methodname> example</title>
|
||||
<programlisting role="php">
|
||||
<![CDATA[
|
||||
<?php
|
||||
/* Connect to a database on default port */
|
||||
$tt = new TokyoTyrant("localhost");
|
||||
|
||||
$tt->put("test1", "value1");
|
||||
$tt->put("test2", "value2");
|
||||
|
||||
$tt->out(array("test1", "test2"));
|
||||
?>
|
||||
]]>
|
||||
</programlisting>
|
||||
</example>
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="seealso">
|
||||
&reftitle.seealso;
|
||||
<para>
|
||||
<simplelist>
|
||||
<member><methodname>TokyoTyrant::put</methodname></member>
|
||||
</simplelist>
|
||||
</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
|
||||
indent-tabs-mode:nil
|
||||
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
|
||||
-->
|
119
reference/tokyo_tyrant/tokyotyrant/put.xml
Normal file
119
reference/tokyo_tyrant/tokyotyrant/put.xml
Normal file
|
@ -0,0 +1,119 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- $Revision: $ -->
|
||||
|
||||
<refentry xml:id="tokyotyrant.put" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
<refnamediv>
|
||||
<refname>TokyoTyrant::put</refname>
|
||||
<refpurpose>Puts values</refpurpose>
|
||||
</refnamediv>
|
||||
|
||||
<refsect1 role="description">
|
||||
&reftitle.description;
|
||||
<methodsynopsis>
|
||||
<modifier>public</modifier> <type>TokyoTyrant</type><methodname>TokyoTyrant::put</methodname>
|
||||
<methodparam><type>mixed</type><parameter>keys</parameter></methodparam>
|
||||
<methodparam choice="opt"><type>string</type><parameter>value</parameter></methodparam>
|
||||
</methodsynopsis>
|
||||
<para>
|
||||
Puts a key-value pair into the database or multiple key-value pairs. If <parameter>keys</parameter> is
|
||||
string then the second parameter value defines the value.
|
||||
The second parameter is mandatory if <parameter>keys</parameter> is a string. If the key exists the value
|
||||
will be replaced with new value.
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="parameters">
|
||||
&reftitle.parameters;
|
||||
<para>
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term><parameter>keys</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
A string key or an array of key-value pairs
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>value</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
The value in case a string key is used
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="returnvalues">
|
||||
&reftitle.returnvalues;
|
||||
<para>
|
||||
This method returns a reference to the current object and throws TokyoTyrantException on failure.
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="examples">
|
||||
&reftitle.examples;
|
||||
<para>
|
||||
<example>
|
||||
<title><methodname>TokyoTyrant::put</methodname> example</title>
|
||||
<programlisting role="php">
|
||||
<![CDATA[
|
||||
<?php
|
||||
/* Connect to a database on default port */
|
||||
$tt = new TokyoTyrant("localhost");
|
||||
|
||||
/* Put single key-value pair */
|
||||
$tt->put("key", "value");
|
||||
|
||||
/* Put key-value pairs, new value overwrites the old */
|
||||
$tt->put(array("key1" => "value1", "key" => "value2"));
|
||||
|
||||
/* Get back one key */
|
||||
echo $tt->get("key");
|
||||
?>
|
||||
]]>
|
||||
</programlisting>
|
||||
&example.outputs;
|
||||
<screen>
|
||||
<![CDATA[
|
||||
value2
|
||||
]]>
|
||||
</screen>
|
||||
</example>
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="seealso">
|
||||
&reftitle.seealso;
|
||||
<para>
|
||||
<simplelist>
|
||||
<member><methodname>TokyoTyrant::putKeep</methodname></member>
|
||||
<member><methodname>TokyoTyrant::putCat</methodname></member>
|
||||
</simplelist>
|
||||
</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
|
||||
indent-tabs-mode:nil
|
||||
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
|
||||
-->
|
118
reference/tokyo_tyrant/tokyotyrant/putcat.xml
Normal file
118
reference/tokyo_tyrant/tokyotyrant/putcat.xml
Normal file
|
@ -0,0 +1,118 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- $Revision: $ -->
|
||||
|
||||
<refentry xml:id="tokyotyrant.putcat" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
<refnamediv>
|
||||
<refname>TokyoTyrant::putCat</refname>
|
||||
<refpurpose>Concatenates to a record</refpurpose>
|
||||
</refnamediv>
|
||||
|
||||
<refsect1 role="description">
|
||||
&reftitle.description;
|
||||
<methodsynopsis>
|
||||
<modifier>public</modifier> <type>TokyoTyrant</type><methodname>TokyoTyrant::putCat</methodname>
|
||||
<methodparam><type>mixed</type><parameter>keys</parameter></methodparam>
|
||||
<methodparam choice="opt"><type>string</type><parameter>value</parameter></methodparam>
|
||||
</methodsynopsis>
|
||||
<para>
|
||||
Appends a value into existing key or multiple values if <parameter>keys</parameter> is an array.
|
||||
The second parameter is mandatory if <parameter>keys</parameter> is a string. If the record does
|
||||
not exist a new record is created.
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="parameters">
|
||||
&reftitle.parameters;
|
||||
<para>
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term><parameter>keys</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
A <type>string</type> key or an <type>array</type> of key-value pairs
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>value</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
The value in case a string key is used
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="returnvalues">
|
||||
&reftitle.returnvalues;
|
||||
<para>
|
||||
This method returns a reference to the current object and throws TokyoTyrantException on failure.
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="examples">
|
||||
&reftitle.examples;
|
||||
<para>
|
||||
<example>
|
||||
<title><methodname>TokyoTyrant::putCat</methodname> example</title>
|
||||
<programlisting role="php">
|
||||
<![CDATA[
|
||||
<?php
|
||||
/* Connect to a database on default port */
|
||||
$tt = new TokyoTyrant("localhost");
|
||||
|
||||
/* Create a new key */
|
||||
$tt->put("key", "value");
|
||||
|
||||
/* Concatenate single key-value pair */
|
||||
$tt->putCat("key", " has more data");
|
||||
|
||||
/* Echo the key */
|
||||
echo $tt->get("key");
|
||||
?>
|
||||
]]>
|
||||
</programlisting>
|
||||
&example.outputs;
|
||||
<screen>
|
||||
<![CDATA[
|
||||
value has more data
|
||||
]]>
|
||||
</screen>
|
||||
</example>
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="seealso">
|
||||
&reftitle.seealso;
|
||||
<para>
|
||||
<simplelist>
|
||||
<member><methodname>TokyoTyrant::put</methodname></member>
|
||||
<member><methodname>TokyoTyrant::putKeep</methodname></member>
|
||||
</simplelist>
|
||||
</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
|
||||
indent-tabs-mode:nil
|
||||
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
|
||||
-->
|
125
reference/tokyo_tyrant/tokyotyrant/putkeep.xml
Normal file
125
reference/tokyo_tyrant/tokyotyrant/putkeep.xml
Normal file
|
@ -0,0 +1,125 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- $Revision: $ -->
|
||||
|
||||
<refentry xml:id="tokyotyrant.putkeep" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
<refnamediv>
|
||||
<refname>TokyoTyrant::putKeep</refname>
|
||||
<refpurpose>Puts a record</refpurpose>
|
||||
</refnamediv>
|
||||
|
||||
<refsect1 role="description">
|
||||
&reftitle.description;
|
||||
<methodsynopsis>
|
||||
<modifier>public</modifier> <type>TokyoTyrant</type><methodname>TokyoTyrant::putKeep</methodname>
|
||||
<methodparam><type>mixed</type><parameter>keys</parameter></methodparam>
|
||||
<methodparam choice="opt"><type>string</type><parameter>value</parameter></methodparam>
|
||||
</methodsynopsis>
|
||||
<para>
|
||||
Puts a key-value pair into the database or multiple key-value pairs. If <parameter>keys</parameter> is
|
||||
string then the second parameter value defines the value.
|
||||
The second parameter is mandatory if <parameter>keys</parameter> is a string. If the key already
|
||||
exists this method throws an exception indicating that the records exists.
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="parameters">
|
||||
&reftitle.parameters;
|
||||
<para>
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term><parameter>keys</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
A <type>string</type> key or an <type>array</type> of key-value pairs
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>value</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
The <type>string</type> value
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="returnvalues">
|
||||
&reftitle.returnvalues;
|
||||
<para>
|
||||
This method returns a reference to the current object and throws TokyoTyrantException on failure.
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="examples">
|
||||
&reftitle.examples;
|
||||
<para>
|
||||
<example>
|
||||
<title><methodname>tokyotyrant::putKeep</methodname> example</title>
|
||||
<programlisting role="php">
|
||||
<![CDATA[
|
||||
<?php
|
||||
/* Connect to a database on default port */
|
||||
$tt = new TokyoTyrant("localhost");
|
||||
|
||||
/* Create a new key */
|
||||
$tt->put("key", "value");
|
||||
|
||||
try {
|
||||
$tt->putKeep("key", "new value");
|
||||
} catch (TokyoTyrantException $e) {
|
||||
if ($e->getCode() === TokyoTyrant::TTE_KEEP) {
|
||||
echo "Existing record! Not modified\n";
|
||||
} else {
|
||||
echo "Error: " , $e->getMessage() , "\n";
|
||||
}
|
||||
}
|
||||
echo $tt->get("key");
|
||||
?>
|
||||
]]>
|
||||
</programlisting>
|
||||
&example.outputs;
|
||||
<screen>
|
||||
<![CDATA[
|
||||
Existing record! Not modified
|
||||
value
|
||||
]]>
|
||||
</screen>
|
||||
</example>
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="seealso">
|
||||
&reftitle.seealso;
|
||||
<para>
|
||||
<simplelist>
|
||||
<member><methodname>TokyoTyrant::put</methodname></member>
|
||||
<member><methodname>TokyoTyrant::putCat</methodname></member>
|
||||
</simplelist>
|
||||
</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
|
||||
indent-tabs-mode:nil
|
||||
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
|
||||
-->
|
120
reference/tokyo_tyrant/tokyotyrant/putnr.xml
Normal file
120
reference/tokyo_tyrant/tokyotyrant/putnr.xml
Normal file
|
@ -0,0 +1,120 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- $Revision: $ -->
|
||||
|
||||
<refentry xml:id="tokyotyrant.putnr" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
<refnamediv>
|
||||
<refname>TokyoTyrant::putNr</refname>
|
||||
<refpurpose>Puts value</refpurpose>
|
||||
</refnamediv>
|
||||
|
||||
<refsect1 role="description">
|
||||
&reftitle.description;
|
||||
<methodsynopsis>
|
||||
<modifier>public</modifier> <type>TokyoTyrant</type><methodname>TokyoTyrant::putNr</methodname>
|
||||
<methodparam><type>mixed</type><parameter>keys</parameter></methodparam>
|
||||
<methodparam choice="opt"><type>string</type><parameter>value</parameter></methodparam>
|
||||
</methodsynopsis>
|
||||
<para>
|
||||
Puts a key-value pair into the database or multiple key-value pairs. If <parameter>keys</parameter> is
|
||||
string then the second parameter value defines the value.
|
||||
The second parameter is mandatory if <parameter>keys</parameter> is a string. This method does not wait
|
||||
for the response from the server.
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="parameters">
|
||||
&reftitle.parameters;
|
||||
<para>
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term><parameter>keys</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
A string key or an array of key-value pairs
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>value</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
The value in case a string key is used
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="returnvalues">
|
||||
&reftitle.returnvalues;
|
||||
<para>
|
||||
This method returns a reference to the current object and throws TokyoTyrantException on failure.
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="examples">
|
||||
&reftitle.examples;
|
||||
<para>
|
||||
<example>
|
||||
<title><methodname>TokyoTyrant::putNr</methodname> example</title>
|
||||
<programlisting role="php">
|
||||
<![CDATA[
|
||||
<?php
|
||||
/* Connect to a database on default port */
|
||||
$tt = new TokyoTyrant("localhost");
|
||||
|
||||
/* Put single key-value pair */
|
||||
$tt->putNr("key", "value");
|
||||
|
||||
/* Put key-value pairs */
|
||||
$tt->putNr(array("key1" => "value1", "key2" => "value2"));
|
||||
|
||||
/* Get back one key */
|
||||
echo $tt->get("key1");
|
||||
?>
|
||||
]]>
|
||||
</programlisting>
|
||||
&example.outputs;
|
||||
<screen>
|
||||
<![CDATA[
|
||||
value1
|
||||
]]>
|
||||
</screen>
|
||||
</example>
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="seealso">
|
||||
&reftitle.seealso;
|
||||
<para>
|
||||
<simplelist>
|
||||
<member><methodname>TokyoTyrant::putNr</methodname></member>
|
||||
<member><methodname>TokyoTyrant::putKeep</methodname></member>
|
||||
<member><methodname>TokyoTyrant::putCat</methodname></member>
|
||||
</simplelist>
|
||||
</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
|
||||
indent-tabs-mode:nil
|
||||
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
|
||||
-->
|
126
reference/tokyo_tyrant/tokyotyrant/putshl.xml
Normal file
126
reference/tokyo_tyrant/tokyotyrant/putshl.xml
Normal file
|
@ -0,0 +1,126 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- $Revision: $ -->
|
||||
|
||||
<refentry xml:id="tokyotyrant.putshl" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
<refnamediv>
|
||||
<refname>TokyoTyrant::putShl</refname>
|
||||
<refpurpose>Concatenates to a record</refpurpose>
|
||||
</refnamediv>
|
||||
|
||||
<refsect1 role="description">
|
||||
&reftitle.description;
|
||||
<methodsynopsis>
|
||||
<modifier>public</modifier> <type>void</type><methodname>TokyoTyrant::putShl</methodname>
|
||||
<methodparam><type>string</type><parameter>key</parameter></methodparam>
|
||||
<methodparam><type>string</type><parameter>value</parameter></methodparam>
|
||||
<methodparam><type>int</type><parameter>width</parameter></methodparam>
|
||||
</methodsynopsis>
|
||||
<para>
|
||||
Concatenate to a record and shift to left.
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="parameters">
|
||||
&reftitle.parameters;
|
||||
<para>
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term><parameter>key</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
A string key
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>value</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
The value to concatenate
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>width</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
The width of the record
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="returnvalues">
|
||||
&reftitle.returnvalues;
|
||||
<para>
|
||||
This method returns a reference to the current object and throws TokyoTyrantException on failure.
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="examples">
|
||||
&reftitle.examples;
|
||||
<para>
|
||||
<example>
|
||||
<title><methodname>TokyoTyrant::putShl</methodname> example</title>
|
||||
<programlisting role="php">
|
||||
<![CDATA[
|
||||
<?php
|
||||
/* Connect to a database on default port */
|
||||
$tt = new TokyoTyrant("localhost");
|
||||
|
||||
/* Create a new key */
|
||||
$tt->put("key", "just a long piece of data");
|
||||
|
||||
/* Concatenate and shift to left */
|
||||
$tt->putShl("key", " and string", 15);
|
||||
|
||||
/* Echo the key */
|
||||
echo $tt->get("key");
|
||||
?>
|
||||
]]>
|
||||
</programlisting>
|
||||
&example.outputs;
|
||||
<screen>
|
||||
<![CDATA[
|
||||
data and string
|
||||
]]>
|
||||
</screen>
|
||||
</example>
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="seealso">
|
||||
&reftitle.seealso;
|
||||
<para>
|
||||
<simplelist>
|
||||
<member><methodname>TokyoTyrant::put</methodname></member>
|
||||
<member><methodname>TokyoTyrant::putKeep</methodname></member>
|
||||
<member><methodname>TokyoTyrant::putCat</methodname></member>
|
||||
</simplelist>
|
||||
</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
|
||||
indent-tabs-mode:nil
|
||||
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
|
||||
-->
|
87
reference/tokyo_tyrant/tokyotyrant/restore.xml
Normal file
87
reference/tokyo_tyrant/tokyotyrant/restore.xml
Normal file
|
@ -0,0 +1,87 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- $Revision: $ -->
|
||||
|
||||
<refentry xml:id="tokyotyrant.restore" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
<refnamediv>
|
||||
<refname>TokyoTyrant::restore</refname>
|
||||
<refpurpose>Restore the database</refpurpose>
|
||||
</refnamediv>
|
||||
|
||||
<refsect1 role="description">
|
||||
&reftitle.description;
|
||||
<methodsynopsis>
|
||||
<modifier>public</modifier> <type>void</type><methodname>TokyoTyrant::restore</methodname>
|
||||
<methodparam><type>string</type><parameter>log_dir</parameter></methodparam>
|
||||
<methodparam><type>int</type><parameter>timestamp</parameter></methodparam>
|
||||
<methodparam choice="opt"><type>bool</type><parameter>check_consistency</parameter></methodparam>
|
||||
</methodsynopsis>
|
||||
<para>
|
||||
Restore the database from the update log.
|
||||
</para>
|
||||
<warning>
|
||||
<simpara>
|
||||
This method is not supported on 32bit platforms.
|
||||
</simpara>
|
||||
</warning>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="parameters">
|
||||
&reftitle.parameters;
|
||||
<para>
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term><parameter>log_dir</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Directory where the log is
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>timestamp</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Beginning timestamp with microseconds
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>check_consistency</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Whether to check consistency: Default: &true;
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="returnvalues">
|
||||
&reftitle.returnvalues;
|
||||
<para>
|
||||
This method returns the current object and throws TokyoTyrantException on failure.
|
||||
</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
|
||||
indent-tabs-mode:nil
|
||||
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
|
||||
-->
|
126
reference/tokyo_tyrant/tokyotyrant/setmaster.xml
Normal file
126
reference/tokyo_tyrant/tokyotyrant/setmaster.xml
Normal file
|
@ -0,0 +1,126 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- $Revision: $ -->
|
||||
|
||||
<refentry xml:id="tokyotyrant.setmaster" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
<refnamediv>
|
||||
<refname>TokyoTyrant::setMaster</refname>
|
||||
<refpurpose>Set the replication master</refpurpose>
|
||||
</refnamediv>
|
||||
|
||||
<refsect1 role="description">
|
||||
&reftitle.description;
|
||||
<methodsynopsis>
|
||||
<modifier>public</modifier> <type>void</type><methodname>TokyoTyrant::setMaster</methodname>
|
||||
<methodparam><type>string</type><parameter>host</parameter></methodparam>
|
||||
<methodparam><type>int</type><parameter>port</parameter></methodparam>
|
||||
<methodparam><type>int</type><parameter>timestamp</parameter></methodparam>
|
||||
<methodparam choice="opt"><type>bool</type><parameter>check_consistency</parameter></methodparam>
|
||||
</methodsynopsis>
|
||||
<para>
|
||||
Sets the replication master of the database
|
||||
</para>
|
||||
<warning>
|
||||
<simpara>
|
||||
This method is not supported on 32bit platforms.
|
||||
</simpara>
|
||||
</warning>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="parameters">
|
||||
&reftitle.parameters;
|
||||
<para>
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term><parameter>host</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Hostname of the replication master. If &null; the replication is disabled.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>port</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Port of the replication master
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>timestamp</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Beginning timestamp with microseconds
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>check_consistency</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Whether to check consistency: Default: &true;
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="returnvalues">
|
||||
&reftitle.returnvalues;
|
||||
<para>
|
||||
This method returns the current object and throws TokyoTyrantException on failure.
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="examples">
|
||||
&reftitle.examples;
|
||||
<para>
|
||||
<example>
|
||||
<title><methodname>TokyoTyrant::setMaster</methodname> example</title>
|
||||
<programlisting role="php">
|
||||
<![CDATA[
|
||||
<?php
|
||||
/* Connect to a database */
|
||||
$tt = new TokyoTyrant("tokyotyrant.example.com");
|
||||
|
||||
/* Disable the replication */
|
||||
$tt->setMaster(NULL, 0, 0);
|
||||
?>
|
||||
]]>
|
||||
</programlisting>
|
||||
</example>
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="seealso">
|
||||
&reftitle.seealso;
|
||||
<para>
|
||||
<simplelist>
|
||||
<member><methodname>Classname::Method</methodname></member>
|
||||
</simplelist>
|
||||
</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
|
||||
indent-tabs-mode:nil
|
||||
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
|
||||
-->
|
91
reference/tokyo_tyrant/tokyotyrant/size.xml
Normal file
91
reference/tokyo_tyrant/tokyotyrant/size.xml
Normal file
|
@ -0,0 +1,91 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- $Revision: $ -->
|
||||
|
||||
<refentry xml:id="tokyotyrant.size" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
<refnamediv>
|
||||
<refname>TokyoTyrant::size</refname>
|
||||
<refpurpose>Returns the size of the value</refpurpose>
|
||||
</refnamediv>
|
||||
|
||||
<refsect1 role="description">
|
||||
&reftitle.description;
|
||||
<methodsynopsis>
|
||||
<modifier>public</modifier> <type>int</type><methodname>TokyoTyrant::size</methodname>
|
||||
<methodparam><type>string</type><parameter>key</parameter></methodparam>
|
||||
</methodsynopsis>
|
||||
<para>
|
||||
Returns the size of a value by key
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="parameters">
|
||||
&reftitle.parameters;
|
||||
<para>
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term><parameter>key</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
The key of which size to fetch
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="returnvalues">
|
||||
&reftitle.returnvalues;
|
||||
<para>
|
||||
Returns the size of the key or throw TokyoTyrantException on error
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="examples">
|
||||
&reftitle.examples;
|
||||
<para>
|
||||
<example>
|
||||
<title><methodname>TokyoTyrant::size</methodname> example</title>
|
||||
<programlisting role="php">
|
||||
<![CDATA[
|
||||
<?php
|
||||
$tt = new TokyoTyrant("localhost");
|
||||
|
||||
$tt->put("test_key", "12345");
|
||||
|
||||
echo $tt->size("test_key");
|
||||
?>
|
||||
]]>
|
||||
</programlisting>
|
||||
&example.outputs;
|
||||
<screen>
|
||||
<![CDATA[
|
||||
5
|
||||
]]>
|
||||
</screen>
|
||||
</example>
|
||||
</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
|
||||
indent-tabs-mode:nil
|
||||
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
|
||||
-->
|
126
reference/tokyo_tyrant/tokyotyrant/stat.xml
Normal file
126
reference/tokyo_tyrant/tokyotyrant/stat.xml
Normal file
|
@ -0,0 +1,126 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- $Revision: $ -->
|
||||
|
||||
<refentry xml:id="tokyotyrant.stat" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
<refnamediv>
|
||||
<refname>TokyoTyrant::stat</refname>
|
||||
<refpurpose>Get statistics</refpurpose>
|
||||
</refnamediv>
|
||||
|
||||
<refsect1 role="description">
|
||||
&reftitle.description;
|
||||
<methodsynopsis>
|
||||
<modifier>public</modifier> <type>array</type><methodname>TokyoTyrant::stat</methodname>
|
||||
<void />
|
||||
</methodsynopsis>
|
||||
<para>
|
||||
Returns statistics of the remote database
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="parameters">
|
||||
&reftitle.parameters;
|
||||
&no.function.parameters;
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="returnvalues">
|
||||
&reftitle.returnvalues;
|
||||
<para>
|
||||
Returns an array of key value pairs describing the statistics
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="examples">
|
||||
&reftitle.examples;
|
||||
<para>
|
||||
<example>
|
||||
<title><methodname>TokyoTyrant::stat</methodname> example</title>
|
||||
<programlisting role="php">
|
||||
<![CDATA[
|
||||
<?php
|
||||
$tt = new TokyoTyrant("localhost");
|
||||
|
||||
var_dump($tt->stat());
|
||||
?>
|
||||
]]>
|
||||
</programlisting>
|
||||
&example.outputs.similar;
|
||||
<screen>
|
||||
<![CDATA[
|
||||
array(19) {
|
||||
["version"]=>
|
||||
string(6) "1.1.28"
|
||||
["libver"]=>
|
||||
string(3) "311"
|
||||
["protver"]=>
|
||||
string(4) "0.91"
|
||||
["os"]=>
|
||||
string(5) "Linux"
|
||||
["time"]=>
|
||||
string(17) "1247358357.665630"
|
||||
["pid"]=>
|
||||
string(5) "14348"
|
||||
["sid"]=>
|
||||
string(8) "59025947"
|
||||
["type"]=>
|
||||
string(9) "on-memory"
|
||||
["path"]=>
|
||||
string(1) "*"
|
||||
["rnum"]=>
|
||||
string(1) "4"
|
||||
["size"]=>
|
||||
string(6) "262856"
|
||||
["bigend"]=>
|
||||
string(1) "0"
|
||||
["fd"]=>
|
||||
string(1) "5"
|
||||
["loadavg"]=>
|
||||
string(8) "0.000000"
|
||||
["memsize"]=>
|
||||
string(8) "77328384"
|
||||
["memrss"]=>
|
||||
string(7) "1183744"
|
||||
["ru_real"]=>
|
||||
string(13) "162776.042152"
|
||||
["ru_user"]=>
|
||||
string(8) "0.476029"
|
||||
["ru_sys"]=>
|
||||
string(8) "8.652540"
|
||||
}
|
||||
]]>
|
||||
</screen>
|
||||
</example>
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="seealso">
|
||||
&reftitle.seealso;
|
||||
<para>
|
||||
<simplelist>
|
||||
<member><methodname>Classname::Method</methodname></member>
|
||||
</simplelist>
|
||||
</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
|
||||
indent-tabs-mode:nil
|
||||
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
|
||||
-->
|
54
reference/tokyo_tyrant/tokyotyrant/sync.xml
Normal file
54
reference/tokyo_tyrant/tokyotyrant/sync.xml
Normal file
|
@ -0,0 +1,54 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- $Revision: $ -->
|
||||
|
||||
<refentry xml:id="tokyotyrant.sync" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
<refnamediv>
|
||||
<refname>TokyoTyrant::sync</refname>
|
||||
<refpurpose>Synchronize the database</refpurpose>
|
||||
</refnamediv>
|
||||
|
||||
<refsect1 role="description">
|
||||
&reftitle.description;
|
||||
<methodsynopsis>
|
||||
<modifier>public</modifier> <type>void</type><methodname>tokyotyrant::sync</methodname>
|
||||
<void />
|
||||
</methodsynopsis>
|
||||
<para>
|
||||
Synchronizes the database on to the physical device
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="parameters">
|
||||
&reftitle.parameters;
|
||||
&no.function.parameters;
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="returnvalues">
|
||||
&reftitle.returnvalues;
|
||||
<para>
|
||||
This method returns the current object and throws TokyoTyrantException on failure.
|
||||
</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
|
||||
indent-tabs-mode:nil
|
||||
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
|
||||
-->
|
80
reference/tokyo_tyrant/tokyotyrant/vanish.xml
Normal file
80
reference/tokyo_tyrant/tokyotyrant/vanish.xml
Normal file
|
@ -0,0 +1,80 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- $Revision: $ -->
|
||||
|
||||
<refentry xml:id="tokyotyrant.vanish" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
<refnamediv>
|
||||
<refname>TokyoTyrant::vanish</refname>
|
||||
<refpurpose>Empties the database</refpurpose>
|
||||
</refnamediv>
|
||||
|
||||
<refsect1 role="description">
|
||||
&reftitle.description;
|
||||
<methodsynopsis>
|
||||
<modifier>public</modifier> <type>void</type><methodname>TokyoTyrant::vanish</methodname>
|
||||
<void />
|
||||
</methodsynopsis>
|
||||
<para>
|
||||
Empties a remote database
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="parameters">
|
||||
&reftitle.parameters;
|
||||
&no.function.parameters;
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="returnvalues">
|
||||
&reftitle.returnvalues;
|
||||
<para>
|
||||
This method returns the current object and throws TokyoTyrantException on failure.
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="examples">
|
||||
&reftitle.examples;
|
||||
<para>
|
||||
<example>
|
||||
<title><methodname>TokyoTyrant::vanish</methodname> example</title>
|
||||
<programlisting role="php">
|
||||
<![CDATA[
|
||||
<?php
|
||||
$tt = new TokyoTyrant("localhost");
|
||||
$tt->vanish();
|
||||
?>
|
||||
]]>
|
||||
</programlisting>
|
||||
</example>
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="seealso">
|
||||
&reftitle.seealso;
|
||||
<para>
|
||||
<simplelist>
|
||||
<member><methodname>TokyoTyrant::out</methodname></member>
|
||||
</simplelist>
|
||||
</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
|
||||
indent-tabs-mode:nil
|
||||
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
|
||||
-->
|
112
reference/tokyo_tyrant/tokyotyrantexception.xml
Normal file
112
reference/tokyo_tyrant/tokyotyrantexception.xml
Normal file
|
@ -0,0 +1,112 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- $Revision: $ -->
|
||||
|
||||
<phpdoc:classref xml:id="class.tokyotyrantexception" xmlns:phpdoc="http://php.net/ns/phpdoc" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xi="http://www.w3.org/2001/XInclude">
|
||||
|
||||
<title>The TokyoTyrantException class</title>
|
||||
<titleabbrev>TokyoTyrantException</titleabbrev>
|
||||
|
||||
<partintro>
|
||||
|
||||
<!-- {{{ tokyotyrantexception intro -->
|
||||
<section xml:id="tokyotyrantexception.intro">
|
||||
&reftitle.intro;
|
||||
<para>
|
||||
TokyoTyrantException
|
||||
</para>
|
||||
</section>
|
||||
<!-- }}} -->
|
||||
|
||||
<section xml:id="tokyotyrantexception.synopsis">
|
||||
&reftitle.classsynopsis;
|
||||
|
||||
<!-- {{{ Synopsis -->
|
||||
<classsynopsis>
|
||||
<ooclass><classname>tokyotyrantexception</classname></ooclass>
|
||||
|
||||
<!-- {{{ Class synopsis -->
|
||||
<classsynopsisinfo>
|
||||
<ooclass>
|
||||
<classname>tokyotyrantexception</classname>
|
||||
</ooclass>
|
||||
|
||||
<ooclass>
|
||||
<modifier>extends</modifier>
|
||||
<classname>Exception</classname>
|
||||
</ooclass>
|
||||
</classsynopsisinfo>
|
||||
<!-- }}} -->
|
||||
<classsynopsisinfo role="comment">Properties</classsynopsisinfo>
|
||||
|
||||
|
||||
<classsynopsisinfo role="comment">Methods</classsynopsisinfo>
|
||||
<xi:include xpointer="xmlns(db=http://docbook.org/ns/docbook) xpointer(id('class.tokyotyrantexception')/db:refentry/db:refsect1[@role='description']/descendant::db:methodsynopsis[1])" />
|
||||
|
||||
<classsynopsisinfo role="comment">Inherited methods</classsynopsisinfo>
|
||||
<xi:include xpointer="xmlns(db=http://docbook.org/ns/docbook) xpointer(id('class.Exception')/db:refentry/db:refsect1[@role='description']/descendant::db:methodsynopsis[1])" />
|
||||
|
||||
</classsynopsis>
|
||||
<!-- }}} -->
|
||||
|
||||
</section>
|
||||
|
||||
|
||||
<!-- {{{ tokyotyrantexception properties -->
|
||||
<section xml:id="tokyotyrantexception.props">
|
||||
&reftitle.properties;
|
||||
<variablelist>
|
||||
<varlistentry xml:id="tokyotyrantexception.props.message">
|
||||
<term><varname>message</varname></term>
|
||||
<listitem>
|
||||
<para>The exception message</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry xml:id="tokyotyrantexception.props.code">
|
||||
<term><varname>code</varname></term>
|
||||
<listitem>
|
||||
<para>The exception code. This can be compared to <constant>TokyoTyrant::TTE_*</constant> constants</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry xml:id="tokyotyrantexception.props.file">
|
||||
<term><varname>file</varname></term>
|
||||
<listitem>
|
||||
<para>Filename where the exception happened</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry xml:id="tokyotyrantexception.props.line">
|
||||
<term><varname>line</varname></term>
|
||||
<listitem>
|
||||
<para>Line where the exception happened</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
</section>
|
||||
<!-- }}} -->
|
||||
|
||||
|
||||
</partintro>
|
||||
|
||||
&reference.tokyo-tyrant.entities.tokyotyrantexception;
|
||||
|
||||
</phpdoc:classref>
|
||||
|
||||
<!-- 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:"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
|
||||
-->
|
75
reference/tokyo_tyrant/tokyotyrantquery.xml
Normal file
75
reference/tokyo_tyrant/tokyotyrantquery.xml
Normal file
|
@ -0,0 +1,75 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- $Revision: $ -->
|
||||
|
||||
<phpdoc:classref xml:id="class.tokyotyrantquery" xmlns:phpdoc="http://php.net/ns/phpdoc" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xi="http://www.w3.org/2001/XInclude">
|
||||
|
||||
<title>The TokyoTyrantQuery class</title>
|
||||
<titleabbrev>TokyoTyrantQuery</titleabbrev>
|
||||
|
||||
<partintro>
|
||||
|
||||
<!-- {{{ tokyotyrantquery intro -->
|
||||
<section xml:id="tokyotyrantquery.intro">
|
||||
&reftitle.intro;
|
||||
<para>
|
||||
This class is used to query the table databases
|
||||
</para>
|
||||
</section>
|
||||
<!-- }}} -->
|
||||
|
||||
<section xml:id="tokyotyrantquery.synopsis">
|
||||
&reftitle.classsynopsis;
|
||||
|
||||
<!-- {{{ Synopsis -->
|
||||
<classsynopsis>
|
||||
<ooclass><classname>TokyoTyrantQuery</classname></ooclass>
|
||||
|
||||
<!-- {{{ Class synopsis -->
|
||||
<classsynopsisinfo>
|
||||
<ooclass>
|
||||
<classname>TokyoTyrantQuery</classname>
|
||||
</ooclass>
|
||||
|
||||
<oointerface>
|
||||
<interfacename>Iterator</interfacename>
|
||||
</oointerface>
|
||||
|
||||
<oointerface>
|
||||
<interfacename>Traversable</interfacename>
|
||||
</oointerface>
|
||||
</classsynopsisinfo>
|
||||
<!-- }}} -->
|
||||
|
||||
<classsynopsisinfo role="comment">Methods</classsynopsisinfo>
|
||||
<xi:include xpointer="xmlns(db=http://docbook.org/ns/docbook) xpointer(id('class.tokyotyrantquery')/db:refentry/db:refsect1[@role='description']/descendant::db:methodsynopsis[1])" />
|
||||
</classsynopsis>
|
||||
<!-- }}} -->
|
||||
|
||||
</section>
|
||||
|
||||
</partintro>
|
||||
|
||||
&reference.tokyo-tyrant.entities.tokyotyrantquery;
|
||||
|
||||
</phpdoc:classref>
|
||||
|
||||
<!-- 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:"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
|
||||
-->
|
148
reference/tokyo_tyrant/tokyotyrantquery/addcond.xml
Normal file
148
reference/tokyo_tyrant/tokyotyrantquery/addcond.xml
Normal file
|
@ -0,0 +1,148 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- $Revision: $ -->
|
||||
|
||||
<refentry xml:id="tokyotyrantquery.addcond" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
<refnamediv>
|
||||
<refname>TokyoTyrantQuery::addCond</refname>
|
||||
<refpurpose>Adds a condition to the query</refpurpose>
|
||||
</refnamediv>
|
||||
|
||||
<refsect1 role="description">
|
||||
&reftitle.description;
|
||||
<methodsynopsis>
|
||||
<modifier>public</modifier> <type>void</type><methodname>TokyoTyrantQuery::addCond</methodname>
|
||||
<methodparam><type>string</type><parameter>name</parameter></methodparam>
|
||||
<methodparam><type>int</type><parameter>op</parameter></methodparam>
|
||||
<methodparam><type>string</type><parameter>expr</parameter></methodparam>
|
||||
</methodsynopsis>
|
||||
<para>
|
||||
Adds a condition to the query. Condition can be something like: get all keys which value
|
||||
matches expr.
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="parameters">
|
||||
&reftitle.parameters;
|
||||
<para>
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term><parameter>name</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Name of the column in the condition
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>op</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
The operator. One of the <constant>TokyoTyrant::RDBQC_*</constant> constants
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>expr</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
The expression
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="returnvalues">
|
||||
&reftitle.returnvalues;
|
||||
<para>
|
||||
This method returns the current object and throws TokyoTyrantException on failure.
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="examples">
|
||||
&reftitle.examples;
|
||||
<para>
|
||||
<example>
|
||||
<title><methodname>TokyoTyrantQuery::addCond</methodname> example</title>
|
||||
<programlisting role="php">
|
||||
<![CDATA[
|
||||
<?php
|
||||
/* Connect to a table database */
|
||||
$tt = new TokyoTyrantTable("localhost", 1979);
|
||||
|
||||
/* Add rows */
|
||||
$tt->put(null, array("column1" => "some data", "column2" => "something here"));
|
||||
$tt->put(null, array("column1" => "more data", "column2" => "best data this far"));
|
||||
$tt->put(null, array("column1" => "again data", "column3" => "not here"));
|
||||
$tt->put(null, array("column45" => "random data", "column2" => "something along the lines"));
|
||||
$tt->put(null, array("column21" => "test data", "column2" => "generating.."));
|
||||
$tt->put(null, array("column1" => "foobar data", "column2" => "value here"));
|
||||
|
||||
/* Get a new query object */
|
||||
$query = $tt->getQuery();
|
||||
|
||||
/* Add a search condition */
|
||||
$query->addCond("column2", TokyoTyrant::RDBQC_STROR, "something");
|
||||
|
||||
/* Dump the search results */
|
||||
var_dump($query->search());
|
||||
?>
|
||||
]]>
|
||||
</programlisting>
|
||||
&example.outputs;
|
||||
<screen>
|
||||
<![CDATA[
|
||||
array(2) {
|
||||
[1]=>
|
||||
array(2) {
|
||||
["column1"]=>
|
||||
string(9) "some data"
|
||||
["column2"]=>
|
||||
string(14) "something here"
|
||||
}
|
||||
[4]=>
|
||||
array(2) {
|
||||
["column45"]=>
|
||||
string(11) "random data"
|
||||
["column2"]=>
|
||||
string(25) "something along the lines"
|
||||
}
|
||||
}
|
||||
]]>
|
||||
</screen>
|
||||
</example>
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="seealso">
|
||||
&reftitle.seealso;
|
||||
<para>
|
||||
<simplelist>
|
||||
<member><methodname>Classname::Method</methodname></member>
|
||||
</simplelist>
|
||||
</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
|
||||
indent-tabs-mode:nil
|
||||
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
|
||||
-->
|
94
reference/tokyo_tyrant/tokyotyrantquery/construct.xml
Normal file
94
reference/tokyo_tyrant/tokyotyrantquery/construct.xml
Normal file
|
@ -0,0 +1,94 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- $Revision: $ -->
|
||||
|
||||
<refentry xml:id="tokyotyrantquery.__construct" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
<refnamediv>
|
||||
<refname>TokyoTyrantQuery::__construct</refname>
|
||||
<refpurpose>Construct a new query</refpurpose>
|
||||
</refnamediv>
|
||||
|
||||
<refsect1 role="description">
|
||||
&reftitle.description;
|
||||
<methodsynopsis>
|
||||
<methodname>TokyoTyrantQuery::__construct</methodname>
|
||||
<methodparam><type>TokyoTyrantTable</type><parameter>table</parameter></methodparam>
|
||||
</methodsynopsis>
|
||||
<para>
|
||||
Construct a new query object
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="parameters">
|
||||
&reftitle.parameters;
|
||||
<para>
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term><parameter>table</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
TokyoTyrantTable object with active database connection
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="returnvalues">
|
||||
&reftitle.returnvalues;
|
||||
<para>
|
||||
Returns a new TokyoTyrantQuery object and throws TokyoTyrantException on error
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="examples">
|
||||
&reftitle.examples;
|
||||
<para>
|
||||
<example>
|
||||
<title><methodname>TokyoTyrantQuery::__construct</methodname> example</title>
|
||||
<programlisting role="php">
|
||||
<![CDATA[
|
||||
<?php
|
||||
$tt = new TokyoTyrantTable("localhost", 1979);
|
||||
|
||||
$query = new TokyoTyrantQuery($tt);
|
||||
|
||||
/* Work with $query */
|
||||
?>
|
||||
]]>
|
||||
</programlisting>
|
||||
</example>
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="seealso">
|
||||
&reftitle.seealso;
|
||||
<para>
|
||||
<simplelist>
|
||||
<member><methodname>TokyoTyrantTable::getQuery</methodname></member>
|
||||
</simplelist>
|
||||
</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
|
||||
indent-tabs-mode:nil
|
||||
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
|
||||
-->
|
105
reference/tokyo_tyrant/tokyotyrantquery/count.xml
Normal file
105
reference/tokyo_tyrant/tokyotyrantquery/count.xml
Normal file
|
@ -0,0 +1,105 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- $Revision: $ -->
|
||||
|
||||
<refentry xml:id="tokyotyrantquery.count" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
<refnamediv>
|
||||
<refname>TokyoTyrantQuery::count</refname>
|
||||
<refpurpose>Counts records</refpurpose>
|
||||
</refnamediv>
|
||||
|
||||
<refsect1 role="description">
|
||||
&reftitle.description;
|
||||
<methodsynopsis>
|
||||
<modifier>public</modifier> <type>int</type><methodname>TokyoTyrantQuery::count</methodname>
|
||||
<void />
|
||||
</methodsynopsis>
|
||||
<para>
|
||||
Returns a count of how many records a query returns.
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="parameters">
|
||||
&reftitle.parameters;
|
||||
&no.function.parameters;
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="returnvalues">
|
||||
&reftitle.returnvalues;
|
||||
<para>
|
||||
Returns a count of matching rows and throws TokyoTyrantException on error
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="examples">
|
||||
&reftitle.examples;
|
||||
<para>
|
||||
<example>
|
||||
<title><methodname>TokyoTyrantQuery::count</methodname> example</title>
|
||||
<programlisting role="php">
|
||||
<![CDATA[
|
||||
<?php
|
||||
/* Connect to a table database */
|
||||
$tt = new TokyoTyrantTable("localhost", 1979);
|
||||
|
||||
/* Add rows */
|
||||
$tt->put(null, array("column1" => "some data", "column2" => "something here"));
|
||||
$tt->put(null, array("column1" => "more data", "column2" => "best data this far"));
|
||||
$tt->put(null, array("column1" => "again data", "column3" => "not here"));
|
||||
$tt->put(null, array("column45" => "random data", "column2" => "something along the lines"));
|
||||
$tt->put(null, array("column21" => "test data", "column2" => "generating.."));
|
||||
$tt->put(null, array("column1" => "foobar data", "column2" => "value here"));
|
||||
|
||||
/* Get a new query object */
|
||||
$query = $tt->getQuery();
|
||||
|
||||
/* Add a search condition */
|
||||
$query->addCond("column2", TokyoTyrant::RDBQC_STROR, "something");
|
||||
|
||||
/* Count the results */
|
||||
var_dump($query->count());
|
||||
?>
|
||||
]]>
|
||||
</programlisting>
|
||||
&example.outputs;
|
||||
<screen>
|
||||
<![CDATA[
|
||||
int(2)
|
||||
]]>
|
||||
</screen>
|
||||
</example>
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="seealso">
|
||||
&reftitle.seealso;
|
||||
<para>
|
||||
<simplelist>
|
||||
<member><methodname>TokyoTyrantQuery::out</methodname></member>
|
||||
<member><methodname>TokyoTyrantQuery::search</methodname></member>
|
||||
<member><methodname>TokyoTyrantQuery::metaSearch</methodname></member>
|
||||
</simplelist>
|
||||
</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
|
||||
indent-tabs-mode:nil
|
||||
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
|
||||
-->
|
106
reference/tokyo_tyrant/tokyotyrantquery/current.xml
Normal file
106
reference/tokyo_tyrant/tokyotyrantquery/current.xml
Normal file
|
@ -0,0 +1,106 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- $Revision: $ -->
|
||||
|
||||
<refentry xml:id="tokyotyrantquery.current" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
<refnamediv>
|
||||
<refname>TokyoTyrantQuery::current</refname>
|
||||
<refpurpose>Returns the current element</refpurpose>
|
||||
</refnamediv>
|
||||
|
||||
<refsect1 role="description">
|
||||
&reftitle.description;
|
||||
<methodsynopsis>
|
||||
<modifier>public</modifier> <type>array</type><methodname>TokyoTyrantQuery::current</methodname>
|
||||
<void />
|
||||
</methodsynopsis>
|
||||
<para>
|
||||
Returns the current element. Part of Iterator interface
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="parameters">
|
||||
&reftitle.parameters;
|
||||
&no.function.parameters;
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="returnvalues">
|
||||
&reftitle.returnvalues;
|
||||
<para>
|
||||
Returns the current row
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="examples">
|
||||
&reftitle.examples;
|
||||
<para>
|
||||
<example>
|
||||
<title>TokyoTyrantQuery iterator example</title>
|
||||
<programlisting role="php">
|
||||
<![CDATA[
|
||||
<?php
|
||||
/* Connect to a table database */
|
||||
$tt = new TokyoTyrantTable("localhost", 1979);
|
||||
|
||||
/* Add rows */
|
||||
$tt->put(null, array("column1" => "some data", "column2" => "something here"));
|
||||
$tt->put(null, array("column1" => "more data", "column2" => "best data this far"));
|
||||
$tt->put(null, array("column1" => "again data", "column3" => "foobar here"));
|
||||
$tt->put(null, array("column45" => "random data", "column2" => "something along the lines"));
|
||||
$tt->put(null, array("column21" => "test data", "column2" => "generating.."));
|
||||
$tt->put(null, array("column1" => "foobar data", "column2" => "value here"));
|
||||
|
||||
/* Get a new query object */
|
||||
$query = $tt->getQuery();
|
||||
|
||||
/* Add a search condition */
|
||||
$query->addCond("column2", TokyoTyrant::RDBQC_STROR, "something");
|
||||
|
||||
/* Iterate the results */
|
||||
foreach ($query as $key => $value) {
|
||||
echo "pk: $key, columns: ", count($value) ,"\n";
|
||||
}
|
||||
?>
|
||||
]]>
|
||||
</programlisting>
|
||||
&example.outputs.similar;
|
||||
<screen>
|
||||
<![CDATA[
|
||||
pk: 1, columns: 2
|
||||
pk: 4, columns: 2
|
||||
]]>
|
||||
</screen>
|
||||
</example>
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="seealso">
|
||||
&reftitle.seealso;
|
||||
<para>
|
||||
<simplelist>
|
||||
<member><methodname>TokyoTyrantQuery::addCond</methodname></member>
|
||||
</simplelist>
|
||||
</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
|
||||
indent-tabs-mode:nil
|
||||
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
|
||||
-->
|
100
reference/tokyo_tyrant/tokyotyrantquery/hint.xml
Normal file
100
reference/tokyo_tyrant/tokyotyrantquery/hint.xml
Normal file
|
@ -0,0 +1,100 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- $Revision: $ -->
|
||||
|
||||
<refentry xml:id="tokyotyrantquery.hint" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
<refnamediv>
|
||||
<refname>TokyoTyrantQuery::hint</refname>
|
||||
<refpurpose>Get the hint string of the query</refpurpose>
|
||||
</refnamediv>
|
||||
|
||||
<refsect1 role="description">
|
||||
&reftitle.description;
|
||||
<methodsynopsis>
|
||||
<modifier>public</modifier> <type>string</type><methodname>TokyoTyrantQuery::hint</methodname>
|
||||
<void />
|
||||
</methodsynopsis>
|
||||
<para>
|
||||
Get the hint string of the query. The hint string contains information about an executed query and
|
||||
it could be compared to for example MySQL EXPLAIN statement.
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="parameters">
|
||||
&reftitle.parameters;
|
||||
&no.function.parameters;
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="returnvalues">
|
||||
&reftitle.returnvalues;
|
||||
<para>
|
||||
This method always returns a string
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="examples">
|
||||
&reftitle.examples;
|
||||
<para>
|
||||
<example>
|
||||
<title>TokyoTyrantQuery::hint example</title>
|
||||
<programlisting role="php">
|
||||
<![CDATA[
|
||||
<?php
|
||||
$tt = new TokyoTyrantTable("localhost", 1979);
|
||||
$tt->vanish();
|
||||
|
||||
for ($i = 0; $i < 11; $i++) {
|
||||
$tt->put(null, array('a_col' => 'a' . $i, 'b_col' => 'b' . $i));
|
||||
}
|
||||
|
||||
$query = $tt->getQuery();
|
||||
$query->addCond('a_col', TokyoTyrant::RDBQC_STRBW, 'a');
|
||||
|
||||
$query->search();
|
||||
var_dump($query->hint());
|
||||
]]>
|
||||
</programlisting>
|
||||
&example.outputs.similar;
|
||||
<screen>
|
||||
<![CDATA[
|
||||
string(72) "
|
||||
scanning the whole table
|
||||
result set size: 11
|
||||
leaving the natural order
|
||||
"
|
||||
]]>
|
||||
</screen>
|
||||
</example>
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="seealso">
|
||||
&reftitle.seealso;
|
||||
<para>
|
||||
<simplelist>
|
||||
<member><methodname>TokyoTyrantQuery::addCond</methodname></member>
|
||||
</simplelist>
|
||||
</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
|
||||
indent-tabs-mode:nil
|
||||
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
|
||||
-->
|
106
reference/tokyo_tyrant/tokyotyrantquery/key.xml
Normal file
106
reference/tokyo_tyrant/tokyotyrantquery/key.xml
Normal file
|
@ -0,0 +1,106 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- $Revision: $ -->
|
||||
|
||||
<refentry xml:id="tokyotyrantquery.key" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
<refnamediv>
|
||||
<refname>TokyoTyrantQuery::key</refname>
|
||||
<refpurpose>The key purpose</refpurpose>
|
||||
</refnamediv>
|
||||
|
||||
<refsect1 role="description">
|
||||
&reftitle.description;
|
||||
<methodsynopsis>
|
||||
<modifier>public</modifier> <type>int</type><methodname>TokyoTyrantQuery::key</methodname>
|
||||
<void />
|
||||
</methodsynopsis>
|
||||
<para>
|
||||
Returns the current key. Part of the Iterator interface
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="parameters">
|
||||
&reftitle.parameters;
|
||||
&no.function.parameters;
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="returnvalues">
|
||||
&reftitle.returnvalues;
|
||||
<para>
|
||||
Returns the current key and throws TokyoTyrantException on error
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="examples">
|
||||
&reftitle.examples;
|
||||
<para>
|
||||
<example>
|
||||
<title>TokyoTyrantQuery iterator example</title>
|
||||
<programlisting role="php">
|
||||
<![CDATA[
|
||||
<?php
|
||||
/* Connect to a table database */
|
||||
$tt = new TokyoTyrantTable("localhost", 1979);
|
||||
|
||||
/* Add rows */
|
||||
$tt->put(null, array("column1" => "some data", "column2" => "something here"));
|
||||
$tt->put(null, array("column1" => "more data", "column2" => "best data this far"));
|
||||
$tt->put(null, array("column1" => "again data", "column3" => "foobar here"));
|
||||
$tt->put(null, array("column45" => "random data", "column2" => "something along the lines"));
|
||||
$tt->put(null, array("column21" => "test data", "column2" => "generating.."));
|
||||
$tt->put(null, array("column1" => "foobar data", "column2" => "value here"));
|
||||
|
||||
/* Get a new query object */
|
||||
$query = $tt->getQuery();
|
||||
|
||||
/* Add a search condition */
|
||||
$query->addCond("column2", TokyoTyrant::RDBQC_STROR, "something");
|
||||
|
||||
/* Iterate the results */
|
||||
foreach ($query as $key => $value) {
|
||||
echo "pk: $key, columns: ", count($value) ,"\n";
|
||||
}
|
||||
?>
|
||||
]]>
|
||||
</programlisting>
|
||||
&example.outputs.similar;
|
||||
<screen>
|
||||
<![CDATA[
|
||||
pk: 1, columns: 2
|
||||
pk: 4, columns: 2
|
||||
]]>
|
||||
</screen>
|
||||
</example>
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="seealso">
|
||||
&reftitle.seealso;
|
||||
<para>
|
||||
<simplelist>
|
||||
<member><methodname>TokyoTyrantQuery::addCond</methodname></member>
|
||||
</simplelist>
|
||||
</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
|
||||
indent-tabs-mode:nil
|
||||
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
|
||||
-->
|
139
reference/tokyo_tyrant/tokyotyrantquery/metasearch.xml
Normal file
139
reference/tokyo_tyrant/tokyotyrantquery/metasearch.xml
Normal file
|
@ -0,0 +1,139 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- $Revision: $ -->
|
||||
|
||||
<refentry xml:id="tokyotyrantquery.metasearch" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
<refnamediv>
|
||||
<refname>TokyoTyrantQuery::metaSearch</refname>
|
||||
<refpurpose>Retrieve records with multiple queries</refpurpose>
|
||||
</refnamediv>
|
||||
|
||||
<refsect1 role="description">
|
||||
&reftitle.description;
|
||||
<methodsynopsis>
|
||||
<modifier>public</modifier> <type>array</type><methodname>TokyoTyrantQuery::metaSearch</methodname>
|
||||
<void />
|
||||
</methodsynopsis>
|
||||
<para>
|
||||
Executes multiple queries on a database and returns matching records. The current object
|
||||
is always the left most object in the search.
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="parameters">
|
||||
&reftitle.parameters;
|
||||
<para>
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term><parameter>queries</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Array of TokyoTyrantQuery objects
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>type</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
One of the <constant>TokyoTyrant::RDBMS_*</constant> constants
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="returnvalues">
|
||||
&reftitle.returnvalues;
|
||||
<para>
|
||||
Returns the matching rows and throws TokyoTyrantException on error
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="examples">
|
||||
&reftitle.examples;
|
||||
<para>
|
||||
<example>
|
||||
<title><methodname>TokyoTyrantQuery::metaSearch</methodname> example</title>
|
||||
<programlisting role="php">
|
||||
<![CDATA[
|
||||
<?php
|
||||
/* Connect to a table database */
|
||||
$tt = new TokyoTyrantTable("localhost", 1979);
|
||||
|
||||
/* Add test data */
|
||||
$tt->put('cherry', array('color' => 'red'));
|
||||
$tt->put('strawberry', array('color' => 'red'));
|
||||
$tt->put('apple', array('color' => 'green'));
|
||||
$tt->put('lemon', array('color' => 'yellow'));
|
||||
|
||||
/* First query */
|
||||
$query = $tt->getQuery();
|
||||
$query->addCond('color', TokyoTyrant::RDBQC_STREQ, 'red')->setOrder('color', TokyoTyrant::RDBQO_STRASC);
|
||||
|
||||
/* Second query */
|
||||
$query1 = $tt->getQuery();
|
||||
$query1->addCond('color', TokyoTyrant::RDBQC_STREQ, 'yellow');
|
||||
|
||||
/* Get union between the queries */
|
||||
var_dump($query->metaSearch(array($query1), TokyoTyrant::RDBMS_UNION));
|
||||
?>
|
||||
]]>
|
||||
</programlisting>
|
||||
&example.outputs;
|
||||
<screen>
|
||||
<![CDATA[
|
||||
array(3) {
|
||||
["cherry"]=>
|
||||
array(1) {
|
||||
["color"]=>
|
||||
string(3) "red"
|
||||
}
|
||||
["strawberry"]=>
|
||||
array(1) {
|
||||
["color"]=>
|
||||
string(3) "red"
|
||||
}
|
||||
["lemon"]=>
|
||||
array(1) {
|
||||
["color"]=>
|
||||
string(6) "yellow"
|
||||
}
|
||||
}
|
||||
]]>
|
||||
</screen>
|
||||
</example>
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="seealso">
|
||||
&reftitle.seealso;
|
||||
<para>
|
||||
<simplelist>
|
||||
<member><methodname>TokyoTyrantQuery::search</methodname></member>
|
||||
</simplelist>
|
||||
</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
|
||||
indent-tabs-mode:nil
|
||||
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
|
||||
-->
|
106
reference/tokyo_tyrant/tokyotyrantquery/next.xml
Normal file
106
reference/tokyo_tyrant/tokyotyrantquery/next.xml
Normal file
|
@ -0,0 +1,106 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- $Revision: $ -->
|
||||
|
||||
<refentry xml:id="tokyotyrantquery.next" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
<refnamediv>
|
||||
<refname>TokyoTyrantQuery::next</refname>
|
||||
<refpurpose>The next purpose</refpurpose>
|
||||
</refnamediv>
|
||||
|
||||
<refsect1 role="description">
|
||||
&reftitle.description;
|
||||
<methodsynopsis>
|
||||
<modifier>public</modifier> <type>array</type><methodname>TokyoTyrantQuery::next</methodname>
|
||||
<void />
|
||||
</methodsynopsis>
|
||||
<para>
|
||||
Returns the next result in the resultset. Part of the Iterator interface.
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="parameters">
|
||||
&reftitle.parameters;
|
||||
&no.function.parameters;
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="returnvalues">
|
||||
&reftitle.returnvalues;
|
||||
<para>
|
||||
Returns the next row and throws TokyoTyrantException on error.
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="examples">
|
||||
&reftitle.examples;
|
||||
<para>
|
||||
<example>
|
||||
<title>TokyoTyrantQuery iterator example</title>
|
||||
<programlisting role="php">
|
||||
<![CDATA[
|
||||
<?php
|
||||
/* Connect to a table database */
|
||||
$tt = new TokyoTyrantTable("localhost", 1979);
|
||||
|
||||
/* Add rows */
|
||||
$tt->put(null, array("column1" => "some data", "column2" => "something here"));
|
||||
$tt->put(null, array("column1" => "more data", "column2" => "best data this far"));
|
||||
$tt->put(null, array("column1" => "again data", "column3" => "foobar here"));
|
||||
$tt->put(null, array("column45" => "random data", "column2" => "something along the lines"));
|
||||
$tt->put(null, array("column21" => "test data", "column2" => "generating.."));
|
||||
$tt->put(null, array("column1" => "foobar data", "column2" => "value here"));
|
||||
|
||||
/* Get a new query object */
|
||||
$query = $tt->getQuery();
|
||||
|
||||
/* Add a search condition */
|
||||
$query->addCond("column2", TokyoTyrant::RDBQC_STROR, "something");
|
||||
|
||||
/* Iterate the results */
|
||||
foreach ($query as $key => $value) {
|
||||
echo "pk: $key, columns: ", count($value) ,"\n";
|
||||
}
|
||||
?>
|
||||
]]>
|
||||
</programlisting>
|
||||
&example.outputs.similar;
|
||||
<screen>
|
||||
<![CDATA[
|
||||
pk: 1, columns: 2
|
||||
pk: 4, columns: 2
|
||||
]]>
|
||||
</screen>
|
||||
</example>
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="seealso">
|
||||
&reftitle.seealso;
|
||||
<para>
|
||||
<simplelist>
|
||||
<member><methodname>TokyoTyrantQuery::addCond</methodname></member>
|
||||
</simplelist>
|
||||
</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
|
||||
indent-tabs-mode:nil
|
||||
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
|
||||
-->
|
98
reference/tokyo_tyrant/tokyotyrantquery/out.xml
Normal file
98
reference/tokyo_tyrant/tokyotyrantquery/out.xml
Normal file
|
@ -0,0 +1,98 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- $Revision: $ -->
|
||||
|
||||
<refentry xml:id="tokyotyrantquery.out" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
<refnamediv>
|
||||
<refname>TokyoTyrantQuery::out</refname>
|
||||
<refpurpose>Removes records based on query</refpurpose>
|
||||
</refnamediv>
|
||||
|
||||
<refsect1 role="description">
|
||||
&reftitle.description;
|
||||
<methodsynopsis>
|
||||
<modifier>public</modifier> <type>TokyoTyrantQuery</type><methodname>TokyoTyrantQuery::out</methodname>
|
||||
<void />
|
||||
</methodsynopsis>
|
||||
<para>
|
||||
Removes all records that match the query. Works exactly like search but removes the records instead
|
||||
of returning them.
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="parameters">
|
||||
&reftitle.parameters;
|
||||
&no.function.parameters;
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="returnvalues">
|
||||
&reftitle.returnvalues;
|
||||
<para>
|
||||
This method returns the current object and throws TokyoTyrantException on failure.
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="examples">
|
||||
&reftitle.examples;
|
||||
<para>
|
||||
<example>
|
||||
<title><methodname>TokyoTyrantQuery::out</methodname> example</title>
|
||||
<programlisting role="php">
|
||||
<![CDATA[
|
||||
<?php
|
||||
/* Connect to a table database */
|
||||
$tt = new TokyoTyrantTable("localhost", 1979);
|
||||
|
||||
/* Add rows */
|
||||
$tt->put(null, array("column1" => "some data", "column2" => "something here"));
|
||||
$tt->put(null, array("column1" => "more data", "column2" => "best data this far"));
|
||||
$tt->put(null, array("column1" => "again data", "column3" => "foobar here"));
|
||||
$tt->put(null, array("column45" => "random data", "column2" => "something along the lines"));
|
||||
$tt->put(null, array("column21" => "test data", "column2" => "generating.."));
|
||||
$tt->put(null, array("column1" => "foobar data", "column2" => "value here"));
|
||||
|
||||
/* Get a new query object */
|
||||
$query = $tt->getQuery();
|
||||
|
||||
/* Add a search condition */
|
||||
$query->addCond("column2", TokyoTyrant::RDBQC_STROR, "something");
|
||||
|
||||
/* Remove matching records */
|
||||
$query->out();
|
||||
?>
|
||||
]]>
|
||||
</programlisting>
|
||||
</example>
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="seealso">
|
||||
&reftitle.seealso;
|
||||
<para>
|
||||
<simplelist>
|
||||
<member><methodname>TokyoTyrantQuery::addCond</methodname></member>
|
||||
</simplelist>
|
||||
</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
|
||||
indent-tabs-mode:nil
|
||||
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
|
||||
-->
|
106
reference/tokyo_tyrant/tokyotyrantquery/rewind.xml
Normal file
106
reference/tokyo_tyrant/tokyotyrantquery/rewind.xml
Normal file
|
@ -0,0 +1,106 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- $Revision: $ -->
|
||||
|
||||
<refentry xml:id="tokyotyrantquery.rewind" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
<refnamediv>
|
||||
<refname>TokyoTyrantQuery::rewind</refname>
|
||||
<refpurpose>The rewind purpose</refpurpose>
|
||||
</refnamediv>
|
||||
|
||||
<refsect1 role="description">
|
||||
&reftitle.description;
|
||||
<methodsynopsis>
|
||||
<modifier>public</modifier> <type>boolean</type><methodname>TokyoTyrantQuery::rewind</methodname>
|
||||
<void />
|
||||
</methodsynopsis>
|
||||
<para>
|
||||
Rewind the resultset and executes the query if it has not been executed. Part of the Iterator interface.
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="parameters">
|
||||
&reftitle.parameters;
|
||||
&no.function.parameters;
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="returnvalues">
|
||||
&reftitle.returnvalues;
|
||||
<para>
|
||||
Returns &true;
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="examples">
|
||||
&reftitle.examples;
|
||||
<para>
|
||||
<example>
|
||||
<title>TokyoTyrantQuery iterator example</title>
|
||||
<programlisting role="php">
|
||||
<![CDATA[
|
||||
<?php
|
||||
/* Connect to a table database */
|
||||
$tt = new TokyoTyrantTable("localhost", 1979);
|
||||
|
||||
/* Add rows */
|
||||
$tt->put(null, array("column1" => "some data", "column2" => "something here"));
|
||||
$tt->put(null, array("column1" => "more data", "column2" => "best data this far"));
|
||||
$tt->put(null, array("column1" => "again data", "column3" => "foobar here"));
|
||||
$tt->put(null, array("column45" => "random data", "column2" => "something along the lines"));
|
||||
$tt->put(null, array("column21" => "test data", "column2" => "generating.."));
|
||||
$tt->put(null, array("column1" => "foobar data", "column2" => "value here"));
|
||||
|
||||
/* Get a new query object */
|
||||
$query = $tt->getQuery();
|
||||
|
||||
/* Add a search condition */
|
||||
$query->addCond("column2", TokyoTyrant::RDBQC_STROR, "something");
|
||||
|
||||
/* Iterate the results */
|
||||
foreach ($query as $key => $value) {
|
||||
echo "pk: $key, columns: ", count($value) ,"\n";
|
||||
}
|
||||
?>
|
||||
]]>
|
||||
</programlisting>
|
||||
&example.outputs.similar;
|
||||
<screen>
|
||||
<![CDATA[
|
||||
pk: 1, columns: 2
|
||||
pk: 4, columns: 2
|
||||
]]>
|
||||
</screen>
|
||||
</example>
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="seealso">
|
||||
&reftitle.seealso;
|
||||
<para>
|
||||
<simplelist>
|
||||
<member><methodname>TokyoTyrantQuery::addCond</methodname></member>
|
||||
</simplelist>
|
||||
</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
|
||||
indent-tabs-mode:nil
|
||||
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
|
||||
-->
|
120
reference/tokyo_tyrant/tokyotyrantquery/search.xml
Normal file
120
reference/tokyo_tyrant/tokyotyrantquery/search.xml
Normal file
|
@ -0,0 +1,120 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- $Revision: $ -->
|
||||
|
||||
<refentry xml:id="tokyotyrantquery.search" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
<refnamediv>
|
||||
<refname>TokyoTyrantQuery::search</refname>
|
||||
<refpurpose>Searches records</refpurpose>
|
||||
</refnamediv>
|
||||
|
||||
<refsect1 role="description">
|
||||
&reftitle.description;
|
||||
<methodsynopsis>
|
||||
<modifier>public</modifier> <type>array</type><methodname>TokyoTyrantQuery::search</methodname>
|
||||
<void />
|
||||
</methodsynopsis>
|
||||
<para>
|
||||
Executes a search on the table database. Returns an array of arrays containing the matching records.
|
||||
In the returned array the first level is the primary key of the data and the second level is the row data.
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="parameters">
|
||||
&reftitle.parameters;
|
||||
&no.function.parameters;
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="returnvalues">
|
||||
&reftitle.returnvalues;
|
||||
<para>
|
||||
Returns the matching rows and throws TokyoTyrantException on error
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="examples">
|
||||
&reftitle.examples;
|
||||
<para>
|
||||
<example>
|
||||
<title><methodname>TokyoTyrantQuery::search</methodname> example</title>
|
||||
<programlisting role="php">
|
||||
<![CDATA[
|
||||
<?php
|
||||
/* Connect to a table database */
|
||||
$tt = new TokyoTyrantTable("localhost", 1979);
|
||||
|
||||
/* Add rows */
|
||||
$tt->put(null, array("column1" => "some data", "column2" => "something here"));
|
||||
$tt->put(null, array("column1" => "more data", "column2" => "best data this far"));
|
||||
$tt->put(null, array("column1" => "again data", "column3" => "not here"));
|
||||
$tt->put(null, array("column45" => "random data", "column2" => "something along the lines"));
|
||||
$tt->put(null, array("column21" => "test data", "column2" => "generating.."));
|
||||
$tt->put(null, array("column1" => "foobar data", "column2" => "value here"));
|
||||
|
||||
/* Get a new query object */
|
||||
$query = $tt->getQuery();
|
||||
|
||||
/* Add a search condition */
|
||||
$query->addCond("column2", TokyoTyrant::RDBQC_STROR, "something");
|
||||
|
||||
/* Dump the search results */
|
||||
var_dump($query->search());
|
||||
?>
|
||||
]]>
|
||||
</programlisting>
|
||||
&example.outputs;
|
||||
<screen>
|
||||
<![CDATA[
|
||||
array(2) {
|
||||
[1]=>
|
||||
array(2) {
|
||||
["column1"]=>
|
||||
string(9) "some data"
|
||||
["column2"]=>
|
||||
string(14) "something here"
|
||||
}
|
||||
[4]=>
|
||||
array(2) {
|
||||
["column45"]=>
|
||||
string(11) "random data"
|
||||
["column2"]=>
|
||||
string(25) "something along the lines"
|
||||
}
|
||||
}
|
||||
]]>
|
||||
</screen>
|
||||
</example>
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="seealso">
|
||||
&reftitle.seealso;
|
||||
<para>
|
||||
<simplelist>
|
||||
<member><methodname>TokyoTyrantQuery::out</methodname></member>
|
||||
<member><methodname>TokyoTyrantQuery::metaSearch</methodname></member>
|
||||
</simplelist>
|
||||
</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
|
||||
indent-tabs-mode:nil
|
||||
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
|
||||
-->
|
74
reference/tokyo_tyrant/tokyotyrantquery/setlimit.xml
Normal file
74
reference/tokyo_tyrant/tokyotyrantquery/setlimit.xml
Normal file
|
@ -0,0 +1,74 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- $Revision: $ -->
|
||||
|
||||
<refentry xml:id="tokyotyrantquery.setlimit" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
<refnamediv>
|
||||
<refname>TokyoTyrantQuery::setLimit</refname>
|
||||
<refpurpose>Limit results</refpurpose>
|
||||
</refnamediv>
|
||||
|
||||
<refsect1 role="description">
|
||||
&reftitle.description;
|
||||
<methodsynopsis>
|
||||
<modifier>public</modifier> <type>void</type><methodname>TokyoTyrantQuery::setLimit</methodname>
|
||||
<methodparam choice="opt"><type>int</type><parameter>max</parameter></methodparam>
|
||||
<methodparam choice="opt"><type>int</type><parameter>skip</parameter></methodparam>
|
||||
</methodsynopsis>
|
||||
<para>
|
||||
Set the maximum amount of records to return on a query.
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="parameters">
|
||||
&reftitle.parameters;
|
||||
<para>
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term><parameter>max</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Maximum amount of records. Default: -1
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>skip</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
How many records to skip from the start. Default: -1
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="returnvalues">
|
||||
&reftitle.returnvalues;
|
||||
<para>
|
||||
This method returns the current object and throws TokyoTyrantException on failure.
|
||||
</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
|
||||
indent-tabs-mode:nil
|
||||
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
|
||||
-->
|
106
reference/tokyo_tyrant/tokyotyrantquery/valid.xml
Normal file
106
reference/tokyo_tyrant/tokyotyrantquery/valid.xml
Normal file
|
@ -0,0 +1,106 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- $Revision: $ -->
|
||||
|
||||
<refentry xml:id="tokyotyrantquery.valid" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
<refnamediv>
|
||||
<refname>TokyoTyrantQuery::valid</refname>
|
||||
<refpurpose>Checks the validity of current item</refpurpose>
|
||||
</refnamediv>
|
||||
|
||||
<refsect1 role="description">
|
||||
&reftitle.description;
|
||||
<methodsynopsis>
|
||||
<modifier>public</modifier> <type>void</type><methodname>TokyoTyrantQuery::valid</methodname>
|
||||
<void />
|
||||
</methodsynopsis>
|
||||
<para>
|
||||
Checks if the current item is valid. Part of the Iterator interface
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="parameters">
|
||||
&reftitle.parameters;
|
||||
&no.function.parameters;
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="returnvalues">
|
||||
&reftitle.returnvalues;
|
||||
<para>
|
||||
Returns &true; if the current item is valid and &false; if not.
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="examples">
|
||||
&reftitle.examples;
|
||||
<para>
|
||||
<example>
|
||||
<title>TokyoTyrantQuery iterator example</title>
|
||||
<programlisting role="php">
|
||||
<![CDATA[
|
||||
<?php
|
||||
/* Connect to a table database */
|
||||
$tt = new TokyoTyrantTable("localhost", 1979);
|
||||
|
||||
/* Add rows */
|
||||
$tt->put(null, array("column1" => "some data", "column2" => "something here"));
|
||||
$tt->put(null, array("column1" => "more data", "column2" => "best data this far"));
|
||||
$tt->put(null, array("column1" => "again data", "column3" => "foobar here"));
|
||||
$tt->put(null, array("column45" => "random data", "column2" => "something along the lines"));
|
||||
$tt->put(null, array("column21" => "test data", "column2" => "generating.."));
|
||||
$tt->put(null, array("column1" => "foobar data", "column2" => "value here"));
|
||||
|
||||
/* Get a new query object */
|
||||
$query = $tt->getQuery();
|
||||
|
||||
/* Add a search condition */
|
||||
$query->addCond("column2", TokyoTyrant::RDBQC_STROR, "something");
|
||||
|
||||
/* Iterate the results */
|
||||
foreach ($query as $key => $value) {
|
||||
echo "pk: $key, columns: ", count($value) ,"\n";
|
||||
}
|
||||
?>
|
||||
]]>
|
||||
</programlisting>
|
||||
&example.outputs.similar;
|
||||
<screen>
|
||||
<![CDATA[
|
||||
pk: 1, columns: 2
|
||||
pk: 4, columns: 2
|
||||
]]>
|
||||
</screen>
|
||||
</example>
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="seealso">
|
||||
&reftitle.seealso;
|
||||
<para>
|
||||
<simplelist>
|
||||
<member><methodname>TokyoTyrantQuery::addCond</methodname></member>
|
||||
</simplelist>
|
||||
</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
|
||||
indent-tabs-mode:nil
|
||||
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
|
||||
-->
|
79
reference/tokyo_tyrant/tokyotyranttable.xml
Normal file
79
reference/tokyo_tyrant/tokyotyranttable.xml
Normal file
|
@ -0,0 +1,79 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- $Revision: $ -->
|
||||
|
||||
<phpdoc:classref xml:id="class.tokyotyranttable" xmlns:phpdoc="http://php.net/ns/phpdoc" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xi="http://www.w3.org/2001/XInclude">
|
||||
|
||||
<title>The TokyoTyrantTable class</title>
|
||||
<titleabbrev>TokyoTyrantTable</titleabbrev>
|
||||
|
||||
<partintro>
|
||||
|
||||
<!-- {{{ tokyotyranttable intro -->
|
||||
<section xml:id="tokyotyranttable.intro">
|
||||
&reftitle.intro;
|
||||
<para>
|
||||
Provides an API to the table databases. A table database can be create using the following
|
||||
command: <literal>ttserver -port 1979 /tmp/tt_table.tct</literal>. In Tokyo Tyrant the table
|
||||
API is a schemaless database which can store arbitrary amount of key-value pairs under a single
|
||||
primary key.
|
||||
</para>
|
||||
</section>
|
||||
<!-- }}} -->
|
||||
|
||||
<section xml:id="tokyotyranttable.synopsis">
|
||||
&reftitle.classsynopsis;
|
||||
|
||||
<!-- {{{ Synopsis -->
|
||||
<classsynopsis>
|
||||
<ooclass><classname>TokyoTyrantTable</classname></ooclass>
|
||||
|
||||
<!-- {{{ Class synopsis -->
|
||||
<classsynopsisinfo>
|
||||
<ooclass>
|
||||
<classname>TokyoTyrantTable</classname>
|
||||
</ooclass>
|
||||
|
||||
<ooclass>
|
||||
<modifier>extends</modifier>
|
||||
<classname>TokyoTyrant</classname>
|
||||
</ooclass>
|
||||
</classsynopsisinfo>
|
||||
<!-- }}} -->
|
||||
|
||||
<classsynopsisinfo role="comment">Methods</classsynopsisinfo>
|
||||
<xi:include xpointer="xmlns(db=http://docbook.org/ns/docbook) xpointer(id('class.tokyotyranttable')/db:refentry/db:refsect1[@role='description']/descendant::db:methodsynopsis[1])" />
|
||||
|
||||
<classsynopsisinfo role="comment">Inherited methods</classsynopsisinfo>
|
||||
<xi:include xpointer="xmlns(db=http://docbook.org/ns/docbook) xpointer(id('class.tokyotyrant')/db:refentry/db:refsect1[@role='description']/descendant::db:methodsynopsis[1])" />
|
||||
|
||||
</classsynopsis>
|
||||
<!-- }}} -->
|
||||
|
||||
</section>
|
||||
|
||||
</partintro>
|
||||
|
||||
&reference.tokyo-tyrant.entities.tokyotyranttable;
|
||||
|
||||
</phpdoc:classref>
|
||||
|
||||
<!-- 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:"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
reference/tokyo_tyrant/tokyotyranttable/add.xml
Normal file
95
reference/tokyo_tyrant/tokyotyranttable/add.xml
Normal file
|
@ -0,0 +1,95 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- $Revision: $ -->
|
||||
|
||||
<refentry xml:id="tokyotyranttable.add" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
<refnamediv>
|
||||
<refname>TokyoTyrantTable::add</refname>
|
||||
<refpurpose>Adds a record</refpurpose>
|
||||
</refnamediv>
|
||||
|
||||
<refsect1 role="description">
|
||||
&reftitle.description;
|
||||
<methodsynopsis>
|
||||
<modifier>public</modifier> <type>int</type><methodname>TokyoTyrantTable::add</methodname>
|
||||
<methodparam><type>string</type><parameter>key</parameter></methodparam>
|
||||
<methodparam><type>mixed</type><parameter>increment</parameter></methodparam>
|
||||
<methodparam choice="opt"><type>string</type><parameter>type</parameter></methodparam>
|
||||
</methodsynopsis>
|
||||
<para>
|
||||
This method is not supported with table databases.
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="parameters">
|
||||
&reftitle.parameters;
|
||||
<para>
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term><parameter>key</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
The string key
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>increment</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
The amount to increment
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>type</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
<constant>TokyoTyrant::RDB_RECINT</constant> or <constant>TokyoTyrant::RDB_RECDBL</constant> constant.
|
||||
If this parameter is omitted the type is guessed from the <parameter>increment</parameter>
|
||||
parameters type.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="returnvalues">
|
||||
&reftitle.returnvalues;
|
||||
<para>
|
||||
This method throws an TokyoTyrantException if used through this class.
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
|
||||
<refsect1 role="seealso">
|
||||
&reftitle.seealso;
|
||||
<para>
|
||||
<simplelist>
|
||||
<member><methodname>TokyoTyrant::add</methodname></member>
|
||||
</simplelist>
|
||||
</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
|
||||
indent-tabs-mode:nil
|
||||
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
|
||||
-->
|
88
reference/tokyo_tyrant/tokyotyranttable/genuid.xml
Normal file
88
reference/tokyo_tyrant/tokyotyranttable/genuid.xml
Normal file
|
@ -0,0 +1,88 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- $Revision: $ -->
|
||||
|
||||
<refentry xml:id="tokyotyranttable.genuid" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
<refnamediv>
|
||||
<refname>TokyoTyrantTable::genUid</refname>
|
||||
<refpurpose>Generate unique id</refpurpose>
|
||||
</refnamediv>
|
||||
|
||||
<refsect1 role="description">
|
||||
&reftitle.description;
|
||||
<methodsynopsis>
|
||||
<modifier>public</modifier> <type>int</type><methodname>TokyoTyrantTable::genUid</methodname>
|
||||
<void />
|
||||
</methodsynopsis>
|
||||
<para>
|
||||
Generates an unique id inside the table database. In table databases rows are referenced
|
||||
using a numeric primary key.
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="parameters">
|
||||
&reftitle.parameters;
|
||||
&no.function.parameters;
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="returnvalues">
|
||||
&reftitle.returnvalues;
|
||||
<para>
|
||||
Returns an unique id or throws TokyoTyrantException on error
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="examples">
|
||||
&reftitle.examples;
|
||||
<para>
|
||||
<example>
|
||||
<title><methodname>TokyoTyrantTable::genUid</methodname> example</title>
|
||||
<programlisting role="php">
|
||||
<![CDATA[
|
||||
<?php
|
||||
$tt = new TokyoTyrantTable("localhost", 1122);
|
||||
|
||||
echo $tt->genUid();
|
||||
?>
|
||||
]]>
|
||||
</programlisting>
|
||||
&example.outputs.similar;
|
||||
<screen>
|
||||
<![CDATA[
|
||||
4
|
||||
]]>
|
||||
</screen>
|
||||
</example>
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="seealso">
|
||||
&reftitle.seealso;
|
||||
<para>
|
||||
<simplelist>
|
||||
<member><methodname>TokyoTyrantTable::put</methodname></member>
|
||||
</simplelist>
|
||||
</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
|
||||
indent-tabs-mode:nil
|
||||
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
|
||||
-->
|
109
reference/tokyo_tyrant/tokyotyranttable/get.xml
Normal file
109
reference/tokyo_tyrant/tokyotyranttable/get.xml
Normal file
|
@ -0,0 +1,109 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- $Revision: $ -->
|
||||
|
||||
<refentry xml:id="tokyotyranttable.get" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
<refnamediv>
|
||||
<refname>TokyoTyrantTable::get</refname>
|
||||
<refpurpose>Get a row</refpurpose>
|
||||
</refnamediv>
|
||||
|
||||
<refsect1 role="description">
|
||||
&reftitle.description;
|
||||
<methodsynopsis>
|
||||
<modifier>public</modifier> <type>void</type><methodname>TokyoTyrantTable::get</methodname>
|
||||
<methodparam><type>mixed</type><parameter>keys</parameter></methodparam>
|
||||
</methodsynopsis>
|
||||
<para>
|
||||
Gets a row from table database. <parameter>keys</parameter> is a single integer for
|
||||
the primary key of the row or an array of integers for multiple rows.
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="parameters">
|
||||
&reftitle.parameters;
|
||||
<para>
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term><parameter>keys</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Single integer or an array of integers for multiple keys
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="returnvalues">
|
||||
&reftitle.returnvalues;
|
||||
<para>
|
||||
Returns the row as an array or an array of arrays for multiple keys
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="examples">
|
||||
&reftitle.examples;
|
||||
<para>
|
||||
<example>
|
||||
<title><methodname>TokyoTyrantTable::get</methodname> example</title>
|
||||
<programlisting role="php">
|
||||
<![CDATA[
|
||||
<?php
|
||||
/* Connect to a table database */
|
||||
$tt = new TokyoTyrantTable("localhost", 1979);
|
||||
|
||||
/* Passing null to put generates a new uid */
|
||||
$index = $tt->put(null, array("column1" => "some data", "column2" => "more data"));
|
||||
|
||||
/* Get the row back */
|
||||
var_dump($tt->get($index));
|
||||
?>
|
||||
]]>
|
||||
</programlisting>
|
||||
&example.outputs;
|
||||
<screen>
|
||||
<![CDATA[
|
||||
array(2) {
|
||||
["column1"]=>
|
||||
string(9) "some data"
|
||||
["column2"]=>
|
||||
string(9) "more data"
|
||||
}
|
||||
]]>
|
||||
</screen>
|
||||
</example>
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="seealso">
|
||||
&reftitle.seealso;
|
||||
<para>
|
||||
<simplelist>
|
||||
<member><methodname>TokyoTyrantTable::put</methodname></member>
|
||||
</simplelist>
|
||||
</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
|
||||
indent-tabs-mode:nil
|
||||
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
|
||||
-->
|
108
reference/tokyo_tyrant/tokyotyranttable/getquery.xml
Normal file
108
reference/tokyo_tyrant/tokyotyranttable/getquery.xml
Normal file
|
@ -0,0 +1,108 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- $Revision: $ -->
|
||||
|
||||
<refentry xml:id="tokyotyranttable.getquery" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
<refnamediv>
|
||||
<refname>TokyoTyrantTable::getQuery</refname>
|
||||
<refpurpose>Get a query object</refpurpose>
|
||||
</refnamediv>
|
||||
|
||||
<refsect1 role="description">
|
||||
&reftitle.description;
|
||||
<methodsynopsis>
|
||||
<modifier>public</modifier> <type>TokyoTyrantQuery</type><methodname>TokyoTyrantTable::getQuery</methodname>
|
||||
<void />
|
||||
</methodsynopsis>
|
||||
<para>
|
||||
Get a query object to execute searches on the database
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="parameters">
|
||||
&reftitle.parameters;
|
||||
&no.function.parameters;
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="returnvalues">
|
||||
&reftitle.returnvalues;
|
||||
<para>
|
||||
Returns TokyoTyrantQuery on success and throws TokyoTyrantException on error
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="examples">
|
||||
&reftitle.examples;
|
||||
<para>
|
||||
<example>
|
||||
<title><methodname>TokyoTyrantTable::getQuery</methodname> example</title>
|
||||
<programlisting role="php">
|
||||
<![CDATA[
|
||||
<?php
|
||||
/* Connect to a table database */
|
||||
$table = new TokyoTyrantTable("localhost", 1979);
|
||||
|
||||
/* Put a few rows */
|
||||
$table->put(null, array("column1" => "some data", "column2" => "more data"));
|
||||
$table->put(null, array("something" => "value", "data" => "good data"));
|
||||
|
||||
/* Get query object */
|
||||
$query = $table->getQuery();
|
||||
|
||||
/* Add condition to query */
|
||||
$query->addCond('data', TokyoTyrant::RDBQC_STREQ, 'good data');
|
||||
|
||||
/* Get matching rows */
|
||||
var_dump($query->search());
|
||||
?>
|
||||
]]>
|
||||
</programlisting>
|
||||
&example.outputs.similar;
|
||||
<screen>
|
||||
<![CDATA[
|
||||
array(1) {
|
||||
[11]=>
|
||||
array(2) {
|
||||
["something"]=>
|
||||
string(5) "value"
|
||||
["data"]=>
|
||||
string(9) "good data"
|
||||
}
|
||||
}
|
||||
]]>
|
||||
</screen>
|
||||
</example>
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="seealso">
|
||||
&reftitle.seealso;
|
||||
<para>
|
||||
<simplelist>
|
||||
<member><methodname>TokyoTyrantQuery::search</methodname></member>
|
||||
<member><methodname>TokyoTyrantQuery::out</methodname></member>
|
||||
</simplelist>
|
||||
</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
|
||||
indent-tabs-mode:nil
|
||||
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
|
||||
-->
|
97
reference/tokyo_tyrant/tokyotyranttable/out.xml
Normal file
97
reference/tokyo_tyrant/tokyotyranttable/out.xml
Normal file
|
@ -0,0 +1,97 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- $Revision: $ -->
|
||||
|
||||
<refentry xml:id="tokyotyranttable.out" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
<refnamediv>
|
||||
<refname>TokyoTyrantTable::out</refname>
|
||||
<refpurpose>Remove records</refpurpose>
|
||||
</refnamediv>
|
||||
|
||||
<refsect1 role="description">
|
||||
&reftitle.description;
|
||||
<methodsynopsis>
|
||||
<modifier>public</modifier> <type>void</type><methodname>TokyoTyrantTable::out</methodname>
|
||||
<methodparam><type>mixed</type><parameter>keys</parameter></methodparam>
|
||||
</methodsynopsis>
|
||||
<para>
|
||||
Removes records from a table database.
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="parameters">
|
||||
&reftitle.parameters;
|
||||
<para>
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term><parameter>keys</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
A single integer key or an array of integers
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="returnvalues">
|
||||
&reftitle.returnvalues;
|
||||
<para>
|
||||
This method returns the current object and throws TokyoTyrantException on failure.
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="examples">
|
||||
&reftitle.examples;
|
||||
<para>
|
||||
<example>
|
||||
<title><methodname>TokyoTyrantTable::out</methodname> example</title>
|
||||
<programlisting role="php">
|
||||
<![CDATA[
|
||||
<?php
|
||||
/* Connect to a table database */
|
||||
$tt = new TokyoTyrantTable("localhost", 1979);
|
||||
|
||||
/* Passing null to put generates a new uid */
|
||||
$index = $tt->put(null, array("column1" => "some data", "column2" => "more data"));
|
||||
|
||||
/* Delete the row */
|
||||
$tt->out($index);
|
||||
?>
|
||||
]]>
|
||||
</programlisting>
|
||||
</example>
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="seealso">
|
||||
&reftitle.seealso;
|
||||
<para>
|
||||
<simplelist>
|
||||
<member><methodname>TokyoTyrantTable::put</methodname></member>
|
||||
</simplelist>
|
||||
</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
|
||||
indent-tabs-mode:nil
|
||||
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
|
||||
-->
|
131
reference/tokyo_tyrant/tokyotyranttable/put.xml
Normal file
131
reference/tokyo_tyrant/tokyotyranttable/put.xml
Normal file
|
@ -0,0 +1,131 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- $Revision: $ -->
|
||||
|
||||
<refentry xml:id="tokyotyranttable.put" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
<refnamediv>
|
||||
<refname>TokyoTyrantTable::put</refname>
|
||||
<refpurpose>Store a row</refpurpose>
|
||||
</refnamediv>
|
||||
|
||||
<refsect1 role="description">
|
||||
&reftitle.description;
|
||||
<methodsynopsis>
|
||||
<modifier>public</modifier> <type>int</type><methodname>TokyoTyrantTable::put</methodname>
|
||||
<methodparam><type>int</type><parameter>key</parameter></methodparam>
|
||||
<methodparam><type>array</type><parameter>columns</parameter></methodparam>
|
||||
</methodsynopsis>
|
||||
<para>
|
||||
Puts a new row into the database. This method parameters are <parameter>key</parameter> which is
|
||||
the primary key of the row, passing &null; will generate a new unique id. <parameter>value</parameter>
|
||||
is an array containing the row contents which is usually key value pairs.
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="parameters">
|
||||
&reftitle.parameters;
|
||||
<para>
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term><parameter>key</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
The primary key of the row
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>columns</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
The row contents
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="returnvalues">
|
||||
&reftitle.returnvalues;
|
||||
<para>
|
||||
Returns the primary key on success and throws TokyoTyrantException on error
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="examples">
|
||||
&reftitle.examples;
|
||||
<para>
|
||||
<example>
|
||||
<title><methodname>TokyoTyrantTable::put</methodname> example</title>
|
||||
<programlisting role="php">
|
||||
<![CDATA[
|
||||
<?php
|
||||
/* Connect to a table database */
|
||||
$tt = new TokyoTyrantTable("localhost", 1979);
|
||||
|
||||
/* Passing null to put generates a new uid */
|
||||
$index = $tt->put(null, array("column1" => "some data", "column2" => "more data"));
|
||||
|
||||
/* Get the row back */
|
||||
var_dump($tt->get($index));
|
||||
|
||||
/* Modify an existing row */
|
||||
$tt->put($index, array("column1" => "other data", "column2" => "better data"));
|
||||
|
||||
/* Get the row back */
|
||||
var_dump($tt->get($index));
|
||||
?>
|
||||
]]>
|
||||
</programlisting>
|
||||
&example.outputs;
|
||||
<screen>
|
||||
<![CDATA[
|
||||
array(2) {
|
||||
["column1"]=>
|
||||
string(9) "some data"
|
||||
["column2"]=>
|
||||
string(9) "more data"
|
||||
}
|
||||
array(2) {
|
||||
["column1"]=>
|
||||
string(10) "other data"
|
||||
["column2"]=>
|
||||
string(11) "better data"
|
||||
}
|
||||
]]>
|
||||
</screen>
|
||||
</example>
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="seealso">
|
||||
&reftitle.seealso;
|
||||
<para>
|
||||
<simplelist>
|
||||
<member><methodname>TokyoTyrantTable::get</methodname></member>
|
||||
</simplelist>
|
||||
</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
|
||||
indent-tabs-mode:nil
|
||||
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
|
||||
-->
|
132
reference/tokyo_tyrant/tokyotyranttable/putcat.xml
Normal file
132
reference/tokyo_tyrant/tokyotyranttable/putcat.xml
Normal file
|
@ -0,0 +1,132 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- $Revision: $ -->
|
||||
|
||||
<refentry xml:id="tokyotyranttable.putcat" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
<refnamediv>
|
||||
<refname>TokyoTyrantTable::putCat</refname>
|
||||
<refpurpose>Concatenates to a row</refpurpose>
|
||||
</refnamediv>
|
||||
|
||||
<refsect1 role="description">
|
||||
&reftitle.description;
|
||||
<methodsynopsis>
|
||||
<modifier>public</modifier> <type>void</type><methodname>TokyoTyrantTable::putCat</methodname>
|
||||
<methodparam><type>int</type><parameter>key</parameter></methodparam>
|
||||
<methodparam><type>array</type><parameter>columns</parameter></methodparam>
|
||||
</methodsynopsis>
|
||||
<para>
|
||||
This method can be used to add new columns to existing records. Existing keys will be left unmodified
|
||||
but any new columns will be appended to the row. Passing null as key will generate a new row.
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="parameters">
|
||||
&reftitle.parameters;
|
||||
<para>
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term><parameter>key</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
The primary key of the row or &null;
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>columns</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Array of row contents
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="returnvalues">
|
||||
&reftitle.returnvalues;
|
||||
<para>
|
||||
Returns the primary key and throws TokyoTyrantException on error.
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="examples">
|
||||
&reftitle.examples;
|
||||
<para>
|
||||
<example>
|
||||
<title><methodname>TokyoTyrantTable::putCat</methodname> example</title>
|
||||
<programlisting role="php">
|
||||
<![CDATA[
|
||||
<?php
|
||||
/* Connect to a table database */
|
||||
$tt = new TokyoTyrantTable("localhost", 1979);
|
||||
|
||||
/* Passing null to put generates a new uid */
|
||||
$index = $tt->put(null, array("column1" => "some data", "column2" => "more data"));
|
||||
|
||||
/* Get the row back */
|
||||
var_dump($tt->get($index));
|
||||
|
||||
/* Modify an existing row */
|
||||
$tt->putcat($index, array("column1" => "something new", "new_column" => "other data"));
|
||||
|
||||
/* Get the row back */
|
||||
var_dump($tt->get($index));
|
||||
?>
|
||||
]]>
|
||||
</programlisting>
|
||||
&example.outputs;
|
||||
<screen>
|
||||
<![CDATA[
|
||||
array(2) {
|
||||
["column1"]=>
|
||||
string(9) "some data"
|
||||
["column2"]=>
|
||||
string(9) "more data"
|
||||
}
|
||||
array(3) {
|
||||
["column1"]=>
|
||||
string(9) "some data"
|
||||
["column2"]=>
|
||||
string(9) "more data"
|
||||
["new_column"]=>
|
||||
string(10) "other data"
|
||||
}
|
||||
]]>
|
||||
</screen>
|
||||
</example>
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="seealso">
|
||||
&reftitle.seealso;
|
||||
<para>
|
||||
<simplelist>
|
||||
<member><methodname>TokyoTyrantTable::put</methodname></member>
|
||||
</simplelist>
|
||||
</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
|
||||
indent-tabs-mode:nil
|
||||
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
|
||||
-->
|
138
reference/tokyo_tyrant/tokyotyranttable/putkeep.xml
Normal file
138
reference/tokyo_tyrant/tokyotyranttable/putkeep.xml
Normal file
|
@ -0,0 +1,138 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- $Revision: $ -->
|
||||
|
||||
<refentry xml:id="tokyotyranttable.putkeep" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
<refnamediv>
|
||||
<refname>TokyoTyrantTable::putKeep</refname>
|
||||
<refpurpose>Put a new record</refpurpose>
|
||||
</refnamediv>
|
||||
|
||||
<refsect1 role="description">
|
||||
&reftitle.description;
|
||||
<methodsynopsis>
|
||||
<modifier>public</modifier> <type>void</type><methodname>TokyoTyrantTable::putKeep</methodname>
|
||||
<methodparam><type>int</type><parameter>key</parameter></methodparam>
|
||||
<methodparam><type>array</type><parameter>columns</parameter></methodparam>
|
||||
</methodsynopsis>
|
||||
<para>
|
||||
Puts a new record into the database. If the key already exists this method throws an exception
|
||||
indicating that the records exists.
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="parameters">
|
||||
&reftitle.parameters;
|
||||
<para>
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term><parameter>key</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
The primary key of the row or &null;
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>columns</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Array of the row contents
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="returnvalues">
|
||||
&reftitle.returnvalues;
|
||||
<para>
|
||||
Returns the primary key and throws TokyoTyrantException on error.
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="examples">
|
||||
&reftitle.examples;
|
||||
<para>
|
||||
<example>
|
||||
<title><methodname>TokyoTyrantTable::putKeep</methodname> example</title>
|
||||
<programlisting role="php">
|
||||
<![CDATA[
|
||||
<?php
|
||||
/* Connect to a table database */
|
||||
$tt = new TokyoTyrantTable("localhost", 1979);
|
||||
|
||||
/* Passing null to put generates a new uid */
|
||||
$index = $tt->put(null, array("column1" => "some data", "column2" => "more data"));
|
||||
|
||||
/* Get the row back */
|
||||
var_dump($tt->get($index));
|
||||
|
||||
try {
|
||||
$tt->putKeep($index, array("column1" => "something new", "new_column" => "other data"));
|
||||
} catch (TokyoTyrantException $e) {
|
||||
if ($e->getCode() === TokyoTyrant::TTE_KEEP) {
|
||||
echo "Existing record! Not modified\n";
|
||||
} else {
|
||||
echo "Error: " , $e->getMessage() , "\n";
|
||||
}
|
||||
}
|
||||
|
||||
/* Get the row back */
|
||||
var_dump($tt->get($index));
|
||||
?>
|
||||
]]>
|
||||
</programlisting>
|
||||
&example.outputs.similar;
|
||||
<screen>
|
||||
<![CDATA[
|
||||
array(2) {
|
||||
["column1"]=>
|
||||
string(9) "some data"
|
||||
["column2"]=>
|
||||
string(9) "more data"
|
||||
}
|
||||
Existing record! Not modified
|
||||
array(2) {
|
||||
["column1"]=>
|
||||
string(9) "some data"
|
||||
["column2"]=>
|
||||
string(9) "more data"
|
||||
}
|
||||
]]>
|
||||
</screen>
|
||||
</example>
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="seealso">
|
||||
&reftitle.seealso;
|
||||
<para>
|
||||
<simplelist>
|
||||
<member><methodname>TokyoTyrantTable::put</methodname></member>
|
||||
</simplelist>
|
||||
</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
|
||||
indent-tabs-mode:nil
|
||||
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
|
||||
-->
|
87
reference/tokyo_tyrant/tokyotyranttable/putnr.xml
Normal file
87
reference/tokyo_tyrant/tokyotyranttable/putnr.xml
Normal file
|
@ -0,0 +1,87 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- $Revision: $ -->
|
||||
|
||||
<refentry xml:id="tokyotyranttable.putnr" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
<refnamediv>
|
||||
<refname>TokyoTyrantTable::putNr</refname>
|
||||
<refpurpose>Puts value</refpurpose>
|
||||
</refnamediv>
|
||||
|
||||
<refsect1 role="description">
|
||||
&reftitle.description;
|
||||
<methodsynopsis>
|
||||
<modifier>public</modifier> <type>void</type><methodname>TokyoTyrantTable::putNr</methodname>
|
||||
<methodparam><type>mixed</type><parameter>keys</parameter></methodparam>
|
||||
<methodparam choice="opt"><type>string</type><parameter>value</parameter></methodparam>
|
||||
</methodsynopsis>
|
||||
<para>
|
||||
This method is not supported on table databases. Calling this method through TokyoTyrantTable
|
||||
is considered an error and an TokyoTyrantException will be thrown.
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="parameters">
|
||||
&reftitle.parameters;
|
||||
<para>
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term><parameter>keys</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
A string key or an array of key-value pairs
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>value</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
The value in case a string key is used
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="returnvalues">
|
||||
&reftitle.returnvalues;
|
||||
<para>
|
||||
This method is not supported on table databases. Calling this method through TokyoTyrantTable
|
||||
is considered an error and an TokyoTyrantException will be thrown.
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="seealso">
|
||||
&reftitle.seealso;
|
||||
<para>
|
||||
<simplelist>
|
||||
<member><methodname>TokyoTyrant::putNr</methodname></member>
|
||||
<member><methodname>TokyoTyrant::putKeep</methodname></member>
|
||||
<member><methodname>TokyoTyrant::putCat</methodname></member>
|
||||
</simplelist>
|
||||
</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
|
||||
indent-tabs-mode:nil
|
||||
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
|
||||
-->
|
98
reference/tokyo_tyrant/tokyotyranttable/putshl.xml
Normal file
98
reference/tokyo_tyrant/tokyotyranttable/putshl.xml
Normal file
|
@ -0,0 +1,98 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- $Revision: $ -->
|
||||
|
||||
<refentry xml:id="tokyotyranttable.putshl" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
<refnamediv>
|
||||
<refname>TokyoTyrantTable::putShl</refname>
|
||||
<refpurpose>Concatenates to a record</refpurpose>
|
||||
</refnamediv>
|
||||
|
||||
<refsect1 role="description">
|
||||
&reftitle.description;
|
||||
<methodsynopsis>
|
||||
<modifier>public</modifier> <type>void</type><methodname>TokyoTyrantTable::putShl</methodname>
|
||||
<methodparam><type>string</type><parameter>key</parameter></methodparam>
|
||||
<methodparam><type>string</type><parameter>value</parameter></methodparam>
|
||||
<methodparam><type>int</type><parameter>width</parameter></methodparam>
|
||||
</methodsynopsis>
|
||||
<para>
|
||||
This method is not supported on table databases. Calling this method through TokyoTyrantTable
|
||||
is considered an error and an TokyoTyrantException will be thrown.
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="parameters">
|
||||
&reftitle.parameters;
|
||||
<para>
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term><parameter>key</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
A string key
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>value</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
The value to concatenate
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>width</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
The width of the record
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="returnvalues">
|
||||
&reftitle.returnvalues;
|
||||
<para>
|
||||
This method is not supported on table databases.
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="seealso">
|
||||
&reftitle.seealso;
|
||||
<para>
|
||||
<simplelist>
|
||||
<member><methodname>TokyoTyrant::put</methodname></member>
|
||||
<member><methodname>TokyoTyrant::putKeep</methodname></member>
|
||||
<member><methodname>TokyoTyrant::putCat</methodname></member>
|
||||
<member><methodname>TokyoTyrantTable::put</methodname></member>
|
||||
<member><methodname>TokyoTyrantTable::putKeep</methodname></member>
|
||||
<member><methodname>TokyoTyrantTable::putCat</methodname></member>
|
||||
</simplelist>
|
||||
</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
|
||||
indent-tabs-mode:nil
|
||||
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
|
||||
-->
|
74
reference/tokyo_tyrant/tokyotyranttable/setindex.xml
Normal file
74
reference/tokyo_tyrant/tokyotyranttable/setindex.xml
Normal file
|
@ -0,0 +1,74 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- $Revision: $ -->
|
||||
|
||||
<refentry xml:id="tokyotyranttable.setindex" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
<refnamediv>
|
||||
<refname>TokyoTyrantTable::setIndex</refname>
|
||||
<refpurpose>Sets index</refpurpose>
|
||||
</refnamediv>
|
||||
|
||||
<refsect1 role="description">
|
||||
&reftitle.description;
|
||||
<methodsynopsis>
|
||||
<modifier>public</modifier> <type>void</type><methodname>TokyoTyrantTable::setIndex</methodname>
|
||||
<methodparam><type>string</type><parameter>column</parameter></methodparam>
|
||||
<methodparam><type>int</type><parameter>type</parameter></methodparam>
|
||||
</methodsynopsis>
|
||||
<para>
|
||||
Sets an index on a specified column. The index type is one of the <constant>TokyoTyrant::RDBIT_*</constant> constants
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="parameters">
|
||||
&reftitle.parameters;
|
||||
<para>
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term><parameter>column</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
The name of the column
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>type</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
The index type
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="returnvalues">
|
||||
&reftitle.returnvalues;
|
||||
<para>
|
||||
This method returns the current object and throws TokyoTyrantException on failure.
|
||||
</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
|
||||
indent-tabs-mode:nil
|
||||
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
|
||||
-->
|
99
reference/tokyo_tyrant/versions.xml
Normal file
99
reference/tokyo_tyrant/versions.xml
Normal file
|
@ -0,0 +1,99 @@
|
|||
<?xml version='1.0' encoding='utf-8'?>
|
||||
<!-- $Revision: $ -->
|
||||
<!--
|
||||
Do NOT translate this file
|
||||
-->
|
||||
<!--
|
||||
Example entries:
|
||||
<function name='classname::methodname' from='PECL extname >= 1.1'/>
|
||||
<function name='functionname' from='PHP >= 5.3.0'/>
|
||||
<function name='functionname' from='PHP 5'/>
|
||||
-->
|
||||
<versions>
|
||||
<!-- Methods -->
|
||||
<function name='tokyotyrant::__construct' from='PECL tokyo_tyrant >= Unknown'/>
|
||||
<function name='tokyotyrant::connect' from='PECL tokyo_tyrant >= Unknown'/>
|
||||
<function name='tokyotyrant::connecturi' from='PECL tokyo_tyrant >= Unknown'/>
|
||||
<function name='tokyotyrant::vanish' from='PECL tokyo_tyrant >= Unknown'/>
|
||||
<function name='tokyotyrant::stat' from='PECL tokyo_tyrant >= Unknown'/>
|
||||
<function name='tokyotyrant::fwmkeys' from='PECL tokyo_tyrant >= Unknown'/>
|
||||
<function name='tokyotyrant::size' from='PECL tokyo_tyrant >= Unknown'/>
|
||||
<function name='tokyotyrant::num' from='PECL tokyo_tyrant >= Unknown'/>
|
||||
<function name='tokyotyrant::sync' from='PECL tokyo_tyrant >= Unknown'/>
|
||||
<function name='tokyotyrant::ext' from='PECL tokyo_tyrant >= Unknown'/>
|
||||
<function name='tokyotyrant::copy' from='PECL tokyo_tyrant >= Unknown'/>
|
||||
<function name='tokyotyrant::restore' from='PECL tokyo_tyrant >= Unknown'/>
|
||||
<function name='tokyotyrant::setmaster' from='PECL tokyo_tyrant >= Unknown'/>
|
||||
<function name='tokyotyrant::put' from='PECL tokyo_tyrant >= Unknown'/>
|
||||
<function name='tokyotyrant::putkeep' from='PECL tokyo_tyrant >= Unknown'/>
|
||||
<function name='tokyotyrant::putcat' from='PECL tokyo_tyrant >= Unknown'/>
|
||||
<function name='tokyotyrant::putnr' from='PECL tokyo_tyrant >= Unknown'/>
|
||||
<function name='tokyotyrant::putshl' from='PECL tokyo_tyrant >= Unknown'/>
|
||||
<function name='tokyotyrant::get' from='PECL tokyo_tyrant >= Unknown'/>
|
||||
<function name='tokyotyrant::out' from='PECL tokyo_tyrant >= Unknown'/>
|
||||
<function name='tokyotyrant::add' from='PECL tokyo_tyrant >= Unknown'/>
|
||||
<function name='tokyotyranttable::put' from='PECL tokyo_tyrant >= Unknown'/>
|
||||
<function name='tokyotyranttable::putkeep' from='PECL tokyo_tyrant >= Unknown'/>
|
||||
<function name='tokyotyranttable::putcat' from='PECL tokyo_tyrant >= Unknown'/>
|
||||
<function name='tokyotyranttable::putnr' from='PECL tokyo_tyrant >= Unknown'/>
|
||||
<function name='tokyotyranttable::putshl' from='PECL tokyo_tyrant >= Unknown'/>
|
||||
<function name='tokyotyranttable::get' from='PECL tokyo_tyrant >= Unknown'/>
|
||||
<function name='tokyotyranttable::out' from='PECL tokyo_tyrant >= Unknown'/>
|
||||
<function name='tokyotyranttable::add' from='PECL tokyo_tyrant >= Unknown'/>
|
||||
<function name='tokyotyranttable::setindex' from='PECL tokyo_tyrant >= Unknown'/>
|
||||
<function name='tokyotyranttable::getquery' from='PECL tokyo_tyrant >= Unknown'/>
|
||||
<function name='tokyotyranttable::genuid' from='PECL tokyo_tyrant >= Unknown'/>
|
||||
<function name='tokyotyranttable::__construct' from='PECL tokyo_tyrant >= Unknown'/>
|
||||
<function name='tokyotyranttable::connect' from='PECL tokyo_tyrant >= Unknown'/>
|
||||
<function name='tokyotyranttable::connecturi' from='PECL tokyo_tyrant >= Unknown'/>
|
||||
<function name='tokyotyranttable::vanish' from='PECL tokyo_tyrant >= Unknown'/>
|
||||
<function name='tokyotyranttable::stat' from='PECL tokyo_tyrant >= Unknown'/>
|
||||
<function name='tokyotyranttable::fwmkeys' from='PECL tokyo_tyrant >= Unknown'/>
|
||||
<function name='tokyotyranttable::size' from='PECL tokyo_tyrant >= Unknown'/>
|
||||
<function name='tokyotyranttable::num' from='PECL tokyo_tyrant >= Unknown'/>
|
||||
<function name='tokyotyranttable::sync' from='PECL tokyo_tyrant >= Unknown'/>
|
||||
<function name='tokyotyranttable::ext' from='PECL tokyo_tyrant >= Unknown'/>
|
||||
<function name='tokyotyranttable::copy' from='PECL tokyo_tyrant >= Unknown'/>
|
||||
<function name='tokyotyranttable::restore' from='PECL tokyo_tyrant >= Unknown'/>
|
||||
<function name='tokyotyranttable::setmaster' from='PECL tokyo_tyrant >= Unknown'/>
|
||||
<function name='tokyotyrantquery::__construct' from='PECL tokyo_tyrant >= Unknown'/>
|
||||
<function name='tokyotyrantquery::addcond' from='PECL tokyo_tyrant >= Unknown'/>
|
||||
<function name='tokyotyrantquery::setlimit' from='PECL tokyo_tyrant >= Unknown'/>
|
||||
<function name='tokyotyrantquery::search' from='PECL tokyo_tyrant >= Unknown'/>
|
||||
<function name='tokyotyrantquery::out' from='PECL tokyo_tyrant >= Unknown'/>
|
||||
<function name='tokyotyrantquery::key' from='PECL tokyo_tyrant >= Unknown'/>
|
||||
<function name='tokyotyrantquery::next' from='PECL tokyo_tyrant >= Unknown'/>
|
||||
<function name='tokyotyrantquery::rewind' from='PECL tokyo_tyrant >= Unknown'/>
|
||||
<function name='tokyotyrantquery::current' from='PECL tokyo_tyrant >= Unknown'/>
|
||||
<function name='tokyotyrantquery::valid' from='PECL tokyo_tyrant >= Unknown'/>
|
||||
<function name='tokyotyrantexception::__clone' from='PECL tokyo_tyrant >= Unknown'/>
|
||||
<function name='tokyotyrantexception::__construct' from='PECL tokyo_tyrant >= Unknown'/>
|
||||
<function name='tokyotyrantexception::getmessage' from='PECL tokyo_tyrant >= Unknown'/>
|
||||
<function name='tokyotyrantexception::getcode' from='PECL tokyo_tyrant >= Unknown'/>
|
||||
<function name='tokyotyrantexception::getfile' from='PECL tokyo_tyrant >= Unknown'/>
|
||||
<function name='tokyotyrantexception::getline' from='PECL tokyo_tyrant >= Unknown'/>
|
||||
<function name='tokyotyrantexception::gettrace' from='PECL tokyo_tyrant >= Unknown'/>
|
||||
<function name='tokyotyrantexception::gettraceasstring' from='PECL tokyo_tyrant >= Unknown'/>
|
||||
<function name='tokyotyrantexception::__tostring' from='PECL tokyo_tyrant >= Unknown'/>
|
||||
</versions>
|
||||
|
||||
<!-- 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:"../../../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…
Reference in a new issue