Home / Companies / Couchbase / Blog / Post Details
Content Deep Dive

Using the Couchbase Sub-Document API with the GoLang SDK

Blog post from Couchbase

Post Details
Company
Date Published
Author
Nic Raboy, Developer Advocate, Couchbase
Word Count
1,458
Company Posts That Month
32
Language
English
Hacker News Points
-
Post removed?
No
Summary

The Go programming language is used to interact with Couchbase Server 4.5+ using the Couchbase Go SDK. A data story for a user profile document with social media information is presented, focusing on manipulations around the social media information. The project starts by creating a connection to a locally running Couchbase cluster and opening the default bucket. A `Person` structure is defined to represent the basic user information, along with a nested `SocialNetworking` structure for social media details. The main function creates an initial data structure, and then uses functions such as `createDocument`, `getDocument`, `getSubDocument`, and `upsertSubDocument` to manipulate the document. These functions demonstrate how to work with fragments of documents using the Couchbase Server Sub-Document API.

Trends Found in this Post

No tracked trend matches for this post yet.

Use This Data

Use this post, company, and trend context to find content marketing opportunities, perform competitive analysis, or address product feature gaps via the Plushcap MCP server or the Plushcap API.