You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Originally posted by lvca October 29, 2021
ArcadeDB provides the powerful db.async().command() API to execute a command asynchronously. Unfortunately, the callback has only onOk(Resultset) and onError() but it would be nice having callbacks per single result of the result set. This makes easier integration with reactive frameworks like RxJava.
The proposal is to enrich AsyncResultsetCallback by adding additional method to support both one time call onStart(resultset) and per result with onNext(Result) and onComplete() when done.
publicinterfaceAsyncResultsetCallback {
/** * Invoked as soon as the command has been executed. * * @param resultset Resultset to fetch */voidonStart(ResultSetresultset);
/** * Invoked per single result in the result set. * * @return true to continue fetching otherwise false. If false is returned, the fetching stops and the {@link #onComplete()} method is never invoked. */booleanonNext(Resultresult);
/** * Invoked when the fetching of the entire result set has been completed. */voidonComplete();
/** * Invoked in case of an error in the execution or fetching of the result set. * * @param exception The exception caught */voidonError(Exceptionexception);
}
The text was updated successfully, but these errors were encountered:
Discussed in #177
Originally posted by lvca October 29, 2021
ArcadeDB provides the powerful
db.async().command()
API to execute a command asynchronously. Unfortunately, the callback has onlyonOk(Resultset)
andonError()
but it would be nice having callbacks per single result of the result set. This makes easier integration with reactive frameworks like RxJava.The proposal is to enrich
AsyncResultsetCallback
by adding additional method to support both one time callonStart(resultset)
and per result withonNext(Result)
andonComplete()
when done.The text was updated successfully, but these errors were encountered: