MCPcopy Create free account
hub / github.com/apecloud/myduckserver / IsReplicationQuery

Function IsReplicationQuery

mycontext/keys.go:29–36  ·  view source on GitHub ↗
(ctx context.Context)

Source from the content-addressed store, hash-verified

27func WithQueryOrigin(ctx context.Context, kind QueryOriginKind) context.Context {
28 if ctx == nil {
29 ctx = context.Background()
30 }
31 return context.WithValue(ctx, queryOriginKey, kind)
32}
33
34func QueryOrigin(ctx context.Context) QueryOriginKind {
35 if ctx == nil {
36 return UnknownQueryOrigin
37 }
38 if kind, ok := ctx.Value(queryOriginKey).(QueryOriginKind); ok {
39 return kind

Callers 1

isIndexCreationDisabledFunction · 0.92

Calls 1

QueryOriginFunction · 0.85

Tested by

no test coverage detected