Skip to content

Commit

Permalink
Create provider to InsertQuery in communication-query
Browse files Browse the repository at this point in the history
Signed-off-by: Otavio Santana <otaviopolianasantana@gmail.com>
  • Loading branch information
otaviojava committed Jun 21, 2022
1 parent 30051ec commit e9dcf22
Showing 1 changed file with 10 additions and 1 deletion.
Expand Up @@ -74,9 +74,18 @@ static InsertQuery parse(String query) {
ServiceLoader.load(InsertQueryProvider.class)).apply(query);
}

/**
* Returns the {@link InsertQueryProvider} instance
* @return the InsertQueryProvider instance
* @throws jakarta.nosql.ProviderNotFoundException when the provider is not found
*/
static InsertQueryProvider getProvider() {
return ServiceLoaderProvider.get(InsertQueryProvider.class, ()->
ServiceLoader.load(InsertQueryProvider.class));
}

/**
* A provider to {@link InsertQuery}
* A provider to {@link InsertQuery}, this provider converts text into {@link InsertQuery}
*/
interface InsertQueryProvider extends Function<String, InsertQuery> {

Expand Down

0 comments on commit e9dcf22

Please sign in to comment.