create Scope
Creates a scope in the bucket.
Parameters
scope Name
Name of the scope to create.
Throws
Scope Exists Exception
if the bucket already has a scope with this name.
Samples
// Create a new scope containing some collections
val manager: CollectionManager = bucket.collections
with(manager) {
val scopeName = "tenant-a"
createScope(scopeName)
createCollection(scopeName = scopeName, collectionName = "widgets")
createCollection(scopeName = scopeName, collectionName = "invoices")
println(getScope(scopeName))
}Content copied to clipboard