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

Function CreateLocalDB

db/api/local.go:45–56  ·  view source on GitHub ↗
(ctx context.Context, logger *zap.Logger, path string)

Source from the content-addressed store, hash-verified

43}
44
45func CreateLocalDB(ctx context.Context, logger *zap.Logger, path string) (Interface, error) {
46 uri, err := storage.ParseURI(path)
47 if err != nil {
48 return nil, err
49 }
50 engine := storage.NewLocalEngine()
51 root, err := db.Create(ctx, engine, logger, uri)
52 if err != nil {
53 return nil, err
54 }
55 return FromRoot(root), nil
56}
57
58func FromRoot(d *db.Root) Interface {
59 return &local{db: d, compiler: compiler.NewCompilerForDB(d)}

Callers 1

RunMethod · 0.92

Calls 4

ParseURIFunction · 0.92
NewLocalEngineFunction · 0.92
CreateFunction · 0.92
FromRootFunction · 0.85

Tested by

no test coverage detected