Reference
Complete reference for all Couchbase module functions and configuration options.
Complete reference for all Couchbase module functions and configuration options.
📖 Built-In Functions (BIFs)
The Couchbase module provides 13 BIFs for interacting with Couchbase Server:
🔌 Provider & Connection Functions
Functions for accessing Couchbase components:
couchbaseGetProvider - Get the Couchbase cache provider instance
couchbaseGetCluster - Get the Couchbase cluster connection
couchbaseGetBucket - Get a specific Couchbase bucket
couchbaseGetScope - Get a specific scope within a bucket
couchbaseGetCollection - Get a specific collection within a scope
🤖 Vector Search Functions
Functions for AI/ML vector operations:
couchbaseVectorSearch - Search documents by vector similarity
couchbaseVectorAdd - Store vector documents with embeddings
couchbaseVectorGet - Retrieve vector document by ID
couchbaseVectorDelete - Delete vector document by ID
couchbaseVectorList - List vector documents with filters
📝 Query Functions
Functions for N1QL/SQL++ queries:
couchbaseQuery - Execute raw N1QL queries with parameters
🔒 Distributed Locking Functions
Functions for coordinating operations across multiple servers:
couchbaseLock - Acquire distributed lock with optional callback
couchbaseUnlock - Release distributed lock manually
🧩 Components
The Couchbase module provides components for advanced functionality:
🔒 Distributed Locking Components
CouchbaseLock - Execute code with automatic distributed lock management
🗄️ Cache Provider Functions
All standard BoxLang cache operations work with Couchbase:
See BoxLang Cache Documentation for complete cache API reference.
⚙️ Configuration Reference
Cache Provider Properties
Property Descriptions
connectionString
String
Yes
-
Couchbase connection string (e.g., couchbase://localhost)
username
String
Yes
-
Couchbase username
password
String
Yes
-
Couchbase password
bucket
String
Yes
-
Bucket name to use
scope
String
No
_default
Scope within the bucket
collection
String
No
_default
Collection within the scope
connectTimeout
Number
No
10000
Connection timeout in milliseconds
kvTimeout
Number
No
2500
Key-value operation timeout in milliseconds
maxConnections
Number
No
20
Maximum number of connections in pool
defaultTimeout
Number
No
60
Default TTL for cache entries (minutes)
evictionPolicy
String
No
LRU
Cache eviction policy (set in Couchbase)
Session Storage Configuration
Application Storage Configuration
🔐 Security Configuration
Secure Connections (TLS/SSL)
Certificate-Based Authentication
Environment Variables
📊 Vector Search Configuration
Vector Index Creation
Recommended Vector Settings
🔗 Related Documentation
Code Usage Guide - Examples and patterns
Distributed Locking Guide - Lock patterns and best practices
Scope Storage Guide - Session and application storage
API Usage - Complete BIF documentation
AI Memory Guide - Vector search and RAG patterns
Troubleshooting - Common issues and solutions
📖 External Resources
Last updated
Was this helpful?
