{"id":13813767,"url":"https://github.com/augmentable-dev/reqlite","last_synced_at":"2026-01-14T15:43:58.927Z","repository":{"id":48571824,"uuid":"361594702","full_name":"augmentable-dev/reqlite","owner":"augmentable-dev","description":"Query redis with SQL","archived":false,"fork":false,"pushed_at":"2021-07-20T01:57:30.000Z","size":7744,"stargazers_count":54,"open_issues_count":9,"forks_count":5,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-05-15T01:37:06.631Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/augmentable-dev.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":"2021-04-26T02:34:34.000Z","updated_at":"2024-06-27T19:50:16.000Z","dependencies_parsed_at":"2022-08-27T07:31:20.440Z","dependency_job_id":null,"html_url":"https://github.com/augmentable-dev/reqlite","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/augmentable-dev/reqlite","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/augmentable-dev%2Freqlite","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/augmentable-dev%2Freqlite/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/augmentable-dev%2Freqlite/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/augmentable-dev%2Freqlite/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/augmentable-dev","download_url":"https://codeload.github.com/augmentable-dev/reqlite/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/augmentable-dev%2Freqlite/sbom","scorecard":{"id":216206,"data":{"date":"2025-08-11","repo":{"name":"github.com/augmentable-dev/reqlite","commit":"181d5bbebfa58636becbca3239c8a65c4802402e"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":4.2,"checks":[{"name":"Code-Review","score":4,"reason":"Found 9/20 approved changesets -- score normalized to 4","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Dangerous-Workflow","score":10,"reason":"no dangerous workflow patterns detected","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Token-Permissions","score":0,"reason":"detected GitHub workflow tokens with excessive permissions","details":["Warn: no topLevel permission defined: .github/workflows/test.yaml:1","Info: no jobLevel write permissions found"],"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Pinned-Dependencies","score":0,"reason":"dependency not pinned by hash detected -- score normalized to 0","details":["Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/test.yaml:15: update your workflow using https://app.stepsecurity.io/secureworkflow/augmentable-dev/reqlite/test.yaml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/test.yaml:21: update your workflow using https://app.stepsecurity.io/secureworkflow/augmentable-dev/reqlite/test.yaml/main?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/test.yaml:33: update your workflow using https://app.stepsecurity.io/secureworkflow/augmentable-dev/reqlite/test.yaml/main?enable=pin","Info:   0 out of   2 GitHub-owned GitHubAction dependencies pinned","Info:   0 out of   1 third-party GitHubAction dependencies pinned"],"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: MIT License: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":-1,"reason":"internal error: error during branchesHandler.setup: internal error: githubv4.Query: Resource not accessible by integration","details":null,"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 27 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}}]},"last_synced_at":"2025-08-17T01:42:12.061Z","repository_id":48571824,"created_at":"2025-08-17T01:42:12.061Z","updated_at":"2025-08-17T01:42:12.061Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28424524,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-14T15:24:48.085Z","status":"ssl_error","status_checked_at":"2026-01-14T15:23:41.940Z","response_time":107,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6: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":[],"created_at":"2024-08-04T04:01:29.535Z","updated_at":"2026-01-14T15:43:58.910Z","avatar_url":"https://github.com/augmentable-dev.png","language":"Go","funding_links":[],"categories":["Go"],"sub_categories":[],"readme":"[![BuildStatus](https://github.com/augmentable-dev/reqlite/workflows/tests/badge.svg)](https://github.com/augmentable-dev/reqlite/actions?workflow=tests)\n[![Go Report Card](https://goreportcard.com/badge/github.com/augmentable-dev/reqlite)](https://goreportcard.com/report/github.com/augmentable-dev/reqlite)\n[![codecov](https://codecov.io/gh/augmentable-dev/reqlite/branch/main/graph/badge.svg?token=X4QW63N9ZN)](https://codecov.io/gh/augmentable-dev/reqlite)\n# reqlite\n\n`reqlite` makes it possible to query data in [Redis](https://redis.io/) with [SQL](https://sqlite.org/lang.html).\nQueries are executed client-side with SQLite (not on the redis server).\nThis project is distributed as a SQLite [run-time loadable extension](https://www.sqlite.org/loadext.html) and (soon) as a standalone binary (CLI).\n\nThis project is experimental for the time being.\nIt's made possible by a [great library for building SQLite extensions in go](https://github.com/riyaz-ali/sqlite).\n\nThe [JSON1 extension](https://www.sqlite.org/json1.html) is also included by default as a convenience.\n\n\u003cp align=\"center\"\u003e\n    \u003cimg src=\"./diagram.png?raw=true\"\u003e\n\u003c/p\u003e\n\n## Use Cases\n\nWhat can or should I use this for?\nThis project is pretty experimental and part of that is exploring use-cases to understand what's possible and interesting!\n\nA common situation is a [task queue](https://redislabs.com/ebook/part-2-core-concepts/chapter-6-application-components-in-redis/6-4-task-queues/) in Redis.\nIf you're [using a `LIST`](https://redislabs.com/ebook/part-2-core-concepts/chapter-6-application-components-in-redis/6-4-task-queues/6-4-1-first-in-first-out-queues/) as a queue holding JSON objects, `reqlite` + the SQLite json1 extension could be used to issue basic \"slicing and dicing\" queries against your task queue.\n\n```sql\n-- what are the most common tasks currently in the queue?\nSELECT count(*), json_extract(value, '$.task') as task\nFROM LRANGE('my-queue', 0, 100)\nGROUP BY task\nORDER BY count(*) DESC\n```\n\nIn general, Redis is fairly accessible from [many programming languages](https://redis.io/clients), and any query using `reqlite` could probably be implemented in a language of your choice using a Redis client.\nHowever, sometimes declarative SQL can be a better choice to express what you're looking for, and that's where this project may be most useful.\nSince `reqlite` is distributed as a run-time loadable SQLite extension, it can be loaded into a language using a SQLite driver as well, which would allow you to mix SQL and the \"host\" language to access data in Redis.\n\n## Getting Started\n\nTo build a run-time loadable extension, run `make` in the root of the source tree.\nThe `reqlite.so` file should be in `.build/reqlite.so`, which you can use immediately in a [SQLite shell](https://sqlite.org/cli.html):\n\n```sql\nsqlite3\nsqlite\u003e .load .build/reqlite.so\nsqlite\u003e SELECT * FROM LRANGE('some-key', 0, 10);\n```\n\n### Connecting to Redis\n\nCurrently, the Redis connection can only be set via the following `env` variables:\n\n| ENV          | Default          | Description                           |\n|--------------|------------------|---------------------------------------|\n| REQLITE_NET  | `tcp`            | Network type - either `tcp` or `udp`  |\n| REQLITE_ADDR | `localhost:6379` | Network address of the redis instance |\n| REQLITE_USER | (none)           | Redis username                        |\n| REQLITE_PASS | (none)           | Redis password                        |\n\nTODO - Implement another mechanism (SQLite UDFs?) for setting up the connection information.\n\n## Commands\n\nCurrently, only read operations are targeted to be implemented as SQLite [scalar functions](https://www.sqlite.org/appfunc.html) or [table-valued functions](https://www.sqlite.org/vtab.html#tabfunc2).\nIn the examples below, you'll see how a SQLite scalar or table-valued function maps to a corresponding [Redis command](https://redis.io/commands), based on the response type.\nNote that there won't always be an exact correspondence, and currently not all Redis commands are targeted to be implemented (read-only for now).\n\n```sql\nSELECT * FROM some_table_valued_function('param', 1, 2) -- function that returns a table\nSELECT some_scalar_function('param', 1, 2) -- function that returns a scalar value\n```\n\nAvailable functions are listed below.\nFor a full list of Redis commands and corresponding SQLite functions, [see here](https://github.com/augmentable-dev/reqlite/tree/main/commands.md).\n\n### LRANGE\n\n```sql\nSELECT * FROM LRANGE('some-key', 0, 10)\n```\n\n### HGETALL\n\n```sql\nSELECT * FROM HGETALL('myhash')\n```\n\n### DUMP\n\n```sql\nSELECT DUMP('some-key');\n\n### BITCOUNT\n\n```sql\nSELECT BITCOUNT('some-key')\nSELECT BITCOUNT('some-key', 1, 1)\n```\n\n### BITPOS\n\n```sql\nSELECT BITPOS('some-key', 0)\nSELECT BITPOS('some-key', 1, 2)\n```\n\n### CLIENT GETNAME\n\n```sql\nSELECT CLIENT_GETNAME()\n```\n\n### CLIENT ID\n\n```sql\nSELECT CLIENT_ID()\n```\n\n\n\n### CLIENT LIST\n\n```sql\nSELECT CLIENT_LIST()\n```\n\n### CONFIG GET\n\n```sql\nSELECT * FROM CONFIG_GET('*max-*-entries*')\nSELECT * FROM CONFIG_GET -- equivalent to CONFIG GET *\n```\n\n### CLUSTER COUNT-FAILURE-REPORTS\n\n```sql\nSELECT CLUSTER_COUNT_FAILURE_REPORTS('some-node-id')\n```\n\n### CLUSTER_COUNTKEYSINSLOT\n\n```sql\nSELECT CLUSTER_COUNTKEYSINSLOT('some-key-id')\n```\n\n### DBSIZE\n\n```sql\nSELECT DBSIZE()\n```\n\n### GET\n\n```sql\nSELECT GET('some-key')\n```\n\n### ECHO\n\n```sql\nSELECT ECHO('some-string')\n```\n\n### LLEN\n\n```sql\nSELECT LLEN('some-list')\n```\n\n### RedisJSON ([link](https://oss.redislabs.com/redisjson/))\n\n#### JSON_GET\n\n```sql\nSELECT JSON_GET('my-json-key')\nSELECT JSON_GET('my-json-key', 'some.path[2]')\n```\n\n#### JSON_MGET\n\n```sql\nSELECT * FROM JSON_MGET('some.path', 'key1,key2,key3')\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faugmentable-dev%2Freqlite","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Faugmentable-dev%2Freqlite","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faugmentable-dev%2Freqlite/lists"}