GoLang TokyoTyrant::putCat

request it (257)
GoLang replacement for PHP's TokyoTyrant::putCat [edit | history]

Do you know a GoLang replacement for PHP's TokyoTyrant::putCat? Write it!

PHP TokyoTyrant::putCat

PHP original manual for TokyoTyrant::putCat [ show | php.net ]


(PECL tokyo_tyrant >= 0.1.0)

TokyoTyrant::putCatConcatenates to a record


public TokyoTyrant TokyoTyrant::putCat ( mixed $keys [, string $value ] )

Appends a value into existing key or multiple values if keys is an array. The second parameter is mandatory if keys is a string. If the record does not exist a new record is created.



A string key or an array of key-value pairs


The value in case a string key is used

Return Values

This method returns a reference to the current object and throws TokyoTyrantException on failure.


Example #1 TokyoTyrant::putCat() example

/* Connect to a database on default port */
$tt = new TokyoTyrant("localhost");

/* Create a new key */

/* Concatenate single key-value pair */
$tt->putCat("key"" has more data");

/* Echo the key */
echo $tt->get("key");

The above example will output:

value has more data

See Also