Package app.hypi.mekadb.client
Class MekaDBClientGrpc.MekaDBClientStub
- java.lang.Object
-
- io.grpc.stub.AbstractStub<S>
-
- io.grpc.stub.AbstractAsyncStub<MekaDBClientGrpc.MekaDBClientStub>
-
- app.hypi.mekadb.client.MekaDBClientGrpc.MekaDBClientStub
-
- Enclosing class:
- MekaDBClientGrpc
public static final class MekaDBClientGrpc.MekaDBClientStub extends io.grpc.stub.AbstractAsyncStub<MekaDBClientGrpc.MekaDBClientStub>
A stub to allow clients to do asynchronous rpc calls to service MekaDBClient.
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidauthenticate(AuthReq request, io.grpc.stub.StreamObserver<AuthCtx> responseObserver)Log into a database to obtain an authentication context that can be used to execute SQL queriesprotected MekaDBClientGrpc.MekaDBClientStubbuild(io.grpc.Channel channel, io.grpc.CallOptions callOptions)io.grpc.stub.StreamObserver<SqlRequest>sqlWithJsonResponse(io.grpc.stub.StreamObserver<SqlResponse> responseObserver)Executes the SQL query given and returns a JSON array response as a string.
-
-
-
Method Detail
-
build
protected MekaDBClientGrpc.MekaDBClientStub build(io.grpc.Channel channel, io.grpc.CallOptions callOptions)
- Specified by:
buildin classio.grpc.stub.AbstractStub<MekaDBClientGrpc.MekaDBClientStub>
-
authenticate
public void authenticate(AuthReq request, io.grpc.stub.StreamObserver<AuthCtx> responseObserver)
Log into a database to obtain an authentication context that can be used to execute SQL queries
-
sqlWithJsonResponse
public io.grpc.stub.StreamObserver<SqlRequest> sqlWithJsonResponse(io.grpc.stub.StreamObserver<SqlResponse> responseObserver)
Executes the SQL query given and returns a JSON array response as a string. The JSON array contains objects where each key is the name of the column, lowercased. For example a table with the columns username, Age and CITY will return [{"username":"Courtney","age":1,"city":"San Francisco"}] i.e. the column names are lower cased, the values are the original as inserted into the table If there are no results, the string returned will always be "[]" i.e. you can always parse the string and assume there is a JSON array but it can be an empty array
-
-