{"id":1885,"date":"2015-02-27T15:42:31","date_gmt":"2015-02-27T15:42:31","guid":{"rendered":"https:\/\/www.couchbase.com\/blog\/?p=1885"},"modified":"2025-06-13T23:49:49","modified_gmt":"2025-06-14T06:49:49","slug":"c-sdk-2-4-7-whats-new","status":"publish","type":"post","link":"https:\/\/www.couchbase.com\/blog\/c-sdk-2-4-7-whats-new\/","title":{"rendered":"What&#8217;s new in C SDK 2.4.7 &#8211; N1QL, Views, and more"},"content":{"rendered":"<p>Several years back, when designing the <a href=\"https:\/\/metacpan.org\/release\/Couchbase\">Perl client<\/a> (before I was working for Couchbase), I wanted an efficient way to handle processing view results as they arrived from the network without having to wait for all the rows to arrive so they could be parsed as a proper JSON array. To solve this problem, I create the <a href=\"https:\/\/github.com\/mnunberg\/jsonsl\">jsonsl<\/a> library to incrementally parse the JSON rows &#8211; allowing users of this library to receive data as it arrives despite not yet having a complete JSON object.<\/p>\n<p>Support for this feature was implemented to a certain degree in both the Python and Perl clients. Now it&#8217;s finally made its way into the C library. This adds the benefit of the enhanced testing infrastructure found in the C client, but also an improved API &#8211; which for C users, should be much simpler than the raw HTTP API.<\/p>\n<h3>Using the views API<\/h3>\n<p>Here&#8217;s an example of how to use it:<\/p>\n<p><script src=\"https:\/\/gist.github.com\/mnunberg\/590c48f76f23a0751ade.js\"><\/script><\/p>\n<p>The new view functionality also includes the ability for the library to fetch documents for the results. Simply set\u00a0the\u00a0<em>LCB_CMDVIEWQUERY_F_INCLUDE_DOCS\u00a0<\/em>flag in the\u00a0<em>cmd.cmdflags<\/em>\u00a0field.<\/p>\n<h3>Using the N1QL API<\/h3>\n<p>N1QL is an experimental feature to be added in future versions of Couchbase. It is available as a developer preview (https:\/\/docs.couchbase.com\/developer\/n1ql-dp3\/n1ql-intro.html). Version 2.4.7 of the client provides some new APIs to interface with N1QL.<\/p>\n<p>Using the N1QL API is very similar to the views API. Like views, it is row-based. Unlike views however, the passing of N1QL query parameters is more abstracted (because of its complexity) and involves creating a special &#8220;parameters&#8221; object.<\/p>\n<p><script src=\"https:\/\/gist.github.com\/mnunberg\/bb753f48c07d740fcb35.js\"><\/script><\/p>\n<h3>Installing<\/h3>\n<p>Simply follow the normal <a href=\"https:\/\/docs.couchbase.com\/developer\/c-2.4\/download-install.html\">upgrade\/install instructions<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Several years back, when designing the Perl client (before I was working for Couchbase), I wanted an efficient way to handle processing view results as they arrived from the network without having to wait for all the rows to arrive [&hellip;]<\/p>\n","protected":false},"author":38,"featured_media":13873,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"inline_featured_image":false,"footnotes":""},"categories":[9986,2201],"tags":[],"ppma_author":[8997],"class_list":["post-1885","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-c","category-tools-sdks"],"acf":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v25.8 (Yoast SEO v25.8) - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>What&#039;s new in C SDK 2.4.7 - N1QL, Views, and more<\/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\/c-sdk-2-4-7-whats-new\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"What&#039;s new in C SDK 2.4.7 - N1QL, Views, and more\" \/>\n<meta property=\"og:description\" content=\"Several years back, when designing the Perl client (before I was working for Couchbase), I wanted an efficient way to handle processing view results as they arrived from the network without having to wait for all the rows to arrive [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.couchbase.com\/blog\/c-sdk-2-4-7-whats-new\/\" \/>\n<meta property=\"og:site_name\" content=\"The Couchbase Blog\" \/>\n<meta property=\"article:published_time\" content=\"2015-02-27T15:42:31+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2025-06-14T06:49:49+00:00\" \/>\n<meta name=\"author\" content=\"Mark Nunberg, Software Engineer, Couchbase\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Mark Nunberg, Software Engineer, Couchbase\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"1 minute\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/www.couchbase.com\/blog\/c-sdk-2-4-7-whats-new\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/www.couchbase.com\/blog\/c-sdk-2-4-7-whats-new\/\"},\"author\":{\"name\":\"Mark Nunberg, Software Engineer, Couchbase\",\"@id\":\"https:\/\/www.couchbase.com\/blog\/#\/schema\/person\/76a75284da32b6f257c8e5e156e6e016\"},\"headline\":\"What&#8217;s new in C SDK 2.4.7 &#8211; N1QL, Views, and more\",\"datePublished\":\"2015-02-27T15:42:31+00:00\",\"dateModified\":\"2025-06-14T06:49:49+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/www.couchbase.com\/blog\/c-sdk-2-4-7-whats-new\/\"},\"wordCount\":300,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/www.couchbase.com\/blog\/#organization\"},\"image\":{\"@id\":\"https:\/\/www.couchbase.com\/blog\/c-sdk-2-4-7-whats-new\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2022\/11\/couchbase-nosql-dbaas.png\",\"articleSection\":[\"C\/C++\",\"Tools &amp; SDKs\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/www.couchbase.com\/blog\/c-sdk-2-4-7-whats-new\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.couchbase.com\/blog\/c-sdk-2-4-7-whats-new\/\",\"url\":\"https:\/\/www.couchbase.com\/blog\/c-sdk-2-4-7-whats-new\/\",\"name\":\"What's new in C SDK 2.4.7 - N1QL, Views, and more\",\"isPartOf\":{\"@id\":\"https:\/\/www.couchbase.com\/blog\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/www.couchbase.com\/blog\/c-sdk-2-4-7-whats-new\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/www.couchbase.com\/blog\/c-sdk-2-4-7-whats-new\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2022\/11\/couchbase-nosql-dbaas.png\",\"datePublished\":\"2015-02-27T15:42:31+00:00\",\"dateModified\":\"2025-06-14T06:49:49+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/www.couchbase.com\/blog\/c-sdk-2-4-7-whats-new\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.couchbase.com\/blog\/c-sdk-2-4-7-whats-new\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.couchbase.com\/blog\/c-sdk-2-4-7-whats-new\/#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\/c-sdk-2-4-7-whats-new\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/www.couchbase.com\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"What&#8217;s new in C SDK 2.4.7 &#8211; N1QL, Views, and more\"}]},{\"@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\/76a75284da32b6f257c8e5e156e6e016\",\"name\":\"Mark Nunberg, Software Engineer, Couchbase\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.couchbase.com\/blog\/#\/schema\/person\/image\/895cad0986a0ab674fda857b6ba71ce0\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/d5a465565eb8a3990192957806a9bc2989ba9f52a5f953d988b5e8afff3b6dc7?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/d5a465565eb8a3990192957806a9bc2989ba9f52a5f953d988b5e8afff3b6dc7?s=96&d=mm&r=g\",\"caption\":\"Mark Nunberg, Software Engineer, Couchbase\"},\"description\":\"Mark Nunberg is a software engineer working at Couchbase. He maintains the C client library (libcouchbase) as well as the Python client. He also developed the Perl client (for use at his previous company) - which initially led him to working at Couchbase. Prior to joining Couchbase, he worked on distributed and high performance routing systems at an eCommerce analytics firm. Mark studied Linguistics at the Hebrew University of Jerusalem.\",\"url\":\"https:\/\/www.couchbase.com\/blog\/author\/mark-nunberg\/\"}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"What's new in C SDK 2.4.7 - N1QL, Views, and more","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\/c-sdk-2-4-7-whats-new\/","og_locale":"en_US","og_type":"article","og_title":"What's new in C SDK 2.4.7 - N1QL, Views, and more","og_description":"Several years back, when designing the Perl client (before I was working for Couchbase), I wanted an efficient way to handle processing view results as they arrived from the network without having to wait for all the rows to arrive [&hellip;]","og_url":"https:\/\/www.couchbase.com\/blog\/c-sdk-2-4-7-whats-new\/","og_site_name":"The Couchbase Blog","article_published_time":"2015-02-27T15:42:31+00:00","article_modified_time":"2025-06-14T06:49:49+00:00","author":"Mark Nunberg, Software Engineer, Couchbase","twitter_card":"summary_large_image","twitter_misc":{"Written by":"Mark Nunberg, Software Engineer, Couchbase","Est. reading time":"1 minute"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.couchbase.com\/blog\/c-sdk-2-4-7-whats-new\/#article","isPartOf":{"@id":"https:\/\/www.couchbase.com\/blog\/c-sdk-2-4-7-whats-new\/"},"author":{"name":"Mark Nunberg, Software Engineer, Couchbase","@id":"https:\/\/www.couchbase.com\/blog\/#\/schema\/person\/76a75284da32b6f257c8e5e156e6e016"},"headline":"What&#8217;s new in C SDK 2.4.7 &#8211; N1QL, Views, and more","datePublished":"2015-02-27T15:42:31+00:00","dateModified":"2025-06-14T06:49:49+00:00","mainEntityOfPage":{"@id":"https:\/\/www.couchbase.com\/blog\/c-sdk-2-4-7-whats-new\/"},"wordCount":300,"commentCount":0,"publisher":{"@id":"https:\/\/www.couchbase.com\/blog\/#organization"},"image":{"@id":"https:\/\/www.couchbase.com\/blog\/c-sdk-2-4-7-whats-new\/#primaryimage"},"thumbnailUrl":"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2022\/11\/couchbase-nosql-dbaas.png","articleSection":["C\/C++","Tools &amp; SDKs"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.couchbase.com\/blog\/c-sdk-2-4-7-whats-new\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.couchbase.com\/blog\/c-sdk-2-4-7-whats-new\/","url":"https:\/\/www.couchbase.com\/blog\/c-sdk-2-4-7-whats-new\/","name":"What's new in C SDK 2.4.7 - N1QL, Views, and more","isPartOf":{"@id":"https:\/\/www.couchbase.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.couchbase.com\/blog\/c-sdk-2-4-7-whats-new\/#primaryimage"},"image":{"@id":"https:\/\/www.couchbase.com\/blog\/c-sdk-2-4-7-whats-new\/#primaryimage"},"thumbnailUrl":"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2022\/11\/couchbase-nosql-dbaas.png","datePublished":"2015-02-27T15:42:31+00:00","dateModified":"2025-06-14T06:49:49+00:00","breadcrumb":{"@id":"https:\/\/www.couchbase.com\/blog\/c-sdk-2-4-7-whats-new\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.couchbase.com\/blog\/c-sdk-2-4-7-whats-new\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.couchbase.com\/blog\/c-sdk-2-4-7-whats-new\/#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\/c-sdk-2-4-7-whats-new\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.couchbase.com\/blog\/"},{"@type":"ListItem","position":2,"name":"What&#8217;s new in C SDK 2.4.7 &#8211; N1QL, Views, and more"}]},{"@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\/76a75284da32b6f257c8e5e156e6e016","name":"Mark Nunberg, Software Engineer, Couchbase","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.couchbase.com\/blog\/#\/schema\/person\/image\/895cad0986a0ab674fda857b6ba71ce0","url":"https:\/\/secure.gravatar.com\/avatar\/d5a465565eb8a3990192957806a9bc2989ba9f52a5f953d988b5e8afff3b6dc7?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/d5a465565eb8a3990192957806a9bc2989ba9f52a5f953d988b5e8afff3b6dc7?s=96&d=mm&r=g","caption":"Mark Nunberg, Software Engineer, Couchbase"},"description":"Mark Nunberg is a software engineer working at Couchbase. He maintains the C client library (libcouchbase) as well as the Python client. He also developed the Perl client (for use at his previous company) - which initially led him to working at Couchbase. Prior to joining Couchbase, he worked on distributed and high performance routing systems at an eCommerce analytics firm. Mark studied Linguistics at the Hebrew University of Jerusalem.","url":"https:\/\/www.couchbase.com\/blog\/author\/mark-nunberg\/"}]}},"authors":[{"term_id":8997,"user_id":38,"is_guest":0,"slug":"mark-nunberg","display_name":"Mark Nunberg, Software Engineer, Couchbase","avatar_url":"https:\/\/secure.gravatar.com\/avatar\/d5a465565eb8a3990192957806a9bc2989ba9f52a5f953d988b5e8afff3b6dc7?s=96&d=mm&r=g","author_category":"","last_name":"Nunberg","first_name":"Mark","job_title":"","user_url":"","description":"Mark Nunberg is a software engineer working at Couchbase. He maintains the C client library (libcouchbase) as well as the Python client. He also developed the Perl client (for use at his previous company) - which initially led him to working at Couchbase. Prior to joining Couchbase, he worked on distributed and high performance routing systems at an eCommerce analytics firm. Mark studied Linguistics at the Hebrew University of Jerusalem."}],"_links":{"self":[{"href":"https:\/\/www.couchbase.com\/blog\/wp-json\/wp\/v2\/posts\/1885","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\/38"}],"replies":[{"embeddable":true,"href":"https:\/\/www.couchbase.com\/blog\/wp-json\/wp\/v2\/comments?post=1885"}],"version-history":[{"count":0,"href":"https:\/\/www.couchbase.com\/blog\/wp-json\/wp\/v2\/posts\/1885\/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=1885"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.couchbase.com\/blog\/wp-json\/wp\/v2\/categories?post=1885"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.couchbase.com\/blog\/wp-json\/wp\/v2\/tags?post=1885"},{"taxonomy":"author","embeddable":true,"href":"https:\/\/www.couchbase.com\/blog\/wp-json\/wp\/v2\/ppma_author?post=1885"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}