-
Notifications
You must be signed in to change notification settings - Fork 1
Functions: Manage connections
For the following functions a user must be DBA or member of the group couchebase.
couchbase:connect($connection as xs:string) as xs:string
couchbase:connect($connection as xs:string, $bucketPassword as xs:string) as xs:stringConnect to Couchbase server. Returns the identifier clusterId of the cluster connection, to be used in subsequent calls. The (not mandatory) password is used for document operations in the buckets.
The Couchbase username is the same username from the XQuery context within eXist-db. The user must be a member of either the dba or the couchbase groups within eXist-db.
For performance reasons, the class CouchbaseEnvironment is used, as recommended in the documentation (paragraph Sharing Resources).
The connection string URL has the format of <url scheme>://<hostname>:<portnr?
The other supported URL schemes are couchbase, couchbases (SSL secured connections) and http.
couchbase:close($clusterId as xs:string) as empty()Close and shutdown the Couchbase connection.
couchbase:list-cluster-ids() as xs:string*Get all Couchbase clusterIds.
couchbase:connection-report()Get report on active connections
couchbase:shutdown()Shutdown all connections and the environment.
note: needs rework
For examples see the junit test