{"id":792,"date":"2016-11-22T01:47:28","date_gmt":"2016-11-22T00:47:28","guid":{"rendered":"http:\/\/exponentialdecay.co.uk\/blog\/?p=792"},"modified":"2025-06-26T17:24:24","modified_gmt":"2025-06-26T17:24:24","slug":"key-value-access-language-kval-for-boltdb-and-golang","status":"publish","type":"post","link":"https:\/\/exponentialdecay.co.uk\/blog\/key-value-access-language-kval-for-boltdb-and-golang\/","title":{"rendered":"Key :: Value Access Language (KVAL) for BoltDB and Golang"},"content":{"rendered":"<p>With some forced downtime as the effects of the Kaik\u014dura earthquake are felt here on the North Island, with the shutdown of Archives New Zealand, what better way to spend it than creating a new grammar and parser for key-value databases? I have spent the last few weeks developing a specification for a Key-Value Access Language (KVAL) and implementing a binding for it for Golang&#8217;s BoltDB. I hope it will be of interest to folks, but let&#8217;s take a look at it in more detail below.<\/p>\n<p><!--more--><\/p>\n<p>For those that know me, I have been writing <a href=\"https:\/\/golang.org\/\" target=\"_blank\" rel=\"noopener\">Golang<\/a> for just over a year now. Introduced to it by <a href=\"https:\/\/twitter.com\/richardlehane\" target=\"_blank\" rel=\"noopener\">Richard Lehane<\/a>\u00a0in October 2014 it has piqued my interest in my current work in digital preservation. It has the following benefits for that field:<\/p>\n<ul>\n<li>Compiles programs to a single executable file so it is easy to distribute.<\/li>\n<li>Cross-platform compilation is a feature of the language, so it is easy to distribute across many platforms.<\/li>\n<li>Unit testing is a feature of the language so supports better software development practices.<\/li>\n<li>Has many of the usability features of scripting languages like Python or Ruby but will perform better.<\/li>\n<li>Is not Java!<\/li>\n<\/ul>\n<p>A key feature that we need\u00a0in any language we work with is a persistent data store. There isn&#8217;t yet a de-facto standard for Golang.<\/p>\n<p>My most useful project in Python relies heavily on <a href=\"https:\/\/github.com\/exponential-decay\/droid-siegfried-sqlite-analysis-engine\" target=\"_blank\" rel=\"noopener\">SQLite<\/a>\u00a0and this is not (yet) implemented in Golang.<\/p>\n<p>To use &#8216;C&#8217; bindings to the Go language is a problem for code maintenance, and cross-compilation over time. Realistically, to benefit software sustainability, and digital preservation, we need to stick to native Golang alternatives.<\/p>\n<p>Enter, BoltDB! But more importantly, for high-level abstraction for interacting with databases like BoltDB, <a href=\"https:\/\/github.com\/kval-access-language\" target=\"_blank\" rel=\"noopener\">Key Value Access Language (KVAL)<\/a>.<\/p>\n<h3><strong>BoltDB<\/strong><\/h3>\n<p><a href=\"https:\/\/github.com\/boltdb\/bolt\/blob\/master\/README.md\" target=\"_blank\" rel=\"noopener\">Bolt<\/a> is a &#8216;Pure Golang key\/value database&#8217;. At time of writing it is used by <a href=\"https:\/\/godoc.org\/github.com\/boltdb\/bolt?importers\" target=\"_blank\" rel=\"noopener\">669<\/a> Golang projects. It was recommended to me to have a look at this and it stands out to me as being a good compromise for persistent storage of data. It also looks like it might become one of those &#8216;de-facto&#8217; standards.<\/p>\n<p>Some of its features:<\/p>\n<ul>\n<li>A database object is a single binary file like SQLite.<\/li>\n<li>The project seems less complex than SQL or NoSQL options.<\/li>\n<li>Is a native Golang project.<\/li>\n<\/ul>\n<p>The project has a simple API for getting and setting values only. It describes itself as being for use at a low-level of abstraction.<\/p>\n<p>When I started working with BoltDB to see if it would match my needs I decided that it may, perhaps, be too low-level. Every transaction needed to be programmed and checked in different ways. The logical result for most it seems would be to create boilerplate libraries for themselves. These boilerplate libraries would all do the same thing:<\/p>\n<ul>\n<li>Open\/deferred closure of a database object<\/li>\n<li>Validate and write data you want to write<\/li>\n<li>Get and validate data you want to retrieve<\/li>\n<\/ul>\n<p>And if you&#8217;re not careful implementing this functionality, you only reduce the amount of programming complexity by a certain amount, and there may still be a lot of work for other callers of your new boilerplate code to do.<\/p>\n<h3><strong>KVAL<\/strong><\/h3>\n<p>I thought about what I needed to do with BoltDB, and how I could express this in a more simplistic way. I also thought about what I liked about how I might work with SQLite in other languages.<\/p>\n<p>In Python for example, most of the interactions\u00a0with SQLite can be done on a pointer to your database (cursor) by running an execute function:<\/p>\n<pre>cursor.execute(\"SELECT * FROM TABLE WHERE X = Y\")<\/pre>\n<p>This makes it easy to work with SQLite, and any SQL database for that matter, and so I decided to try and create a language specification for accessing Key Value Stores.<\/p>\n<p>The language specification is here:\u00a0<a href=\"https:\/\/github.com\/kval-access-language\/kval\/blob\/master\/README.md\" target=\"_blank\" rel=\"noopener\">https:\/\/github.com\/kval-access-language\/kval\/blob\/master\/README.md<\/a><\/p>\n<p>In summary:<\/p>\n<ul>\n<li>It uses the concept of arbitrary numbers of &#8216;buckets&#8217; from Bolt to store key value pairs<\/li>\n<li>A bucket may also be a key<\/li>\n<li>There are four read\/write keywords INS, GET, LIS, REN, DEL<\/li>\n<li>There are a handful of operators to describe the relationship between buckets and key value pairs: &gt;&gt;, &gt;&gt;&gt;&gt;, ::, =&gt;<\/li>\n<\/ul>\n<p>An example INS (Insert) to create an arbitrary number of buckets, and a single key, value is as follows:<\/p>\n<pre>INS bucket one &gt;&gt; bucket two &gt;&gt;&gt;&gt; key name :: value<\/pre>\n<p>And to retrieve that:<\/p>\n<pre>GET bucket one &gt;&gt; bucket two &gt;&gt;&gt;&gt; key name<\/pre>\n<p>If you have lost track of what you called your key, read-all the bucket contents:<\/p>\n<pre>GET bucket one &gt;&gt; bucket two<\/pre>\n<p>And that&#8217;s it. Simply call Query, and keep working with your data. <a href=\"https:\/\/github.com\/kval-access-language\/kval-boltdb-demo\" target=\"_blank\" rel=\"noopener\">This small demo<\/a>\u00a0of the Bolt binding can be compiled as a starting point for your own work.<\/p>\n<p>Other language features to try can be seen described in the specification above.<\/p>\n<h3><strong>Bolt Bindings<\/strong><\/h3>\n<p>I discovered that there are three components to any binding.<\/p>\n<ol>\n<li>Token scanner: This breaks a query string into valid component parts<\/li>\n<li>Parser: Allows us to validate the query string and format it in a machine readable manner<\/li>\n<li>Binding: Once 1. and 2. are written, a binding will take the result output by the Parser and implement the language&#8217;s capabilities according to the library&#8217;s capabilities.<\/li>\n<\/ol>\n<p>For one and two, I came across a tutorial by one of the BoltDB implementers <a href=\"https:\/\/twitter.com\/benbjohnson?lang=en\" target=\"_blank\" rel=\"noopener\">Ben B Johnson<\/a>: <a href=\"https:\/\/blog.gopheracademy.com\/advent-2014\/parsers-lexers\/\" target=\"_blank\" rel=\"noopener\">https:\/\/blog.gopheracademy.com\/advent-2014\/parsers-lexers\/<\/a><\/p>\n<p>This tutorial provided the bones to work from and was the best resource I could have wished for to implement this work.<\/p>\n<p>The KVAL-BoltDB bindings I created on top of 1. and 2. can be found here:\u00a0<a href=\"https:\/\/github.com\/kval-access-language\/kval-boltdb\" target=\"_blank\" rel=\"noopener\">https:\/\/github.com\/kval-access-language\/kval-boltdb<\/a><\/p>\n<h3><strong>Unit Tests<\/strong><\/h3>\n<p>Creating each new capability simply required systematically walking through the KVAL language and then implementing it using Bolt&#8217;s own features. The basic skeleton of this work was implemented in a couple of weeks.<\/p>\n<p>I identified unit testing as the most important feature of the binding; this took somewhat longer. For users to have confidence in this work it would mean testing every possible scenario permitted by the language specification, and more.<\/p>\n<p>The <a href=\"https:\/\/github.com\/kval-access-language\/kval-boltdb\/blob\/master\/kval-boltdb_test.go\" target=\"_blank\" rel=\"noopener\">tests<\/a> are still quite unwieldy as I learn Go, and better unit testing as I work. They are a good place to look for an understanding of the different command variants and library capabilities.<\/p>\n<p>Some things I really wanted to make sure worked as well as possible included the storage of big strings e.g. blog text, and Unicode strings, and also the storage of Base64 encoded binary information, <a href=\"https:\/\/godoc.org\/github.com\/kval-access-language\/kval-boltdb#StoreBlob\" target=\"_blank\" rel=\"noopener\">blobs<\/a>.<\/p>\n<p>Take a look!<\/p>\n<h3><strong>Godoc<\/strong><\/h3>\n<p><a href=\"https:\/\/blog.golang.org\/godoc-documenting-go-code\" target=\"_blank\" rel=\"noopener\">Godoc<\/a> is one of the coolest features of Golang and in releasing this work as a &#8216;Package&#8217; (a library that other Go users can import and use), the capabilities are documented online for everyone to access via this resource: <a href=\"https:\/\/godoc.org\/github.com\/kval-access-language\/kval-boltdb\" target=\"_blank\" rel=\"noopener\">https:\/\/godoc.org\/github.com\/kval-access-language\/kval-boltdb<\/a><\/p>\n<p>Getting the documentation right has been a rewarding part of the development and I&#8217;m keen to improve it further as users discover the language.<\/p>\n<p>It&#8217;s also a great place to look at what else you can do with this work.<\/p>\n<h3><strong>In Summary&#8230;<\/strong><\/h3>\n<p>This work is inspired by the axiom, <a href=\"http:\/\/quoteinvestigator.com\/2011\/05\/13\/einstein-simple\/\" target=\"_blank\" rel=\"noopener\">&#8220;everything should be made as simple as possible, but not simpler&#8221;<\/a>.<\/p>\n<p>It is hoped that for Golang\/BoltDB beginner users and intermediate users, at least, there will be benefit to using this library. I&#8217;ll be using it in my own production code soon.<\/p>\n<p>It is also an ambition that folks look at the KVAL <a href=\"https:\/\/github.com\/kval-access-language\/kval\" target=\"_blank\" rel=\"noopener\">specification<\/a> itself and consider its application as a bona-fide\u00a0standard providing simple, fluid access to key\/value like structures.<\/p>\n<p>As a working draft there is lots of room for discussion about what is presented in this blog and in these various implementations.<\/p>\n<p>I&#8217;d like to work on other bindings. <a href=\"https:\/\/github.com\/attic-labs\/noms\" target=\"_blank\" rel=\"noopener\">NOMS<\/a> is another Golang data store that may have even greater application in my other work. I&#8217;ll investigate if this is feasible.<\/p>\n<p>All of the work surrounding this will be collected in the KVAL organisation&#8217;s repositories:\u00a0<a href=\"https:\/\/github.com\/kval-access-language\" target=\"_blank\" rel=\"noopener\">https:\/\/github.com\/kval-access-language<\/a><\/p>\n<p>And finally, that demo link again:\u00a0<a href=\"https:\/\/github.com\/kval-access-language\/kval-boltdb-demo\" target=\"_blank\" rel=\"noopener\">https:\/\/github.com\/kval-access-language\/kval-boltdb-demo<\/a><\/p>\n<p>Thank you.<\/p>\n<div class=\"pvc_clear\"><\/div>\n<p id=\"pvc_stats_792\" class=\"pvc_stats total_only  \" data-element-id=\"792\" style=\"\"><i class=\"pvc-stats-icon small\" aria-hidden=\"true\"><svg aria-hidden=\"true\" focusable=\"false\" data-prefix=\"far\" data-icon=\"chart-bar\" role=\"img\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" viewBox=\"0 0 512 512\" class=\"svg-inline--fa fa-chart-bar fa-w-16 fa-2x\"><path fill=\"currentColor\" d=\"M396.8 352h22.4c6.4 0 12.8-6.4 12.8-12.8V108.8c0-6.4-6.4-12.8-12.8-12.8h-22.4c-6.4 0-12.8 6.4-12.8 12.8v230.4c0 6.4 6.4 12.8 12.8 12.8zm-192 0h22.4c6.4 0 12.8-6.4 12.8-12.8V140.8c0-6.4-6.4-12.8-12.8-12.8h-22.4c-6.4 0-12.8 6.4-12.8 12.8v198.4c0 6.4 6.4 12.8 12.8 12.8zm96 0h22.4c6.4 0 12.8-6.4 12.8-12.8V204.8c0-6.4-6.4-12.8-12.8-12.8h-22.4c-6.4 0-12.8 6.4-12.8 12.8v134.4c0 6.4 6.4 12.8 12.8 12.8zM496 400H48V80c0-8.84-7.16-16-16-16H16C7.16 64 0 71.16 0 80v336c0 17.67 14.33 32 32 32h464c8.84 0 16-7.16 16-16v-16c0-8.84-7.16-16-16-16zm-387.2-48h22.4c6.4 0 12.8-6.4 12.8-12.8v-70.4c0-6.4-6.4-12.8-12.8-12.8h-22.4c-6.4 0-12.8 6.4-12.8 12.8v70.4c0 6.4 6.4 12.8 12.8 12.8z\" class=\"\"><\/path><\/svg><\/i> <img loading=\"lazy\" decoding=\"async\" width=\"16\" height=\"16\" alt=\"Loading\" src=\"https:\/\/exponentialdecay.co.uk\/blog\/wp-content\/plugins\/page-views-count\/ajax-loader-2x.gif\" border=0 \/><\/p>\n<div class=\"pvc_clear\"><\/div>\n","protected":false},"excerpt":{"rendered":"<p>With some forced downtime as the effects of the Kaik\u014dura earthquake are felt here on the North Island, with the shutdown of Archives New Zealand, what better way to spend it than creating a new grammar and parser for key-value databases? I have spent the last few weeks developing a specification for a Key-Value Access Language (KVAL) and implementing a binding for it for Golang&#8217;s BoltDB. I hope it will be of interest to folks, but let&#8217;s take a look at it in more detail below.<\/p>\n<div class=\"link-more\"><a href=\"https:\/\/exponentialdecay.co.uk\/blog\/key-value-access-language-kval-for-boltdb-and-golang\/\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &ldquo;Key :: Value Access Language (KVAL) for BoltDB and Golang&rdquo;<\/span>&hellip;<\/a><\/div>\n<div class=\"pvc_clear\"><\/div>\n<p id=\"pvc_stats_792\" class=\"pvc_stats total_only  \" data-element-id=\"792\" style=\"\"><i class=\"pvc-stats-icon small\" aria-hidden=\"true\"><svg aria-hidden=\"true\" focusable=\"false\" data-prefix=\"far\" data-icon=\"chart-bar\" role=\"img\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" viewBox=\"0 0 512 512\" class=\"svg-inline--fa fa-chart-bar fa-w-16 fa-2x\"><path fill=\"currentColor\" d=\"M396.8 352h22.4c6.4 0 12.8-6.4 12.8-12.8V108.8c0-6.4-6.4-12.8-12.8-12.8h-22.4c-6.4 0-12.8 6.4-12.8 12.8v230.4c0 6.4 6.4 12.8 12.8 12.8zm-192 0h22.4c6.4 0 12.8-6.4 12.8-12.8V140.8c0-6.4-6.4-12.8-12.8-12.8h-22.4c-6.4 0-12.8 6.4-12.8 12.8v198.4c0 6.4 6.4 12.8 12.8 12.8zm96 0h22.4c6.4 0 12.8-6.4 12.8-12.8V204.8c0-6.4-6.4-12.8-12.8-12.8h-22.4c-6.4 0-12.8 6.4-12.8 12.8v134.4c0 6.4 6.4 12.8 12.8 12.8zM496 400H48V80c0-8.84-7.16-16-16-16H16C7.16 64 0 71.16 0 80v336c0 17.67 14.33 32 32 32h464c8.84 0 16-7.16 16-16v-16c0-8.84-7.16-16-16-16zm-387.2-48h22.4c6.4 0 12.8-6.4 12.8-12.8v-70.4c0-6.4-6.4-12.8-12.8-12.8h-22.4c-6.4 0-12.8 6.4-12.8 12.8v70.4c0 6.4 6.4 12.8 12.8 12.8z\" class=\"\"><\/path><\/svg><\/i> <img loading=\"lazy\" decoding=\"async\" width=\"16\" height=\"16\" alt=\"Loading\" src=\"https:\/\/exponentialdecay.co.uk\/blog\/wp-content\/plugins\/page-views-count\/ajax-loader-2x.gif\" border=0 \/><\/p>\n<div class=\"pvc_clear\"><\/div>\n","protected":false},"author":1,"featured_media":793,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"activitypub_content_warning":"","activitypub_content_visibility":"","activitypub_max_image_attachments":3,"activitypub_interaction_policy_quote":"anyone","activitypub_status":"federated","footnotes":""},"categories":[75,20],"tags":[81,85,84,80,77,76,79,83,78,82],"class_list":["post-792","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-golang","category-just-code","tag-api","tag-bolt","tag-boltdb","tag-database","tag-go","tag-golang","tag-key-value-access-language","tag-key-value-store","tag-kval","tag-libraries","entry"],"a3_pvc":{"activated":true,"total_views":3149,"today_views":0},"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.4 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Key :: Value Access Language (KVAL) for BoltDB and Golang - ross spencer :: exponentialdecay.digipres :: blog<\/title>\n<meta name=\"description\" content=\"Developing a specification for a Key-Value Access Language (KVAL) and implementing a binding for it for Golang&#039;s BoltDB.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/exponentialdecay.co.uk\/blog\/key-value-access-language-kval-for-boltdb-and-golang\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Key :: Value Access Language (KVAL) for BoltDB and Golang - ross spencer :: exponentialdecay.digipres :: blog\" \/>\n<meta property=\"og:description\" content=\"Developing a specification for a Key-Value Access Language (KVAL) and implementing a binding for it for Golang&#039;s BoltDB.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/exponentialdecay.co.uk\/blog\/key-value-access-language-kval-for-boltdb-and-golang\/\" \/>\n<meta property=\"og:site_name\" content=\"ross spencer :: exponentialdecay.digipres :: blog\" \/>\n<meta property=\"article:published_time\" content=\"2016-11-22T00:47:28+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2025-06-26T17:24:24+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/exponentialdecay.co.uk\/blog\/wp-content\/uploads\/2016\/11\/key-value-cats.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"941\" \/>\n\t<meta property=\"og:image:height\" content=\"954\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"Ross Spencer\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@beet_keeper\" \/>\n<meta name=\"twitter:site\" content=\"@beet_keeper\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Ross Spencer\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"6 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/exponentialdecay.co.uk\\\/blog\\\/key-value-access-language-kval-for-boltdb-and-golang\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/exponentialdecay.co.uk\\\/blog\\\/key-value-access-language-kval-for-boltdb-and-golang\\\/\"},\"author\":{\"name\":\"Ross Spencer\",\"@id\":\"https:\\\/\\\/exponentialdecay.co.uk\\\/blog\\\/#\\\/schema\\\/person\\\/4cae0a954400f42b9c1b70c699837716\"},\"headline\":\"Key :: Value Access Language (KVAL) for BoltDB and Golang\",\"datePublished\":\"2016-11-22T00:47:28+00:00\",\"dateModified\":\"2025-06-26T17:24:24+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/exponentialdecay.co.uk\\\/blog\\\/key-value-access-language-kval-for-boltdb-and-golang\\\/\"},\"wordCount\":1321,\"commentCount\":1,\"publisher\":{\"@id\":\"https:\\\/\\\/exponentialdecay.co.uk\\\/blog\\\/#\\\/schema\\\/person\\\/4cae0a954400f42b9c1b70c699837716\"},\"image\":{\"@id\":\"https:\\\/\\\/exponentialdecay.co.uk\\\/blog\\\/key-value-access-language-kval-for-boltdb-and-golang\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/exponentialdecay.co.uk\\\/blog\\\/wp-content\\\/uploads\\\/2016\\\/11\\\/key-value-cats.jpg\",\"keywords\":[\"API\",\"Bolt\",\"BoltDB\",\"Database\",\"Go\",\"Golang\",\"Key Value Access Language\",\"Key Value Store\",\"KVAL\",\"Libraries\"],\"articleSection\":[\"Golang\",\"Just Code\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/exponentialdecay.co.uk\\\/blog\\\/key-value-access-language-kval-for-boltdb-and-golang\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/exponentialdecay.co.uk\\\/blog\\\/key-value-access-language-kval-for-boltdb-and-golang\\\/\",\"url\":\"https:\\\/\\\/exponentialdecay.co.uk\\\/blog\\\/key-value-access-language-kval-for-boltdb-and-golang\\\/\",\"name\":\"Key :: Value Access Language (KVAL) for BoltDB and Golang - ross spencer :: exponentialdecay.digipres :: blog\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/exponentialdecay.co.uk\\\/blog\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/exponentialdecay.co.uk\\\/blog\\\/key-value-access-language-kval-for-boltdb-and-golang\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/exponentialdecay.co.uk\\\/blog\\\/key-value-access-language-kval-for-boltdb-and-golang\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/exponentialdecay.co.uk\\\/blog\\\/wp-content\\\/uploads\\\/2016\\\/11\\\/key-value-cats.jpg\",\"datePublished\":\"2016-11-22T00:47:28+00:00\",\"dateModified\":\"2025-06-26T17:24:24+00:00\",\"description\":\"Developing a specification for a Key-Value Access Language (KVAL) and implementing a binding for it for Golang's BoltDB.\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/exponentialdecay.co.uk\\\/blog\\\/key-value-access-language-kval-for-boltdb-and-golang\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/exponentialdecay.co.uk\\\/blog\\\/key-value-access-language-kval-for-boltdb-and-golang\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/exponentialdecay.co.uk\\\/blog\\\/key-value-access-language-kval-for-boltdb-and-golang\\\/#primaryimage\",\"url\":\"https:\\\/\\\/exponentialdecay.co.uk\\\/blog\\\/wp-content\\\/uploads\\\/2016\\\/11\\\/key-value-cats.jpg\",\"contentUrl\":\"https:\\\/\\\/exponentialdecay.co.uk\\\/blog\\\/wp-content\\\/uploads\\\/2016\\\/11\\\/key-value-cats.jpg\",\"width\":941,\"height\":954,\"caption\":\"Abstract representation of a Key Value store\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/exponentialdecay.co.uk\\\/blog\\\/key-value-access-language-kval-for-boltdb-and-golang\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/exponentialdecay.co.uk\\\/blog\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Key :: Value Access Language (KVAL) for BoltDB and Golang\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/exponentialdecay.co.uk\\\/blog\\\/#website\",\"url\":\"https:\\\/\\\/exponentialdecay.co.uk\\\/blog\\\/\",\"name\":\"ross spencer :: exponentialdecay.digipres :: blog\",\"description\":\"Digital preservation analyst, researcher, and software developer\",\"publisher\":{\"@id\":\"https:\\\/\\\/exponentialdecay.co.uk\\\/blog\\\/#\\\/schema\\\/person\\\/4cae0a954400f42b9c1b70c699837716\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/exponentialdecay.co.uk\\\/blog\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":[\"Person\",\"Organization\"],\"@id\":\"https:\\\/\\\/exponentialdecay.co.uk\\\/blog\\\/#\\\/schema\\\/person\\\/4cae0a954400f42b9c1b70c699837716\",\"name\":\"Ross Spencer\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/exponentialdecay.co.uk\\\/blog\\\/wp-content\\\/uploads\\\/2025\\\/06\\\/avatar-scaled.png\",\"url\":\"https:\\\/\\\/exponentialdecay.co.uk\\\/blog\\\/wp-content\\\/uploads\\\/2025\\\/06\\\/avatar-scaled.png\",\"contentUrl\":\"https:\\\/\\\/exponentialdecay.co.uk\\\/blog\\\/wp-content\\\/uploads\\\/2025\\\/06\\\/avatar-scaled.png\",\"width\":2560,\"height\":2560,\"caption\":\"Ross Spencer\"},\"logo\":{\"@id\":\"https:\\\/\\\/exponentialdecay.co.uk\\\/blog\\\/wp-content\\\/uploads\\\/2025\\\/06\\\/avatar-scaled.png\"},\"description\":\"Digital preservation domain expert and full-stack software developer.\",\"sameAs\":[\"http:\\\/\\\/www.exponentialdecay.co.uk\\\/blog\",\"https:\\\/\\\/www.instagram.com\\\/b33tk33p3r\\\/\",\"https:\\\/\\\/www.linkedin.com\\\/in\\\/ross-spencer-b6b9b758\\\/\",\"https:\\\/\\\/x.com\\\/beet_keeper\"],\"url\":\"https:\\\/\\\/exponentialdecay.co.uk\\\/blog\\\/author\\\/exponentialdecay\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Key :: Value Access Language (KVAL) for BoltDB and Golang - ross spencer :: exponentialdecay.digipres :: blog","description":"Developing a specification for a Key-Value Access Language (KVAL) and implementing a binding for it for Golang's BoltDB.","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:\/\/exponentialdecay.co.uk\/blog\/key-value-access-language-kval-for-boltdb-and-golang\/","og_locale":"en_US","og_type":"article","og_title":"Key :: Value Access Language (KVAL) for BoltDB and Golang - ross spencer :: exponentialdecay.digipres :: blog","og_description":"Developing a specification for a Key-Value Access Language (KVAL) and implementing a binding for it for Golang's BoltDB.","og_url":"https:\/\/exponentialdecay.co.uk\/blog\/key-value-access-language-kval-for-boltdb-and-golang\/","og_site_name":"ross spencer :: exponentialdecay.digipres :: blog","article_published_time":"2016-11-22T00:47:28+00:00","article_modified_time":"2025-06-26T17:24:24+00:00","og_image":[{"width":941,"height":954,"url":"https:\/\/exponentialdecay.co.uk\/blog\/wp-content\/uploads\/2016\/11\/key-value-cats.jpg","type":"image\/jpeg"}],"author":"Ross Spencer","twitter_card":"summary_large_image","twitter_creator":"@beet_keeper","twitter_site":"@beet_keeper","twitter_misc":{"Written by":"Ross Spencer","Est. reading time":"6 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/exponentialdecay.co.uk\/blog\/key-value-access-language-kval-for-boltdb-and-golang\/#article","isPartOf":{"@id":"https:\/\/exponentialdecay.co.uk\/blog\/key-value-access-language-kval-for-boltdb-and-golang\/"},"author":{"name":"Ross Spencer","@id":"https:\/\/exponentialdecay.co.uk\/blog\/#\/schema\/person\/4cae0a954400f42b9c1b70c699837716"},"headline":"Key :: Value Access Language (KVAL) for BoltDB and Golang","datePublished":"2016-11-22T00:47:28+00:00","dateModified":"2025-06-26T17:24:24+00:00","mainEntityOfPage":{"@id":"https:\/\/exponentialdecay.co.uk\/blog\/key-value-access-language-kval-for-boltdb-and-golang\/"},"wordCount":1321,"commentCount":1,"publisher":{"@id":"https:\/\/exponentialdecay.co.uk\/blog\/#\/schema\/person\/4cae0a954400f42b9c1b70c699837716"},"image":{"@id":"https:\/\/exponentialdecay.co.uk\/blog\/key-value-access-language-kval-for-boltdb-and-golang\/#primaryimage"},"thumbnailUrl":"https:\/\/exponentialdecay.co.uk\/blog\/wp-content\/uploads\/2016\/11\/key-value-cats.jpg","keywords":["API","Bolt","BoltDB","Database","Go","Golang","Key Value Access Language","Key Value Store","KVAL","Libraries"],"articleSection":["Golang","Just Code"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/exponentialdecay.co.uk\/blog\/key-value-access-language-kval-for-boltdb-and-golang\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/exponentialdecay.co.uk\/blog\/key-value-access-language-kval-for-boltdb-and-golang\/","url":"https:\/\/exponentialdecay.co.uk\/blog\/key-value-access-language-kval-for-boltdb-and-golang\/","name":"Key :: Value Access Language (KVAL) for BoltDB and Golang - ross spencer :: exponentialdecay.digipres :: blog","isPartOf":{"@id":"https:\/\/exponentialdecay.co.uk\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/exponentialdecay.co.uk\/blog\/key-value-access-language-kval-for-boltdb-and-golang\/#primaryimage"},"image":{"@id":"https:\/\/exponentialdecay.co.uk\/blog\/key-value-access-language-kval-for-boltdb-and-golang\/#primaryimage"},"thumbnailUrl":"https:\/\/exponentialdecay.co.uk\/blog\/wp-content\/uploads\/2016\/11\/key-value-cats.jpg","datePublished":"2016-11-22T00:47:28+00:00","dateModified":"2025-06-26T17:24:24+00:00","description":"Developing a specification for a Key-Value Access Language (KVAL) and implementing a binding for it for Golang's BoltDB.","breadcrumb":{"@id":"https:\/\/exponentialdecay.co.uk\/blog\/key-value-access-language-kval-for-boltdb-and-golang\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/exponentialdecay.co.uk\/blog\/key-value-access-language-kval-for-boltdb-and-golang\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/exponentialdecay.co.uk\/blog\/key-value-access-language-kval-for-boltdb-and-golang\/#primaryimage","url":"https:\/\/exponentialdecay.co.uk\/blog\/wp-content\/uploads\/2016\/11\/key-value-cats.jpg","contentUrl":"https:\/\/exponentialdecay.co.uk\/blog\/wp-content\/uploads\/2016\/11\/key-value-cats.jpg","width":941,"height":954,"caption":"Abstract representation of a Key Value store"},{"@type":"BreadcrumbList","@id":"https:\/\/exponentialdecay.co.uk\/blog\/key-value-access-language-kval-for-boltdb-and-golang\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/exponentialdecay.co.uk\/blog\/"},{"@type":"ListItem","position":2,"name":"Key :: Value Access Language (KVAL) for BoltDB and Golang"}]},{"@type":"WebSite","@id":"https:\/\/exponentialdecay.co.uk\/blog\/#website","url":"https:\/\/exponentialdecay.co.uk\/blog\/","name":"ross spencer :: exponentialdecay.digipres :: blog","description":"Digital preservation analyst, researcher, and software developer","publisher":{"@id":"https:\/\/exponentialdecay.co.uk\/blog\/#\/schema\/person\/4cae0a954400f42b9c1b70c699837716"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/exponentialdecay.co.uk\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":["Person","Organization"],"@id":"https:\/\/exponentialdecay.co.uk\/blog\/#\/schema\/person\/4cae0a954400f42b9c1b70c699837716","name":"Ross Spencer","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/exponentialdecay.co.uk\/blog\/wp-content\/uploads\/2025\/06\/avatar-scaled.png","url":"https:\/\/exponentialdecay.co.uk\/blog\/wp-content\/uploads\/2025\/06\/avatar-scaled.png","contentUrl":"https:\/\/exponentialdecay.co.uk\/blog\/wp-content\/uploads\/2025\/06\/avatar-scaled.png","width":2560,"height":2560,"caption":"Ross Spencer"},"logo":{"@id":"https:\/\/exponentialdecay.co.uk\/blog\/wp-content\/uploads\/2025\/06\/avatar-scaled.png"},"description":"Digital preservation domain expert and full-stack software developer.","sameAs":["http:\/\/www.exponentialdecay.co.uk\/blog","https:\/\/www.instagram.com\/b33tk33p3r\/","https:\/\/www.linkedin.com\/in\/ross-spencer-b6b9b758\/","https:\/\/x.com\/beet_keeper"],"url":"https:\/\/exponentialdecay.co.uk\/blog\/author\/exponentialdecay\/"}]}},"views":4533,"_links":{"self":[{"href":"https:\/\/exponentialdecay.co.uk\/blog\/wp-json\/wp\/v2\/posts\/792","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/exponentialdecay.co.uk\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/exponentialdecay.co.uk\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/exponentialdecay.co.uk\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/exponentialdecay.co.uk\/blog\/wp-json\/wp\/v2\/comments?post=792"}],"version-history":[{"count":15,"href":"https:\/\/exponentialdecay.co.uk\/blog\/wp-json\/wp\/v2\/posts\/792\/revisions"}],"predecessor-version":[{"id":2521,"href":"https:\/\/exponentialdecay.co.uk\/blog\/wp-json\/wp\/v2\/posts\/792\/revisions\/2521"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/exponentialdecay.co.uk\/blog\/wp-json\/wp\/v2\/media\/793"}],"wp:attachment":[{"href":"https:\/\/exponentialdecay.co.uk\/blog\/wp-json\/wp\/v2\/media?parent=792"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/exponentialdecay.co.uk\/blog\/wp-json\/wp\/v2\/categories?post=792"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/exponentialdecay.co.uk\/blog\/wp-json\/wp\/v2\/tags?post=792"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}