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

Method URI

cli/dbflags/flags.go:87–100  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

85}
86
87func (l *Flags) URI() (*storage.URI, error) {
88 db := strings.TrimRight(l.DB, "/")
89 if !l.dbSpecified {
90 db = getDefaultDataDir()
91 }
92 if db == "" {
93 return nil, errors.New("database location must be set (either with the -db flag or SUPER_DB environment variable)")
94 }
95 u, err := storage.ParseURI(db)
96 if err != nil {
97 err = fmt.Errorf("error parsing database location: %w", err)
98 }
99 return u, err
100}
101
102// ClientURI returns the URI of the database to connect to. If the database path is
103// the defaultDataDir, it first checks if a SuperDB service is running on

Callers 3

ClientURIMethod · 0.95
RunMethod · 0.80
RunMethod · 0.80

Calls 3

ParseURIFunction · 0.92
getDefaultDataDirFunction · 0.85
NewMethod · 0.80

Tested by

no test coverage detected