Documentation
¶
Index ¶
- Constants
- Variables
- func LookupSqlQuerySetRootOp(_ context.Context, opTypeID string) (world.Operation, error)
- func SqlQueryFactory(ctx context.Context, _ *logrus.Entry, _ bus.Bus, engine world.Engine, ...) (srpc.Invoker, func(), error)
- type SqlQueryResource
- func (r *SqlQueryResource) Close()
- func (r *SqlQueryResource) GetMux() srpc.Mux
- func (r *SqlQueryResource) GetQueryText(ctx context.Context, _ *s4wave_sql_query.GetQueryTextRequest) (*s4wave_sql_query.GetQueryTextResponse, error)
- func (r *SqlQueryResource) Run(ctx context.Context, req *s4wave_sql_query.RunQueryRequest) (*s4wave_sql_query.RunQueryResponse, error)
- func (r *SqlQueryResource) SetParameters(ctx context.Context, req *s4wave_sql_query.SetParametersRequest) (*s4wave_sql_query.SetParametersResponse, error)
- func (r *SqlQueryResource) SetQueryText(ctx context.Context, req *s4wave_sql_query.SetQueryTextRequest) (*s4wave_sql_query.SetQueryTextResponse, error)
- type SqlQuerySetRootOp
- func (o *SqlQuerySetRootOp) ApplyWorldObjectOp(ctx context.Context, _ *logrus.Entry, os world.ObjectState, _ peer.ID) (bool, error)
- func (o *SqlQuerySetRootOp) ApplyWorldOp(ctx context.Context, le *logrus.Entry, ws world.WorldState, sender peer.ID) (bool, error)
- func (m *SqlQuerySetRootOp) CloneMessageVT() protobuf_go_lite.CloneMessage
- func (m *SqlQuerySetRootOp) CloneVT() *SqlQuerySetRootOp
- func (this *SqlQuerySetRootOp) EqualMessageVT(thatMsg any) bool
- func (this *SqlQuerySetRootOp) EqualVT(that *SqlQuerySetRootOp) bool
- func (x *SqlQuerySetRootOp) GetObjectKey() string
- func (o *SqlQuerySetRootOp) GetOperationTypeId() string
- func (x *SqlQuerySetRootOp) GetRootRef() *bucket.ObjectRef
- func (o *SqlQuerySetRootOp) MarshalBlock() ([]byte, error)
- func (x *SqlQuerySetRootOp) MarshalJSON() ([]byte, error)
- func (x *SqlQuerySetRootOp) MarshalProtoJSON(s *json.MarshalState)
- func (x *SqlQuerySetRootOp) MarshalProtoText() string
- func (m *SqlQuerySetRootOp) MarshalToSizedBufferVT(dAtA []byte) (int, error)
- func (m *SqlQuerySetRootOp) MarshalToVT(dAtA []byte) (int, error)
- func (m *SqlQuerySetRootOp) MarshalVT() (dAtA []byte, err error)
- func (*SqlQuerySetRootOp) ProtoMessage()
- func (x *SqlQuerySetRootOp) Reset()
- func (m *SqlQuerySetRootOp) SizeVT() (n int)
- func (x *SqlQuerySetRootOp) String() string
- func (o *SqlQuerySetRootOp) UnmarshalBlock(data []byte) error
- func (x *SqlQuerySetRootOp) UnmarshalJSON(b []byte) error
- func (x *SqlQuerySetRootOp) UnmarshalProtoJSON(s *json.UnmarshalState)
- func (m *SqlQuerySetRootOp) UnmarshalVT(dAtA []byte) error
- func (o *SqlQuerySetRootOp) Validate() error
Constants ¶
const SqlQuerySetRootOpId = "sql/query/set-root"
SqlQuerySetRootOpId is the world op id for advancing a sql/query root.
Variables ¶
var SqlQueryType = objecttype.NewObjectType(s4wave_sql_query.SqlQueryTypeID, SqlQueryFactory)
SqlQueryType registers the SQL query world ObjectType.
Functions ¶
func LookupSqlQuerySetRootOp ¶
LookupSqlQuerySetRootOp returns an empty SQL query set-root op for lookup.
Types ¶
type SqlQueryResource ¶
type SqlQueryResource struct {
// contains filtered or unexported fields
}
SqlQueryResource serves SqlQueryResourceService for one SQL query object.
func NewSqlQueryResource ¶
func NewSqlQueryResource( ws world.WorldState, engine world.Engine, objectKey string, ) *SqlQueryResource
NewSqlQueryResource constructs a SQL query resource.
func (*SqlQueryResource) Close ¶
func (r *SqlQueryResource) Close()
Close releases the resource lifecycle.
func (*SqlQueryResource) GetMux ¶
func (r *SqlQueryResource) GetMux() srpc.Mux
GetMux returns the SRPC mux for this resource.
func (*SqlQueryResource) GetQueryText ¶
func (r *SqlQueryResource) GetQueryText( ctx context.Context, _ *s4wave_sql_query.GetQueryTextRequest, ) (*s4wave_sql_query.GetQueryTextResponse, error)
GetQueryText reads the query text and target metadata.
func (*SqlQueryResource) Run ¶
func (r *SqlQueryResource) Run( ctx context.Context, req *s4wave_sql_query.RunQueryRequest, ) (*s4wave_sql_query.RunQueryResponse, error)
Run executes the query and creates a linked query result object.
func (*SqlQueryResource) SetParameters ¶
func (r *SqlQueryResource) SetParameters( ctx context.Context, req *s4wave_sql_query.SetParametersRequest, ) (*s4wave_sql_query.SetParametersResponse, error)
SetParameters updates positional bind arguments.
func (*SqlQueryResource) SetQueryText ¶
func (r *SqlQueryResource) SetQueryText( ctx context.Context, req *s4wave_sql_query.SetQueryTextRequest, ) (*s4wave_sql_query.SetQueryTextResponse, error)
SetQueryText updates query text and target metadata.
type SqlQuerySetRootOp ¶
type SqlQuerySetRootOp struct {
// ObjectKey is the sql/query object key to update.
ObjectKey string `protobuf:"bytes,1,opt,name=object_key,json=objectKey,proto3" json:"objectKey,omitempty"`
// RootRef is the committed query root reference.
RootRef *bucket.ObjectRef `protobuf:"bytes,2,opt,name=root_ref,json=rootRef,proto3" json:"rootRef,omitempty"`
// contains filtered or unexported fields
}
SqlQuerySetRootOp advances a sql/query world object's root.
func NewSqlQuerySetRootOp ¶
func NewSqlQuerySetRootOp(objectKey string, rootRef *bucket.ObjectRef) *SqlQuerySetRootOp
NewSqlQuerySetRootOp constructs a SQL query set-root operation.
func (*SqlQuerySetRootOp) ApplyWorldObjectOp ¶
func (o *SqlQuerySetRootOp) ApplyWorldObjectOp( ctx context.Context, _ *logrus.Entry, os world.ObjectState, _ peer.ID, ) (bool, error)
ApplyWorldObjectOp applies the SQL query set-root operation to an object.
func (*SqlQuerySetRootOp) ApplyWorldOp ¶
func (o *SqlQuerySetRootOp) ApplyWorldOp( ctx context.Context, le *logrus.Entry, ws world.WorldState, sender peer.ID, ) (bool, error)
ApplyWorldOp applies the SQL query set-root operation to a world.
func (*SqlQuerySetRootOp) CloneMessageVT ¶
func (m *SqlQuerySetRootOp) CloneMessageVT() protobuf_go_lite.CloneMessage
func (*SqlQuerySetRootOp) CloneVT ¶
func (m *SqlQuerySetRootOp) CloneVT() *SqlQuerySetRootOp
func (*SqlQuerySetRootOp) EqualMessageVT ¶
func (this *SqlQuerySetRootOp) EqualMessageVT(thatMsg any) bool
func (*SqlQuerySetRootOp) EqualVT ¶
func (this *SqlQuerySetRootOp) EqualVT(that *SqlQuerySetRootOp) bool
func (*SqlQuerySetRootOp) GetObjectKey ¶
func (x *SqlQuerySetRootOp) GetObjectKey() string
func (*SqlQuerySetRootOp) GetOperationTypeId ¶
func (o *SqlQuerySetRootOp) GetOperationTypeId() string
GetOperationTypeId returns the operation type identifier.
func (*SqlQuerySetRootOp) GetRootRef ¶
func (x *SqlQuerySetRootOp) GetRootRef() *bucket.ObjectRef
func (*SqlQuerySetRootOp) MarshalBlock ¶
func (o *SqlQuerySetRootOp) MarshalBlock() ([]byte, error)
MarshalBlock marshals the SQL query set-root operation.
func (*SqlQuerySetRootOp) MarshalJSON ¶
func (x *SqlQuerySetRootOp) MarshalJSON() ([]byte, error)
MarshalJSON marshals the SqlQuerySetRootOp to JSON.
func (*SqlQuerySetRootOp) MarshalProtoJSON ¶
func (x *SqlQuerySetRootOp) MarshalProtoJSON(s *json.MarshalState)
MarshalProtoJSON marshals the SqlQuerySetRootOp message to JSON.
func (*SqlQuerySetRootOp) MarshalProtoText ¶
func (x *SqlQuerySetRootOp) MarshalProtoText() string
func (*SqlQuerySetRootOp) MarshalToSizedBufferVT ¶
func (m *SqlQuerySetRootOp) MarshalToSizedBufferVT(dAtA []byte) (int, error)
func (*SqlQuerySetRootOp) MarshalToVT ¶
func (m *SqlQuerySetRootOp) MarshalToVT(dAtA []byte) (int, error)
func (*SqlQuerySetRootOp) MarshalVT ¶
func (m *SqlQuerySetRootOp) MarshalVT() (dAtA []byte, err error)
func (*SqlQuerySetRootOp) ProtoMessage ¶
func (*SqlQuerySetRootOp) ProtoMessage()
func (*SqlQuerySetRootOp) Reset ¶
func (x *SqlQuerySetRootOp) Reset()
func (*SqlQuerySetRootOp) SizeVT ¶
func (m *SqlQuerySetRootOp) SizeVT() (n int)
func (*SqlQuerySetRootOp) String ¶
func (x *SqlQuerySetRootOp) String() string
func (*SqlQuerySetRootOp) UnmarshalBlock ¶
func (o *SqlQuerySetRootOp) UnmarshalBlock(data []byte) error
UnmarshalBlock unmarshals the SQL query set-root operation.
func (*SqlQuerySetRootOp) UnmarshalJSON ¶
func (x *SqlQuerySetRootOp) UnmarshalJSON(b []byte) error
UnmarshalJSON unmarshals the SqlQuerySetRootOp from JSON.
func (*SqlQuerySetRootOp) UnmarshalProtoJSON ¶
func (x *SqlQuerySetRootOp) UnmarshalProtoJSON(s *json.UnmarshalState)
UnmarshalProtoJSON unmarshals the SqlQuerySetRootOp message from JSON.
func (*SqlQuerySetRootOp) UnmarshalVT ¶
func (m *SqlQuerySetRootOp) UnmarshalVT(dAtA []byte) error
func (*SqlQuerySetRootOp) Validate ¶
func (o *SqlQuerySetRootOp) Validate() error
Validate performs cursory checks on the operation.