{"id":2177,"date":"2016-05-06T06:58:00","date_gmt":"2016-05-06T06:58:00","guid":{"rendered":"https:\/\/www.couchbase.com\/blog\/?p=2177"},"modified":"2025-06-13T21:20:34","modified_gmt":"2025-06-14T04:20:34","slug":"preview-of-the-subdocument-api-using-go","status":"publish","type":"post","link":"https:\/\/www.couchbase.com\/blog\/preview-of-the-subdocument-api-using-go\/","title":{"rendered":"The Couchbase Sub-Document API for Go"},"content":{"rendered":"<h2>The Sub-Document API &#8211; go<\/h2>\n<p>You&#8217;ve probably heard about the sub-document (<a href=\"https:\/\/www.couchbase.com\/blog\/subdoc-explained\/\"><em>subdoc<\/em><\/a>)\u00a0API available in couchbase 4.5. Mark Nunberg, one of the architects of the new API, has a great <a href=\"https:\/\/www.couchbase.com\/blog\/subdoc-explained\/\">blog<\/a> on the motivation and impetus behind extending the Memcached (key-value) api to support Sub-Document operations. Matthew Revell also put together a great <a href=\"https:\/\/www.couchbase.com\/blog\/sub-documents-change-only-what-you-need-to\/\">sample<\/a> walkthrough using Java and Python. If you&#8217;re anything like me, you want to see any new feature expressed in your preferred language(s). For me, that means go or nodejs. Let&#8217;s look at an example and how the API works in go.<\/p>\n<p style=\"margin-bottom: 1em;color: #4a4947;font-family: 'Kievit OT', sans-serif;text-align: start\"><span style=\"font-weight: bold\">Edit<\/span>: This blog post has been edited with updates from the 4.5 Beta<\/p>\n<p style=\"margin-bottom: 1em;color: #4a4947;font-family: 'Kievit OT', sans-serif;text-align: start\">For other features of Couchbase 4.5, see Don Pinto&#8217;s blog posts about the\u00a0<a style=\"background-image: none;color: #ec1e2c;text-decoration: none;background-position: initial initial\" href=\"https:\/\/www.couchbase.com\/blog\/introducing-couchbase-server-4.5-developer-preview\/\">Developer Preview<\/a>\u00a0and the\u00a0<a style=\"background-image: none;color: #ec1e2c;text-decoration: none;background-position: initial initial\" href=\"https:\/\/www.couchbase.com\/blog\/couchbase-4-5-beta\/\">Beta<\/a>.<\/p>\n<p>Let&#8217;s start with a simple json structure, with three fields<\/p>\n<p>Create a document using the structure we defined and &#8220;upsert&#8221; it into couchbase<\/p>\n<p>Now, let&#8217;s add an array to the document we created to a new field, and then perform some additional operations on the array. Through the magic of the subdoc API, we can do all of this without ever having to retrieve or update the entire document. This saves time and bandwidth, and dramatically improves performance.<\/p>\n<h2>What just happened? I need a builder!<\/h2>\n<p>The go api for sub-document operations adds two new methods to the Bucket type: <code>LookupIn()<\/code> and <code>MutateIn()<\/code>. These bucket level operations are consistent across the couchbase SDKs. If you&#8217;re using go, nodejs, Java, .NET, C\u00a0or Python they all work the same way. This is a nice convenience for code portability, as we seldom see a production environment with only one language through the stack. Let&#8217;s take a look at what these two new methods on the Bucket type do under the covers:<\/p>\n<h3>MutateIn<\/h3>\n<p>Let&#8217;s look at the MutateInBuilder, used to combine one or more mutation\u00a0operations scoped to a single document: <code>func (b *Bucket) MutateIn(key string, cas Cas, expiry uint32) *MutateInBuilder<\/code>. This function includes a method receiver for the Bucket type, and it returns a reference to the MutateInBuilder<\/p>\n<p><img decoding=\"async\" src=\"\/wp-content\/original-assets\/2016\/february\/preview-of-the-subdocument-api-using-go\/subdoc_go_water.jpg\" \/><\/p>\n<p><strong>The MutateInBuilder has ten methods:<\/strong><\/p>\n<ul>\n<li><strong>AddUnique(): <\/strong><code>func (set *MutateInBuilder) AddUnique(path string, value interface{}, createParents bool) *MutateInBuilder \u00a0<\/code>This method adds a unique value to an existing array field. It checks if the value exists first, and the updates. It returns a reference to a <code>MutateInBuilder<\/code><\/li>\n<li><strong>ArrayInsert(): <\/strong><code>func (set *MutateInBuilder) ArrayInsert(path string, value interface{}) *MutateInBuilder \u00a0<\/code>This method inserts an array value to an array field of a document. <strong>Note<\/strong>, in our example above we pass in a string that represents the array and index: &#8220;fourthItem[2]&#8221;. It returns a reference to a <code>MutateInBuilder<\/code><\/li>\n<li><strong>Counter(): <\/strong><code>func (set *MutateInBuilder) Counter(path string, delta int64, createParents bool) *MutateInBuilder \u00a0<\/code>This method performs an atomic counter operation on a field within a document. It returns a reference to a <code>MutateInBuilder<\/code><\/li>\n<li><strong style=\"line-height: 1.6em\">Insert(): <\/strong><code style=\"font-size: 13px;line-height: 1.6em\">func (set *MutateInBuilder) Insert(path string, value interface{}, createParents bool) *MutateInBuilder \u00a0<\/code><span style=\"line-height: 1.6em\">This method\u00a0inserts a new value to a specific location in a document. It returns a reference to a <\/span><code style=\"font-size: 13px;line-height: 1.6em\">MutateInBuilder<\/code><\/li>\n<li><strong>PushBack(): <\/strong><code>func (set *MutateInBuilder) PushBack(path string, value interface{}, createParents bool) *MutateInBuilder \u00a0<\/code>This method adds a new value to the end of an array field within a document. It returns a reference to a <code>MutateInBuilder<\/code><\/li>\n<li><strong>PushFront(): <\/strong><code>func (set *MutateInBuilder) PushFront(path string, value interface{}, createParents bool) *MutateInBuilder \u00a0<\/code>This method adds a new value to the beginning of an array field within a document. It returns a reference to a <code>MutateInBuilder<\/code><\/li>\n<li><strong>Remove(): <\/strong><code>func (set *MutateInBuilder) Remove(path string) *MutateInBuilder \u00a0<\/code>This method removes a value from a specific field of a document. It returns a reference to a <code>MutateInBuilder<\/code><\/li>\n<li><strong>Replace(): <\/strong><code>func (set *MutateInBuilder) Replace(path string, value interface{}) *MutateInBuilder \u00a0<\/code>This method replaces a value within a field of a document. It returns a reference to a <code>MutateInBuilder<\/code><\/li>\n<li><strong>Upsert(): <\/strong><code>func (set *MutateInBuilder) Upsert(path string, value interface{}, createParents bool) *MutateInBuilder \u00a0<\/code>This method adds or replaces a field within a document. It returns a reference to a <code>MutateInBuilder<\/code><\/li>\n<li><strong>Execute():\u00a0<\/strong><code>func (set *MutateInBuilder) Execute() (*DocumentFragment, error) \u00a0<\/code>This method submits the chained operations to the server and returns\u00a0a\u00a0<code>DocumentFragment\u00a0<\/code><span style=\"color: #333333;line-height: 20.8px;text-align: left\">containing their results.<\/span><\/li>\n<\/ul>\n<p><strong>The logic flow for <code>MutateIn()<\/code> looks like this<\/strong><\/p>\n<p><img decoding=\"async\" src=\"\/wp-content\/original-assets\/2016\/february\/preview-of-the-subdocument-api-using-go\/subdoc_go_mutatein.jpg\" \/><\/p>\n<h3>LookupIn<\/h3>\n<p>Let&#8217;s look at the LookupInBuilder, which allows us to declare one or more retrieval\u00a0operations scoped to a single document: <code>func (b *Bucket) LookupIn(key string) *LookupInBuilder<\/code>. This function includes a method receiver for the Bucket type, and it returns a reference to the LookupInBuilder.<\/p>\n<p><img decoding=\"async\" src=\"\/wp-content\/original-assets\/2016\/february\/preview-of-the-subdocument-api-using-go\/subdoc_go_spyglass.jpg\" \/><\/p>\n<p><strong>The LookupInBuilder has three methods:<\/strong><\/p>\n<ul>\n<li><strong style=\"line-height: 1.6em\">Get(): <\/strong><code style=\"font-size: 13px;line-height: 1.6em\">func (set *LookupInBuilder) Get(path string) *LookupInBuilder \u00a0<\/code><span style=\"line-height: 1.6em\">This method requests that the path contents be retrieved.\u00a0Returns a reference to a <\/span><code style=\"font-size: 13px;line-height: 1.6em\">LookupInBuilder<\/code><\/li>\n<li><strong>Exists():\u00a0<\/strong><code>func (set *LookupInBuilder) Exists(path string) *LookupInBuilder \u00a0<\/code>\u00a0Checks if the provided path exists. Returns a reference\u00a0to a\u00a0<code>LookupInBuilder<\/code><\/li>\n<li><strong>Execute(): <\/strong><code>func (set *LookupInBuilder) Execute() (*DocumentFragment, error)<\/code>\u00a0 This method sends\u00a0the chained commands to the server and returns a reference to a <code>DocumentFragment<\/code> type (containing the results)\u00a0and an <code>error<\/code> if one is encountered.<\/li>\n<\/ul>\n<p><strong>The logic flow for <code>LookupIn()<\/code>looks like this<\/strong><\/p>\n<p><img decoding=\"async\" src=\"\/wp-content\/original-assets\/2016\/february\/preview-of-the-subdocument-api-using-go\/subdoc_go_lookupin.jpg\" \/><\/p>\n<h2>Next Steps<\/h2>\n<p>Why not try it yourself? The example above along with several other go examples can be found in our developer-guide repository on <a href=\"https:\/\/github.com\/couchbaselabs\/devguide-examples\/tree\/master\/go\">github<\/a> A great way to get started and try out couchbase 4.5 (in beta at the time of publishing) is with docker. The couchbase 4.5 docker image can be loaded if you have docker installed with the following command:<\/p>\n<p><code>docker run -d --name=CB45DP1 -p 8091-8093:8091-8094\u00a0-p 11207-11210:11207-11210 -p 18091-18092:18091-18092 couchbase\/server:enterprise-4.5.0-Beta<\/code><\/p>\n<p>We thrive on feedback&#8211;give it a try and let us know what you think.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>The Sub-Document API &#8211; go You&#8217;ve probably heard about the sub-document (subdoc)\u00a0API available in couchbase 4.5. Mark Nunberg, one of the architects of the new API, has a great blog on the motivation and impetus behind extending the Memcached (key-value) [&hellip;]<\/p>\n","protected":false},"author":20,"featured_media":13873,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"inline_featured_image":false,"footnotes":""},"categories":[1820],"tags":[],"ppma_author":[9019],"class_list":["post-2177","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-golang"],"acf":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v26.0 (Yoast SEO v26.0) - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>The Couchbase Sub-Document API for Go - The Couchbase Blog<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.couchbase.com\/blog\/preview-of-the-subdocument-api-using-go\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"The Couchbase Sub-Document API for Go\" \/>\n<meta property=\"og:description\" content=\"The Sub-Document API &#8211; go You&#8217;ve probably heard about the sub-document (subdoc)\u00a0API available in couchbase 4.5. Mark Nunberg, one of the architects of the new API, has a great blog on the motivation and impetus behind extending the Memcached (key-value) [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.couchbase.com\/blog\/preview-of-the-subdocument-api-using-go\/\" \/>\n<meta property=\"og:site_name\" content=\"The Couchbase Blog\" \/>\n<meta property=\"article:published_time\" content=\"2016-05-06T06:58:00+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2025-06-14T04:20:34+00:00\" \/>\n<meta name=\"author\" content=\"Todd Greenstein\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@todd_greenstein\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Todd Greenstein\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"5 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/www.couchbase.com\/blog\/preview-of-the-subdocument-api-using-go\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/www.couchbase.com\/blog\/preview-of-the-subdocument-api-using-go\/\"},\"author\":{\"name\":\"Todd Greenstein\",\"@id\":\"https:\/\/www.couchbase.com\/blog\/#\/schema\/person\/64b5d1e5969768c5d63c11c696951ed3\"},\"headline\":\"The Couchbase Sub-Document API for Go\",\"datePublished\":\"2016-05-06T06:58:00+00:00\",\"dateModified\":\"2025-06-14T04:20:34+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/www.couchbase.com\/blog\/preview-of-the-subdocument-api-using-go\/\"},\"wordCount\":755,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/www.couchbase.com\/blog\/#organization\"},\"image\":{\"@id\":\"https:\/\/www.couchbase.com\/blog\/preview-of-the-subdocument-api-using-go\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2022\/11\/couchbase-nosql-dbaas.png\",\"articleSection\":[\"GoLang\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/www.couchbase.com\/blog\/preview-of-the-subdocument-api-using-go\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.couchbase.com\/blog\/preview-of-the-subdocument-api-using-go\/\",\"url\":\"https:\/\/www.couchbase.com\/blog\/preview-of-the-subdocument-api-using-go\/\",\"name\":\"The Couchbase Sub-Document API for Go - The Couchbase Blog\",\"isPartOf\":{\"@id\":\"https:\/\/www.couchbase.com\/blog\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/www.couchbase.com\/blog\/preview-of-the-subdocument-api-using-go\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/www.couchbase.com\/blog\/preview-of-the-subdocument-api-using-go\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2022\/11\/couchbase-nosql-dbaas.png\",\"datePublished\":\"2016-05-06T06:58:00+00:00\",\"dateModified\":\"2025-06-14T04:20:34+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/www.couchbase.com\/blog\/preview-of-the-subdocument-api-using-go\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.couchbase.com\/blog\/preview-of-the-subdocument-api-using-go\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.couchbase.com\/blog\/preview-of-the-subdocument-api-using-go\/#primaryimage\",\"url\":\"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2022\/11\/couchbase-nosql-dbaas.png\",\"contentUrl\":\"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2022\/11\/couchbase-nosql-dbaas.png\",\"width\":1800,\"height\":630},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.couchbase.com\/blog\/preview-of-the-subdocument-api-using-go\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/www.couchbase.com\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"The Couchbase Sub-Document API for Go\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.couchbase.com\/blog\/#website\",\"url\":\"https:\/\/www.couchbase.com\/blog\/\",\"name\":\"The Couchbase Blog\",\"description\":\"Couchbase, the NoSQL Database\",\"publisher\":{\"@id\":\"https:\/\/www.couchbase.com\/blog\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.couchbase.com\/blog\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/www.couchbase.com\/blog\/#organization\",\"name\":\"The Couchbase Blog\",\"url\":\"https:\/\/www.couchbase.com\/blog\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.couchbase.com\/blog\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/2023\/04\/admin-logo.png\",\"contentUrl\":\"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/2023\/04\/admin-logo.png\",\"width\":218,\"height\":34,\"caption\":\"The Couchbase Blog\"},\"image\":{\"@id\":\"https:\/\/www.couchbase.com\/blog\/#\/schema\/logo\/image\/\"}},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.couchbase.com\/blog\/#\/schema\/person\/64b5d1e5969768c5d63c11c696951ed3\",\"name\":\"Todd Greenstein\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.couchbase.com\/blog\/#\/schema\/person\/image\/abfbe093983052aa28595343c19888ce\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/f230045f7f6e636cf01abbd35f1cbf66a1206fbe149a0d4f0bbdd992c646257d?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/f230045f7f6e636cf01abbd35f1cbf66a1206fbe149a0d4f0bbdd992c646257d?s=96&d=mm&r=g\",\"caption\":\"Todd Greenstein\"},\"description\":\"Todd Greenstein is a Solution Architect at Couchbase. Todd is specialize in API design, architecture, data modeling, nodejs and golang development.\",\"sameAs\":[\"https:\/\/x.com\/todd_greenstein\"],\"url\":\"https:\/\/www.couchbase.com\/blog\/author\/todd-greenstein\/\"}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"The Couchbase Sub-Document API for Go - The Couchbase Blog","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.couchbase.com\/blog\/preview-of-the-subdocument-api-using-go\/","og_locale":"en_US","og_type":"article","og_title":"The Couchbase Sub-Document API for Go","og_description":"The Sub-Document API &#8211; go You&#8217;ve probably heard about the sub-document (subdoc)\u00a0API available in couchbase 4.5. Mark Nunberg, one of the architects of the new API, has a great blog on the motivation and impetus behind extending the Memcached (key-value) [&hellip;]","og_url":"https:\/\/www.couchbase.com\/blog\/preview-of-the-subdocument-api-using-go\/","og_site_name":"The Couchbase Blog","article_published_time":"2016-05-06T06:58:00+00:00","article_modified_time":"2025-06-14T04:20:34+00:00","author":"Todd Greenstein","twitter_card":"summary_large_image","twitter_creator":"@todd_greenstein","twitter_misc":{"Written by":"Todd Greenstein","Est. reading time":"5 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.couchbase.com\/blog\/preview-of-the-subdocument-api-using-go\/#article","isPartOf":{"@id":"https:\/\/www.couchbase.com\/blog\/preview-of-the-subdocument-api-using-go\/"},"author":{"name":"Todd Greenstein","@id":"https:\/\/www.couchbase.com\/blog\/#\/schema\/person\/64b5d1e5969768c5d63c11c696951ed3"},"headline":"The Couchbase Sub-Document API for Go","datePublished":"2016-05-06T06:58:00+00:00","dateModified":"2025-06-14T04:20:34+00:00","mainEntityOfPage":{"@id":"https:\/\/www.couchbase.com\/blog\/preview-of-the-subdocument-api-using-go\/"},"wordCount":755,"commentCount":0,"publisher":{"@id":"https:\/\/www.couchbase.com\/blog\/#organization"},"image":{"@id":"https:\/\/www.couchbase.com\/blog\/preview-of-the-subdocument-api-using-go\/#primaryimage"},"thumbnailUrl":"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2022\/11\/couchbase-nosql-dbaas.png","articleSection":["GoLang"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.couchbase.com\/blog\/preview-of-the-subdocument-api-using-go\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.couchbase.com\/blog\/preview-of-the-subdocument-api-using-go\/","url":"https:\/\/www.couchbase.com\/blog\/preview-of-the-subdocument-api-using-go\/","name":"The Couchbase Sub-Document API for Go - The Couchbase Blog","isPartOf":{"@id":"https:\/\/www.couchbase.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.couchbase.com\/blog\/preview-of-the-subdocument-api-using-go\/#primaryimage"},"image":{"@id":"https:\/\/www.couchbase.com\/blog\/preview-of-the-subdocument-api-using-go\/#primaryimage"},"thumbnailUrl":"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2022\/11\/couchbase-nosql-dbaas.png","datePublished":"2016-05-06T06:58:00+00:00","dateModified":"2025-06-14T04:20:34+00:00","breadcrumb":{"@id":"https:\/\/www.couchbase.com\/blog\/preview-of-the-subdocument-api-using-go\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.couchbase.com\/blog\/preview-of-the-subdocument-api-using-go\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.couchbase.com\/blog\/preview-of-the-subdocument-api-using-go\/#primaryimage","url":"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2022\/11\/couchbase-nosql-dbaas.png","contentUrl":"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2022\/11\/couchbase-nosql-dbaas.png","width":1800,"height":630},{"@type":"BreadcrumbList","@id":"https:\/\/www.couchbase.com\/blog\/preview-of-the-subdocument-api-using-go\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.couchbase.com\/blog\/"},{"@type":"ListItem","position":2,"name":"The Couchbase Sub-Document API for Go"}]},{"@type":"WebSite","@id":"https:\/\/www.couchbase.com\/blog\/#website","url":"https:\/\/www.couchbase.com\/blog\/","name":"The Couchbase Blog","description":"Couchbase, the NoSQL Database","publisher":{"@id":"https:\/\/www.couchbase.com\/blog\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.couchbase.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/www.couchbase.com\/blog\/#organization","name":"The Couchbase Blog","url":"https:\/\/www.couchbase.com\/blog\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.couchbase.com\/blog\/#\/schema\/logo\/image\/","url":"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/2023\/04\/admin-logo.png","contentUrl":"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/2023\/04\/admin-logo.png","width":218,"height":34,"caption":"The Couchbase Blog"},"image":{"@id":"https:\/\/www.couchbase.com\/blog\/#\/schema\/logo\/image\/"}},{"@type":"Person","@id":"https:\/\/www.couchbase.com\/blog\/#\/schema\/person\/64b5d1e5969768c5d63c11c696951ed3","name":"Todd Greenstein","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.couchbase.com\/blog\/#\/schema\/person\/image\/abfbe093983052aa28595343c19888ce","url":"https:\/\/secure.gravatar.com\/avatar\/f230045f7f6e636cf01abbd35f1cbf66a1206fbe149a0d4f0bbdd992c646257d?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/f230045f7f6e636cf01abbd35f1cbf66a1206fbe149a0d4f0bbdd992c646257d?s=96&d=mm&r=g","caption":"Todd Greenstein"},"description":"Todd Greenstein is a Solution Architect at Couchbase. Todd is specialize in API design, architecture, data modeling, nodejs and golang development.","sameAs":["https:\/\/x.com\/todd_greenstein"],"url":"https:\/\/www.couchbase.com\/blog\/author\/todd-greenstein\/"}]}},"authors":[{"term_id":9019,"user_id":20,"is_guest":0,"slug":"todd-greenstein","display_name":"Todd Greenstein","avatar_url":"https:\/\/secure.gravatar.com\/avatar\/f230045f7f6e636cf01abbd35f1cbf66a1206fbe149a0d4f0bbdd992c646257d?s=96&d=mm&r=g","author_category":"","last_name":"Greenstein","first_name":"Todd","job_title":"","user_url":"","description":"Todd Greenstein is a Solution Architect at Couchbase. Todd is  specialize in API design, architecture, data modeling, nodejs and golang development."}],"_links":{"self":[{"href":"https:\/\/www.couchbase.com\/blog\/wp-json\/wp\/v2\/posts\/2177","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.couchbase.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.couchbase.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.couchbase.com\/blog\/wp-json\/wp\/v2\/users\/20"}],"replies":[{"embeddable":true,"href":"https:\/\/www.couchbase.com\/blog\/wp-json\/wp\/v2\/comments?post=2177"}],"version-history":[{"count":0,"href":"https:\/\/www.couchbase.com\/blog\/wp-json\/wp\/v2\/posts\/2177\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.couchbase.com\/blog\/wp-json\/wp\/v2\/media\/13873"}],"wp:attachment":[{"href":"https:\/\/www.couchbase.com\/blog\/wp-json\/wp\/v2\/media?parent=2177"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.couchbase.com\/blog\/wp-json\/wp\/v2\/categories?post=2177"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.couchbase.com\/blog\/wp-json\/wp\/v2\/tags?post=2177"},{"taxonomy":"author","embeddable":true,"href":"https:\/\/www.couchbase.com\/blog\/wp-json\/wp\/v2\/ppma_author?post=2177"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}