{"id":36464652,"url":"https://github.com/wearetheledger/go-couchdb-query-engine","last_synced_at":"2026-01-12T00:01:18.368Z","repository":{"id":57491730,"uuid":"114785666","full_name":"wearetheledger/go-couchdb-query-engine","owner":"wearetheledger","description":"CouchDB query implementation in Golang for in-memory object querying","archived":false,"fork":false,"pushed_at":"2018-10-28T08:31:57.000Z","size":34,"stargazers_count":12,"open_issues_count":0,"forks_count":3,"subscribers_count":7,"default_branch":"master","last_synced_at":"2024-10-16T09:20:05.906Z","etag":null,"topics":["couchdb","go","golang","query"],"latest_commit_sha":null,"homepage":null,"language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/wearetheledger.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-12-19T16:10:45.000Z","updated_at":"2022-03-11T16:44:23.000Z","dependencies_parsed_at":"2022-08-30T23:20:59.665Z","dependency_job_id":null,"html_url":"https://github.com/wearetheledger/go-couchdb-query-engine","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/wearetheledger/go-couchdb-query-engine","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wearetheledger%2Fgo-couchdb-query-engine","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wearetheledger%2Fgo-couchdb-query-engine/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wearetheledger%2Fgo-couchdb-query-engine/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wearetheledger%2Fgo-couchdb-query-engine/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/wearetheledger","download_url":"https://codeload.github.com/wearetheledger/go-couchdb-query-engine/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wearetheledger%2Fgo-couchdb-query-engine/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28328663,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-11T22:11:01.104Z","status":"ssl_error","status_checked_at":"2026-01-11T22:10:58.990Z","response_time":60,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["couchdb","go","golang","query"],"created_at":"2026-01-12T00:01:17.706Z","updated_at":"2026-01-12T00:01:18.357Z","avatar_url":"https://github.com/wearetheledger.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# go-couchdb-query-engine\nCouchDB query implementation in Golang for in-memory object querying\n\n**Build status**: [![Build Status](https://travis-ci.org/wearetheledger/go-couchdb-query-engine.svg?branch=master)](https://travis-ci.org/wearetheledger/go-couchdb-query-engine)\n\n## Features\n- skip\n- limit\n- selector\n\n## Selector\nThe selector query accepts following couchdb operators:\n- all\n- and\n- elematch\n- eq\n- exists\n- gt\n- gte\n- in\n- lt\n- lte\n- mod\n- ne\n- nin\n- nor\n- not\n- or\n- regex\n- size\n- type\n\n## Example code\n### Data\n\n```golang\nvar TestData = map[string]interface{}{\n\t\"MARBLE1\": map[string]interface{}{\n\t\t\"objectType\": \"MARBLE\",\n\t\t\"owner\":      \"bob\",\n\t\t\"size\":       3,\n\t\t\"previousOwners\": []string{\n\t\t\t\"alice\",\n\t\t\t\"donald\",\n\t\t},\n\t\t\"family\": map[string]interface{}{\n\t\t\t\"name\":   \"colored\",\n\t\t\t\"origin\": \"spain\",\n\t\t},\n\t},\n\t\"MARBLE2\": map[string]interface{}{\n\t\t\"objectType\": \"MARBLE\",\n\t\t\"owner\":      \"alice\",\n\t\t\"size\":       1,\n\t\t\"previousOwners\": []string{\n\t\t\t\"donald\",\n\t\t},\n\t\t\"family\": map[string]interface{}{\n\t\t\t\"name\":   \"white\",\n\t\t\t\"origin\": \"france\",\n\t\t},\n\t\t\"verification\": []interface{}{\n\t\t\tmap[string]interface{}{\n\t\t\t\t\"organizationId\": \"marbles inspectors inc.\",\n\t\t\t\t\"checkedAt\":      \"2017-12-18T12:11:34.171Z\",\n\t\t\t\t\"score\":          5,\n\t\t\t},\n\t\t},\n\t},\n\t\"MARBLE3\": map[string]interface{}{\n\t\t\"objectType\": \"MARBLE\",\n\t\t\"owner\":      \"arnold\",\n\t\t\"size\":       5,\n\t\t\"previousOwners\": []string{\n\t\t\t\"alice\",\n\t\t},\n\t\t\"family\": map[string]interface{}{\n\t\t\t\"name\":   \"striped\",\n\t\t\t\"origin\": \"america\",\n\t\t},\n\t\t\"verification\": []interface{}{\n\t\t\tmap[string]interface{}{\n\t\t\t\t\"organizationId\": \"marbles ID inc.\",\n\t\t\t\t\"checkedAt\":      \"2017-12-18T12:11:34.171Z\",\n\t\t\t\t\"score\":          3,\n\t\t\t},\n\t\t\tmap[string]interface{}{\n\t\t\t\t\"organizationId\": \"marbles ID inc.\",\n\t\t\t\t\"checkedAt\":      \"2016-12-18T12:11:34.171Z\",\n\t\t\t\t\"score\":          7,\n\t\t\t},\n\t\t},\n\t},\n}\n```\n\n### Method\n```golang\nres, err := query.ParseCouchDBQuery(TestData, map[string]interface{}{\n\t\t\t\"selector\": map[string]interface{}{\n\t\t\t\t\"size\": map[string]interface{}{\n\t\t\t\t\t\"$eq\": 3,\n\t\t\t\t},\n\t\t\t},\n\t\t})\n```\n### Response\n```golang\nStateCouchDBQueryResult{\n\tStateCouchDBQueryObject{\n\t\tKey: \"MARBLE0\",\n\t\tValue: map[string]interface{}{\n\t\t\t\"objectType\": \"MARBLE\",\n\t\t\t\"owner\":      \"bob\",\n\t\t\t\"size\":       3,\n\t\t\t\"previousOwners\": []string{\n\t\t\t\t\"alice\",\n\t\t\t\t\"donald\",\n\t\t\t},\n\t\t\t\"family\": map[string]interface{}{\n\t\t\t\t\"name\":   \"colored\",\n\t\t\t\t\"origin\": \"spain\",\n\t\t\t},\n\t\t},\n\t},\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwearetheledger%2Fgo-couchdb-query-engine","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwearetheledger%2Fgo-couchdb-query-engine","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwearetheledger%2Fgo-couchdb-query-engine/lists"}