Proposed Python API

Version 10 by vmx
on Mar 26, 2013 07:38.

compared with
Version 11 by mnunberg
on Apr 26, 2013 12:27.

Key
This line was removed.
This word was removed. This word was added.
This line was added.

Changes (4)

View Page History
{code}

The connect will be an instance of the Bucket class. This way the API can be expanded in the future to do administrative tasks on the cluster that are not bucket specific.

h3. Ruby
{code}

h3. Perl

{code}
my $cb = Couchbase::Client->new({server => "server", username => "user", password => "password"});
{code}

h2. Get

c\[key\] | c.get(key1, key2, key3, ...) | c.get(key, :ttl=ttl) |
| *PHP* | $cb->get(key) | $cb->getMulti(array-of-keys) | cb->getAndTouch(key, expiry) |
| *Perl* | $cb->get(key) | $cb->get_multi(array-of-keys) | cb->get(key, { exp => expiry }) |

h2. Set
c\[key\] = value | c.set(key, value, :ttl=ttl) | c.set(key1 => value1, key2 => value2, ...) |
| *PHP* | $cb->set(key, value) | $cb->set(key, value, expiry) | $cb->setMulti(array-of-key-value-pairs) |
| *Perl* | $cb->set(key, value) | $cb->set(key, value, { exp => $expiry }) | $cb->set_multi(\[key, value, { exp => expiry}\], ...) |
https://github.com/mnunberg/perl-Couchbase-Client/commit/b4ee1413746fe58f99d53e48a4560aa794ec195c