Search in sources :

Example 1 with Exp

use of com.aerospike.client.exp.Exp in project aerospike-client-java by aerospike.

the class TestBitExp method resize.

private void resize(Key key) {
    Exp size = Exp.val(6);
    policy.filterExp = Exp.build(Exp.ne(BitExp.resize(BitPolicy.Default, size, 0, Exp.blobBin(binA)), BitExp.resize(BitPolicy.Default, size, 0, Exp.blobBin(binA))));
    Record r = client.get(policy, key);
    assertEquals(null, r);
    policy.filterExp = Exp.build(Exp.eq(BitExp.resize(BitPolicy.Default, size, 0, Exp.blobBin(binA)), BitExp.resize(BitPolicy.Default, size, 0, Exp.blobBin(binA))));
    r = client.get(policy, key);
    assertRecordFound(key, r);
}
Also used : Record(com.aerospike.client.Record) Exp(com.aerospike.client.exp.Exp) BitExp(com.aerospike.client.exp.BitExp)

Example 2 with Exp

use of com.aerospike.client.exp.Exp in project aerospike-client-java by aerospike.

the class TestHLLExp method describe.

private void describe(Key key) {
    Exp index = Exp.val(0);
    policy.filterExp = Exp.build(Exp.ne(ListExp.getByIndex(ListReturnType.VALUE, Exp.Type.INT, index, HLLExp.describe(Exp.hllBin(bin1))), ListExp.getByIndex(ListReturnType.VALUE, Exp.Type.INT, index, HLLExp.describe(Exp.hllBin(bin2)))));
    Record r = client.get(policy, key);
    assertEquals(null, r);
    policy.filterExp = Exp.build(Exp.eq(ListExp.getByIndex(ListReturnType.VALUE, Exp.Type.INT, index, HLLExp.describe(Exp.hllBin(bin1))), ListExp.getByIndex(ListReturnType.VALUE, Exp.Type.INT, index, HLLExp.describe(Exp.hllBin(bin2)))));
    r = client.get(policy, key);
    assertRecordFound(key, r);
}
Also used : Record(com.aerospike.client.Record) HLLExp(com.aerospike.client.exp.HLLExp) Exp(com.aerospike.client.exp.Exp) ListExp(com.aerospike.client.exp.ListExp)

Aggregations

Record (com.aerospike.client.Record)2 Exp (com.aerospike.client.exp.Exp)2 BitExp (com.aerospike.client.exp.BitExp)1 HLLExp (com.aerospike.client.exp.HLLExp)1 ListExp (com.aerospike.client.exp.ListExp)1