I’m happy to announce the General Availability release of the official Couchbase SDK for Go. At Couchbase, we are heavily invested in the Go platform for many components of our software, and today we are excited to be bringing that capability to our users.
What's supported?
- Synchronous and Asynchronous APIs
- Multi-Dimensional Scaling
- N1QL Querying (Ad-Hoc and Prepared)
- CRUD Operations
- View Querying
- Bulk Operations
- Management Operations
- SSL Support
- Replica Reads
Let me give some of the highlights.
Synchronous and Asynchronous APIs
The Go SDK was built from the ground up to give developers the power to utilize Go however they please, be that using our asynchronous API to perform your operations in line with other work, using our synchronous API to build worker go-routines or simply executing Couchbase operations in line with your request processing. There is no penalty for use of the same client from multiple goroutines simultaneously, and our asynchronous operations are always non-blocking.
N1QL Querying
Performing N1QL queries with the Go SDK is as simple as instantiating a query object and then executing it. The details of how the query is prepared and executed accross the cluster is handled by the SDK and the Server.
View Querying
View querying is performed nearly identically to N1QL querying, except the use of a ViewQuery object and the use of the ExecuteViewQuery method.
Support for SSL
SSL support allows the clients to make secured connections to the cluster to ensure that no prying eyes inspect the data that is being communicated between your cluster and your application servers. Enabling SSL is as simple as specifying a secured connection string.
Replica Reads
Replica reads permit you to access your data in case the primary server hosting your data goes offline. This allows you to continue to provide service to your users in spite of server failures.
Getting The Release
Installing this release is identical to previous versions, and is similar to the installation of many other Go modules. Use go get
to install and you are ready!
1 |
$ go get gopkg.in/couchbase/gocb.v1 |
Additionally, the documentation is available here:
http://developer.couchbase.com/documentation/server/4.0/sdks/go-beta/introduction.html
And the API reference here:
It appears you didn’t implement any SQL Injection sanitizing or I am not seeing it. Considering Injection is still the #1 OWASP issue, this makes me sad.