{"id":1372,"date":"2014-07-14T23:26:48","date_gmt":"2014-07-14T22:26:48","guid":{"rendered":"https:\/\/www.entropywins.wtf\/blog\/?p=1372"},"modified":"2014-07-15T00:06:04","modified_gmt":"2014-07-14T23:06:04","slug":"some-fun-with-iterators","status":"publish","type":"post","link":"https:\/\/www.entropywins.wtf\/blog\/2014\/07\/14\/some-fun-with-iterators\/","title":{"rendered":"Some fun with iterators"},"content":{"rendered":"<p>Sometimes you need to loop over a big pile of stuff and execute an action for each item. In the Wikibase software, this for instance occurs when we want to rebuild or refresh a part of our secondary persistence, or when we want to create an export of sorts.<\/p>\n<p>Historically we&#8217;ve created CLI scrips that build and executed calls to the database to get the data. As we&#8217;ve been paying more attention to separating concerns, such scripts have evolved into fetching the data via some persistence service. That avoids binding to a specific implementation to some extend. However, it still leads to the script knowing about the particular persistence service. In other words, it might not know the database layout, or that MySQL is used, it still things via the signature of the interface. And it&#8217;s entirely possible you want to use the code with a different source of the thing being iterated over that is in a format which the persistence interface is not suitable for.<\/p>\n<p>All the code doing the iteration and invocation of the task needs to know is that there is a collection of a particular type it can loop over. This is what the Iterator interface is for. If you have the iteration code use an Iterator, you can implement and test most of your code without having the fetching part in place. You can simply feed in an ArrayIterator. This also demonstrates the script no longer knows if the data is already there or if (part of it) still needs to be retrieved.<\/p>\n<p><a href=\"https:\/\/github.com\/JeroenDeDauw\/BatchingIterator#usage\"><img loading=\"lazy\" decoding=\"async\" data-attachment-id=\"1374\" data-permalink=\"https:\/\/www.entropywins.wtf\/blog\/2014\/07\/14\/some-fun-with-iterators\/tweetiterator\/\" data-orig-file=\"https:\/\/www.entropywins.wtf\/blog\/wp-content\/uploads\/2014\/07\/tweetiterator.jpg\" data-orig-size=\"500,174\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;}\" data-image-title=\"tweetiterator\" data-image-description=\"\" data-image-caption=\"\" data-large-file=\"https:\/\/www.entropywins.wtf\/blog\/wp-content\/uploads\/2014\/07\/tweetiterator.jpg\" class=\"alignnone size-full wp-image-1374\" src=\"https:\/\/www.entropywins.wtf\/blog\/wp-content\/uploads\/2014\/07\/tweetiterator.jpg\" alt=\"tweetiterator\" width=\"500\" height=\"174\" srcset=\"https:\/\/www.entropywins.wtf\/blog\/wp-content\/uploads\/2014\/07\/tweetiterator.jpg 500w, https:\/\/www.entropywins.wtf\/blog\/wp-content\/uploads\/2014\/07\/tweetiterator-300x104.jpg 300w, https:\/\/www.entropywins.wtf\/blog\/wp-content\/uploads\/2014\/07\/tweetiterator-100x34.jpg 100w, https:\/\/www.entropywins.wtf\/blog\/wp-content\/uploads\/2014\/07\/tweetiterator-150x52.jpg 150w, https:\/\/www.entropywins.wtf\/blog\/wp-content\/uploads\/2014\/07\/tweetiterator-200x69.jpg 200w, https:\/\/www.entropywins.wtf\/blog\/wp-content\/uploads\/2014\/07\/tweetiterator-450x156.jpg 450w\" sizes=\"auto, (max-width: 500px) 100vw, 500px\" \/><\/a><\/p>\n<p>When iterating over a big or expensive to retrieve set of data, one often wants to apply batching. Having to create an iterator every time is annoying though, and putting the iteration logic together with the actual retrieval code is not very nice. After having done this a few times, I realized that part could be abstracted out, and created a tiny new library: <a href=\"https:\/\/github.com\/JeroenDeDauw\/BatchingIterator\">BatchingIterator<\/a>. You can read <a href=\"https:\/\/github.com\/JeroenDeDauw\/BatchingIterator#usage\">how to use it<\/a>.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Sometimes you need to loop over a big pile of stuff and execute an action for each item. In the&hellip;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":false,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2}},"categories":[7],"tags":[355,354,181,195,197,316,317,305],"class_list":["post-1372","post","type-post","status-publish","format-standard","hentry","category-programming","tag-batching","tag-iterator","tag-open-source","tag-php","tag-planet-wikimedia","tag-software-design","tag-wikibase","tag-wikidata"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.4 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Some fun with iterators - Blog of Jeroen De Dauw<\/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.entropywins.wtf\/blog\/2014\/07\/14\/some-fun-with-iterators\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Some fun with iterators - Blog of Jeroen De Dauw\" \/>\n<meta property=\"og:description\" content=\"Sometimes you need to loop over a big pile of stuff and execute an action for each item. In the&hellip;\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.entropywins.wtf\/blog\/2014\/07\/14\/some-fun-with-iterators\/\" \/>\n<meta property=\"og:site_name\" content=\"Blog of Jeroen De Dauw\" \/>\n<meta property=\"article:published_time\" content=\"2014-07-14T22:26:48+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2014-07-14T23:06:04+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.entropywins.wtf\/blog\/wp-content\/uploads\/2014\/07\/tweetiterator.jpg\" \/>\n<meta name=\"author\" content=\"Jeroen\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@https:\/\/twitter.com\/JeroenDeDauw\" \/>\n<meta name=\"twitter:site\" content=\"@JeroenDeDauw\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Jeroen\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"2 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/www.entropywins.wtf\\\/blog\\\/2014\\\/07\\\/14\\\/some-fun-with-iterators\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.entropywins.wtf\\\/blog\\\/2014\\\/07\\\/14\\\/some-fun-with-iterators\\\/\"},\"author\":{\"name\":\"Jeroen\",\"@id\":\"https:\\\/\\\/www.entropywins.wtf\\\/blog\\\/#\\\/schema\\\/person\\\/4e2ef14f2ca7dc3a0ac137d1692b66b7\"},\"headline\":\"Some fun with iterators\",\"datePublished\":\"2014-07-14T22:26:48+00:00\",\"dateModified\":\"2014-07-14T23:06:04+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.entropywins.wtf\\\/blog\\\/2014\\\/07\\\/14\\\/some-fun-with-iterators\\\/\"},\"wordCount\":338,\"commentCount\":5,\"publisher\":{\"@id\":\"https:\\\/\\\/www.entropywins.wtf\\\/blog\\\/#\\\/schema\\\/person\\\/4e2ef14f2ca7dc3a0ac137d1692b66b7\"},\"image\":{\"@id\":\"https:\\\/\\\/www.entropywins.wtf\\\/blog\\\/2014\\\/07\\\/14\\\/some-fun-with-iterators\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.entropywins.wtf\\\/blog\\\/wp-content\\\/uploads\\\/2014\\\/07\\\/tweetiterator.jpg\",\"keywords\":[\"Batching\",\"Iterator\",\"Open Source\",\"PHP\",\"Planet Wikimedia\",\"Software design\",\"Wikibase\",\"wikidata\"],\"articleSection\":[\"Programming\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/www.entropywins.wtf\\\/blog\\\/2014\\\/07\\\/14\\\/some-fun-with-iterators\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.entropywins.wtf\\\/blog\\\/2014\\\/07\\\/14\\\/some-fun-with-iterators\\\/\",\"url\":\"https:\\\/\\\/www.entropywins.wtf\\\/blog\\\/2014\\\/07\\\/14\\\/some-fun-with-iterators\\\/\",\"name\":\"Some fun with iterators - Blog of Jeroen De Dauw\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.entropywins.wtf\\\/blog\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/www.entropywins.wtf\\\/blog\\\/2014\\\/07\\\/14\\\/some-fun-with-iterators\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/www.entropywins.wtf\\\/blog\\\/2014\\\/07\\\/14\\\/some-fun-with-iterators\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.entropywins.wtf\\\/blog\\\/wp-content\\\/uploads\\\/2014\\\/07\\\/tweetiterator.jpg\",\"datePublished\":\"2014-07-14T22:26:48+00:00\",\"dateModified\":\"2014-07-14T23:06:04+00:00\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.entropywins.wtf\\\/blog\\\/2014\\\/07\\\/14\\\/some-fun-with-iterators\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.entropywins.wtf\\\/blog\\\/2014\\\/07\\\/14\\\/some-fun-with-iterators\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.entropywins.wtf\\\/blog\\\/2014\\\/07\\\/14\\\/some-fun-with-iterators\\\/#primaryimage\",\"url\":\"https:\\\/\\\/www.entropywins.wtf\\\/blog\\\/wp-content\\\/uploads\\\/2014\\\/07\\\/tweetiterator.jpg\",\"contentUrl\":\"https:\\\/\\\/www.entropywins.wtf\\\/blog\\\/wp-content\\\/uploads\\\/2014\\\/07\\\/tweetiterator.jpg\",\"width\":500,\"height\":174},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.entropywins.wtf\\\/blog\\\/2014\\\/07\\\/14\\\/some-fun-with-iterators\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/www.entropywins.wtf\\\/blog\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Some fun with iterators\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.entropywins.wtf\\\/blog\\\/#website\",\"url\":\"https:\\\/\\\/www.entropywins.wtf\\\/blog\\\/\",\"name\":\"Entropy Wins\",\"description\":\"A blog on Software Architecture, Design and Craftsmanship\",\"publisher\":{\"@id\":\"https:\\\/\\\/www.entropywins.wtf\\\/blog\\\/#\\\/schema\\\/person\\\/4e2ef14f2ca7dc3a0ac137d1692b66b7\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/www.entropywins.wtf\\\/blog\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":[\"Person\",\"Organization\"],\"@id\":\"https:\\\/\\\/www.entropywins.wtf\\\/blog\\\/#\\\/schema\\\/person\\\/4e2ef14f2ca7dc3a0ac137d1692b66b7\",\"name\":\"Jeroen\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/d62e6b5b8e332335cf17854fac850d9c70ba367c4692872613c3110ebd4e009b?s=96&d=mm&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/d62e6b5b8e332335cf17854fac850d9c70ba367c4692872613c3110ebd4e009b?s=96&d=mm&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/d62e6b5b8e332335cf17854fac850d9c70ba367c4692872613c3110ebd4e009b?s=96&d=mm&r=g\",\"caption\":\"Jeroen\"},\"logo\":{\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/d62e6b5b8e332335cf17854fac850d9c70ba367c4692872613c3110ebd4e009b?s=96&d=mm&r=g\"},\"sameAs\":[\"https:\\\/\\\/www.linkedin.com\\\/in\\\/jeroendedauw\\\/\",\"https:\\\/\\\/x.com\\\/https:\\\/\\\/twitter.com\\\/JeroenDeDauw\"]}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Some fun with iterators - Blog of Jeroen De Dauw","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.entropywins.wtf\/blog\/2014\/07\/14\/some-fun-with-iterators\/","og_locale":"en_US","og_type":"article","og_title":"Some fun with iterators - Blog of Jeroen De Dauw","og_description":"Sometimes you need to loop over a big pile of stuff and execute an action for each item. In the&hellip;","og_url":"https:\/\/www.entropywins.wtf\/blog\/2014\/07\/14\/some-fun-with-iterators\/","og_site_name":"Blog of Jeroen De Dauw","article_published_time":"2014-07-14T22:26:48+00:00","article_modified_time":"2014-07-14T23:06:04+00:00","og_image":[{"url":"https:\/\/www.entropywins.wtf\/blog\/wp-content\/uploads\/2014\/07\/tweetiterator.jpg","type":"","width":"","height":""}],"author":"Jeroen","twitter_card":"summary_large_image","twitter_creator":"@https:\/\/twitter.com\/JeroenDeDauw","twitter_site":"@JeroenDeDauw","twitter_misc":{"Written by":"Jeroen","Est. reading time":"2 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.entropywins.wtf\/blog\/2014\/07\/14\/some-fun-with-iterators\/#article","isPartOf":{"@id":"https:\/\/www.entropywins.wtf\/blog\/2014\/07\/14\/some-fun-with-iterators\/"},"author":{"name":"Jeroen","@id":"https:\/\/www.entropywins.wtf\/blog\/#\/schema\/person\/4e2ef14f2ca7dc3a0ac137d1692b66b7"},"headline":"Some fun with iterators","datePublished":"2014-07-14T22:26:48+00:00","dateModified":"2014-07-14T23:06:04+00:00","mainEntityOfPage":{"@id":"https:\/\/www.entropywins.wtf\/blog\/2014\/07\/14\/some-fun-with-iterators\/"},"wordCount":338,"commentCount":5,"publisher":{"@id":"https:\/\/www.entropywins.wtf\/blog\/#\/schema\/person\/4e2ef14f2ca7dc3a0ac137d1692b66b7"},"image":{"@id":"https:\/\/www.entropywins.wtf\/blog\/2014\/07\/14\/some-fun-with-iterators\/#primaryimage"},"thumbnailUrl":"https:\/\/www.entropywins.wtf\/blog\/wp-content\/uploads\/2014\/07\/tweetiterator.jpg","keywords":["Batching","Iterator","Open Source","PHP","Planet Wikimedia","Software design","Wikibase","wikidata"],"articleSection":["Programming"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.entropywins.wtf\/blog\/2014\/07\/14\/some-fun-with-iterators\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.entropywins.wtf\/blog\/2014\/07\/14\/some-fun-with-iterators\/","url":"https:\/\/www.entropywins.wtf\/blog\/2014\/07\/14\/some-fun-with-iterators\/","name":"Some fun with iterators - Blog of Jeroen De Dauw","isPartOf":{"@id":"https:\/\/www.entropywins.wtf\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.entropywins.wtf\/blog\/2014\/07\/14\/some-fun-with-iterators\/#primaryimage"},"image":{"@id":"https:\/\/www.entropywins.wtf\/blog\/2014\/07\/14\/some-fun-with-iterators\/#primaryimage"},"thumbnailUrl":"https:\/\/www.entropywins.wtf\/blog\/wp-content\/uploads\/2014\/07\/tweetiterator.jpg","datePublished":"2014-07-14T22:26:48+00:00","dateModified":"2014-07-14T23:06:04+00:00","breadcrumb":{"@id":"https:\/\/www.entropywins.wtf\/blog\/2014\/07\/14\/some-fun-with-iterators\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.entropywins.wtf\/blog\/2014\/07\/14\/some-fun-with-iterators\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.entropywins.wtf\/blog\/2014\/07\/14\/some-fun-with-iterators\/#primaryimage","url":"https:\/\/www.entropywins.wtf\/blog\/wp-content\/uploads\/2014\/07\/tweetiterator.jpg","contentUrl":"https:\/\/www.entropywins.wtf\/blog\/wp-content\/uploads\/2014\/07\/tweetiterator.jpg","width":500,"height":174},{"@type":"BreadcrumbList","@id":"https:\/\/www.entropywins.wtf\/blog\/2014\/07\/14\/some-fun-with-iterators\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.entropywins.wtf\/blog\/"},{"@type":"ListItem","position":2,"name":"Some fun with iterators"}]},{"@type":"WebSite","@id":"https:\/\/www.entropywins.wtf\/blog\/#website","url":"https:\/\/www.entropywins.wtf\/blog\/","name":"Entropy Wins","description":"A blog on Software Architecture, Design and Craftsmanship","publisher":{"@id":"https:\/\/www.entropywins.wtf\/blog\/#\/schema\/person\/4e2ef14f2ca7dc3a0ac137d1692b66b7"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.entropywins.wtf\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":["Person","Organization"],"@id":"https:\/\/www.entropywins.wtf\/blog\/#\/schema\/person\/4e2ef14f2ca7dc3a0ac137d1692b66b7","name":"Jeroen","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/d62e6b5b8e332335cf17854fac850d9c70ba367c4692872613c3110ebd4e009b?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/d62e6b5b8e332335cf17854fac850d9c70ba367c4692872613c3110ebd4e009b?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/d62e6b5b8e332335cf17854fac850d9c70ba367c4692872613c3110ebd4e009b?s=96&d=mm&r=g","caption":"Jeroen"},"logo":{"@id":"https:\/\/secure.gravatar.com\/avatar\/d62e6b5b8e332335cf17854fac850d9c70ba367c4692872613c3110ebd4e009b?s=96&d=mm&r=g"},"sameAs":["https:\/\/www.linkedin.com\/in\/jeroendedauw\/","https:\/\/x.com\/https:\/\/twitter.com\/JeroenDeDauw"]}]}},"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack_shortlink":"https:\/\/wp.me\/p74TBF-m8","jetpack-related-posts":[{"id":1524,"url":"https:\/\/www.entropywins.wtf\/blog\/2016\/01\/25\/replicator-a-cli-tool-for-wikidata\/","url_meta":{"origin":1372,"position":0},"title":"Replicator: Wikidata import tool","author":"Jeroen","date":"2016-01-25","format":false,"excerpt":"I'm happy to announce the first release of Replicator, a CLI tool for importing entities from Wikidata. Replicator was created for importing data from Wikidata into the QueryR REST API persistence. It has two big conceptual components: getting entities from a specified source, and then doing something with said entities.\u2026","rel":"","context":"In &quot;Programming&quot;","block_context":{"text":"Programming","link":"https:\/\/www.entropywins.wtf\/blog\/category\/programming\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":1337,"url":"https:\/\/www.entropywins.wtf\/blog\/2014\/05\/06\/the-wikidata-phase3-software-components\/","url_meta":{"origin":1372,"position":1},"title":"The Wikidata phase3 software components","author":"Jeroen","date":"2014-05-06","format":false,"excerpt":"Work on the long awaited query functionality for the Wikidata project has already happened during a period of several months. Since queries are a completely disjoint feature set from the existing functionality, we decided to put it into a new component part of the Wikibase software. This component is called\u2026","rel":"","context":"In &quot;Programming&quot;","block_context":{"text":"Programming","link":"https:\/\/www.entropywins.wtf\/blog\/category\/programming\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":1340,"url":"https:\/\/www.entropywins.wtf\/blog\/2014\/05\/06\/wikibase-and-doctrine-dbal\/","url_meta":{"origin":1372,"position":2},"title":"Wikibase and Doctrine DBAL","author":"Jeroen","date":"2014-05-06","format":false,"excerpt":"When I started writing this blog post, I realized some introduction to the query components was first due. You can find it in my last blog post: The Wikidata phase3 software components. In this post I described how the SQLStore uses a database abstraction layer to not bind itself to\u2026","rel":"","context":"In &quot;Programming&quot;","block_context":{"text":"Programming","link":"https:\/\/www.entropywins.wtf\/blog\/category\/programming\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/www.entropywins.wtf\/blog\/wp-content\/uploads\/2014\/05\/dbal.png?resize=350%2C200&ssl=1","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/www.entropywins.wtf\/blog\/wp-content\/uploads\/2014\/05\/dbal.png?resize=350%2C200&ssl=1 1x, https:\/\/i0.wp.com\/www.entropywins.wtf\/blog\/wp-content\/uploads\/2014\/05\/dbal.png?resize=525%2C300&ssl=1 1.5x, https:\/\/i0.wp.com\/www.entropywins.wtf\/blog\/wp-content\/uploads\/2014\/05\/dbal.png?resize=700%2C400&ssl=1 2x, https:\/\/i0.wp.com\/www.entropywins.wtf\/blog\/wp-content\/uploads\/2014\/05\/dbal.png?resize=1050%2C600&ssl=1 3x"},"classes":[]},{"id":1488,"url":"https:\/\/www.entropywins.wtf\/blog\/2015\/11\/14\/entitystore-and-termstore-for-wikibasewikidata\/","url_meta":{"origin":1372,"position":3},"title":"EntityStore and TermStore for Wikibase\/Wikidata","author":"Jeroen","date":"2015-11-14","format":false,"excerpt":"I'm happy to announce the public release of two new PHP libraries that provide services around Wikibase, the software behind Wikidata. They are called QueryR EntityStore and QueryR TermStore. Both these libraries provide persistence and lookup services for specific Wikibase data. These services are build on top of Doctrine DBAL,\u2026","rel":"","context":"In &quot;Programming&quot;","block_context":{"text":"Programming","link":"https:\/\/www.entropywins.wtf\/blog\/category\/programming\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":1287,"url":"https:\/\/www.entropywins.wtf\/blog\/2014\/03\/20\/status-of-the-new-wikibase-deserialization-code\/","url_meta":{"origin":1372,"position":4},"title":"Status of the new Wikibase (de)serialization code","author":"Jeroen","date":"2014-03-20","format":false,"excerpt":"A quick update on the status of the new serialization and deserialization code for Wikibase, the software behind Wikidata. For a long time now, we've had two serialization formats. One intended for external usage, and one intended for internal usage. The former one is the format our web API uses.\u2026","rel":"","context":"In &quot;Software&quot;","block_context":{"text":"Software","link":"https:\/\/www.entropywins.wtf\/blog\/category\/software\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":1141,"url":"https:\/\/www.entropywins.wtf\/blog\/2013\/11\/01\/new-database-abstraction-layer-for-mediawiki\/","url_meta":{"origin":1372,"position":5},"title":"New database abstraction layer for MediaWiki","author":"Jeroen","date":"2013-11-01","format":false,"excerpt":"Disclaimer: the views and opinions expressed in this blog post are my own, and do not reflect those of Wikmedia Germany or my colleagues. At Wikimedia Germany, we\u2019ve created a library that acts as database abstraction layer and which is largely build on top of the MediaWiki database abstraction layer.\u2026","rel":"","context":"With 1 comment","block_context":{"text":"With 1 comment","link":"https:\/\/www.entropywins.wtf\/blog\/2013\/11\/01\/new-database-abstraction-layer-for-mediawiki\/#comments"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]}],"jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/www.entropywins.wtf\/blog\/wp-json\/wp\/v2\/posts\/1372","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.entropywins.wtf\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.entropywins.wtf\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.entropywins.wtf\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.entropywins.wtf\/blog\/wp-json\/wp\/v2\/comments?post=1372"}],"version-history":[{"count":2,"href":"https:\/\/www.entropywins.wtf\/blog\/wp-json\/wp\/v2\/posts\/1372\/revisions"}],"predecessor-version":[{"id":1375,"href":"https:\/\/www.entropywins.wtf\/blog\/wp-json\/wp\/v2\/posts\/1372\/revisions\/1375"}],"wp:attachment":[{"href":"https:\/\/www.entropywins.wtf\/blog\/wp-json\/wp\/v2\/media?parent=1372"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.entropywins.wtf\/blog\/wp-json\/wp\/v2\/categories?post=1372"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.entropywins.wtf\/blog\/wp-json\/wp\/v2\/tags?post=1372"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}