BucketManager
class BucketManager (View source)
Provides management capabilities for the Couchbase Bucket
Methods
Returns information about the bucket
Flushes the bucket (clears all data)
Returns all design documents of the bucket.
Get design document by its name
Removes design document by its name
Creates or replaces design document.
Inserts design document and fails if it is exist already.
List all N1QL indexes that are registered for the current bucket.
Create a primary N1QL index.
Create secondary N1QL index.
Drop the given primary index
Drop the given secondary index
Details
array
info()
Returns information about the bucket
Returns an associative array of status information as seen by the cluster for this bucket. The exact structure of the returned data can be seen in the Couchbase Manual by looking at the bucket /info endpoint.
flush()
Flushes the bucket (clears all data)
array
listDesignDocuments()
Returns all design documents of the bucket.
array
getDesignDocument(string $name)
Get design document by its name
removeDesignDocument(string $name)
Removes design document by its name
upsertDesignDocument(string $name, array $document)
Creates or replaces design document.
insertDesignDocument(string $name, array $document)
Inserts design document and fails if it is exist already.
array
listN1qlIndexes()
List all N1QL indexes that are registered for the current bucket.
createN1qlPrimaryIndex(string $customName = '', bool $ignoreIfExist = false, bool $defer = false)
Create a primary N1QL index.
createN1qlIndex(string $name, array $fields, string $whereClause = '', bool $ignoreIfExist = false, bool $defer = false)
Create secondary N1QL index.
dropN1qlPrimaryIndex(string $customName = '', bool $ignoreIfNotExist = false)
Drop the given primary index
dropN1qlIndex(string $name, bool $ignoreIfNotExist = false)
Drop the given secondary index