{"id":26255543,"url":"https://github.com/vegarsti/sql","last_synced_at":"2025-04-28T12:20:45.386Z","repository":{"id":46087652,"uuid":"386739989","full_name":"vegarsti/sql","owner":"vegarsti","description":"a SQL interpreter","archived":false,"fork":false,"pushed_at":"2021-11-26T20:04:16.000Z","size":253,"stargazers_count":10,"open_issues_count":10,"forks_count":1,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-04-25T05:54:00.676Z","etag":null,"topics":["db","dbms","go","golang","interpreter","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/vegarsti.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":"2021-07-16T19:12:55.000Z","updated_at":"2024-11-22T17:46:08.000Z","dependencies_parsed_at":"2022-08-30T21:22:08.175Z","dependency_job_id":null,"html_url":"https://github.com/vegarsti/sql","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vegarsti%2Fsql","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vegarsti%2Fsql/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vegarsti%2Fsql/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vegarsti%2Fsql/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/vegarsti","download_url":"https://codeload.github.com/vegarsti/sql/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251311338,"owners_count":21569010,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":["db","dbms","go","golang","interpreter","sql"],"created_at":"2025-03-13T19:19:34.829Z","updated_at":"2025-04-28T12:20:45.368Z","avatar_url":"https://github.com/vegarsti.png","language":"Go","readme":"# sql\n\n\u003ca href=\"https://github.com/vegarsti/sql/actions\"\u003e\u003cimg src=\"https://github.com/vegarsti/sql/workflows/test/badge.svg\" alt=\"Build Status\"\u003e\u003c/a\u003e\n\n[![Go Report Card](https://goreportcard.com/badge/github.com/vegarsti/sql)](https://goreportcard.com/report/github.com/vegarsti/sql)\n\nThe interpreter can be run interactively.\n\n```\n$ go run cmd/sql/main.go\n\u003e\u003e create table programming_languages (name text, first_appeared integer);\nOK\n\u003e\u003e insert into programming_languages values ('C', 1972), ('Python', 1990), ('Lisp', 1958), ('Go', 2009)\nOK\n\u003e\u003e select name, first_appeared from programming_languages where first_appeared \u003c 2000 order by first_appeared\nname     first_appeared\n'Lisp'   1958\n'C'      1972\n'Python' 1990\n\u003e\u003e select 1, 3.14 as pi, '✅' as emoji, 'Vegard' as name\n1 pi       emoji name\n1 3.140000 '✅'   'Vegard'\n\u003e\u003e create table squares (number int, square int)\nOK\n\u003e\u003e insert into squares values (1, 1), (2, 2^2), (3, 3^2)\nOK\n\u003e\u003e create table cubes (number int, cube int)\nOK\n\u003e\u003e insert into cubes values (1, 1), (2, 2^3), (3, 3^3)\nOK\n\u003e\u003e select s.number, square, cube from squares s join cubes c on s.number = c.number\nnumber square cube\n1      1      1\n2      4      8\n3      9      27\n```\n\nThe interpreter also supports running against standard input.\n\n```\n$ cat example.sql | go run cmd/sql/main.go\nname     first_appeared\n'C'      1972\n'Python' 1990\n'Lisp'   1958\n'Go'     2009\n```\n\nBased on Thorsten Ball's excellent [Writing an Interpreter in Go](https://interpreterbook.com/).\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvegarsti%2Fsql","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fvegarsti%2Fsql","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvegarsti%2Fsql/lists"}