use of com.cinchapi.ccl.syntax.AbstractSyntaxTree in project concourse by cinchapi.
the class ConcourseServer method selectCclTimeOrderPage.
@Override
@TranslateClientExceptions
@VerifyAccessToken
@VerifyReadPermission
public Map<Long, Map<String, Set<TObject>>> selectCclTimeOrderPage(String ccl, long timestamp, TOrder order, TPage page, AccessToken creds, TransactionToken transaction, String environment) throws TException {
AbstractSyntaxTree ast = compiler.parse(ccl);
AtomicSupport store = getStore(transaction, environment);
Supplier<SortableTable<Set<TObject>>> supplier = () -> emptySortableResultDataset();
return AtomicOperations.supplyWithRetry(store, atomic -> Operations.selectAstOptionalAtomic(atomic, ast, timestamp, Orders.from(order), Pages.from(page), supplier));
}
use of com.cinchapi.ccl.syntax.AbstractSyntaxTree in project concourse by cinchapi.
the class ConcourseServer method getKeyCclTimePage.
@Override
@TranslateClientExceptions
@VerifyAccessToken
@VerifyReadPermission
public Map<Long, TObject> getKeyCclTimePage(String key, String ccl, long timestamp, TPage page, AccessToken creds, TransactionToken transaction, String environment) throws TException {
AbstractSyntaxTree ast = compiler.parse(ccl);
AtomicSupport store = getStore(transaction, environment);
Supplier<SortableColumn<TObject>> supplier = () -> SortableColumn.singleValued(key, new LinkedHashMap<>());
return Operations.getKeyAstOptionalAtomic(store, key, ast, timestamp, Orders.from(NO_ORDER), Pages.from(page), supplier);
}
use of com.cinchapi.ccl.syntax.AbstractSyntaxTree in project concourse by cinchapi.
the class ConcourseServer method navigateKeyCriteriaTime.
@SuppressWarnings("deprecation")
@Override
@TranslateClientExceptions
@VerifyAccessToken
@VerifyReadPermission
@Deprecated
public Map<Long, Set<TObject>> navigateKeyCriteriaTime(String key, TCriteria criteria, long timestamp, AccessToken creds, TransactionToken transaction, String environment) throws TException {
AbstractSyntaxTree ast = compiler.parse(criteria);
AtomicSupport store = getStore(transaction, environment);
return AtomicOperations.supplyWithRetry(store, (atomic) -> {
Set<Long> records = ast.accept(Finder.instance(), atomic);
return Operations.navigateKeyRecordsAtomic(key, records, timestamp, atomic);
});
}
use of com.cinchapi.ccl.syntax.AbstractSyntaxTree in project concourse by cinchapi.
the class ConcourseServer method minKeyCriteriaTime.
@Override
@TranslateClientExceptions
@VerifyAccessToken
@VerifyReadPermission
public TObject minKeyCriteriaTime(String key, TCriteria criteria, long timestamp, AccessToken creds, TransactionToken transaction, String environment) throws TException {
AbstractSyntaxTree ast = compiler.parse(criteria);
AtomicSupport store = getStore(transaction, environment);
return AtomicOperations.supplyWithRetry(store, (atomic) -> {
Set<Long> records = ast.accept(Finder.instance(), atomic);
Number min = Operations.minKeyRecordsAtomic(key, records, timestamp, atomic);
return Convert.javaToThrift(min);
});
}
use of com.cinchapi.ccl.syntax.AbstractSyntaxTree in project concourse by cinchapi.
the class ConcourseServer method countKeyCriteriaTime.
@Override
@TranslateClientExceptions
@VerifyAccessToken
@VerifyReadPermission
public long countKeyCriteriaTime(String key, TCriteria criteria, long timestamp, AccessToken creds, TransactionToken transaction, String environment) throws TException {
AbstractSyntaxTree ast = compiler.parse(criteria);
AtomicSupport store = getStore(transaction, environment);
return AtomicOperations.supplyWithRetry(store, (atomic) -> {
Set<Long> records = ast.accept(Finder.instance(), atomic);
return Operations.countKeyRecordsAtomic(key, records, timestamp, atomic);
});
}
Aggregations