package Ydb_Query_V1
import "github.com/ydb-platform/ydb-go-genproto/Ydb_Query_V1"
Index ¶
- Constants
- Variables
- func RegisterQueryServiceServer(s grpc.ServiceRegistrar, srv QueryServiceServer)
- type QueryServiceClient
- type QueryServiceServer
- type QueryService_AttachSessionClient
- type QueryService_AttachSessionServer
- type QueryService_ExecuteQueryClient
- type QueryService_ExecuteQueryServer
- type UnimplementedQueryServiceServer
- func (UnimplementedQueryServiceServer) AttachSession(*Ydb_Query.AttachSessionRequest, QueryService_AttachSessionServer) error
- func (UnimplementedQueryServiceServer) BeginTransaction(context.Context, *Ydb_Query.BeginTransactionRequest) (*Ydb_Query.BeginTransactionResponse, error)
- func (UnimplementedQueryServiceServer) CommitTransaction(context.Context, *Ydb_Query.CommitTransactionRequest) (*Ydb_Query.CommitTransactionResponse, error)
- func (UnimplementedQueryServiceServer) CreateSession(context.Context, *Ydb_Query.CreateSessionRequest) (*Ydb_Query.CreateSessionResponse, error)
- func (UnimplementedQueryServiceServer) DeleteSession(context.Context, *Ydb_Query.DeleteSessionRequest) (*Ydb_Query.DeleteSessionResponse, error)
- func (UnimplementedQueryServiceServer) ExecuteQuery(*Ydb_Query.ExecuteQueryRequest, QueryService_ExecuteQueryServer) error
- func (UnimplementedQueryServiceServer) ExecuteScript(context.Context, *Ydb_Query.ExecuteScriptRequest) (*Ydb_Operations.Operation, error)
- func (UnimplementedQueryServiceServer) FetchScriptResults(context.Context, *Ydb_Query.FetchScriptResultsRequest) (*Ydb_Query.FetchScriptResultsResponse, error)
- func (UnimplementedQueryServiceServer) RollbackTransaction(context.Context, *Ydb_Query.RollbackTransactionRequest) (*Ydb_Query.RollbackTransactionResponse, error)
- type UnsafeQueryServiceServer
Constants ¶
const ( QueryService_CreateSession_FullMethodName = "/Ydb.Query.V1.QueryService/CreateSession" QueryService_DeleteSession_FullMethodName = "/Ydb.Query.V1.QueryService/DeleteSession" QueryService_AttachSession_FullMethodName = "/Ydb.Query.V1.QueryService/AttachSession" QueryService_BeginTransaction_FullMethodName = "/Ydb.Query.V1.QueryService/BeginTransaction" QueryService_CommitTransaction_FullMethodName = "/Ydb.Query.V1.QueryService/CommitTransaction" QueryService_RollbackTransaction_FullMethodName = "/Ydb.Query.V1.QueryService/RollbackTransaction" QueryService_ExecuteQuery_FullMethodName = "/Ydb.Query.V1.QueryService/ExecuteQuery" QueryService_ExecuteScript_FullMethodName = "/Ydb.Query.V1.QueryService/ExecuteScript" QueryService_FetchScriptResults_FullMethodName = "/Ydb.Query.V1.QueryService/FetchScriptResults" )
Variables ¶
var File_ydb_query_v1_proto protoreflect.FileDescriptor
var QueryService_ServiceDesc = grpc.ServiceDesc{ ServiceName: "Ydb.Query.V1.QueryService", HandlerType: (*QueryServiceServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "CreateSession", Handler: _QueryService_CreateSession_Handler, }, { MethodName: "DeleteSession", Handler: _QueryService_DeleteSession_Handler, }, { MethodName: "BeginTransaction", Handler: _QueryService_BeginTransaction_Handler, }, { MethodName: "CommitTransaction", Handler: _QueryService_CommitTransaction_Handler, }, { MethodName: "RollbackTransaction", Handler: _QueryService_RollbackTransaction_Handler, }, { MethodName: "ExecuteScript", Handler: _QueryService_ExecuteScript_Handler, }, { MethodName: "FetchScriptResults", Handler: _QueryService_FetchScriptResults_Handler, }, }, Streams: []grpc.StreamDesc{ { StreamName: "AttachSession", Handler: _QueryService_AttachSession_Handler, ServerStreams: true, }, { StreamName: "ExecuteQuery", Handler: _QueryService_ExecuteQuery_Handler, ServerStreams: true, }, }, Metadata: "ydb_query_v1.proto", }
QueryService_ServiceDesc is the grpc.ServiceDesc for QueryService service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
Functions ¶
func RegisterQueryServiceServer ¶
func RegisterQueryServiceServer(s grpc.ServiceRegistrar, srv QueryServiceServer)
Types ¶
type QueryServiceClient ¶
type QueryServiceClient interface { // Sessions are basic primitives for communicating with YDB Query Service. The are similar to // connections for classic relational DBs. Sessions serve three main purposes: // 1. Provide a flow control for DB requests with limited number of active channels. // 2. Distribute load evenly across multiple DB nodes. // 3. Store state for volatile stateful operations, such as short-living transactions. CreateSession(ctx context.Context, in *Ydb_Query.CreateSessionRequest, opts ...grpc.CallOption) (*Ydb_Query.CreateSessionResponse, error) DeleteSession(ctx context.Context, in *Ydb_Query.DeleteSessionRequest, opts ...grpc.CallOption) (*Ydb_Query.DeleteSessionResponse, error) AttachSession(ctx context.Context, in *Ydb_Query.AttachSessionRequest, opts ...grpc.CallOption) (QueryService_AttachSessionClient, error) // Short-living transactions allow transactional execution of several queries, including support // for interactive transactions. Transaction control can be implemented via flags in ExecuteQuery // call (recommended), or via explicit calls to Begin/Commit/RollbackTransaction. BeginTransaction(ctx context.Context, in *Ydb_Query.BeginTransactionRequest, opts ...grpc.CallOption) (*Ydb_Query.BeginTransactionResponse, error) CommitTransaction(ctx context.Context, in *Ydb_Query.CommitTransactionRequest, opts ...grpc.CallOption) (*Ydb_Query.CommitTransactionResponse, error) RollbackTransaction(ctx context.Context, in *Ydb_Query.RollbackTransactionRequest, opts ...grpc.CallOption) (*Ydb_Query.RollbackTransactionResponse, error) // Execute interactive query in a specified short-living transaction. // YDB query can contain DML, DDL and DCL statements. Supported mix of different statement types depends // on the chosen transaction type. // In case of error, including transport errors such as interrupted stream, whole transaction // needs to be retried. For non-idempotent transaction, a custom client logic is required to // retry conditionally retriable statuses, when transaction execution state is unknown. ExecuteQuery(ctx context.Context, in *Ydb_Query.ExecuteQueryRequest, opts ...grpc.CallOption) (QueryService_ExecuteQueryClient, error) // Execute long-running script. // YDB scripts can contain all type of statements, including TCL statements. This way you can execute multiple // transactions in a single YDB script. // ExecuteScript call returns long-running Ydb.Operation object with: // // operation.metadata = ExecuteScriptMetadata // operation.result = Empty // // Script execution metadata contains all information about current execution state, including // execution_id, execution statistics and result sets info. // You can use standard operation methods such as Get/Cancel/Forget/ListOperations to work with script executions. // Script can be executed as persistent, in which case all execution information and results will be stored // persistently and available after successful or unsuccessful execution. ExecuteScript(ctx context.Context, in *Ydb_Query.ExecuteScriptRequest, opts ...grpc.CallOption) (*Ydb_Operations.Operation, error) // Fetch results for script execution using fetch_token for continuation. // For script with multiple result sets, parts of different results sets are interleaved in responses. // For persistent scripts, you can fetch results in specific position of specific result set using // position instead of fetch_token. FetchScriptResults(ctx context.Context, in *Ydb_Query.FetchScriptResultsRequest, opts ...grpc.CallOption) (*Ydb_Query.FetchScriptResultsResponse, error) }
QueryServiceClient is the client API for QueryService service.
For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
func NewQueryServiceClient ¶
func NewQueryServiceClient(cc grpc.ClientConnInterface) QueryServiceClient
type QueryServiceServer ¶
type QueryServiceServer interface { // Sessions are basic primitives for communicating with YDB Query Service. The are similar to // connections for classic relational DBs. Sessions serve three main purposes: // 1. Provide a flow control for DB requests with limited number of active channels. // 2. Distribute load evenly across multiple DB nodes. // 3. Store state for volatile stateful operations, such as short-living transactions. CreateSession(context.Context, *Ydb_Query.CreateSessionRequest) (*Ydb_Query.CreateSessionResponse, error) DeleteSession(context.Context, *Ydb_Query.DeleteSessionRequest) (*Ydb_Query.DeleteSessionResponse, error) AttachSession(*Ydb_Query.AttachSessionRequest, QueryService_AttachSessionServer) error // Short-living transactions allow transactional execution of several queries, including support // for interactive transactions. Transaction control can be implemented via flags in ExecuteQuery // call (recommended), or via explicit calls to Begin/Commit/RollbackTransaction. BeginTransaction(context.Context, *Ydb_Query.BeginTransactionRequest) (*Ydb_Query.BeginTransactionResponse, error) CommitTransaction(context.Context, *Ydb_Query.CommitTransactionRequest) (*Ydb_Query.CommitTransactionResponse, error) RollbackTransaction(context.Context, *Ydb_Query.RollbackTransactionRequest) (*Ydb_Query.RollbackTransactionResponse, error) // Execute interactive query in a specified short-living transaction. // YDB query can contain DML, DDL and DCL statements. Supported mix of different statement types depends // on the chosen transaction type. // In case of error, including transport errors such as interrupted stream, whole transaction // needs to be retried. For non-idempotent transaction, a custom client logic is required to // retry conditionally retriable statuses, when transaction execution state is unknown. ExecuteQuery(*Ydb_Query.ExecuteQueryRequest, QueryService_ExecuteQueryServer) error // Execute long-running script. // YDB scripts can contain all type of statements, including TCL statements. This way you can execute multiple // transactions in a single YDB script. // ExecuteScript call returns long-running Ydb.Operation object with: // // operation.metadata = ExecuteScriptMetadata // operation.result = Empty // // Script execution metadata contains all information about current execution state, including // execution_id, execution statistics and result sets info. // You can use standard operation methods such as Get/Cancel/Forget/ListOperations to work with script executions. // Script can be executed as persistent, in which case all execution information and results will be stored // persistently and available after successful or unsuccessful execution. ExecuteScript(context.Context, *Ydb_Query.ExecuteScriptRequest) (*Ydb_Operations.Operation, error) // Fetch results for script execution using fetch_token for continuation. // For script with multiple result sets, parts of different results sets are interleaved in responses. // For persistent scripts, you can fetch results in specific position of specific result set using // position instead of fetch_token. FetchScriptResults(context.Context, *Ydb_Query.FetchScriptResultsRequest) (*Ydb_Query.FetchScriptResultsResponse, error) // contains filtered or unexported methods }
QueryServiceServer is the server API for QueryService service. All implementations must embed UnimplementedQueryServiceServer for forward compatibility
type QueryService_AttachSessionClient ¶
type QueryService_AttachSessionClient interface { Recv() (*Ydb_Query.SessionState, error) grpc.ClientStream }
type QueryService_AttachSessionServer ¶
type QueryService_AttachSessionServer interface { Send(*Ydb_Query.SessionState) error grpc.ServerStream }
type QueryService_ExecuteQueryClient ¶
type QueryService_ExecuteQueryClient interface { Recv() (*Ydb_Query.ExecuteQueryResponsePart, error) grpc.ClientStream }
type QueryService_ExecuteQueryServer ¶
type QueryService_ExecuteQueryServer interface { Send(*Ydb_Query.ExecuteQueryResponsePart) error grpc.ServerStream }
type UnimplementedQueryServiceServer ¶
type UnimplementedQueryServiceServer struct { }
UnimplementedQueryServiceServer must be embedded to have forward compatible implementations.
func (UnimplementedQueryServiceServer) AttachSession ¶
func (UnimplementedQueryServiceServer) AttachSession(*Ydb_Query.AttachSessionRequest, QueryService_AttachSessionServer) error
func (UnimplementedQueryServiceServer) BeginTransaction ¶
func (UnimplementedQueryServiceServer) BeginTransaction(context.Context, *Ydb_Query.BeginTransactionRequest) (*Ydb_Query.BeginTransactionResponse, error)
func (UnimplementedQueryServiceServer) CommitTransaction ¶
func (UnimplementedQueryServiceServer) CommitTransaction(context.Context, *Ydb_Query.CommitTransactionRequest) (*Ydb_Query.CommitTransactionResponse, error)
func (UnimplementedQueryServiceServer) CreateSession ¶
func (UnimplementedQueryServiceServer) CreateSession(context.Context, *Ydb_Query.CreateSessionRequest) (*Ydb_Query.CreateSessionResponse, error)
func (UnimplementedQueryServiceServer) DeleteSession ¶
func (UnimplementedQueryServiceServer) DeleteSession(context.Context, *Ydb_Query.DeleteSessionRequest) (*Ydb_Query.DeleteSessionResponse, error)
func (UnimplementedQueryServiceServer) ExecuteQuery ¶
func (UnimplementedQueryServiceServer) ExecuteQuery(*Ydb_Query.ExecuteQueryRequest, QueryService_ExecuteQueryServer) error
func (UnimplementedQueryServiceServer) ExecuteScript ¶
func (UnimplementedQueryServiceServer) ExecuteScript(context.Context, *Ydb_Query.ExecuteScriptRequest) (*Ydb_Operations.Operation, error)
func (UnimplementedQueryServiceServer) FetchScriptResults ¶
func (UnimplementedQueryServiceServer) FetchScriptResults(context.Context, *Ydb_Query.FetchScriptResultsRequest) (*Ydb_Query.FetchScriptResultsResponse, error)
func (UnimplementedQueryServiceServer) RollbackTransaction ¶
func (UnimplementedQueryServiceServer) RollbackTransaction(context.Context, *Ydb_Query.RollbackTransactionRequest) (*Ydb_Query.RollbackTransactionResponse, error)
type UnsafeQueryServiceServer ¶
type UnsafeQueryServiceServer interface {
// contains filtered or unexported methods
}
UnsafeQueryServiceServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to QueryServiceServer will result in compilation errors.
Source Files ¶
ydb_query_v1.pb.go ydb_query_v1_grpc.pb.go
- Version
- v0.0.0-20241112172322-ea1f63298f77 (latest)
- Published
- Nov 12, 2024
- Platform
- linux/amd64
- Imports
- 9 packages
- Last checked
- 4 hours ago –
Tools for package owners.