NAV
http java php python ruby shell

Introduction

Welcome to the Concourse API!

We have drivers and language bindings for the command line, Java, Ruby, Python, and PHP! As you read through the API documentation, you can view code examples in the area to the right. You can toggle the programming language of the examples with the tabs in the top.

Installation

You can install our language bindings with various package managers for each language.

Dependency Management

TODO

# Install via rubygems
gem install concourse-driver-ruby

# Install via Gemfile
gem 'concourse-driver-ruby'
#TODO
#TODO
#TODO

Import Driver

You’ll need to import and require the top-level Concourse class to establish a connection and use the various methods.

// The HTTP API is accessible from any standard HTTP
// client like cURL or Postman.
import com.cinchapi.concourse.Concourse;
from concourse import Concourse
// TODO
# The concourse shell client is automatically
# shipped with Concourse.

connect

Connect to Concourse and return a handle for operations.

connect()

Connect to Concourse using all the default connection parameters:

NOT SUPPORTED
Concourse concourse = Concourse.connect();
$concourse = Concourse::connect();
concourse = Concourse.connect()
@concourse = Concourse.connect()
concourse shell

connect(environment)

connect(host, port, username, password)

connect(host, port, username, password, environment)

connectWithPrefs(file)

require 'concourse'

concourse = Concourse.connect
import concourse

concourse = concourse.connect()
<?php
$concourse = Concourse::connect();
import com.cinchapi.concourse.Concourse;

public static void main(String...args){
Concourse concourse = Concourse.connect();
}
concourse shell
curl --request POST \
  --url http://localhost:8817/login \
  --header 'content-type: application/json' \
  --data '{"username": "admin", "password": "admin"}'

Connects to localhost:1717 by default Default values are *host:localhost *port:1717 *username:admin *password:admin *environment:

abort

Abort the current transaction and discard any changes that are currently staged. After returning, the driver will return to autocommit mode and all subsequent changes will be committed immediately. Calling this method when the driver is not in staging mode is a no-op.

To abort current transaction use this code:

concourse.stage()
key = "some_key"
value = "some value"
record = 1
@concourse.add key, value, record
@concourse.abort
// Code omitted for clarity

concourse.stage()
//make same changes
concourse.abort()

// Code omitted for clarity
<?php

$concourse.stage()
//make some changes
$concourse.abort()

# With shell, you can just pass the correct header with each request
curl "api_endpoint_here"
  -H "Authorization: meowmeowmeow"

add

Append a key as a value in one or more records.

key = "some_key"
value = "some value"
record = @concourse.add key, value

# Append *keyas *valuein a new record.
concourse.add(key,value)

<?php
# Append *keyas *valuein a new record.
$concourse.add(key,value)
concourse.add("foo", "bar")

add(key, value, record)

Append key as value in record if and only if it doesn’t exist.

key = "some_key"
value = "some value"
record = 24
@concourse.add key, value, record
key = "some_key"
value = "static value"
record = 17
self.concourse.add(key=key, value=value, record=record)
$key = "foo";
$value = "static value";
$record = 17;
$this->concourse->add(['key' => $key, 'value' => $value, 'record' => $record]);
concourse.add("foo", "bar", 1);

add(key, value, records)

Atomically append key as value in each of the records where it doesn’t exist.

key = "some_key"
value = "static value"
records = [1, 2, 3]
result = @concourse.add key, value, records
key = "some_key"
value = "static value"
records = [1, 2, 3]
result = self.concourse.add(key=key, value=value, records=records)
$key = "foo";
$value = "static value";
$records = [1, 2, 3];
$result = $this->concourse->add(['key' => $key, 'value' => $value, 'record' => $records]);
concourse.add("foo", "bar", concourse.find("foo", Operator.NOT_EQUALS, "bar"));

audit

Return a list of all the changes ever made to record

key1 = "some_key_1"
key2 = "some_key_2"
key3 = "some_key_3"
value = "foo"
record = 1002
@concourse.add key1, value, record
@concourse.add key2, value, record
@concourse.add key3, value, record
audit = @concourse.audit record //audit.length = 3

key1 = "some_key_1"
key2 = "some_key_2"
key3 = "some_key_3"
value = "foo"
record = 1002
self.concourse.add(key1, value, record)
self.concourse.add(key2, value, record)
self.concourse.add(key3, value, record)
audit = self.concourse.audit(record)
$key1 = "some_key_1";
$key2 = "some_key_2";
$key3 = "some_key_3";
$value = "foo";
$record = 1002;
$this->concourse->add($key1, $value, $record);
$this->concourse->add($key2, $value, $record);
$this->concourse->add($key3, $value, $record);
$audit = $this->concourse->audit($record);
Map<Timestamp, String> audit = concourse.audit(12131);

audit(record, start)

Return a list all the changes made to record since start (inclusive).

key1 = "some_key_1"
key2 = "some_key_2"
key3 = "some_key_3"
value = "bar"
record = 276
@concourse.add key1, value, record
@concourse.add key2, value, record
@concourse.add key3, value, record
start = @concourse.time
@concourse.remove key1, value, record
@concourse.remove key2, value, record
@concourse.remove key3, value, record
audit = @concourse.audit record, start:start //audit.length = 3
key1 = "some_key_1"
key2 = "some_key_2"
key3 = "some_key_3"
value = "bar"
record = 344
self.concourse.add(key1, value, record)
self.concourse.add(key2, value, record)
self.concourse.add(key3, value, record)
start = self.concourse.time()
self.concourse.remove(key1, value, record)
self.concourse.remove(key2, value, record)
self.concourse.remove(key3, value, record)
audit = self.concourse.audit(record, start=start)
$key1 = "some_key_1";
$key2 = "some_key_2";
$key3 = "some_key_3";
$value = "bar";
$record = 344;
$this->concourse->add($key1, $value, $record);
$this->concourse->add($key2, $value, $record);
$this->concourse->add($key3, $value, $record);
$start = $this->concourse->time();
$this->concourse->remove($key1, $value, $record);
$this->concourse->remove($key2, $value, $record);
$this->concourse->remove($key3, $value, $record);
$audit = $this->concourse->audit($record, array('start' => $start));
Timestamp timestampStart = Timestamp.fromJoda(Timestamp.now().getJoda().minusDays(3));
Map<Timestamp, String> auditing = concourse.audit(record, timestampStart);

audit(record, start, end)

Return a list all the changes made to record between start (inclusive) and end (non-inclusive).

key1 = "some_key_1"
key2 = "some_key_2"
key3 = "some_key_3"
value = "bar"
record = 276

@concourse.add key1, value, record
@concourse.add key2, value, record
@concourse.add key3, value, record
start = @concourse.time

@concourse.remove key1, value, record
@concourse.remove key2, value, record
@concourse.remove key3, value, record
time_end = @concourse.time

@concourse.add key1, value, record
@concourse.add key2, value, record
@concourse.add key3, value, record

audit = @concourse.audit record, start:start, end:time_end //audit.length = 3
key1 = "some_key_1"
key2 = "some_key_2"
key3 = "some_key_3"
value = "bar"
record = 344
self.concourse.add(key1, value, record)
self.concourse.add(key2, value, record)
self.concourse.add(key3, value, record)
start = self.concourse.time()
self.concourse.remove(key1, value, record)
self.concourse.remove(key2, value, record)
self.concourse.remove(key3, value, record)
end = self.concourse.time()
self.concourse.add(key1, value, record)
self.concourse.add(key2, value, record)
self.concourse.add(key3, value, record)
audit = self.concourse.audit(record, start=start, end=end)
$key1 = "some_key_1";
$key2 = "some_key_2";
$key3 = "some_key_3";
$value = "bar";
$record = 344;
$this->concourse->add($key1, $value, $record);
$this->concourse->add($key2, $value, $record);
$this->concourse->add($key3, $value, $record);
$start = $this->concourse->time();
$this->concourse->remove($key1, $value, $record);
$this->concourse->remove($key2, $value, $record);
$this->concourse->remove($key3, $value, $record);
$end = $this->concourse->time();
$this->concourse->add($key1, $value, $record);
$this->concourse->add($key2, $value, $record);
$this->concourse->add($key3, $value, $record);
$audit = $this->concourse->audit($record, array('start' => $start, 'end' => $end));
Timestamp timestampStart = Timestamp.fromJoda(Timestamp.now().getJoda().minusDays(3));
Timestamp timestampEnd = Timestamp.fromJoda(Timestamp.now().getJoda().minusDays(1));
Map<Timestamp, String> auditing = concourse.audit(record, timestampStart, timestampEnd);

audit(record, key)

Return a list all the changes ever made to the key field in record

key1 = "some_key_1"
value = "bar"
record = 276
@concourse.add key1, value, record
audit = @concourse.audit record, key //audit.length = 1
key = "some_key"
values = ["one", "two", "three"]
record = 1000
for value in values:
    self.concourse.set(key, value, record)
audit = self.concourse.audit(key, record)
$key = "some_key"';
$values = ["one", "two", "three"];
$record = 1000;
foreach($values as $value){
    $this->concourse->set($key, $value, $record);
}
$audit = $this->concourse->audit($key, $record);
concourse.audit("some_key_1", 12141);

audit(record, key, start)

key1 = "some_key_1"
value = "bar"
record = 276
@concourse.add key1, value, record

start = @concourse.time
@concourse.remove key1, value, record

audit = @concourse.audit key, record, start:start //audit.length = 3
key = "some_key"
values = ["one", "two", "three"]
record = 1001
for value in values:
    self.concourse.set(key, value, record)
start = self.concourse.time()
values = [4, 5, 6]
for value in values:
    self.concourse.set(key, value, record)
audit = self.concourse.audit(key, record, start=start)
$key = "some_key"';
$values = ["one", "two", "three"];
$record = 1000;
$values = [4, 5, 6];
foreach($values as $value){
    $this->concourse->set($key, $value, $record);
}
$start = $this->concourse->time();
foreach($values as $value){
    $this->concourse->set($key, $value, $record);
}
$audit = $this->concourse->audit($key, $record, $start);
Timestamp timestamp = Timestamp.fromJoda(Timestamp.now().getJoda().minusDays(3));
concourse.audit("some_key_1", 12141, timestamp);

browse

Return a view of the values from all records that are currently stored for each of the keys

key1 = "some_key_1"
key2 = "some_key_2"
key3 = "some_key_3"
value1 = "A"
value2 = "B"
value3 = "C"
record1 = 1
record2 = 2
record3 = 3
@concourse.add key1, value1, record1
@concourse.add key2, value2, record2
@concourse.add key3, value3, record3
data = @concourse.browse [key1, key2, key3]
key1 = "some_key_1"
key2 = "some_key_2"
key3 = "some_key_3"
value1 = "A"
value2 = "B"
value3 = "C"
record1 = 1
record2 = 2
record3 = 3
self.concourse.add(key1, value1, record1)
self.concourse.add(key2, value2, record2)
self.concourse.add(key3, value3, record3)
data = self.concourse.browse([key1, key2, key3])
$key1 = "some_key_1";
$key2 = "some_key_2";
$key3 = "some_key_3";
$value1 = "A";
$value2 = "B";
$value3 = "C";
$record1 = 1;
$record2 = 2;
$record3 = 3;
$this->concourse->add($key1, $value1, $record1);
$this->concourse->add($key2, $value2, $record2);
$this->concourse->add($key3, $value3, $record3);
$data = $this->concourse->browse(array($key1, $key2, $key3));
List<String> keys = new ArrayList<String>();
keys.add("some_key_1");
keys.add("some_key_2");
keys.add("some_key_3");
concourse.browse(keys)

browse (keys, timestamp)

Return a view of the values from all records that were stored for each of the keys at `timestamp.

key1 = "some_key_1"
key2 = "some_key_2"
key3 = "some_key_3"
value1 = "A"
value2 = "B"
value3 = "C"
record1 = 1
record2 = 2
record3 = 3
@concourse.add key1, value1, record1
@concourse.add key2, value2, record2
@concourse.add key3, value3, record3
time = @concourse.time
@concourse.add key1, "Foo"
@concourse.add key2, "Foo"
@concourse.add key3, "Foo"
data = @concourse.browse [key1, key2, key3], time:time
key1 = "some_key_1"
key2 = "some_key_2"
key3 = "some_key_3"
value1 = "A"
value2 = "B"
value3 = "C"
record1 = 1
record2 = 2
record3 = 3
self.concourse.add(key1, value1, record1)
self.concourse.add(key2, value2, record2)
self.concourse.add(key3, value3, record3)
time = self.concourse.time()
self.concourse.add(key1, "Foo")
self.concourse.add(key2, "Foo")
self.concourse.add(key3, "Foo")
data = self.concourse.browse([key1, key2, key3], time=time)
$key1 = "some_key_1";
$key2 = "some_key_2";
$key3 = "some_key_3";
$value1 = "A";
$value2 = "B";
$value3 = "C";
$record1 = 1;
$record2 = 2;
$record3 = 3;
$this->concourse->add($key1, $value1, $record1);
$this->concourse->add($key2, $value2, $record2);
$this->concourse->add($key3, $value3, $record3);
$time = $this->concourse->time();
$this->concourse->add($key1, "Foo");
$this->concourse->add($key2, "Foo");
$this->concourse->add($key3, "Foo");
$data = $this->concourse->browse(array($key1, $key2, $key3), $time);
List<String> keys = new ArrayList<String>();

keys.add("some_key_1");
keys.add("some_key_2");
keys.add("some_key_3");
concourse.browse(keys)

browse (key)

Return a view of the values from all records that are currently stored for key.

key1 = "some_key_1"
value = 10
@concourse.add key, value, [1, 2, 3]
value = "some value"
@concourse.add key, value, [10, 20, 30]
data = @concourse.browse key
key = "some_key"
value = 10
self.concourse.add(key, value, [1, 2, 3])
value = "some_value"
self.concourse.add(key, value, [10, 20, 30])
data = self.concourse.browse(key)
$key = "some_key"';
$value = 10;
$this->concourse->add($key, $value, array(1, 2, 3));
$value = "some_value";
$this->concourse->add($key, $value, array(10, 20, 30));
$data = $this->concourse->browse($key);
concourse.browse("some_key_1");

browse (key, timestamp)

Return a view of the values from all records that were stored for each of the key at timestamp.

key1 = "some_key_1"
value = 10
@concourse.add key, value, [1, 2, 3]
value = "some value"
@concourse.add key, value, [10, 20, 30]
time = @concourse.time
@concourse.add key, value, [100, 200, 300]
data = @concourse.browse key, time:time
key = "some_key"
value = 10
self.concourse.add(key, value, [1, 2, 3])
value = "some_value"
self.concourse.add(key, value, [10, 20, 30])
timestamp = self.concourse.time()
self.concourse.add(key=key, value=True)
data = self.concourse.browse(key, timestamp)
$key = "some_key"';
$value = 10;
$this->concourse->add($key, $value, array(1, 2, 3));
$value = "some_value";
$this->concourse->add($key, $value, array(10, 20, 30));
$time = $this->concourse->time();
$this->concourse->add($key, $value, array(100, 200, 300));
$data = $this->concourse->browse($key, array('time' => $time));
Timestamp timestamp = Timestamp.fromJoda(Timestamp.now().getJoda().minusDays(3));
concourse.browse("some_key_1", timestamp);

chronologize

Return a time series that contains a snapshot of the values stored for key in record after every change made to the field.

key = "some_key"
record = 12344

@concourse.add key, 1, record
@concourse.add key, 2, record
@concourse.add key, 3, record
@concourse.remove key, 1, record
@concourse.remove key, 2, record
@concourse.remove key, 3, record
data = @concourse.chronologize key:key, record:record
key = "some_key"
record = 123
self.concourse.add(key, 1, record)
self.concourse.add(key, 2, record)
self.concourse.add(key, 3, record)
self.concourse.remove(key, 1, record)
self.concourse.remove(key, 2, record)
self.concourse.remove(key, 3, record)
data = self.concourse.chronologize(key, record)
$key = "some_key"';
$record = 123;
$this->concourse->add($key, 1, $record);
$this->concourse->add($key, 2, $record);
$this->concourse->add($key, 3, $record);
$this->concourse->remove($key, 1, $record);
$this->concourse->remove($key, 2, $record);
$this->concourse->remove($key, 3, $record);
$data = $this->concourse->chronologize(array('key' => $key, 'record' => $record));
Map<Timestamp, Set<Object>> data = concourse.chronologize("some_key_1", 124123)

chronologize(key, record, start)

Return a time series between start (inclusive) and the present that contains a snapshot of the values stored for key in record after every change made to the field during the time span.

key = "some_key"
record = 12344

@concourse.add key, 1, record
@concourse.add key, 2, record
@concourse.add key, 3, record
start = @concourse.time
@concourse.remove key, 1, record
@concourse.remove key, 2, record
@concourse.remove key, 3, record
data = @concourse.chronologize key:key, record:record, start:start
key = "some_key"
record = 123
self.concourse.add(key, 1, record)
self.concourse.add(key, 2, record)
self.concourse.add(key, 3, record)
start = self.concourse.time()
self.concourse.remove(key, 1, record)
self.concourse.remove(key, 2, record)
self.concourse.remove(key, 3, record)
data = self.concourse.chronologize(key, record, time=start)
$key = "some_key"';
$record = 123;
$this->concourse->add($key, 1, $record);
$this->concourse->add($key, 2, $record);
$this->concourse->add($key, 3, $record);
$start = $this->concourse->time();
$this->concourse->remove($key, 1, $record);
$this->concourse->remove($key, 2, $record);
$this->concourse->remove($key, 3, $record);
$data = $this->concourse->chronologize(array('start' => $start, 'key' => $key, 'record' => $record));
Timestamp timestamp = Timestamp.fromJoda(Timestamp.now().getJoda().minusDays(3));
Map<Timestamp, Set<Object>> data = concourse.chronologize("some_key_1", 124123, timestamp)

chronologize(key, record, start, end)

Return a time series between start (inclusive) and end (non-inclusive) that contains a snapshot of the values stored for key in record after every change made to the field during the time span.

key = "some_key"
record = 12344
@concourse.add key, 1, record
@concourse.add key, 2, record
@concourse.add key, 3, record
start = @concourse.time
@concourse.remove key, 1, record
tend = @concourse.time
@concourse.remove key, 2, record
@concourse.remove key, 3, record
data = @concourse.chronologize key:key, record:record, time:start, end:tend
key = "some_key"
record = 123
self.concourse.add(key, 1, record)
self.concourse.add(key, 2, record)
self.concourse.add(key, 3, record)
start = self.concourse.time()
self.concourse.remove(key, 1, record)
end = self.concourse.time()
self.concourse.remove(key, 2, record)
self.concourse.remove(key, 3, record)
data = self.concourse.chronologize(key, record, timestamp=start, end=end)
$key = "some_key"';
$record = 123;
$this->concourse->add($key, 1, $record);
$this->concourse->add($key, 2, $record);
$this->concourse->add($key, 3, $record);
$start = $this->concourse->time();
$this->concourse->remove($key, 1, $record);
$end = $this->concourse->time();
$this->concourse->remove($key, 2, $record);
$this->concourse->remove($key, 3, $record);
$data = $this->concourse->chronologize(array('start' => $start, 'key' => $key, 'record' => $record, 'end' => $end));
Timestamp startTimestamp = Timestamp.fromJoda(Timestamp.now().getJoda().minusDays(3));
Timestamp startTimestamp = Timestamp.fromJoda(Timestamp.now().getJoda().minusDays(1));
Map<Timestamp, Set<Object>> data = concourse.chronologize("some_key_1", 124123, startTimestamp, endTimestamp)

clear

Atomically remove all the values stored for every key in each of the records

  data = {
 'a'=> 'A',
 'b'=> 'B',
 'c'=> ['C', true],
 'd'=> 'D'
}
records = [1, 2, 3]
@concourse.insert data, records
@concourse.clear records
data = @concourse.select records
data = {
    'a': 'A',
    'b': 'B',
    'c': ['C', True],
    'd': 'D'
}
records = [1, 2, 3]
self.concourse.insert(data=data, records=records)
self.concourse.clear(records=records)
$records = [1, 2, 3, 4]
$this->concourse->clear($records);
List<Long> records = new ArrayList<Long>();

records.add(124);
records.add(312);
records.add(777);

concourse.clear(records);

clear(keys, records)

Atomically remove all the values stored for each of the keys in each of the records.

data = {"a" => "A", "b" => "B", "c" => ["C", true], "d" => "D"}
records = [1, 2, 3]
@concourse.insert(data, records)
@concourse.clear ['a', 'b', 'c'], records
data = @concourse.get key:"d", records: records
data = {
    'a': 'A',
    'b': 'B',
    'c': ['C', True],
    'd': 'D'
}
records = [1, 2, 3]
self.concourse.insert(data=data, records=records)
self.concourse.clear(keys=['a', 'b', 'c'], records=records)
$data = [
    'a' => 'A',
    'b' => 'B',
    'c' => ["C", true],
    'd' => 'D'
];
$records = [1, 2, 3];
$this->concourse->insert($data, $records);
$this->concourse->clear(['a, b, c'], $records);
concourse.clear(concourse.describe(1), concourse.find("count", Operator.GREATER_THAN", 0));

clear(keys, record)

Atomically remove all the values stored for each of the keys in record.

key1 = "some_key_1"
key2 = "some_key_2"
key3 = "some_key_3"
record = 123125
@concourse.add key1, 1, record
@concourse.add key2, 2, record
@concourse.add key3, 3, record
@concourse.clear [key1, key2, key3], record
data = @concourse.select keys:[key1, key2, key3], record:record
key1 = "some_key_1"
key2 = "some_key_2"
key3 = "some_key_3"
record = 123
self.concourse.add(key1, 1, record)
self.concourse.add(key2, 2, record)
self.concourse.add(key3, 3, record)
self.concourse.clear(keys=[key1, key2, key3], record=record)
$key1 = "key1";
$key2 = "key2";
$key3 = "key3";
$record = 123;
$this->concourse->add($key1, 1, $record);
$this->concourse->add($key2, 2, $record);
$this->concourse->add($key3, 3, $record);
$this->concourse->clear(array($key1, $key2, $key3), $record);
concourse.clear(concourse.describe(1), 1);

clear(record)

Atomically remove all the values stored for every key in record.

data = {
 "a" => "A",
 "B" => "B",
 "C" => ["C", true]
}
record = @concourse.insert(data)[0]
@concourse.clear record
data = @concourse.select record:record
data = {
    'a': 'A',
    'b': 'B',
    'c': ['C', True]
}
record = next(iter(self.concourse.insert(data)))
self.concourse.clear(record=record)
$data = [
    'a' => 'A',
    'b' => 'B',
    'c' => ["C", true],
    'd' => 'D'
];
$record = $this->concourse->insert(array('data' => $data))[0];
$this->concourse->clear($record);
concourse.clear(1);

clear(key, records)

Atomically remove all the values stored for key in each of the records

key = "some_key"
records = [1, 2, 3]
@concourse.add key, 1, records
@concourse.add key, 2, records
@concourse.add key, 3, records
@concourse.clear key, records
data = @concourse.select key:key, record:records
key = "some_key"
records = [1, 2, 3]
self.concourse.add(key, 1, records)
self.concourse.add(key, 2, records)
self.concourse.add(key, 3, records)
self.concourse.clear(key=key, records=records)
$key = "some_key"';
$records = [1, 2, 3];
$this->concourse->add($key, 1, $records);
$this->concourse->add($key, 2, $records);
$this->concourse->add($key, 3, $records);
$this->concourse->clear($key, $records);
concourse.clear("foo", concourse.search("foo", "bar"));

clear(key, record)

Atomically remove all the values stored for key in record

key1 = "some_key_1"
record = 123124
@concourse.add key, 1, record
@concourse.add key, 2, record
@concourse.add key, 3, record
@concourse.clear key, record
data = @concourse.select key:key, record:record

key = "some_key"
record = 123
self.concourse.add(key, 1, record)
self.concourse.add(key, 2, record)
self.concourse.add(key, 3, record)
self.concourse.clear(key=key, record=record)
$key = "some_key"';
$record = 123;
$this->concourse->add($key, 1, $record);
$this->concourse->add($key, 2, $record);
$this->concourse->add($key, 3, $record);
$this->concourse->clear(array('key' => $key, 'record' => $record));
concourse.clear("foo", 1);

close

An alias for the Exit method

commit

Attempt to permanently commit any changes that are staged in a transaction and return true if and only if all the changes can be applied. Otherwise, returns false and all the changes are discarded. After returning, the driver will return to autocommit mode and all subsequent changes will be committed immediately. This method will return false if it is called when the driver is not in staging mode.

@concourse.stage
record = @concourse.add "name", "foo bar"
@concourse.commit
self.concourse.stage()
record = self.concourse.add("name", "jeff nelson")
self.concourse.commit()
$this->concourse->stage();
$record = $this->concourse->add("name", "foo bar");
$this->concourse->commit();
concourse.stage();

// make some changes

if(concourse.commit()){
    System.out.println("yay");
}else{
    System.out.println("oops");
}

describe

For each of the records, return all of the keys that have at least one value.

  records = [1, 2, 3]
@concourse.set "name", "tom brady", records
@concourse.set "age", 100, records
@concourse.set "team", "new england patriots", records
keys = @concourse.describe records
records = [1, 2, 3]
self.concourse.set('name', 'tom brady', records)
self.concourse.set('age', 100, records)
self.concourse.set('team', 'new england patriots', records)
keys = self.concourse.describe(records)
$records = [1, 2, 3];
$this->concourse->set("name", "tom brady", $records);
$this->concourse->set("age", 100, $records);
$this->concourse->set("team", "new england patriots", $records);
$keys = $this->concourse->describe($records);
List<Long> records = new ArrayList<Long>();
records.add(1);
records.add(2);
records.add(3);
concourse.describe(records);

describe(record)

Return all the keys in record that have at least one value.

@concourse.set "name", "tom brady", 1
@concourse.set "age", 100, 1
@concourse.set "team", "new england patriots", 1
keys = @concourse.describe 1
self.concourse.set('name', 'tom brady', 1)
self.concourse.set('age', 100, 1)
self.concourse.set('team', 'new england patriots', 1)
keys = self.concourse.describe(1)
$this->concourse->set("name", "tom brady", 1);
$this->concourse->set("age", 100, 1);
$this->concourse->set("team", "new england patriots", 1);
$keys = $this->concourse->describe(1);
Long record = 12412l;
concourse.describe(record);

describe(record, time)

Return all the keys in record that had at least one value at timestamp.

@concourse.set "name", "tom brady", 1
@concourse.set "age", 100, 1
@concourse.set "team", "new england patriots", 1
time = @concourse.time
@concourse.clear "name", 1
keys = @concourse.describe 1, time
self.concourse.set('name', 'tom brady', 1)
self.concourse.set('age', 100, 1)
self.concourse.set('team', 'new england patriots', 1)
timestamp = self.concourse.time()
self.concourse.clear('name', 1)
keys = self.concourse.describe(1, time=timestamp)
$this->concourse->set("name", "tom brady", 1);
$this->concourse->set("age", 100, 1);
$this->concourse->set("team", "new england patriots", 1);
$time = $this->concourse->time();
$this->concourse->clear("name", 1);
$keys = $this->concourse->describe(1, $time);
Long record = 12412l;
Timestamp timestampStart = Timestamp.fromJoda(Timestamp.now().getJoda().minusDays(3));
concourse.describe(record, timestampStart);

describe(records, time)

For each of the records, return all the keys that had at least one value at timestamp.

 records = [1, 2, 3]
@concourse.set "name", "tom brady", records
@concourse.set "age", 100, records
@concourse.set "team", "new england patriots", records
time = @concourse.time
@concourse.clear records
keys = @concourse.describe records, time
records = [1, 2, 3]
self.concourse.set('name', 'tom brady', records)
self.concourse.set('age', 100, records)
self.concourse.set('team', 'new england patriots', records)
timestamp = self.concourse.time()
self.concourse.clear(records=records)
keys = self.concourse.describe(records, timestamp=timestamp)
$records = [1, 2, 3];
$this->concourse->set("name", "tom brady", $records);
$this->concourse->set("age", 100, $records);
$this->concourse->set("team", "new england patriots", $records);
$time = $this->concourse->time();
$this->concourse->clear($records);
$keys = $this->concourse->describe($records, $time);
List<Long> records = new ArrayList<Long>();
records.add(1);
records.add(2);
records.add(3);
Timestamp timestamp = Timestamp.fromJoda(Timestamp.now().getJoda().minusDays(3));
concourse.describe(records, timestamp);

diff

Return the *netchanges made to record since start. If you begin with the state of the record at start and re-apply all the changes in the diff, you’ll re-create the state of the record at the present.

Unlike the #audit(long, Timestamp) method, #diff(long, Timestamp) does not necessarily reflect ALL the changes made to record during the time span.

@concourse.add "foo", 1, 1
start = @concourse.time
@concourse.set "foo", 2, 1
@concourse.add "bar", true, 1
diff = @concourse.diff record:1, time:start
self.concourse.add(key="foo", value=1, record=1)
start = self.concourse.time()
self.concourse.set(key="foo", value=2, record=1)
self.concourse.add(key="bar", value=True, record=1)
diff = self.concourse.diff(record=1, time=start)
$this->concourse->add("foo", 1, 1);
$start = $this->concourse->time();
$this->concourse->set("foo", 2, 1);
$this->concourse->add("bar", true, 1);
$diff = $this->concourse->diff(['record' => 1, 'start' => $start]);

diff(record, start, end)

Return the net changes made to record from start to end.

If you begin with the state of the record at start and re-apply all the changes in the diff, you’ll re-create the state of the same record at end.

Unlike the #audit(long, Timestamp, Timestamp) method, #diff(long, Timestamp) does not necessarily reflect ALL the changes made to record during the time span.

@concourse.add "foo", 1, 1
start = @concourse.time
@concourse.set "foo", 2, 1
@concourse.add "bar", true, 1
tend = @concourse.time
@concourse.set "car", 100, 1
diff = @concourse.diff record:1, time:start, end:tend
self.concourse.add(key="foo", value=1, record=1)
start = self.concourse.time()
self.concourse.set(key="foo", value=2, record=1)
self.concourse.add(key="bar", value=True, record=1)
end = self.concourse.time()
self.concourse.set(key="car", value=100, record=1)
diff = self.concourse.diff(record=1, time=start, end=end)
$this->concourse->add("foo", 1, 1);
$start = $this->concourse->time();
$this->concourse->set("foo", 2, 1);
$this->concourse->add("bar", true, 1);
$end = $this->concourse->time();
$this->concourse->set("car", 100, 1);
$diff = $this->concourse->diff(['record' => 1, 'start' => $start, 'end' => $end]);

diff(key, record, start)

List the net changes made to key in record since start.

If you begin with the state of the field at start and re-apply all the changes in the diff, you’ll re-create the state of the same field at the present.

key = "some_key"
record = 1231412
@concourse.add key, 1, record
start = @concourse.time
@concourse.add key, 2, record
@concourse.remove key, 1, record
diff = @concourse.diff key, record, start
key = "some_key"
self.concourse.add(key=key, value=1, record=1)
start = self.concourse.time()
self.concourse.add(key=key, value=2, record=1)
self.concourse.add(key=key, value=1, record=2)
self.concourse.add(key=key, value=3, record=3)
self.concourse.remove(key=key, value=1, record=2)
end = self.concourse.time()
self.concourse.add(key=key, value=4, record=1)
diff = self.concourse.diff(key=key, start=start, end=end)
$key = "some_key"';
$record = 123;
$this->concourse->add($key, 1, $record);
$start = $this->concourse->time();
$this->concourse->add($key, 2, $record);
$this->concourse->remove($key, 1, $record);
$diff = $this->concourse->diff($key, ['record' => $record, 'start' => $start]);

diff(key, record, start, end)

Return the net changes made to key in record from start to end.

If you begin with the state of the field at start and re-apply all the changes in the diff, you’ll re-create the state of the same field at end.

key = "some_key"
record = 1231412
@concourse.add key, 1, record
start = @concourse.time
@concourse.add key, 2, record
@concourse.remove key, 1, record
tend = @concourse.time
@concourse.set key, 3, record
diff = @concourse.diff key, record, start, tend
key = "some_key"
record = 123
self.concourse.add(key, 1, record)
start = self.concourse.time()
self.concourse.add(key, 2, record)
self.concourse.remove(key, 1, record)
end = self.concourse.time()
self.concourse.set(key, 3, record)
diff = self.concourse.diff(key, record, start, end)
$key = "some_key"';
$record = 123;
$this->concourse->add($key, 1, $record);
$start = $this->concourse->time();
$this->concourse->add($key, 2, $record);
$this->concourse->remove($key, 1, $record);
$end = $this->concourse->time();
$this->concourse->set($key, 3, $record);
$diff = $this->concourse->diff(['key' => $key, 'record' => $record, 'start' => $start, 'end' => $end]);

diff(key, start)

Return the net changes made to the key field across all records since start.

If you begin with the state of the inverted index for key at start and re-apply all the changes in the diff, you’ll re-create the state of the same index at the present.

Unlike the #audit(key, record, time) method, #diff(record, time) does not necessarily reflect ALL the changes made to key in record during the time span.

key = "some_key"
@concourse.add key, 1, 1
start = @concourse.time
@concourse.add key, 2, 1
@concourse.add key, 1, 2
@concourse.add key, 3, 3
@concourse.remove key, 1, 2
diff = @concourse.diff key:key, start:start
key = "some_key"
self.concourse.add(key=key, value=1, record=1)
start = self.concourse.time()
self.concourse.add(key=key, value=2, record=1)
self.concourse.add(key=key, value=1, record=2)
self.concourse.add(key=key, value=3, record=3)
self.concourse.remove(key=key, value=1, record=2)
diff = self.concourse.diff(key=key, start=start)
$key = "some_key"';
$this->concourse->add($key, 1, 1);
$start = $this->concourse->time();
$this->concourse->add($key, 2, 1);
$this->concourse->add($key, 1, 2);
$this->concourse->add($key, 3, 3);
$this->concourse->remove($key, 1, 2);
$diff = $this->concourse->diff(['key' => $key, 'start' => $start]);

diff(key, start, end)

Return the net changes made to the key field across all records from start to end.

If you begin with the state of the inverted index for key at start and re-apply all the changes in the diff, you’ll re-create the state of the same index at end.

Unlike the #audit(String, long, Timestamp, Timestamp) method, #diff(long, Timestamp) does not necessarily return ALL the changes made to key in record during the time span.

key = "some_key"
@concourse.add key, 1, 1
start = @concourse.time
@concourse.add key, 2, 1
@concourse.add key, 1, 2
@concourse.add key, 3, 3
@concourse.remove key, 1, 2
tend = @concourse.time
@concourse.add key, 4, 1
diff = @concourse.diff key:key, start:start, end:tend
key = "some_key"
self.concourse.add(key=key, value=1, record=1)
start = self.concourse.time()
self.concourse.add(key=key, value=2, record=1)
self.concourse.add(key=key, value=1, record=2)
self.concourse.add(key=key, value=3, record=3)
self.concourse.remove(key=key, value=1, record=2)
end = self.concourse.time()
self.concourse.add(key=key, value=4, record=1)
diff = self.concourse.diff(key=key, start=start, end=end)
$key = "some_key"';
$this->concourse->add($key, 1, 1);
$start = $this->concourse->time();
$this->concourse->add($key, 2, 1);
$this->concourse->add($key, 1, 2);
$this->concourse->add($key, 3, 3);
$this->concourse->remove($key, 1, 2);
$end = $this->concourse->time();
$this->concourse->add($key, 4, 1);
$diff = $this->concourse->diff(['key' => $key, 'start' => $start, 'end' => $end]);

exit

Terminate the concourse’s session and close this connection.

concourse.exit
self.concourse.exit()
$this->$concourse->ext();
concourse.exit();

find

Return the set of records that satisfy the Criteria.

find(ccl)

Return the set of records that satisfy the ccl filter.

key = "some_key"
(1..10).step(1) do |x|
@concourse.add key, x, x
end
records = @concourse.find "#{key} > 3"
key = "some_key"
for n in range(0, 10):
    self.concourse.add(key=key, value=n, record=n)
records = list(self.concourse.find(key+' > 3'))
$key = "some_key"';
foreach(range(1, 10) as $i){
    $this->concourse->add($key, $i, $i);
}
$records = $this->concourse->find("$key > 3");
concourse.find("#{key} > 3");

find(key, value)

Return the set of records where key Operator#EQUALS equals value.

This method is a shortcut for calling #find(String, Operator, Object) with Operator#EQUALS.

key = "some_key"
(1..10).step(1) do |x|
@concourse.add key, x, x
end
records = @concourse.find key:key, value:5
key = "some_key"
for n in range(0, 10):
    self.concourse.add(key=key, value=n, record=n)
records = list(self.concourse.find(key=key, value=3))
$key = "some_key"';
foreach(range(1, 10) as $i){
    $this->concourse->add($key, $i, $i);
}
$records = $this->concourse->find($key, 5);
concourse.find("some_key_1", 5);

find(key, value, timestamp)

Return the set of records where key was Operator#EQUALS equal to value at timestamp.

This method is a shortcut for calling #find(String, Operator, Object, Timestamp) with Operator#EQUALS.

 key = "some_key"
(1..10).step(1) do |x|
@concourse.add key, x, x
end
time = @concourse.time
(1..10).step(1) do |x|
@concourse.add key, 5, x
end
records = @concourse.find key:key, value:5, timestamp:time
key = "some_key"
for n in range(0, 10):
    self.concourse.add(key=key, value=n, record=n)
ts = self.concourse.time()
for n in range(0, 10):
    self.concourse.add(key=key, value=n, record=n+1)
records = list(self.concourse.find(key=key, value=3, time=ts))
$key = "some_key"';
foreach(range(1, 10) as $i){
    $this->concourse->add($key, $i, $i);
}
$time = $this->concourse->time();
foreach(range(1, 10) as $i){
    $this->concourse->add($key, $i, $i+1);
}
$records = $this->concourse->find($key, 5 , ['time' => $time]);
concourse.find("some_key_1", 5, Timestamp.fromJoda(DateTime.now().minusYears(1)));

find(key, operator, value)

Return the set of records where the key field contains at least one value that satisfies the operator in relation to the value.

key = "some_key"
(1..10).step(1) do |x|
@concourse.add key, x, x
end
records = @concourse.find key:key, operator:Operator::EQUALS, value:5

# String operator example:
key = "some_key"
(1..10).step(1) do |x|
@concourse.add key, x, x
end
records = @concourse.find key:key, operator:"=", value:5
key = "some_key"
for n in range(0, 10):
    self.concourse.add(key=key, value=n, record=n)
records = list(self.concourse.find(key=key, value=3))
$key = "some_key"';
foreach(range(1, 10) as $i){
    $this->concourse->add($key, $i, $i);
}
$records = $this->concourse->find($key, Operator::EQUALS, 5);
concourse.find("age", Operator.GREATHER_THAN_OR_EQUALS, 20);

find(key, operator, value, timestamp)

Return the set of records where the key field contained at least one value at timestamp that satisfies the operator in relation to the value.

key = "some_key"
(1..10).step(1) do |x|
@concourse.add key, x, x
end
time = @concourse.time
(1..10).step(1) do |x|
@concourse.add key, x, x+1
end
records = @concourse.find key:key, operator:Operator::BETWEEN, value:3, timestamp:time

key = "some_key"
for n in range(0, 10):
    self.concourse.add(key=key, value=n, record=n)
ts = self.concourse.time()
for n in range(0, 10):
    self.concourse.add(key=key, value=n, record=n+1)
records = list(self.concourse.find(key=key, operator=Operator.GREATER_THAN, value=3, time=ts))
$key = "some_key"';
foreach(range(1, 10) as $i){
    $this->concourse->add($key, $i, $i);
}
$time = $this->concourse->time();
foreach(range(1, 10) as $i){
    $this->concourse->add($key, 5, $i);
}
$records = $this->concourse->find($key, Operator::EQUALS, 5, ['time' => $time]);
concourse.find("some_key_1", Operator.GREATHER_THAN_OR_EQUALS, 5, Timestamp.fromJoda(DateTime.now().minusYears(1)));

find(key, operator, value, value2)

Return the set of records where the key field contains at least one value that satisfies the operator in relation to value and value2.

key = "some_key"
(1..10).step(1) do |x|
@concourse.add key, x, x
end
records = @concourse.find key:key, operator:Operator::BETWEEN, values:[3,6]

# String operator example:
key = "some_key"
(1..10).step(1) do |x|
@concourse.add key, x, x
end
records = @concourse.find key:key, operator:"bw", values:[3,6]
key = "some_key"
for n in range(0, 10):
    self.concourse.add(key=key, value=n, record=n)
records = list(self.concourse.find(key=key, operator=Operator.BETWEEN, values=[3, 6]))
$key = "some_key"';
foreach(range(1, 10) as $i){
    $this->concourse->add($key, $i, $i);
}
$records = $this->concourse->find($key, Operator::BETWEEN, [3,6]);
concourse.find("some_key_1", Operator.BETWEEN, 5, 9);

find(key, operator, value, value2, timestamp)

Return the set of records where the key field contained at least one value at timestamp that satisfies the operator in relation to the value.

key = "some_key"
(1..10).step(1) do |x|
@concourse.add key, x, x
end
time = @concourse.time
(1..10).step(1) do |x|
@concourse.add key, x, x+1
end
records = @concourse.find key:key, operator:Operator::BETWEEN, values:[3,6], timestamp:time

# String operator example:
key = "some_key"
(1..10).step(1) do |x|
@concourse.add key, x, x
end
time = @concourse.time
(1..10).step(1) do |x|
@concourse.add key, x, x+1
end
records = @concourse.find key:key, operator:"bw", values:[3,6], timestamp:time
key = "some_key"
for n in range(0, 10):
    self.concourse.add(key=key, value=n, record=n)
ts = self.concourse.time()
for n in range(0, 10):
    self.concourse.add(key=key, value=n, record=n+1)
records = list(self.concourse.find(key=key, operator=Operator.BETWEEN, values=[3, 6], time=ts))
$key = "some_key"';
foreach(range(1, 10) as $i){
    $this->concourse->add($key, $i, $i);
}
$time = $this->concourse->time();
foreach(range(1, 10) as $i){
    $this->concourse->add($key, $i, $i+1);
}
$records = $this->concourse->find($key, Operator::BETWEEN, [3,6], ['time' => $time]);
Timestamp timestamp = Timestamp.fromJoda(DateTime.now().minusYears(1));
concourse.find("some_key_1", Operator.GREATHER_THAN_OR_EQUALS, 5, 9, timestamp );

findOrAdd

Return the unique record where key equals value, or throw a DuplicateEntryException if multiple records match the condition. If no record matches, #add(String, Object) key as value into an new record and return the id.

This method can be used to simulate a unique index because it atomically checks for a condition and only adds data if that condition isn’t currently satisfied.

record = @concourse.find_or_add "age", 23
record = self.concourse.find_or_add("age", 23)
$record = $this->concourse->findOrAdd("age", 23);
String key = "some_key_1";
Object value = 7;
concourse.find(key, value);

findOrInsert

Return the unique record that matches the criteria, if one exist or throw a DuplicateEntryException if multiple records match. If no record matches, #insert(Map) the data into a new record and return the id.

This method can be used to simulate a unique index because it atomically checks for a condition and only inserts data if that condition isn’t currently satisfied.

Each of the values in data must be a primitive or one dimensional object (e.g. no nested Map or Multimap.

This method is syntactic sugar for findOrInsert(). The only difference is that this method takes a in-process Criteria building sequence for convenience.

data = {
:name => "Foo Bar"
}
data = data.to_json
record = @concourse.find_or_insert criteria:"age > 20", data:data
data = {
    'name': 'Foo Bar'
}
record = self.concourse.find_or_insert(criteria="age > 10", data=data)
$data = [
    'name' => "Foo Bar"
];
$record = $this->concourse->findOrInsert("age > 10", $data);

findOrInsert(criteria, multimap)

Return the unique record that matches the criteria, if one exist or throw a {@link DuplicateEntryException} if multiple records match. If no record matches, {@link #insert(Multimap)} the data into a new record and return the id.

This method can be used to simulate a unique index because it atomically checks for a condition and only inserts data if that condition isn’t currently satisfied.

Each of the values in data must be a primitive or one dimensional object (e.g. no nested {@link Map maps} or {@link Multimap multimaps}).

This method is syntactic sugar for {@link #findOrInsert(Criteria, Multimap)}. The only difference is that this method takes a in-process {@link Criteria} building sequence for convenience.


findOrInsert(criteria, json)

Return the unique record that matches the criteria, if one exist or throw a {@link DuplicateEntryException} if multiple records match. If no record matches, {@link #insert(String)} the json into a new record and return the id.

This method can be used to simulate a unique index because it atomically checks for a condition and only inserts data if that condition isn’t currently satisfied.

This method is syntactic sugar for {@link #findOrInsert(Criteria, String)}. The only difference is that this method takes a in-process {@link Criteria} building sequence for convenience.



String key = "some_key_1";
long record = concourse.findOrInsert(
  Criteria.where().key(key).operator(Operator.GREATER_THAN)
  .value(5), json);

findOrInsert(criteria, map)

Return the unique record that matches the criteria, if one exist or throw a {@link DuplicateEntryException} if multiple records match. If no record matches, {@link #insert(Map)} the data into a new record and return the id.

This method can be used to simulate a unique index because it atomically checks for a condition and only inserts data if that condition isn’t currently satisfied.

Each of the values in data must be a primitive or one dimensional object (e.g. no nested {@link Map maps} or {@link Multimap multimaps}).


findOrInsert(ccl, map)

Return the unique record that matches the ccl filter, if one exist or throw a {@link DuplicateEntryException} if multiple records match. If no record matches, {@link #insert(Map)} the data into a new record and return the id.

This method can be used to simulate a unique index because it atomically checks for a condition and only inserts data if that condition isn’t currently satisfied.

Each of the values in data must be a primitive or one dimensional object (e.g. no nested {@link Map maps} or {@link Multimap multimaps}).


data = {
    'name': 'jeff nelson'
}
record = self.concourse.find_or_insert(criteria="age > 10", data=data)

findOrInsert(ccl, multimap)

Return the unique record that matches the ccl filter, if one exist or throw a {@link DuplicateEntryException} if multiple records match. If no record matches, #insert(Multimap) the data into a new record and return the id.

This method can be used to simulate a unique index because it atomically checks for a condition and only inserts data if that condition isn’t currently satisfied.

Each of the values in data must be a primitive or one dimensional object (e.g. no nested Map or Multimap).


findOrInsert(ccl, json)

Return the unique record that matches the ccl filter, if one exist or throw a {@link DuplicateEntryException} if multiple records match. If no record matches, {@link #insert(String)} the json into a new record and return the id.

This method can be used to simulate a unique index because it atomically checks for a condition and only inserts data if that condition isn’t currently satisfied.

data = {
:name => "Foo Bar"
}
data = data.to_json
record = @concourse.find_or_insert criteria:"age > 10", data:data
data = {
    'name': 'Foo Bar'
}
data = ujson.dumps(data)
record = self.concourse.find_or_insert(criteria="age > 10", data=data)
$data = [
    'name' => "foo bar"
];
$record = $this->concourse->findOrInsert("age > 10", $data);
long record = concourse.findOrInsert("foo = 10", json);

get

For each of the keys in each of the records, return the stored value that was most recently added.

@concourse.add "foo", 1, [1, 2]
@concourse.add "foo", 2, [1, 2]
@concourse.add "bar", 1, [1, 2]
@concourse.add "bar", 2, [1, 2]
data = @concourse.get keys: ["foo", "bar"], records: [1, 2]
self.concourse.add('foo', 1, [1, 2])
self.concourse.add('foo', 2, [1, 2])
self.concourse.add('bar', 1, [1, 2])
self.concourse.add('bar', 2, [1, 2])
data = self.concourse.get(keys=['foo', 'bar'], records=[1, 2])
$this->concourse->add("foo", 1, [1, 2]);
$this->concourse->add("foo", 2, [1, 2]);
$this->concourse->add("bar", 1, [1, 2]);
$this->concourse->add("bar", 2, [1, 2]);
$data = $this->concourse->get(['keys' => ['foo', 'bar'], 'records' => [1, 2]]);
List<String> keys = new ArrayList<String>();
keys.add("some_key_1");
keys.add("some_key_1");
keys.add("some_key_1");

List<Long> records = new ArrayList<Long>();
records.add(233123l);
records.add(241232l);
records.add(123124l);

Map<Long, Set<String>> data =  concourse.get(keys, records);

get(keys, records, timestamp)

For each of the keys in each of the records, return the stored value that was most recently added at timestamp.

@concourse.add "foo", 1, [1, 2]
@concourse.add "foo", 2, [1, 2]
@concourse.add "bar", 1, [1, 2]
@concourse.add "bar", 2, [1, 2]
time = @concourse.time
@concourse.add "foo", 3, [1, 2]
@concourse.add "bar", 3, [1, 2]
data = @concourse.get keys: ["foo", "bar"], records: [1, 2], time:time
self.concourse.add('foo', 1, [1, 2])
self.concourse.add('foo', 2, [1, 2])
self.concourse.add('bar', 1, [1, 2])
self.concourse.add('bar', 2, [1, 2])
ts = self.concourse.time()
self.concourse.add('foo', 3, [1, 2])
self.concourse.add('bar', 3, [1, 2])
data = self.concourse.get(keys=['foo', 'bar'], records=[1, 2], time=ts)
$this->concourse->add("foo", 1, [1, 2]);
$this->concourse->add("foo", 2, [1, 2]);
$this->concourse->add("bar", 1, [1, 2]);
$this->concourse->add("bar", 2, [1, 2]);
$time = $this->concourse->time();
$this->concourse->add("foo", 3, [1, 2]);
$this->concourse->add("bar", 3, [1, 2]);
$data = $this->concourse->get(['keys' => ['foo', 'bar'], 'records' => [1, 2], 'time' => $time]);
List<String> keys = new ArrayList<String>();
keys.add("some_key_1");
keys.add("some_key_1");
keys.add("some_key_1");

List<Long> records = new ArrayList<Long>();
records.add(233123l);
records.add(241232l);
records.add(123124l);
Timestamp timestampStart = Timestamp.fromJoda(Timestamp.now().getJoda().minusDays(3));

Map<Long, Set<String>> data =  concourse.get(keys, records, timestamp);

get(keys, record)

For each of the keys in record, return the stored value that was most recently added.

@concourse.add "foo", 1, [1, 2]
@concourse.add "foo", 2, [1, 2]
@concourse.add "bar", 1, [1, 2]
@concourse.add "bar", 2, [1, 2]
data = @concourse.get keys: ["foo", "bar"], record: 1
self.concourse.add('foo', 1, 1)
self.concourse.add('foo', 2, 1)
self.concourse.add('bar', 1, 1)
self.concourse.add('bar', 2, 1)
data = self.concourse.get(keys=['foo', 'bar'], record=1)
$this->concourse->add("foo", 1, 1);
$this->concourse->add("foo", 2, 1);
$this->concourse->add("bar", 1, 1);
$this->concourse->add("bar", 2, 1);
$data = $this->concourse->get(['keys' => ["foo", "bar"], 'record' => 1]);
List<String> keys = new ArrayList<String>();
keys.add("some_key_1");
keys.add("some_key_1");
keys.add("some_key_1");
Map<Long, Set<String>> data =  concourse.get(keys, 123124l);

get(keys, record, timestamp)

For each of the keys in record, return the stored value that was most recently added at timestamp.

@concourse.add "foo", 1, 1
@concourse.add "foo", 2, 1
@concourse.add "bar", 1, 1
@concourse.add "bar", 2, 1
time = @concourse.time
@concourse.add "foo", 3, 1
@concourse.add "bar", 3, 1
data = @concourse.get(keys:["foo", "bar"], record:1, time:time)
self.concourse.add('foo', 1, 1)
self.concourse.add('foo', 2, 1)
self.concourse.add('bar', 1, 1)
self.concourse.add('bar', 2, 1)
ts = self.concourse.time()
self.concourse.add('foo', 3, 1)
self.concourse.add('bar', 3, 1)
data = self.concourse.get(keys=['foo', 'bar'], record=1, time=ts)
$this->concourse->add("foo", 1, 1);
$this->concourse->add("foo", 2, 1);
$this->concourse->add("bar", 1, 1);
$this->concourse->add("bar", 2, 1);
$time = $this->concourse->time();
$this->concourse->add("foo", 3, 1);
$this->concourse->add("bar", 3, 1);
$data = $this->concourse->get(['keys' => ["foo", "bar"], 'record' => 1, 'time' => $time]);
List<String> keys = new ArrayList<String>();
keys.add("some_key_1");
keys.add("some_key_1");
keys.add("some_key_1");
Timestamp timestamp = Timestamp.fromJoda(Timestamp.now().getJoda().minusDays(3));
Map<Long, Set<String>> data =  concourse.get(keys, 123124l, timestamp);

get(keys, ccl)

For each of the keys in every record that matches the ccl filter, return the stored value that was most recently added.

key1 = "some_key_1"
key2 = "some_key_2"
record1 = 12312412
record2 = 32412312
@concourse.add key1, 1, [record1, record2]
@concourse.add key1, 2, [record1, record2]
@concourse.add key1, 3, [record1, record2]
@concourse.add key2, 10, [record1, record2]
@concourse.add key1, 4, record2
ccl = "#{key2} = 10"
data = @concourse.get ccl:ccl, key:[key1, key2]
key1 = "some_key_1"
key2 = "some_key_2"
record1 = 123456
record2 = 1234567
self.concourse.add(key=key1, value=1, records=[record1, record2])
self.concourse.add(key=key1, value=2, records=[record1, record2])
self.concourse.add(key=key1, value=3, records=[record1, record2])
self.concourse.add(key=key2, value=10, records=[record1, record2])
self.concourse.add(key=key1, value=4, record=record2)
ccl = key2 + ' = 10'
data = self.concourse.get(keys=[key1, key2], ccl=ccl)
$key1 = "some_key_1";
$key2 = "some_key_2";
$record1 = 2312;
$record1 = 3122;
$this->concourse->add($key1, 1, [$record1, $record2]);
$this->concourse->add($key1, 2, [$record1, $record2]);
$this->concourse->add($key1, 3, [$record1, $record2]);
$this->concourse->add($key2, 10, [$record1, $record2]);
$this->concourse->add($key1, 4, [$record2]);
$ccl = "$key2 = 10";
$data = $this->concourse->get(['ccl' => $ccl, 'key' => [$key1, $key2]]);
List<String> keys = new ArrayList<String>();
keys.add("some_key_1");
keys.add("some_key_1");
keys.add("some_key_1");
String ccl = "foo = 10";
Map<Long, Set<String>> data = concourse.get(keys, ccl);

get(keys, ccl, timestamp)

For each of the keys in every record that matches the ccl filter, return the stored value that was most recently added at timestamp.

key1 = "some_key_1"
key2 = "some_key_2"
record1 = 12312412
record2 = 32412312
@concourse.add key1, 1, [record1, record2]
@concourse.add key1, 2, [record1, record2]
@concourse.add key1, 3, [record1, record2]
@concourse.add key2, 10, [record1, record2]
@concourse.add key1, 4, record2
time = @concourse.time
@concourse.set key1, 100, [record1, record2]
ccl = "#{key2} = 10"
data = @concourse.get ccl:ccl, key:[key1, key2], time:time
key1 = "some_key_1"
key2 = "some_key_2"
record1 = 123456
record2 = 1234567
self.concourse.add(key=key1, value=1, records=[record1, record2])
self.concourse.add(key=key1, value=2, records=[record1, record2])
self.concourse.add(key=key1, value=3, records=[record1, record2])
self.concourse.add(key=key2, value=10, records=[record1, record2])
self.concourse.add(key=key1, value=4, record=record2)
ts = self.concourse.time()
ccl = key2 + ' = 10'
self.concourse.set(key=key1, value=100, record=[record2, record1])
data = self.concourse.get(key=[key1, key2], ccl=ccl, time=ts)
$key1 = "some_key_1";
$key2 = "some_key_2";
$record1 = 2312;
$record1 = 3122;
$this->concourse->add($key1, 1, [$record1, $record2]);
$this->concourse->add($key1, 2, [$record1, $record2]);
$this->concourse->add($key1, 3, [$record1, $record2]);
$this->concourse->add($key2, 10, [$record1, $record2]);
$this->concourse->add($key1, 4, [$record2]);
$time = $this->concourse->time();
$this->concourse->set($key1, 100, [$record2]);
$ccl = "$key2 = 10";
$data = $this->concourse->get(['ccl' => $ccl, 'key' => [$key1, $key2], 'time' => $time]);
List<String> keys = new ArrayList<String>();
keys.add("some_key_1");
keys.add("some_key_1");
keys.add("some_key_1");
String ccl = "foo = 10";
Timestamp timestamp = Timestamp.fromJoda(Timestamp.now().getJoda().minusDays(3));
Map<Long, Set<String>> data =  concourse.get(keys, ccl, timestamp);

get(ccl)

For every key in every record that matches the ccl filter, return the stored value that was most recently added.

key1 = "some_key_1"
key2 = "some_key_2"
record1 = 12312412
record2 = 32412312
@concourse.add key1, 1, [record1, record2]
@concourse.add key1, 2, [record1, record2]
@concourse.add key1, 3, [record1, record2]
@concourse.add key2, 10, [record1, record2]
ccl = "#{key2} = 10"
data = @concourse.get ccl:ccl
key1 = "some_key_1"
key2 = "some_key_2"
record1 = 123456
record2 = 1234567
self.concourse.add(key=key1, value=1, records=[record1, record2])
self.concourse.add(key=key1, value=2, records=[record1, record2])
self.concourse.add(key=key1, value=3, records=[record1, record2])
self.concourse.add(key=key2, value=10, records=[record1, record2])
ccl = key2 + ' = 10'
data = self.concourse.get(ccl=ccl)
$key1 = "some_key_1";
$key2 = "some_key_2";
$record1 = 2312;
$record1 = 3122;
$this->concourse->add($key1, 1, [$record1, $record2]);
$this->concourse->add($key1, 2, [$record1, $record2]);
$this->concourse->add($key1, 3, [$record1, $record2]);
$this->concourse->add($key2, 10, [$record1, $record2]);
$ccl = "$key2 = 10";
$data = $this->concourse->get(['ccl' => $ccl]);
String ccl = "foo = 10";
Map<Long, Set<String>> data = concourse.get(ccl);

get(ccl, timestamp)

For every key in every record that matches the ccl filter, return the stored value that was most recently added.

key1 = "some_key_1"
key2 = "some_key_2"
record1 = 12312412
record2 = 32412312
@concourse.add key1, 1, [record1, record2]
@concourse.add key1, 2, [record1, record2]
@concourse.add key1, 3, [record1, record2]
@concourse.add key2, 10, [record1, record2]
time = @concourse.time
@concourse.add key2, 11, [record1, record2]
ccl = "#{key2} = 10"
data = @concourse.get ccl:ccl, time:time
key1 = "some_key_1"
key2 = "some_key_2"
record1 = 123456
record2 = 1234567
self.concourse.add(key=key1, value=1, records=[record1, record2])
self.concourse.add(key=key1, value=2, records=[record1, record2])
self.concourse.add(key=key1, value=3, records=[record1, record2])
self.concourse.add(key=key2, value=10, records=[record1, record2])
ts = self.concourse.time()
self.concourse.set(key=key2, value=11, records=[record1, record2])
ccl = key2 + ' > 10'
data = self.concourse.get(ccl=ccl, time=ts)
$key1 = "some_key_1";
$key2 = "some_key_2";
$record1 = 2312;
$record1 = 3122;
$this->concourse->add($key1, 1, [$record1, $record2]);
$this->concourse->add($key1, 2, [$record1, $record2]);
$this->concourse->add($key1, 3, [$record1, $record2]);
$this->concourse->add($key2, 10, [$record1, $record2]);
$time = $this->concourse->time();
$this->concourse->add($key2, 11, [$record1, $record2]);
$ccl = "$key2 = 10";
$data = $this->concourse->get(['ccl' => $ccl, 'time' => $time]);
String ccl = "foo = 10";
Timestamp timestamp = Timestamp.fromJoda(Timestamp.now().getJoda().minusDays(3));
Map<Long, Set<String>> data =  concourse.get(ccl, timestamp);

get(key, ccl)

For every record that matches the ccl filter, return the stored value in the key field that was most recently added.

This method is syntactic sugar for {@link #get(String, Criteria)}. The only difference is that this method takes a in-process {@link Criteria} building sequence for convenience.

key1 = "some_key_1"
key2 = "some_key_2"
record1 = 12312412
record2 = 32412312
@concourse.add key1, 1, [record1, record2]
@concourse.add key1, 2, [record1, record2]
@concourse.add key1, 3, [record1, record2]
@concourse.add key2, 10, [record1, record2]
@concourse.add key1, 4, record2
ccl = "#{key2} = 10"
data = @concourse.get key:key1, ccl:ccl
key1 = "some_key_1"
key2 = "some_key_2"
record1 = 123456
record2 = 1234567
self.concourse.add(key=key1, value=1, records=[record1, record2])
self.concourse.add(key=key1, value=2, records=[record1, record2])
self.concourse.add(key=key1, value=3, records=[record1, record2])
self.concourse.add(key=key2, value=10, records=[record1, record2])
self.concourse.add(key=key1, value=4, record=record2)
ccl = key2 + ' = 10'
data = self.concourse.get(key=key1, ccl=ccl)
$key1 = "some_key_1";
$key2 = "some_key_2";
$record1 = 2312;
$record1 = 3122;
$this->concourse->add($key1, 1, [$record1, $record2]);
$this->concourse->add($key1, 2, [$record1, $record2]);
$this->concourse->add($key1, 3, [$record1, $record2]);
$this->concourse->add($key2, 10, [$record1, $record2]);
$this->concourse->add($key1, 4, [$record2]);
$ccl = "$key2 = 10";
$data = $this->concourse->get(['ccl' => $ccl, 'key' => $key1]);
String ccl = "foo = 10";
String key = "some_key_1";
Map<Long, Set<String>> data =  concourse.get(key, ccl);

get(key, ccl, timestamp)

For every record that matches the ccl filter, return the stored value in the key field that was most recently added at timestamp.

This method is syntactic sugar for {@link #get(String, Criteria, Timestamp)}. The only difference is that this method takes a in-process {@link Criteria} building sequence for convenience.

key1 = "some_key_1"
key2 = "some_key_2"
record1 = 12312412
record2 = 32412312
@concourse.add key1, 1, [record1, record2]
@concourse.add key1, 2, [record1, record2]
@concourse.add key1, 3, [record1, record2]
@concourse.add key2, 10, [record1, record2]
@concourse.add key1, 4, record2
time = @concourse.time
@concourse.set key1, 100, [record1, record2]
ccl = "#{key2} = 10"
data = @concourse.get ccl:ccl, key:key1, time:time
key1 = "some_key_1"
key2 = "some_key_2"
record1 = 123456
record2 = 1234567
self.concourse.add(key=key1, value=1, records=[record1, record2])
self.concourse.add(key=key1, value=2, records=[record1, record2])
self.concourse.add(key=key1, value=3, records=[record1, record2])
self.concourse.add(key=key2, value=10, records=[record1, record2])
self.concourse.add(key=key1, value=4, record=record2)
ts = self.concourse.time()
ccl = key2 + ' = 10'
self.concourse.set(key=key1, value=100, record=[record2, record1])
data = self.concourse.get(key=key1, ccl=ccl, time=ts)
$key1 = "some_key_1";
$key2 = "some_key_2";
$record1 = 2312;
$record1 = 3122;
$this->concourse->add($key1, 1, [$record1, $record2]);
$this->concourse->add($key1, 2, [$record1, $record2]);
$this->concourse->add($key1, 3, [$record1, $record2]);
$this->concourse->add($key2, 10, [$record1, $record2]);
$this->concourse->add($key1, 4, [$record2]);
$time = $this->concourse->time();
$this->concourse->set($key1, 100, [$record2, $record1]);
$ccl = "$key2 = 10";
$data = $this->concourse->get(['ccl' => $ccl, 'key' => $key1, 'time' => $time]);
String ccl = "foo = 10";
String key = "some_key_1";
Timestamp timestamp = Timestamp.fromJoda(Timestamp.now().getJoda().minusDays(3));
Map<Long, Set<String>> data =  concourse.get(key, ccl, timestamp);

get(key, records)

For each of the records, return the stored value in the key field that was most recently added.

@concourse.add "foo", 1, [1, 2]
@concourse.add "foo", 2, [1, 2]
@concourse.add "bar", 1, [1, 2]
@concourse.add "bar", 2, [1, 2]
data = @concourse.get keys: ["foo", "bar"], records: [1, 2]
self.concourse.add('foo', 1, [1, 2, 3])
self.concourse.add('foo', 2, [1, 2, 3])
self.concourse.add('foo', 3, [1, 2, 3])
self.concourse.get(key='foo', record=[1, 2, 3])
$this->concourse->add("foo", 1, [1, 2, 3]);
$this->concourse->add("foo", 2, [1, 2, 3]);
$this->concourse->add("foo", 3, [1, 2, 3]);
$this->concourse->get("foo", ['record' => [1, 2, 3]]);
String key = "some_key_1"; 

List<Long> records = new ArrayList<Long>();
records.add(233123l);
records.add(241232l);
records.add(123124l);

Map<Long, Set<String>> data =  concourse.get(key, records);

get(key, records, timestamp)

For each of the records, return the stored value in the key field that was most recently added.

@concourse.add "foo", 1, [1, 2]
@concourse.add "foo", 2, [1, 2]
@concourse.add "bar", 1, [1, 2]
@concourse.add "bar", 2, [1, 2]
time = @concourse.time
@concourse.add "foo", 3, [1, 2]
@concourse.add "bar", 3, [1, 2]
data = @concourse.get key: "foo", records: [1, 2], time:time
self.concourse.add('foo', 1, [1, 2, 3])
self.concourse.add('foo', 2, [1, 2, 3])
self.concourse.add('foo', 3, [1, 2, 3])
ts = self.concourse.time()
self.concourse.add('foo', 4, [1, 2, 3])
self.concourse.get(key='foo', record=[1, 2, 3], time=ts)
$this->concourse->add("foo", 1, [1, 2, 3]);
$this->concourse->add("foo", 2, [1, 2, 3]);
$this->concourse->add("foo", 3, [1, 2, 3]);
$time = $this->concourse->time();
$this->concourse->add("foo", 4, [1, 2, 3]);
$this->concourse->get("foo", ['record' => [1, 2, 3], 'time' => $time]);
String key = "some_key_1"; 

List<Long> records = new ArrayList<Long>();
records.add(233123l);
records.add(241232l);
records.add(123124l);
Timestamp timestampStart = Timestamp.fromJoda(Timestamp.now().getJoda().minusDays(3));

Map<Long, Set<String>> data =  concourse.get(key, records, timestamp);

get(key, record)

Return the stored value that was most recently added for key in record. If the field is empty, return null.

@concourse.add "foo", 1, 1
@concourse.add "foo", 2, 1
@concourse.add "foo", 3, 1
@concourse.get("foo", record:1)
self.concourse.add('foo', 1, 1)
self.concourse.add('foo', 2, 1)
self.concourse.add('foo', 3, 1)
self.concourse.get(key='foo', record=1)
$this->concourse->add("foo", 1, 1);
$this->concourse->add("foo", 2, 1);
$this->concourse->add("foo", 3, 1);
$this->concourse->get("foo", ['record' => 1]);
String key = "some_key1";
long record = 12312L;
concourse.get(key,record);

get(key, record, timestamp)

Return the stored value that was most recently added for key in record at timestamp. If the field was empty at timestamp, return null.

@concourse.add "foo", 1, 1
@concourse.add "foo", 2, 1
@concourse.add "foo", 3, 1
ts = @concourse.time
@concourse.add "foo", 4, 1
@concourse.get("foo", 1, time:ts)
self.concourse.add('foo', 1, 1)
self.concourse.add('foo', 2, 1)
self.concourse.add('foo', 3, 1)
ts = self.concourse.time()
self.concourse.add('foo', 4, 1)
self.concourse.get(key='foo', record=1, time=ts)
$this->concourse->add("foo", 1, 1);
$this->concourse->add("foo", 2, 1);
$this->concourse->add("foo", 3, 1);
$time = $this->concourse->time();
$this->concourse->add("foo", 4, 1);
$this->concourse->get("foo", ['record' => 1, 'time' => $time]);
String key = "some_key1";
long record = 12312L;
Timestamp timestamp = Timestamp.fromJoda(Timestamp.now().getJoda().minusDays(3));

concourse.get(key,record, timestamp);

get(key, criteria)

For every record that matches the criteria, return the stored value in the key field that was most recently added.

get(key, criteria, timestamp)

For every record that matches the criteria, return the stored value in the key field that was most recently added at timestamp.

get(criteria)

For every key in every record that matches the criteria, return the stored value that was most recently added.

get(keys, criteria)

For each of the keys in every record that matches the criteria, return the stored value that was most recently added.


get(keys, criteria, timestamp)

For each of the keys in every record that matches the criteria, return the stored value that was most recently added at timestamp.


get(criteria, timestamp)

For every key in every record that matches the criteria, return the stored value that was most recently added at timestamp.

getServerEnvironment

Return the name of the connected environment.

getServerVersion

Return the version of the connected server.

insert

Atomically insert the key/value associations from each of the Multimap in data into new and distinct records. Each of the values in each map in data must be a primitive or one dimensional object (e.g. no nested Map or Multimap)

data = {
    :string => "a",
    :int => 1,
    :double => 3.14,
    :bool => true,
    :multi => ["a", 1, 3.14, true]
}
record = @concourse.insert(data:data)[0]
data = {
    'string': 'a',
    'int': 1,
    'double': 3.14,
    'bool': True,
    'multi': ['a', 1, 3.14, True]
}
record = self.concourse.insert(data=data)[0]

insert(data)

MAP

Atomically insert the key/value associations from {@link Map data} into a new record.

Each of the values in data must be a primitive or one dimensional object (e.g. no nested {@link Map maps} or {@link Multimap multimaps}).

MULTIMAP Atomically insert the key/value associations from Multimap data into a new record.

Each of the values in data must be a primitive or one dimensional object (e.g. no nested {@link Map maps} or {@link Multimap multimaps}).

data = [
    {
'foo': 1
    },
    {
'foo': 2
    },
    {
'foo': 3
    }
]
records = self.concourse.insert(data=data)
$data = [
    'string' => 'a',
    'int' => 1,
    'double' => 3.14,
    'bool' => true,
    'multi' => ["a", 1, 3.14, true]
];
$record = $this->concourse->insert(['data' => $data])[0];
//Multimap example

Multimap<String, Object> data = HashMultimap.create();
data.put("name", "Jeff Nelson");
data.put("company", "Cinchapi");
data.put("title", "CEO");
data.put("direct_reports", Link.to(1));
data.put("direct_reports", Link.to(2));
long record = concourse.insert(data);

//Map example

Map<String, Object> data = Maps.newHashMap();
data.put("title", "Director of Engineering");
data.put("name", "Jane Doe");
data.put("salary", 20.0);
data.put("role", "Director");
long record = concourse.insert(data);

insert(data, records)

//map + multimap example MAP Atomically insert the key/value associations from {@link Map data} into each of the records, if possible.

An insert will fail for a given record if any of the key/value associations in data currently exist in that record (e.g. {@link #add(String, Object, long) adding} the key/value association would fail).

Each of the values in data must be a primitive or one dimensional object (e.g. no nested {@link Map maps} or {@link Multimap multimaps}).

MULTIMAP Atomically insert the key/value associations from Multimap data into each of the records, if possible.

An insert will fail for a given record if any of the key/value associations in data currently exist in that record (e.g. {@link #add(String, Object, long) adding} the key/value association would fail).

Each of the values in data must be a primitive or one dimensional object (e.g. no nested {@link Map maps} or {@link Multimap multimaps}).

data = {
    :string => "a",
    :int => 1,
    :double => 3.14,
    :bool => true,
    :multi => ["a", 1, 3.14, true]
}
records = [123, 321, 231]
result = @concourse.insert(data:data, record:records)
record1 = 123456
record2 = 1234567
record3 = 12345678
data = {
    'string': 'a',
    'int': 1,
    'double': 3.14,
    'bool': True,
    'multi': ['a', 1, 3.14, True]
}
result = self.concourse.insert(data=data, records=[record1, record2, record3])
//Map example
Map<String, Object> map = Maps.newHashMap();
map.put("name", "Jeff Nelson");
map.put("company", "Cinchapi");
map.put("title", "CEO");
map.put("direct_reports", Sets.newHashSet(Link.to(1), Link.to(2)));
long record1 = 31231L;
long record2 = 12312L;
concourse.insert(map, Lists.newArrayList(record1, record2));

//Multimap example
Multimap<String, Object> map = HashMultimap.create();
map.put("name", "Jeff Nelson");
map.put("company", "Cinchapi");
map.put("title", "CEO");
map.put("direct_reports", Link.to(1));
map.put("direct_reports", Link.to(2));
long record1 = 31231L;
long record2 = 12312L;
concourse.insert(map, Lists.newArrayList(record1, record2));

insert(data, record)

MAP

Atomically insert the key/value associations from {@link Map data} into record, if possible.

The insert will fail if any of the key/value associations in data currently exist in record (e.g. {@link #add(String, Object, long) adding} the key/value association would fail).

Each of the values in data must be a primitive or one dimensional object (e.g. no nested {@link Map maps} or {@link Multimap multimaps}).

MUTLIMAP

Atomically insert the key/value associations in {@link Multimap data} into record, if possible.

The insert will fail if any of the key/value associations in data currently exist in record (e.g. {@link #add(String, Object, long) adding} the key/value association would fail).

Each of the values in data must be a primitive or one dimensional object (e.g. no nested {@link Map maps} or {@link Multimap multimaps}).

data = {
    :string => "a",
    :int => 1,
    :double => 3.14,
    :bool => true,
    :multi => ["a", 1, 3.14, true]
}
record = 123
@concourse.insert(data:data, record:record)
record = 123
data = {
    'string': 'a',
    'int': 1,
    'double': 3.14,
    'bool': True,
    'multi': ['a', 1, 3.14, True]
}
result = self.concourse.insert(data=data, record=record)
//Map example
Map<String, Object> map = Maps.newHashMap();
map.put("name", "Jeff Nelson");
map.put("company", "Cinchapi");
map.put("title", "CEO");
map.put("direct_reports", Lists.newArrayList(Link.to(1), Link.to(2)));
long record = 3124L;
concourse.insert(map, record);

//Multimap example
Multimap<String, Object> map = HashMultimap.create();
map.put("name", "Jeff Nelson");
map.put("company", "Cinchapi");
map.put("title", "CEO");
map.put("direct_reports", Link.to(1));
map.put("direct_reports", Link.to(2));
long record = 3124L;
concourse.insert(map, record);

insert(json)

Atomically insert the key/value associations from the json string into as many new records as necessary.

If the json string contains a top-level array (of objects), this method will insert each of the objects in a new and distinct record. The {@link Set} that is returned will contain the ids of all those records. On the other hand, if the json string contains a single top-level object, this method will insert that object in a single new record. The {@link Set} that is returned will only contain the id of that record.

Regardless of whether the top-level element is an object or an array, each object in the json string contains one or more keys, each of which maps to a JSON primitive or an array of JSON primitives (e.g. no nested objects or arrays).

data = {
    :string => "a",
    :int => 1,
    :double => 3.14,
    :bool => true,
    :multi => ["a", 1, 3.14, true]
}
data = data.to_json
record = @concourse.insert(data:data)[0]

# JSON List

data = [
    {:foo => 1},
    {:foo => 2},
    {:foo => 3}
]
count = data.length
data = data.to_json
records = @concourse.insert(data:data)
data = {
    'string': 'a',
    'int': 1,
    'double': 3.14,
    'bool': True,
    'multi': ['a', 1, 3.14, True]
}
data = ujson.dumps(data)
record = self.concourse.insert(data=data)[0]
$data = '{"string":"a","int":1,"double":3.14,"bool":true,"multi":["a",1,3.14,true]}';
$record = $this->concourse->insert(['data' => $data])[0];
JsonObject json1 = new JsonObject();
json1.addProperty("foo", 10);
JsonArray array = new JsonArray();
array.add(json1);
String json = array.toString();

concourse.insert(json);

insert(json, records)

Atomically insert the key/value associations from the json object into each of the records, if possible.

An insert will fail for a given record if any of the key/value associations in the json object currently exist in that record (e.g. {@link #add(String, Object, long) adding} the key/value association would fail).

The json must contain a top-level object that contains one or more keys, each of which maps to a JSON primitive or an array of JSON primitives (e.g. no nested objects or arrays).

data = {
    :string => "a",
    :int => 1,
    :double => 3.14,
    :bool => true,
    :multi => ["a", 1, 3.14, true]
}
data = data.to_json
records = [123, 321, 213]
result = @concourse.insert(data:data, record:records)
record1 = 123456
record2 = 1234567
record3 = 12345678
data = {
    'string': 'a',
    'int': 1,
    'double': 3.14,
    'bool': True,
    'multi': ['a', 1, 3.14, True]
}
data = ujson.dumps(data)
result = self.concourse.insert(data=data, records=[record1, record2, record3])
$data = '{"string":"a","int":1,"double":3.14,"bool":true,"multi":["a",1,3.14,true]}';
$record = [123, 123, 123];
$result = $this->concourse->insert(['data' => $data, 'record' => $record]);
JsonObject json1 = new JsonObject();
json1.addProperty("foo", 10);

JsonArray array = new JsonArray();
array.add(json1);

String json = array.toString();

List<Long> records = new ArrayList<Long>();
records.add(124);
records.add(312);
records.add(777);

concourse.insert(json);

insert(json, record)

Atomically insert the key/value associations from the json object into record, if possible.

The insert will fail if any of the key/value associations in the json object currently exist in record (e.g. {@link #add(String, Object, long) adding} the key/value association would fail).

The json must contain a JSON object that contains one or more keys, each of which maps to a JSON primitive or an array of JSON primitives.

data = {
    :string => "a",
    :int => 1,
    :double => 3.14,
    :bool => true,
    :multi => ["a", 1, 3.14, true]
}
data = data.to_json
record = 1234
@concourse.insert(data:data, record:record)
record = 123
data = {
    'string': 'a',
    'int': 1,
    'double': 3.14,
    'bool': True,
    'multi': ['a', 1, 3.14, True]
}
data = ujson.dumps(data)
result = self.concourse.insert(data=data, record=record)
$data = '{"string":"a","int":1,"double":3.14,"bool":true,"multi":["a",1,3.14,true]}';
$record = 123;
$this->concourse->insert(['data' => $data, 'record' => $record]);
JsonObject json1 = new JsonObject();
json1.addProperty("foo", 10);

JsonArray array = new JsonArray();
array.add(json1);

String json = array.toString();
concourse.insert(json, 123123L);

inventory

Return all the records that have current or historical data.

records = [1, 2, 3, 4, 5, 6, 7]
@concourse.add "favorite_number", 17, records
records = [1, 2, 3, 4, 5, 6, 7]
self.concourse.add(key='foo', value=17, records=records)
self.concourse.inventory()
$records = [1, 2, 3, 4, 5, 6, 7];
$this->concourse->add("favorite_number", 17, $records);
$records, $this->concourse->inventory();
concourse.inventory();

invokePlugin

Invoke method using args within the plugin identified by id There must be a class named id available in Concourse Server via a plugin distribution. The method must also be accessible within the class. If the plugin throws any Exception, it’ll be re-thrown here as a RuntimeException

jsonify

Atomically dump the data in each of the records as a JSON array of objects.

record1 = 1
record2 = 2
data = {
"int" => 1,
"multi" => [1, 2, 3, 4]
}
@concourse.insert data:data, records:[record1, record2]
dump = @concourse.jsonify records:[record1, record2]
record1 = 1
record2 = 2
data = {
    'int': 1,
    'multi': [1, 2, 3, 4]
}
self.concourse.insert(data=data, records=[record1, record2])
dump = self.concourse.jsonify(records=[record1, record2])
$record1 = 1;
$record2 = 2;
$data = [
    "int" => 1,
    "multi" => [1, 2, 3, 4]
];
$this->concourse->insert(['data' => $data, 'records' => [$record1, $record2]]);
$dump = $this->concourse->jsonify(['records' => [$record1, $record2]]);
long record1 = 1;
List<Long> recordsList = Lists.newArrayList();
recordsList.add(record1);
concourse.add("a", 1, record1);
concourse.add("a", 2, record1);
concourse.add("a", 3, record1);
concourse.add("b", 1, record1);
concourse.add("b", 2, record1);
concourse.add("b", 3, record1);
String json = concourse.jsonify(recordsList);

jsonify(records, identifier)

Atomically dump the data in each of the records as a JSON array of objects and optionally include a special identifier key that contains the record id for each of the dumped objects.

record1 = 1
record2 = 2
data = {
"int" => 1,
"multi" => [1, 2, 3, 4]
}
@concourse.insert data:data, records:[record1, record2]
dump = @concourse.jsonify records:[record1, record2], include_id:true
record1 = 1
record2 = 2
data = {
    'int': 1,
    'multi': [1, 2, 3, 4]
}
self.concourse.insert(data=data, records=[record1, record2])
dump = self.concourse.jsonify(records=[record1, record2], id=True)
$record1 = 1;
$record2 = 2;
$data = [
    "int" => 1,
    "multi" => [1, 2, 3, 4]
];
$this->concourse->insert(['data' => $data, 'records' => [$record1, $record2]]);
$dump = $this->concourse->jsonify(['records' => [$record1, $record2], 'includeId' => true]);
long record1 = 1;
List<Long> recordsList = Lists.newArrayList();
recordsList.add(record1);
concourse.add("a", 1, record1);
concourse.add("a", 2, record1);
concourse.add("a", 3, record1);
concourse.add("b", 1, record1);
concourse.add("b", 2, record1);
concourse.add("b", 3, record1);
String json = concourse.jsonify(recordsList);

jsonify(records, timestamp)

Atomically dump the data in each of the records at timestamp as a JSON array of objects.

record1 = 1
record2 = 2
data = {
"int" => 1,
"multi" => [1, 2, 3, 4]
}
@concourse.insert data:data, records:[record1, record2]
time = @concourse.time
@concourse.add 'foo', 10, [record1, record2]
dump = @concourse.jsonify records:[record1, record2], time:time
record1 = 1
record2 = 2
data = {
    'int': 1,
    'multi': [1, 2, 3, 4]
}
self.concourse.insert(data=data, records=[record1, record2])
ts = self.concourse.time()
self.concourse.add('foo', 10, [record1, record2])
dump = self.concourse.jsonify(records=[record1, record2], time=ts)
$record1 = 1;
$record2 = 2;
$data = [
    "int" => 1,
    "multi" => [1, 2, 3, 4]
];
$this->concourse->insert(['data' => $data, 'records' => [$record1, $record2]]);
$time = $this->concourse->time();
$this->concourse->add("foo", 10, [$record1, $record2]);
$dump = $this->concourse->jsonify(['records' => [$record1, $record2], 'time' => $time]);
long record1 = 1;
List<Long> recordsList = Lists.newArrayList();
recordsList.add(record1);
concourse.add("a", 1, record1);
concourse.add("a", 2, record1);
concourse.add("a", 3, record1);
concourse.add("b", 1, record1);
concourse.add("b", 2, record1);
concourse.add("b", 3, record1);
Timestamp timestamp = Timestamp.fromJoda(Timestamp.now().getJoda().minusDays(3));
String json = concourse.jsonify(recordsList, timestamp);

jsonify(records, timestamp, identifier)

Atomically dump the data in each of the records at timestamp as a JSON array of objects and optionally include a special identifier key that contains the record id for each of the dumped objects.

record1 = 1
record2 = 2
data = {
"int" => 1,
"multi" => [1, 2, 3, 4]
}
@concourse.insert data:data, records:[record1, record2]
time = @concourse.time
@concourse.add "foo", 17, [record1, record2]
dump = @concourse.jsonify records:[record1, record2], include_id:true, time:time
record1 = 1
record2 = 2
data = {
    'int': 1,
    'multi': [1, 2, 3, 4]
}
self.concourse.insert(data=data, records=[record1, record2])
ts = self.concourse.time()
self.concourse.add('foo', 10, [record1, record2])
dump = self.concourse.jsonify(records=[record1, record2], time=ts)
$record1 = 1;
$record2 = 2;
$data = [
    "int" => 1,
    "multi" => [1, 2, 3, 4]
];
$this->concourse->insert(['data' => $data, 'records' => [$record1, $record2]]);
$time = $this->concourse->time();
$this->concourse->add("foo", 10, [$record1, $record2]);
$dump = $this->concourse->jsonify(['records' => [$record1, $record2], 'time' => $time, 'includeId' => true]);
long record1 = 1;
List<Long> recordsList = Lists.newArrayList();
recordsList.add(record1);
concourse.add("a", 1, record1);
concourse.add("a", 2, record1);
concourse.add("a", 3, record1);
concourse.add("b", 1, record1);
concourse.add("b", 2, record1);
concourse.add("b", 3, record1);
Timestamp timestamp = Timestamp.fromJoda(Timestamp.now().getJoda().minusDays(3));
String json = concourse.jsonify(recordsList, timestamp, true);

jsonify(record)

Atomically dump all the data in record as a JSON object.

record1 = 1
data = {
"int" => 1,
"multi" => [1, 2, 3, 4]
}
@concourse.insert data:data, records:[record1, record2]
dump = @concourse.jsonify record: record1
record1 = 1
data = {
"int" => 1,
"multi" => [1, 2, 3, 4]
}
self.concourse.insert(data:data, records:[record1, record2])
self.concourse.jsonify(record1)
$dump = $this->concourse->jsonify(['record' => 1]);
Long record = 123123L;
String json = concourse.jsonify(record);

jsonify(record, identifier)

Atomically dump all the data in record as a JSON object and optionally include a special identifier key that contains the record id.

record1 = 1
data = {
"int" => 1,
"multi" => [1, 2, 3, 4]
}
@concourse.insert data:data, record: record1
dump = @concourse.jsonify record:record1, include_id:true
record1 = 1
record2 = 2
data = {
    'int': 1,
    'multi': [1, 2, 3, 4]
}
self.concourse.insert(data=data, records=[record1, record2])
dump = self.concourse.jsonify(record=record1, id=True)
$dump = $this->concourse->jsonify(['record' => 1, 'includeId' => true]);
Long record = 123123L;
String json = concourse.jsonify(record, true);

jsonify(record, timestamp)

Atomically dump all the data in record at timestamp as a JSON object.

record1 = 1
data = {
"int" => 1,
"multi" => [1, 2, 3, 4]
}
@concourse.insert data:data, record: record1
time = @concourse.time
@concourse.add 'foo', 10, record1
dump = @concourse.jsonify record:record1, time:time
record1 = 1
record2 = 2
data = {
    'int': 1,
    'multi': [1, 2, 3, 4]
}
self.concourse.insert(data=data, records=[record1, record2])
ts = self.concourse.time()
dump = self.concourse.jsonify(record=record1, time=ts)
$time = $this->concourse->time();
$dump = $this->concourse->jsonify(['record' => 1, 'time' => $time]);
Long record = 123123L;
Timestamp timestamp = Timestamp.fromJoda(Timestamp.now().getJoda().minusDays(3));
String json = concourse.jsonify(record, timestamp);

jsonify(record, timestamp, identifier)

Atomically dump all the data in record at timestamp as a JSON object and optionally include a special identifier key that contains the record id.

record1 = 1
data = {
"int" => 1,
"multi" => [1, 2, 3, 4]
}
@concourse.insert data:data, record:record1
time = @concourse.time
@concourse.add "foo", 17, record1
dump = @concourse.jsonify record: record1, include_id:true, time:time
record1 = 1
record2 = 2
data = {
    'int': 1,
    'multi': [1, 2, 3, 4]
}
self.concourse.insert(data=data, records=[record1, record2])
ts = self.concourse.time()

dump = self.concourse.jsonify(record=record1, time=ts, id=True)
$time = $this->concourse->time();
$dump = $this->concourse->jsonify(['record' => 1, 'time' => $time, 'includeId' => true]);
Long record = 123123L;
Timestamp timestamp = Timestamp.fromJoda(Timestamp.now().getJoda().minusDays(3));
String json = concourse.jsonify(record, timestamp, true);

link

Append links from key in source to each of the destinations.

@concourse.link "friends", 1, 5
@concourse.link("friends", 1, [1, 2, 3, 4, 5])
self.concourse.link(key='friends', source=1, destination=[2, 3, 4])
$this->concourse->link("friends", 1, 5);
$this->concourse->link("friends", 1, [1, 2, 3, 4, 5]));
String key = "some_key";
long source = 333L;
List<Long> destinations = new ArrayList<Long>();
records.add(213L);
records.add(333L);

concourse.link(key, destinations, source);

Append a link from key in source to destination.

@concourse.link "friends", 1, 2
self.concourse.link(key='friends', source=1, destination=2)
$this->concourse->link("friends", 1, 2);
long source = 1;
long destionation = 3;
concourse.link("foo", source, destination);

ping

Atomically check to see if each of the records currently contains any data.

@concourse.add "foo", 1, [1, 2]
data = @concourse.ping [1, 2, 3]
self.concourse.add(key='foo', value=1, records=[1, 2])
data = self.concourse.ping([1, 2, 3])
$this->concourse->add("foo", 1, [1, 2]);
$data = $this->concourse->ping([1, 2, 3]);
List<Long> records = new ArrayList<Long>();

records.add(124);
records.add(312);
records.add(777);

concourse.ping(records);

ping(record)

Check to see if record currently contains any data.

@concourse.add "foo", 1, record
@concourse.ping record
record = 1
self.concourse.ping(record)
$record = 1;
$this->concourse->ping($record);
long record = 12312l;
concourse.ping(record);

reconcile

Make the necessary changes to the data stored for key in record so that it contains the exact same values as the specified collection.

@concourse.reconcile key:"foo", record:17, values:[]
self.concourse.reconcile(key="foo", record=17, values=[])
$this->concourse->reconcile("foo", 17, []);
String key = "some_key";
long record = 231l;
concourse.reconcile(key, record, 102, 103, 104);

reconcile(key, record, values)

Make the necessary changes to the data stored for key in record so that it contains the exact same values as the specified array.

record = 1
key = "some_key"
@concourse.add(key, "A", record)
@concourse.add(key, "C", record)
@concourse.add(key, "D", record)
@concourse.add(key, "E", record)
@concourse.add(key, "F", record)
values = ['A', 'B', 'D', 'G']
@concourse.reconcile(key:key, record:record, values:values)
record = 1
key = "testKey"
self.concourse.add(key, "A", record)
self.concourse.add(key, "C", record)
self.concourse.add(key, "D", record)
self.concourse.add(key, "E", record)
self.concourse.add(key, "F", record)
values = ['A', 'B', 'D', 'G']
self.concourse.reconcile(key=key, record=record, values=values)
$field = "some_key";
$record = 1;
$this->concourse->add($field, "A", $record);
$this->concourse->add($field, "C", $record);
$this->concourse->add($field, "D", $record);
$this->concourse->add($field, "E", $record);
$this->concourse->add($field, "F", $record);
$values = array("A", "B", "D", "G");
$this->concourse->reconcile($field, $record, $values);
long record = 1l;
String key = "some_key";
List<Long> values = new ArrayList<Long>();
values.add(232);
values.add(415);
concourse.reconcile(key, record, values);

remove

Atomically remove key as value from each of the records where it currently exists.

key = "foo"
value = 1
@concourse.add key, value, [1, 2]
data = @concourse.remove key, value, [1, 2, 3]
key = 'foo'
value = 1
self.concourse.add(key, value, records=[1, 2])
data = self.concourse.remove(key, value, records=[1, 2, 3])
$key = "foo";
$value = 1;
$this->concourse->add($key, $value, [1, 2]);
$this->concourse->remove($key, $value, [1, 2, 3]);
String key = "some_key";
long value = 2312l;
long record1 = 1;
List<Long> records = Lists.newArrayList();
recordsList.add(record1);

concourse.remove(key, value, records);

remove(key, value, record)

Remove key as value from record if it currently exists.

key = "foo"
value = 1
record = 1
@concourse.add key, value, record
@concourse.remove key, value, record
key = 'foo'
value = 1
record = 1
self.concourse.add(key, value, record)
self.concourse.remove(key=key, record=record, value=value)
$key = "foo";
$value = 1;
$record = 1;
$this->concourse->remove($key, $value, $record);
String key = "some_key";
long value = 2312l;
long record = 1;
concourse.remove(key, value, record);

revert

Atomically revert each of the keys in each of the records to their state at timestamp by creating new revisions that undo the net changes that have occurred since timestamp.

data1 = {
'one'=> 1,
'two'=> 2,
'three'=> 3
}
data2 = {
'one'=> true,
'two'=> true,
'three'=> true
}
@concourse.insert data:data1, records:[1,2,3]
time = @concourse.time
@concourse.insert data:data2, records:[1,2,3]
@concourse.revert keys:["one", "two", "three"], record:[1,2,3], time:time
data = @concourse.select keys:["one", "two", "three"], records:[1,2,3]
data1 = {
    'one': 1,
    'two': 2,
    'three': 3
}
data2 = {
    'one': True,
    'two': True,
    'three': True
}
self.concourse.insert(data=data1, records=[1, 2, 3])
ts = self.concourse.time()
self.concourse.insert(data=data2, records=[1, 2, 3])
self.concourse.revert(keys=['one', 'two', 'three'], records=[1, 2, 3], time=ts)
$data1 = [
    'one' => 1,
    'two' => 2,
    'three' => 3
];
$data2 = [
    'one' => true,
    'two' => true,
    'three' => true
];
$this->concourse->insert(['data' => $data1, 'records' => [1, 2, 3]]);
$time = $this->concourse->time();
$this->concourse->insert(['data' => $data2, 'records' => [1, 2, 3]]);
$this->concourse->revert(["one", "two", "three"], [1, 2, 3], $time);
List<String> keys = new ArrayList<String>();
keys.add("some_key_1");
keys.add("some_key_2");
keys.add("some_key_3");

List<Long> records = new ArrayList<Long>();
records.add(233123l);
records.add(241232l);
records.add(123124l);
Timestamp timestamp = Timestamp.fromJoda(Timestamp.now().getJoda().minusDays(3));

concourse.revert(keys, records, timestamp);

revert(keys, record, timestamp)

Atomically revert each of the keys in record to their state at timestamp by creating new revisions that undo the net changes that have occurred since timestamp.

data1 = {
'one'=> 1,
'two'=> 2,
'three'=> 3
}
data2 = {
'one'=> true,
'two'=> true,
'three'=> true
}
@concourse.insert data:data1, records:[1,2,3]
time = @concourse.time
@concourse.insert data:data2, records:[1,2,3]
@concourse.revert key:["one", "two", "three"], record:1, time:time
data1 = {
    'one': 1,
    'two': 2,
    'three': 3
}
data2 = {
    'one': True,
    'two': True,
    'three': True
}
self.concourse.insert(data=data1, records=[1, 2, 3])
ts = self.concourse.time()
self.concourse.insert(data=data2, records=[1, 2, 3])
self.concourse.revert(key=['one', 'two', 'three'], record=1, time=ts)
$data1 = [
    'one' => 1,
    'two' => 2,
    'three' => 3
];
$data2 = [
    'one' => true,
    'two' => true,
    'three' => true
];
$this->concourse->insert(['data' => $data1, 'records' => [1, 2, 3]]);
$time = $this->concourse->time();
$this->concourse->insert(['data' => $data2, 'records' => [1, 2, 3]]);
$this->concourse->revert(["one", "two", "three"], [1], $time);
List<String> keys = new ArrayList<String>();
keys.add("some_key_1");
keys.add("some_key_2");
keys.add("some_key_3");
Long record = 21412L;
Timestamp timestamp = Timestamp.fromJoda(Timestamp.now().getJoda().minusDays(3));

concourse.revert(keys, record, timestamp);

revert(key, records, timestamp)

Atomically revert key in each of the records to its state at timestamp by creating new revisions that undo the net changes that have occurred since timestamp.

data1 = {
'one'=> 1,
'two'=> 2,
'three'=> 3
}
data2 = {
'one'=> true,
'two'=> true,
'three'=> true
}
@concourse.insert data:data1, records:[1,2,3]
time = @concourse.time
@concourse.insert data:data2, records:[1,2,3]
@concourse.revert key:"one", record:[1,2,3], time:time
data1 = {
    'one': 1,
    'two': 2,
    'three': 3
}
data2 = {
    'one': True,
    'two': True,
    'three': True
}
self.concourse.insert(data=data1, records=[1, 2, 3])
ts = self.concourse.time()
self.concourse.insert(data=data2, records=[1, 2, 3])
self.concourse.revert(key='one', records=[1, 2, 3], time=ts)
$data1 = [
    'one' => 1,
    'two' => 2,
    'three' => 3
];
$data2 = [
    'one' => true,
    'two' => true,
    'three' => true
];
$this->concourse->insert(['data' => $data1, 'records' => [1, 2, 3]]);
$time = $this->concourse->time();
$this->concourse->insert(['data' => $data2, 'records' => [1, 2, 3]]);
$this->concourse->revert("one", [1, 2, 3], $time);
String key = "some_key_1";

List<Long> records = new ArrayList<Long>();
records.add(233123l);
records.add(241232l);
records.add(123124l);
Timestamp timestamp = Timestamp.fromJoda(Timestamp.now().getJoda().minusDays(3));

concourse.revert(key, records, timestamp);

revert(key, record, timestamp)

Perform a full text search for query against the key field and return the records that contain a {@link String} or {@link Tag} value that matches.

data1 = {
'one'=> 1,
'two'=> 2,
'three'=> 3
}
data2 = {
'one'=> true,
'two'=> true,
'three'=> true
}
@concourse.insert data:data1, records:[1,2,3]
time = @concourse.time
@concourse.insert data:data2, records:[1,2,3]
@concourse.revert key:"one", record:1, time:time
data = @concourse.select key:"one", records:1
data1 = {
    'one': 1,
    'two': 2,
    'three': 3
}
data2 = {
    'one': True,
    'two': True,
    'three': True
}
self.concourse.insert(data=data1, records=[1, 2, 3])
ts = self.concourse.time()
self.concourse.insert(data=data2, records=[1, 2, 3])
self.concourse.revert(key='one', record=1, time=ts)
$data1 = [
    'one' => 1,
    'two' => 2,
    'three' => 3
];
$data2 = [
    'one' => true,
    'two' => true,
    'three' => true
];
$this->concourse->insert(['data' => $data1, 'records' => [1, 2, 3]]);
$time = $this->concourse->time();
$this->concourse->insert(['data' => $data2, 'records' => [1, 2, 3]]);
$this->concourse->revert(["one"], [1], $time);
String key = "some_key_1";
Long record = 123L;
Timestamp timestamp = Timestamp.fromJoda(Timestamp.now().getJoda().minusDays(3));

concourse.revert(key, record, timestamp);

search

Perform a full text search for query against the key field and return the records that contain a String or Tag value that matches.

@concourse.search "some_key_1", "foo"
self.concourse.add(key="name", value="jeff", record=1)
self.concourse.add(key="name", value="jeffery", record=2)
self.concourse.add(key="name", value="jeremy", record=3)
self.concourse.add(key="name", value="ben jefferson", record=4)
records = self.concourse.search(key="name", query="jef")
$this->concourse->add("name", "jeff", 1);
$this->concourse->add("name", "jeffery", 2);
$this->concourse->add("name", "jeremy", 3);
$this->concourse->add("name", "ben jefferson", 4);
$records = $this->concourse->search("name", "jeff");
concourse.search("some_key_1", "foo");

select

Return all the data that is currently stored in each of the records.

@concourse.select records:[1, 2]
self.concourse.add('foo', 1, [1, 2])
self.concourse.add('foo', 2, [1, 2])
self.concourse.add('bar', 1, [1, 2])
self.concourse.add('bar', 2, [1, 2])
data = self.concourse.select(records=[1, 2])
$this->concourse->add("foo", 1, [1, 2]);
$this->concourse->add("foo", 2, [1, 2]);
$this->concourse->add("bar", 1, [1, 2]);
$this->concourse->add("bar", 2, [1, 2]);
$data = $this->concourse->select([1, 2]);
List<Long> records = new ArrayList<Long>();
records.add(233123l);
records.add(241232l);
records.add(123124l);

concourse.select(records);

select(records, timestamp)

Return all the data that was stored in each of the records at timestamp.

@concourse.add "foo", 1, [1, 2]
@concourse.add "foo", 2, [1, 2]
@concourse.add "bar", 1, [1, 2]
@concourse.add "bar", 2, [1, 2]
time = @concourse.time
@concourse.add "foo", 3, [1, 2]
@concourse.add "bar", 3, [1, 2]
data = @concourse.select record:[1, 2], time:time
self.concourse.add('foo', 1, [1, 2])
self.concourse.add('foo', 2, [1, 2])
self.concourse.add('bar', 1, [1, 2])
self.concourse.add('bar', 2, [1, 2])
ts = self.concourse.time()
self.concourse.add('foo', 3, [1, 2])
self.concourse.add('bar', 3, [1, 2])
data = self.concourse.select( records=[1, 2], time=ts)
$this->concourse->add("foo", 1, [1, 2]);
$this->concourse->add("foo", 2, [1, 2]);
$this->concourse->add("bar", 1, [1, 2]);
$this->concourse->add("bar", 2, [1, 2]);
$time = $this->concourse->time();
$this->concourse->add("foo", 3, [1, 2]);
$this->concourse->add("bar", 3, [1, 2]);
$data = $this->concourse->select([1, 2], ['time' => $time]);
List<Long> records = new ArrayList<Long>();
records.add(233123l);
records.add(241232l);
records.add(123124l);
Timestamp timestamp = Timestamp.fromJoda(Timestamp.now().getJoda().minusDays(3));

concourse.select(records, timestamp);

select(keys, records)

Return all the values stored for each of the keys in each of the records.

@concourse.add "foo", 1, [1, 2]
@concourse.add "foo", 2, [1, 2]
@concourse.add "bar", 1, [1, 2]
@concourse.add "bar", 2, [1, 2]
data = @concourse.select keys:["foo", "bar"], records:[1, 2]
self.concourse.add('foo', 1, [1, 2])
self.concourse.add('foo', 2, [1, 2])
self.concourse.add('bar', 1, [1, 2])
self.concourse.add('bar', 2, [1, 2])
data = self.concourse.select(keys=['foo', 'bar'], records=[1, 2])
$this->concourse->add("foo", 1, [1, 2]);
$this->concourse->add("foo", 2, [1, 2]);
$this->concourse->add("bar", 1, [1, 2]);
$this->concourse->add("bar", 2, [1, 2]);
$data = $this->concourse->select(['keys' => ['foo', 'bar'], 'record' => [1, 2]]);
List<String> keys = new ArrayList<String>();
keys.add("some_key_1");
keys.add("some_key_2");
keys.add("some_key_3");

List<Long> records = new ArrayList<Long>();
records.add(233123l);
records.add(241232l);
records.add(123124l);

concourse.select(keys,records);

select(keys, records, timestamp)

Return all the values stored for each of the keys in each of the records at timestamp.

@concourse.add "foo", 1, [1, 2]
@concourse.add "foo", 2, [1, 2]
@concourse.add "bar", 1, [1, 2]
@concourse.add "bar", 2, [1, 2]
time = @concourse.time
@concourse.add "foo", 3, [1, 2]
@concourse.add "bar", 3, [1, 2]
data = @concourse.select keys:["foo", "bar"], records:[1, 2], time:time
self.concourse.add('foo', 1, [1, 2])
self.concourse.add('foo', 2, [1, 2])
self.concourse.add('bar', 1, [1, 2])
self.concourse.add('bar', 2, [1, 2])
ts = self.concourse.time()
self.concourse.add('foo', 3, [1, 2])
self.concourse.add('bar', 3, [1, 2])
data = self.concourse.select(keys=['foo', 'bar'], records=[1, 2], time=ts)
$this->concourse->add("foo", 1, [1, 2]);
$this->concourse->add("foo", 2, [1, 2]);
$this->concourse->add("bar", 1, [1, 2]);
$this->concourse->add("bar", 2, [1, 2]);
$time = $this->concourse->time();
$this->concourse->add("foo", 3, [1, 2]);
$this->concourse->add("bar", 3, [1, 2]);
$data = $this->concourse->select(['keys' => ['foo', 'bar'], 'record' => [1, 2], 'time' => $time]);
List<String> keys = new ArrayList<String>();
keys.add("some_key_1");
keys.add("some_key_2");
keys.add("some_key_3");

List<Long> records = new ArrayList<Long>();
records.add(233123l);
records.add(241232l);
records.add(123124l);

Timestamp timestamp = Timestamp.fromJoda(Timestamp.now().getJoda().minusDays(3));

concourse.select(keys, records, timestamp);

select(keys, criteria)

Return all the values stored for each of the keys in every record that matches the criteria.


select(keys, criteria, timestamp)

Return all the values stored for each of the keys at timestamp in every record that matches the criteria

select(keys, record)

Return all the values stored for each of the keys in record.

@concourse.add "foo", 1, 1
@concourse.add "foo", 2, 1
@concourse.add "bar", 1, 1
@concourse.add "bar", 2, 1
data = @concourse.select(keys:["foo", "bar"], record:1)
self.concourse.add('foo', 1, 1)
self.concourse.add('foo', 2, 1)
self.concourse.add('bar', 1, 1)
self.concourse.add('bar', 2, 1)
data = self.concourse.select(keys=['foo', 'bar'], record=1)
List<String> keys = new ArrayList<String>();
keys.add("some_key_1");
keys.add("some_key_2");
keys.add("some_key_3");
long record = 231L;

concourse.select(keys, record);

select(keys, record, timestamp)

Return all the values stored for each of the keys in record at timestamp.

@concourse.add "foo", 1, 1
@concourse.add "foo", 2, 1
@concourse.add "bar", 1, 1
@concourse.add "bar", 2, 1
time = @concourse.time
@concourse.add "foo", 3, 1
@concourse.add "bar", 3, 1
data = @concourse.select(keys:["foo", "bar"], record:1, time:time)
self.concourse.add('foo', 1, 1)
self.concourse.add('foo', 2, 1)
self.concourse.add('bar', 1, 1)
self.concourse.add('bar', 2, 1)
ts = self.concourse.time()
self.concourse.add('foo', 3, 1)
self.concourse.add('bar', 3, 1)
data = self.concourse.select(keys=['foo', 'bar'], record=1, time=ts)
List<String> keys = new ArrayList<String>();
keys.add("some_key_1");
keys.add("some_key_2");
keys.add("some_key_3");
long record = 231L;
Timestamp timestamp = Timestamp.fromJoda(Timestamp.now().getJoda().minusDays(3));

concourse.select(keys, record, timestamp);

select(keys, ccl)

Return all the values stored for each of the keys in every record that matches the ccl filter.

key1 = "some_key_1"
key2 = "some_key_2"
record1 = 123145123
record1 = 223145123
@concourse.add key1, 1, [record1, record2]
@concourse.add key1, 2, [record1, record2]
@concourse.add key1, 3, [record1, record2]
@concourse.add key2, 10, [record1, record2]
@concourse.add key1, 4, record2
ccl = "#{key2} = 10"
data = @concourse.select key:[key1, key2], ccl:ccl
key1 = "some_key_1"
key2 = "some_key_2"
record1 = 123456
record2 = 1234567
self.concourse.add(key=key1, value=1, records=[record1, record2])
self.concourse.add(key=key1, value=2, records=[record1, record2])
self.concourse.add(key=key1, value=3, records=[record1, record2])
self.concourse.add(key=key2, value=10, records=[record1, record2])
ccl = key2 + ' = 10'
data = self.concourse.select(ccl=ccl)
String ccl = "foo = 10";
List<String> keys = new ArrayList<String>();
keys.add("some_key_1");
keys.add("some_key_2");
keys.add("some_key_3");

concourse.select(keys, ccl);

select(keys, ccl, timestamp)

Return all the values stored for each of the keys at timestamp in every record that matches the ccl filter.

key1 = "some_key_1"
key2 = "some_key_2"
record1 = 123145123
record1 = 223145123
@concourse.add key1, 1, [record1, record2]
@concourse.add key1, 2, [record1, record2]
@concourse.add key1, 3, [record1, record2]
@concourse.add key2, 10, [record1, record2]
@concourse.add key1, 4, record2
ccl = "#{key2} = 10"
data = @concourse.select key:[key1, key2], ccl:ccl
key1 = "some_key_1"
key2 = "some_key_2"
record1 = 123456
record2 = 1234567
self.concourse.add(key=key1, value=1, records=[record1, record2])
self.concourse.add(key=key1, value=2, records=[record1, record2])
self.concourse.add(key=key1, value=3, records=[record1, record2])
self.concourse.add(key=key2, value=10, records=[record1, record2])
self.concourse.add(key=key1, value=4, record=record2)
ts = self.concourse.time()
ccl = key2 + ' = 10'
self.concourse.set(key=key1, value=100, record=[record2, record1])
data = self.concourse.select(key=[key1, key2], ccl=ccl, time=ts)
String ccl = "foo = 10";
List<String> keys = new ArrayList<String>();
keys.add("some_key_1");
keys.add("some_key_2");
keys.add("some_key_3");
Timestamp timestamp = Timestamp.fromJoda(Timestamp.now().getJoda().minusDays(3));

concourse.select(keys, ccl, timestamp);

select(criteria)

Return all the data from every record that matches criteria.

select(criteria, timestamp)

Return all the data at timestamp from every record that matches the criteria.

select(record)

Return all the data from record.

@concourse.add "foo", 1, [1, 2]
@concourse.add "foo", 2, [1, 2]
@concourse.add "bar", 1, [1, 2]
@concourse.add "bar", 2, [1, 2]
data = @concourse.select record:1
self.concourse.add('foo', 1, [1, 2])
self.concourse.add('foo', 2, [1, 2])
self.concourse.add('bar', 1, [1, 2])
self.concourse.add('bar', 2, [1, 2])
data = self.concourse.select(record=1)
$this->concourse->add("foo", 1, [1, 2])
$this->concourse->add("foo", 2, [1, 2])
$this->concourse->add("bar", 1, [1, 2])
$this->concourse->add("bar", 2, [1, 2])
$this->concourse->add(record=1)
concourse.select(231);

select(record, timestamp)

Return all the data from record at timestamp.

@concourse.add "foo", 1, [1, 2]
@concourse.add "foo", 2, [1, 2]
@concourse.add "bar", 1, [1, 2]
@concourse.add "bar", 2, [1, 2]
time = @concourse.time
@concourse.add "foo", 3, [1, 2]
@concourse.add "bar", 3, [1, 2]
data = @concourse.select record:1, time:time
self.concourse.add('foo', 1, [1, 2])
self.concourse.add('foo', 2, [1, 2])
self.concourse.add('bar', 1, [1, 2])
self.concourse.add('bar', 2, [1, 2])
ts = self.concourse.time()
self.concourse.add('foo', 3, [1, 2])
self.concourse.add('bar', 3, [1, 2])
data = self.concourse.select(record=2, time=ts)
Timestamp timestamp = Timestamp.fromJoda(Timestamp.now().getJoda().minusDays(3));
concourse.select(231, timestamp);

select(ccl)

Return all the data from every record that matches ccl filter.

key1 = "some_key_1"
key2 = "some_key_2"
record1 = 123145123
record1 = 223145123
@concourse.add key1, 1, [record1, record2]
@concourse.add key1, 2, [record1, record2]
@concourse.add key1, 3, [record1, record2]
@concourse.add key2, 10, [record1, record2]
ccl = "#{key2} = 10"
data = @concourse.select ccl:ccl
key1 = "some_key_1"
key2 = "some_key_2"
record1 = 123456
record2 = 1234567
self.concourse.add(key=key1, value=1, records=[record1, record2])
self.concourse.add(key=key1, value=2, records=[record1, record2])
self.concourse.add(key=key1, value=3, records=[record1, record2])
self.concourse.add(key=key2, value=10, records=[record1, record2])
ccl = key2 + ' = 10'
data = self.concourse.select(ccl=ccl)
$key1 = "some_key_1";
$key2 = "some_key_2";
$record1 = 2312;
$record1 = 3122;
$this->concourse->add($key1, 1, [$record1, $record2]);
$this->concourse->add($key1, 2, [$record1, $record2]);
$this->concourse->add($key1, 3, [$record1, $record2]);
$this->concourse->add($key2, 10, [$record1, $record2]);
$ccl = "$key2 = 10";
$data = $this->concourse->select(['ccl' => $ccl]);
String ccl = "foo = 10";
concourse.select(ccl);

select(key, records)

Return all values stored for key in each of the records

@concourse.add "foo", 1, [1, 2, 3]
@concourse.add "foo", 2, [1, 2, 3]
@concourse.add "foo", 3, [1, 2, 3]
@concourse.select(key:"foo", record:[1, 2, 3])
self.concourse.add('foo', 1, [1, 2, 3])
self.concourse.add('foo', 2, [1, 2, 3])
self.concourse.add('foo', 3, [1, 2, 3])
self.concourse.select(key='foo', record=[1, 2, 3])
$this->concourse->add("foo", 1, [1, 2, 3]);
$this->concourse->add("foo", 2, [1, 2, 3]);
$this->concourse->add("foo", 3, [1, 2, 3]);
$expected = [
    1 => [1, 2, 3],
    2 => [1, 2, 3],
    3 => [1, 2, 3]
];
$this->concourse->select(['key' => "foo", 'record' => [1, 2, 3]]);
String key = "some_key_1";
List<Long> records = new ArrayList<Long>();
records.add(233123l);
records.add(241232l);
records.add(123124l);

concourse.select(key, records);

select(key, records, timestamp)

Return all values stored for key in each of the records at timestamp.

@concourse.add "foo", 1, [1, 2, 3]
@concourse.add "foo", 2, [1, 2, 3]
@concourse.add "foo", 3, [1, 2, 3]
time = @concourse.time
@concourse.add "foo", 4, [1, 2, 3]
@concourse.select(key:"foo", record:[1, 2, 3], time:time)
self.concourse.add('foo', 1, [1, 2, 3])
self.concourse.add('foo', 2, [1, 2, 3])
self.concourse.add('foo', 3, [1, 2, 3])
ts = self.concourse.time()
self.concourse.add('foo', 4, [1, 2, 3])
self.concourse.select(key='foo', record=[1, 2, 3], time=ts)
$this->concourse->add("foo", 1, [1, 2, 3]);
$this->concourse->add("foo", 2, [1, 2, 3]);
$this->concourse->add("foo", 3, [1, 2, 3]);
$time = $this->concourse->time();
$this->concourse->add("foo", 4, [1, 2, 3]);
$expected = [
    1 => [1, 2, 3],
    2 => [1, 2, 3],
    3 => [1, 2, 3]
];
$this->concourse->select(['key' => "foo", 'record' => [1, 2, 3], 'time' => $time]);
String key = "some_key_1";
List<Long> records = new ArrayList<Long>();
records.add(233123l);
records.add(241232l);
records.add(123124l);
Timestamp timestamp = Timestamp.fromJoda(Timestamp.now().getJoda().minusDays(3));

concourse.select(key, records, timestamp);

select(key, criteria)

Return all the values stored for key in every record that matches the criteria.

select(key, criteria, timestamp)

Return all the values stored for key at timestamp in every record that matches the criteria.

select(key, record)

Return all the values stored for key in record.

@concourse.add "foo", 1, 1
@concourse.add "foo", 2, 1
@concourse.add "foo", 3, 1
@concourse.select(key:"foo", record:1)
self.concourse.add('foo', 1, 1)
self.concourse.add('foo', 2, 1)
self.concourse.add('foo', 3, 1)
self.concourse.select(key='foo', record=1)
$this->concourse->add("foo", 1, 1);
$this->concourse->add("foo", 2, 1);
$this->concourse->add("foo", 3, 1);
$this->concourse->select(['key' => "foo", 'record' => 1]);
String key = "some_key_1";
Long record = 2131L;

concourse.select(key, record);

select(key, record, timestamp)

Return all the values stored for key in record at timestamp.

@concourse.add "foo", 1, 1
@concourse.add "foo", 2, 1
@concourse.add "foo", 3, 1
time = @concourse.time
@concourse.add "foo", 4, 1
@concourse.select(key:"foo", record:1, time:time)
self.concourse.add('foo', 1, 1)
self.concourse.add('foo', 2, 1)
self.concourse.add('foo', 3, 1)
ts = self.concourse.time()
self.concourse.add('foo', 4, 1)
self.concourse.select(key='foo', record=1, time=ts)
$this->concourse->add("foo", 1, 1);
$this->concourse->add("foo", 2, 1);
$this->concourse->add("foo", 3, 1);
$time = $this->concourse->time();
$this->concourse->add("foo", 4, 1);
$this->concourse->select(['key' => "foo", 'record' => 1, 'time' => $time]);
String key = "some_key_1";
Long record = 2131L;
Timestamp timestamp = Timestamp.fromJoda(Timestamp.now().getJoda().minusDays(3));

concourse.select(key, record, timestamp);

select(key, ccl)

Return all the values stored for key in every record that matches the ccl filter.

key1 = "some_key_1"
key2 = "some_key_2"
record1 = 123145123
record1 = 223145123
@concourse.add key1, 1, [record1, record2]
@concourse.add key1, 2, [record1, record2]
@concourse.add key1, 3, [record1, record2]
@concourse.add key2, 10, [record1, record2]
@concourse.add key1, 4, record2
ccl = "#{key2} = 10"
data = @concourse.select key:key1, ccl:ccl
key1 = "some_key_1"
key2 = "some_key_2"
record1 = 123456
record2 = 1234567
self.concourse.add(key=key1, value=1, records=[record1, record2])
self.concourse.add(key=key1, value=2, records=[record1, record2])
self.concourse.add(key=key1, value=3, records=[record1, record2])
self.concourse.add(key=key2, value=10, records=[record1, record2])
self.concourse.add(key=key1, value=4, record=record2)
ccl = key2 + ' = 10'
data = self.concourse.select(key=key1, ccl=ccl)
$key1 = "some_key_1";
$key2 = "some_key_2";
$record1 = 2312;
$record1 = 3122;
$this->concourse->add($key1, 1, [$record1, $record2]);
$this->concourse->add($key1, 2, [$record1, $record2]);
$this->concourse->add($key1, 3, [$record1, $record2]);
$this->concourse->add($key2, 10, [$record1, $record2]);
$this->concourse->add($key1, 4, $record2);
$ccl = "$key2 = 10";
$data = $this->concourse->select(['ccl' => $ccl, 'key' => $key1]);
String key = "some_key_1";
String ccl = "bar > 10";

concourse.select(key, ccl);

select(key, ccl, timestamp)

Return all the values stored for key at timestamp in every record that matches the ccl filter.

key1 = "some_key_1"
key2 = "some_key_2"
record1 = 123145123
record1 = 223145123
@concourse.add key1, 1, [record1, record2]
@concourse.add key1, 2, [record1, record2]
@concourse.add key1, 3, [record1, record2]
@concourse.add key2, 10, [record1, record2]
@concourse.add key1, 4, record2
time = @concourse.time
ccl = "#{key2} = 10"
@concourse.set key1, 100, [record2, record1]
data = @concourse.select key:key1, ccl:ccl, time:time
key1 = "some_key_1"
key2 = "some_key_2"
record1 = 123456
record2 = 1234567
self.concourse.add(key=key1, value=1, records=[record1, record2])
self.concourse.add(key=key1, value=2, records=[record1, record2])
self.concourse.add(key=key1, value=3, records=[record1, record2])
self.concourse.add(key=key2, value=10, records=[record1, record2])
self.concourse.add(key=key1, value=4, record=record2)
ts = self.concourse.time()
ccl = key2 + ' = 10'
self.concourse.set(key=key1, value=100, record=[record2, record1])
data = self.concourse.select(key=key1, ccl=ccl, time=ts)
$key1 = "some_key_1";
$key2 = "some_key_2";
$record1 = 2312;
$record1 = 3122;
$this->concourse->add($key1, 1, [$record1, $record2]);
$this->concourse->add($key1, 2, [$record1, $record2]);
$this->concourse->add($key1, 3, [$record1, $record2]);
$this->concourse->add($key2, 10, [$record1, $record2]);
$this->concourse->add($key1, 4, $record2);
$time = $this->concourse->time();
$ccl = "$key2 = 10";
$this->concourse->set($key1, 100, [$record2, $record1]);
$data = $this->concourse->select(['ccl' => $ccl, 'key' => $key1, 'time' => $time]);
String key = "some_key_1";
String ccl = "bar > 10";
Timestamp timestamp = Timestamp.fromJoda(Timestamp.now().getJoda().minusDays(3));
concourse.select(key, ccl, timestamp);

select(ccl, timestamp)

Return all the data at timestamp from every record that matches the ccl filter.

key1 = "some_key_1"
key2 = "some_key_2"
record1 = 123145123
record1 = 223145123
@concourse.add key1, 1, [record1, record2]
@concourse.add key1, 2, [record1, record2]
@concourse.add key1, 3, [record1, record2]
@concourse.add key2, 10, [record1, record2]
time = @concourse.time
@concourse.set key2, 11, [record1, record2]
ccl = "#{key2} > 10"
data = @concourse.select ccl:ccl, time:time
key1 = "some_key_1"
key2 = "some_key_2"
record1 = 123456
record2 = 1234567
self.concourse.add(key=key1, value=1, records=[record1, record2])
self.concourse.add(key=key1, value=2, records=[record1, record2])
self.concourse.add(key=key1, value=3, records=[record1, record2])
self.concourse.add(key=key2, value=10, records=[record1, record2])
ts = self.concourse.time()
self.concourse.set(key=key2, value=11, records=[record1, record2])
ccl = key2 + ' > 10'
data = self.concourse.select(ccl=ccl, time=ts)
$key1 = "some_key_1";
$key2 = "some_key_2";
$record1 = 2312;
$record1 = 3122;
$this->concourse->add($key1, 1, [$record1, $record2]);
$this->concourse->add($key1, 2, [$record1, $record2]);
$this->concourse->add($key1, 3, [$record1, $record2]);
$this->concourse->add($key2, 10, [$record1, $record2]);
$time = $this->concourse->time();
$this->concourse->set($key2, 11, [$record1, $record2]);
$ccl = "$key2 = 10";
$data = $this->concourse->select(['ccl' => $ccl, 'time' => $time]);
String ccl = "bar > 10";
Timestamp timestamp = Timestamp.fromJoda(Timestamp.now().getJoda().minusDays(3));
concourse.select(ccl, timestamp);

set

In each of the records, atomically remove all the values stored for key and then add key as value in the respective record.

@concourse.add "foo", 2, [1, 2, 3]
@concourse.add "foo", 3, [1, 2, 3]
@concourse.set "foo", 1, [1, 2, 3]
key = "foo"
value = 1
record = 1
self.concourse.add(key=key, value=2, record=record)
self.concourse.add(key=key, value=2, record=record)
self.concourse.set(key=key, value=value, record=record)
$this->concourse->add("foo", 2, [1, 2, 3]);
$this->concourse->add("foo", 3, [1, 2, 3]);
$this->concourse->set("foo", 1, [1, 2, 3]);
$data = $this->concourse->select([1, 2, 3]);
String key = "some_key_1";
long value = 2321;
List<Long> records = new ArrayList<Long>();
records.add(233123l);
records.add(241232l);
records.add(123124l);

concourse.set(key, value, records);

set(key, value, record)

Atomically remove all the values stored for key in record and add then key as value.

@concourse.add "foo", 2, 1
@concourse.add "foo", 3, 1
@concourse.set "foo", 1, 1
key = "foo"
value = 1
record = 1
self.concourse.add(key=key, value=2, record=record)
self.concourse.add(key=key, value=2, record=record)
self.concourse.set(key=key, value=value, record=record)

$this->concourse->add("foo", 2, 1);
$this->concourse->add("foo", 3, 1);
$this->concourse->set("foo", 1, 1);
String key = "some_key_1";
long value = 2321;
long record = 231;

concourse.set(key, value, record);

set(key, value)

key = "foo"
value = 1
record = @concourse.set key, value
key = "foo"
value = 1
record = self.concourse.set(key=key, value=value)
data = self.concourse.select(record=record)
$key = "foo";
$value = 1;
$record = $this->concourse->set($key, $value);
String key = "some_key_1";
long value = 2321;

concourse.set(key, value);

stage

Start a new transaction that guarantees a reliable, all or nothing collection of work that allows correct recovery from failure and provides isolation between clients so the database maintains a consistent state.

stage()

Turn on staging mode so that all subsequent changes are collected in an isolated buffer before possibly committing to the database. Staged operations are guaranteed to be reliable, all or nothing units of work that allow correct recovery

After this method returns, all subsequent operations will be done in staging mode until either abort() or commit() is called.

Yo
@concourse.stage

@concourse.add "name", "Jeff Nelson", 17
@concourse.commit
self.concourse.stage()
key1 = "some_key_1"
key2 = "some_key_2"
key3 = "some_key_3"
record = 123
self.concourse.add(key1, 1, record)
self.concourse.add(key2, 2, record)
self.concourse.add(key3, 3, record)
self.concourse.commit()
$this->concourse->stage();
try {
    $this->concourse.add("name", "Jeff Nelson", 17);
    $this->concourse.commit();
}
catch(Exception $e){
    $this->concourse->abort();
}
concourse.stage();
try {
  concourse.add("name", "Jeff Nelson", 17);
  concourse.add("company", "Cinchapi", 17);
  concourse.add("title", "CEO", 17);
  concourse.commit();
}
catch (TransactionException e){
  concourse.abort();
}

stage(task)

Execute the task in an implicit transaction with support for auto-commit on success and auto-abort on failure.

$this->concourse->stage(function() {
    $this->concourse->add("name", "jeff", 17);
});
concourse.stage(() -> {
  concourse.add("name", "Jeff Nelson", 17);
  concourse.add("company", "Cinchapi", 17);
  concourse.add("title", "CEO", 17);
})

time

Return a Timestamp that represents the current instant according to the server.

@concourse.time
self.concourse.time()
$this->concourse->time()
Timestamp timestamp = concourse.time();

time(micros)

Return a {@link Timestamp} that corresponds to the specified number of microseconds since the Unix epoch.

Timestamp timestamp = concourse.time(4123);

time(phrase)

Return the {@link Timestamp}, according to the server, that corresponds to the instant described by the phrase.

@concourse.time("3 seconds ago")
self.concourse.time("3 seconds ago")
$this->concourse->time("3 seconds ago")
concourse.time("3 seoconds ago");

unlink

If it exists, remove the link from key in source to destination.

@concourse.unlink "friends", 1, 2
self.concourse.unlink(key='friends', source=1, destination=2)
$this->concourse->unlink("friends", 1, 2)
@concourse.unlink("friends", 1, [2, 3])
self.concourse.unlink(key='friends', source=1, destination=[2, 3])
$this->concourse->unlink("friends", 1, [2, 3])
String key = "some_key_1";
long destination = 1231;
long source = 1000;

concourse.unlink(key, source, destionation);

verify

Return true if value is stored for key in record.

@concourse.add "name", "jeff", 1
@concourse.add "name", "jeffery", 1
@concourse.add "name", "bob", 1
@concourse.verify "name", "jeff", 1
key1 = "some_key_1"
key2 = "some_key_2"
key3 = "some_key_3"
record = 123
self.concourse.add(key1, 1, record)
self.concourse.add(key2, 2, record)
self.concourse.add(key3, 3, record)
self.concourse.verify(key1, value, record)
$this->concourse->add("name", "jeff", 1);
$this->concourse->add("name", "jeffery", 1);
$this->concourse->add("name", "bob", 1);
$this->concourse->verify("name", "jeff", 1);
String key = "some_key_1";
long record = 1231;
long value = 222;

concourse.unlink(key, value, record);

verify(key, value, record, timestamp)

Return true if value was stored for key in record at timestamp.

@concourse.add "name", "jeff", 1
@concourse.add "name", "jeffery", 1
@concourse.add "name", "bob", 1
time = @concourse.time
@concourse.remove "name", "jeff", 1
@concourse.verify "name", "jeff", 1, time:time
self.concourse.add('name', 'jeff', 1)
self.concourse.add('name', 'jeffery', 1)
self.concourse.add('name', 'bob', 1)
ts = self.concourse.time()
self.concourse.remove('name', 'jeff', 1)
self.concourse.verify('name', 'jeff', 1, time=ts)
$this->concourse->add("name", "jeff", 1);
$this->concourse->add("name", "jeffery", 1);
$this->concourse->add("name", "bob", 1);
$time = $this->concourse->time();
$this->concourse->remove("name", "jeff", 1);
$this->concourse->verify("name", "jeff", 1, $time);
String key = "some_key_1";
long record = 1231;
long value = 222;
Timestamp timestamp = Timestamp.fromMicros(Time.now());

concourse.unlink(key, value, record, timestamp);

verifyAndSwap

Atomically replace expected with replacement for key in record if and only if expected is currently stored in the field.

@concourse.add "foo", 2, 2
@concourse.verify_and_swap("foo", 2, 2, 3)
self.concourse.add("foo", 2, 2)
self.concourse.verify_and_swap(key='foo', expected=1, record=2, replacement=3)

$this->concourse->add("foo", 2, 2);
$this->concourse->verifyAndSwap("foo", 1, 2, 3);
String key = "some_key_1";
long record = 231;
Object replacement = "replacement";
Object expected = "expecting";

concourse.verifyAndSwap(key, expected, record, replacement);

verifyOrSet

Atomically verify that key equals expected in record or set it as such.

@concourse.add "foo", 2, 2
@concourse.verify_or_set "foo", 3, 2
self.concourse.add("foo", 2, 2)
self.concourse.verify_or_set(key='foo', value=3, record=2)
self.concourse.get(key='foo', record=2)
$this->concourse->add("foo", 2, 2);
$this->concourse->verifyOrSet("foo", 3, 2);
String key = "some_key";
String expected = "some_key_1";
long record = 123;

concourse.verifyOrSet(key, expected, record);

Please note that after returning, this method guarantees that key in record will only contain value, even if value already existed alongside other values [e.g. calling verifyOrSet(“foo”, “bar”, 1) will mean that “foo” in 1 only has “bar” as a value after returning, even if “foo” in 1 already had “bar”, “baz”, and “apple” as values].

So, basically, this function has the same guarantee as the #set(String, Object, long) method, except it will not create any new revisions unless it is necessary to do so. The set method, on the other hand, would indiscriminately clear all the values for key in record before adding value, even if value already existed.

If you want to add a new value only if it does not exist while also preserving other values, you should use the #add(String, Object, long) method instead.

copyConnection

Return a new Concourse connection that is connected to the same deployment with the same credentials as this connection.

concourse.copyConnection();

Errors

The Kittn API uses the following error codes:

Error Code Meaning
400 Bad Request – Your request sucks
401 Unauthorized – Your API key is wrong
403 Forbidden – The kitten requested is hidden for administrators only
404 Not Found – The specified kitten could not be found
405 Method Not Allowed – You tried to access a kitten with an invalid method
406 Not Acceptable – You requested a format that isn’t json
410 Gone – The kitten requested has been removed from our servers
418 I’m a teapot
429 Too Many Requests – You’re requesting too many kittens! Slow down!
500 Internal Server Error – We had a problem with our server. Try again later.
503 Service Unavailable – We’re temporarially offline for maintanance. Please try again later.