{"id":36853960,"url":"https://github.com/xiaobogaga/minidb","last_synced_at":"2026-01-12T14:41:42.942Z","repository":{"id":57568580,"uuid":"214447860","full_name":"xiaobogaga/minidb","owner":"xiaobogaga","description":"a simple in-memory database built for fun","archived":false,"fork":false,"pushed_at":"2021-11-28T07:55:03.000Z","size":13276,"stargazers_count":6,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-06-20T07:58:52.922Z","etag":null,"topics":["database","sql"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/xiaobogaga.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-10-11T13:47:15.000Z","updated_at":"2024-06-20T07:58:52.923Z","dependencies_parsed_at":"2022-08-28T08:20:15.273Z","dependency_job_id":null,"html_url":"https://github.com/xiaobogaga/minidb","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/xiaobogaga/minidb","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xiaobogaga%2Fminidb","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xiaobogaga%2Fminidb/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xiaobogaga%2Fminidb/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xiaobogaga%2Fminidb/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/xiaobogaga","download_url":"https://codeload.github.com/xiaobogaga/minidb/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xiaobogaga%2Fminidb/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28340403,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-12T12:22:26.515Z","status":"ssl_error","status_checked_at":"2026-01-12T12:22:10.856Z","response_time":98,"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":["database","sql"],"created_at":"2026-01-12T14:41:42.851Z","updated_at":"2026-01-12T14:41:42.917Z","avatar_url":"https://github.com/xiaobogaga.png","language":"Go","readme":"# minidb\n\nA in-memory \"database\" can support basic sql processing.\n\nTable of Contents\n=================\n\n* [minidb](#minidb)\n  * [usage](#usage)\n  * [The supported statements](#the-supported-statements)\n    * [create:](#create)\n    * [drop](#drop)\n    * [rename](#rename)\n    * [truncate](#truncate)\n    * [insert](#insert)\n    * [delete](#delete)\n    * [update](#update)\n    * [select](#select)\n\n## usage\n\n* Install\n\n```shell script\ngo get -u github.com/xiaobogaga/minidb\ngo install github.com/xiaobogaga/minidb/minidb\n```\nyou can find minidb in **$GOPATH/bin/** \n\n* Startup minidb\n\n```shell script\nminidb -d\n```\n\n* minidb queries\n\n```shell script\nminidb\u003e show databases;\n+-----------+\n+ databases +\n+-----------+\n+       db1 +\n+       db2 +\n+-----------+\nserver:  OK\nminidb\u003e use db1;\nserver:  OK\nminidb\u003e show tables;\n+--------+\n+ tables +\n+--------+\n+  test1 +\n+  test2 +\n+--------+\nserver:  OK\nminidb\u003e select id, name, age from test1 where age \u003e 0 order by age limit 3;\n+----+--------------+------+\n+ id +         name +  age +\n+----+--------------+------+\n+  8 + val!u@pu(g13 + 1.28 +\n+  6 +            v + 3.28 +\n+  2 +         v\u003c%# + 3.86 +\n+----+--------------+------+\nserver:  OK. no more data\nminidb\u003e select test1.id as id1, test2.id as id2, test1.name, test2.name from test1 left join test2 on test1.id = test2.id order by test1.age limit 10;\n+-----+-----+---------------------+--------------------+\n+ id1 + id2 +                name +               name +\n+-----+-----+---------------------+--------------------+\n+  11 +  11 +                   v +          vb0ulbcyv +\n+  12 +  12 +    vxit0zoh;4\u003c)0%1# +      v(30;^08s8c#k +\n+  14 +  14 + v(%!#v35s~l)cc(vv8b +           v{\u003co)s8} +\n+   9 +   9 +   vm4)$5i)4{~60i7d2 +   vq3\u003eu~t7;s0\u0026e)cj +\n+   0 +   0 +               vjnr# +        v%4k~i\u003e}nf\u0026 +\n+   5 +   5 +             v8kgc}2 +    v74zp^0foxsdt)x +\n+   4 +   4 +            v@y\u003cnhp% +     vbb\u003e2{{sh(1w2v +\n+   8 +   8 +        val!u@pu(g13 +               v\u003c%x +\n+   6 +   6 +                   v +             v3!xju +\n+   2 +   2 +                v\u003c%# + vm\u003ez*4e8jg6)tj237j +\n+-----+-----+---------------------+--------------------+\nserver:  OK. no more data\nminidb\u003e select sex, count(id), sum(age) from test1 group by sex;\n+-----+-----------+----------+\n+ sex + COUNT(id) + SUM(age) +\n+-----+-----------+----------+\n+   0 +         8 + -7716.00 +\n+   1 +         8 +  -324.00 +\n+-----+-----------+----------+\nserver:  OK. no more data\n```\n\nor without `-d` to start with empty databases.\n\n## The supported statements\n\nminidb supports a set of sql statements:\n\n### create:\n\n* `create table [if not exist] tb_name2 (\n    Column_Def...\n    ) [engine=value] [[character set = value] | [collate = value]];`\n\n* `create {database|schema} [if not exist] database_name [[character set = value] | [collate = value]];`\n\n### drop\n\n* `drop {database | schema} [if exists] db_name;`\n* `drop table [if exists] tb_name[,tb_name...];`\n\n### rename\n\n* `rename table {tb1 To tb2...};`\n\n### truncate\n\n* `truncate [table] tb_name;`\n\n### insert\n\n* `insert into tb_name [( col_name... )] values (expression...);`\n\n### delete\n\n* `delete from tb_name [whereStm] [OrderByStm] [LimitStm];`\n* `delete tb1,... from table_references [WhereStm];`\n\n### update\n\n* `update table_reference set assignments... [WhereStm] [OrderByStm] [LimitStm];`\n* `update table_reference... set assignments... [WhereStm];`\n\n### select\n\n* `select select_expression... from table_reference... [WhereStm] [GroupByStm] [HavingStm] [OrderByStm] [LimitStm]`\n\nwhere table_reference can be a single table or a table join another table(like inner join, left join, right join)","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fxiaobogaga%2Fminidb","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fxiaobogaga%2Fminidb","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fxiaobogaga%2Fminidb/lists"}