Examples: Using the Eventing Service
This page contains examples of how to use the Eventing Service, using the Couchbase Web Console.
Detailed Examples: These tutorial-like guides are ideal for a novice to learn the basics of the Eventing Service, via complete detailed step by step start-to-finish instructions.
Basic KV Eventing Functions: The following Scriptlets are essentially stand alone Eventing Functions examples, and introduce more use cases. Here we assume the reader has a good understanding of the Eventing System and requires little guidance.
Basic N1QL Eventing Functions: The following Scriptlets demonstrate using N1QL or the Query Service from within an Eventing Function.
Generic Manipulation Eventing Functions The following Scriptlets are more advanced use cases which focus on mutating documents without knowledge of the document’s schema.
Advanced Accessor Eventing Functions: The following Scriptlets demonstrate using Advanced Bucket Accessors (introduced in version 6.6.1) which allow the use of CAS, ability to set expirations (or TTLs) and the use of distributed atomic counters to increment or decrement counts.
Binary Document Support: The following Scriptlets demonstrate support for binary documents in Eventing. Only a Function with “language compatibility” of 6.6.2 or above in its settings will pass binary documents to the OnUpdate(doc,meta) handler.
Performance Eventing Functions The following Scriptlets are performance oriented and/or benchmarks.