MCPcopy Create free account
hub / github.com/brimdata/super / Connect

Function Connect

db/api/api.go:50–55  ·  view source on GitHub ↗
(ctx context.Context, logger *zap.Logger, u string)

Source from the content-addressed store, hash-verified

48}
49
50func Connect(ctx context.Context, logger *zap.Logger, u string) (Interface, error) {
51 if IsRemote(u) {
52 return NewRemoteDB(client.NewConnectionTo(u)), nil
53 }
54 return OpenLocalDB(ctx, logger, u)
55}
56
57func IsRemote(u string) bool {
58 return strings.HasPrefix(u, "http://") || strings.HasPrefix(u, "https://")

Callers 1

OpenMethod · 0.92

Calls 4

NewConnectionToFunction · 0.92
IsRemoteFunction · 0.85
NewRemoteDBFunction · 0.85
OpenLocalDBFunction · 0.85

Tested by

no test coverage detected