This page contains examples of how to use the Eventing Service with the Couchbase Web Console.
Step-by-Step Examples
Scriptlets
Basic Accessor Eventing Functions
The following scriptlets are examples of standadlone Eventing Functions.
Basic SQL++ Eventing Functions
The following scriptlets demonstrate how to use SQL++ or the Query Service with an Eventing Function.
Generic Manipulation Eventing Functions
The following scriptlets are examples of advanced use cases that focus on mutating a document without knowing that document’s schema.
Advanced Accessor Eventing Functions
The following scriptlets demonstrate how to use Advanced Keyspace Accessors, which allow you to:
-
Use CAS
-
Set expiry (TTL) dates
-
Use distributed atomic counters to increment and decrement counts
Binary Document Support
The following scriptlets demonstrate support for binary documents in Eventing.
Your Eventing Function must have a language compatibility setting of Couchbase Server version 6.6.2 or above to pass binary documents in its OnUpdate(doc,meta)
handler.