@Internal
@CompileStatic
class QueryableHelper
extends Object
Helper for Queryable
| Type Params | Return Type | Name and description |
|---|---|---|
<T> |
static T |
getVar(String name)Returns a named execution variable from the thread-local context. |
|
static boolean |
isParallel()Indicates whether the current query is executing in parallel mode. |
<T> |
static Queryable<SourceRecord<T>> |
navigate(Queryable<? extends T> queryable, List<String> aliasList)Make Queryable instance's data source records being able to access via aliases |
<T> |
static T |
removeVar(String name)Removes a named execution variable from the thread-local context. |
<T> |
static void |
setVar(String name, T value)Stores a named execution variable in the thread-local context. |
|
static void |
shutdown(int mode)Shutdown to release resources |
<T> |
static T |
singleValue(Queryable<? extends T> queryable)Returns single value of Queryable instance |
<T> |
static ForkJoinTask<T> |
submit(Callable<T> callable)Submits work to the shared fork-join pool. |
<U> |
static CompletableFuture<U> |
supplyAsync(Supplier<U> supplier)Executes a supplier asynchronously on the shared thread pool. |
<T, U> |
static CompletableFuture<U> |
supplyAsync(Function<? super T, ? extends U> function, T param)Executes a single-argument function asynchronously on the shared thread pool. |
Returns a named execution variable from the thread-local context.
name - the variable nameIndicates whether the current query is executing in parallel mode.
true if parallel mode is enabledMake Queryable instance's data source records being able to access via aliases
queryable - the original Queryable instancealiasList - the aliases of clause from and joinsRemoves a named execution variable from the thread-local context.
name - the variable nameStores a named execution variable in the thread-local context.
name - the variable namevalue - the variable valueShutdown to release resources
mode - 0: immediate, 1: abortReturns single value of Queryable instance
queryable - the Queryable instanceSubmits work to the shared fork-join pool.
callable - the task to submitExecutes a supplier asynchronously on the shared thread pool.
supplier - the supplier to executeExecutes a single-argument function asynchronously on the shared thread pool.
function - the function to executeparam - the argument passed to the function