MCPcopy Create free account
hub / github.com/couchbase/sync_gateway / AddDatabaseFromConfig

Method AddDatabaseFromConfig

rest/server_context.go:1618–1621  ·  view source on GitHub ↗

Adds a database to the ServerContext given its configuration. If an existing config is found for the name, returns an error.

(ctx context.Context, config DatabaseConfig)

Source from the content-addressed store, hash-verified

1616// Adds a database to the ServerContext given its configuration. If an existing config is found
1617// for the name, returns an error.
1618func (sc *ServerContext) AddDatabaseFromConfig(ctx context.Context, config DatabaseConfig) (*db.DatabaseContext, error) {
1619 failFast := false
1620 return sc.getOrAddDatabaseFromConfig(ctx, config, getOrAddDatabaseConfigOptions{useExisting: false, failFast: failFast})
1621}
1622
1623// AddDatabaseFromConfigFailFast adds a database to the ServerContext given its configuration and fails fast.
1624// If an existing config is found for the name, returns an error.

Callers 8

TestUnsupportedConfigFunction · 0.95
TestAllDatabaseNamesFunction · 0.95
handleFlushMethod · 0.80
BucketMethod · 0.80

Calls 1