{"id":20707583,"url":"https://github.com/theory/sqljson","last_synced_at":"2025-09-27T09:31:54.161Z","repository":{"id":246835367,"uuid":"823898879","full_name":"theory/sqljson","owner":"theory","description":"PostgreSQL-compatible SQL-standard SQL/JSON in Go","archived":false,"fork":false,"pushed_at":"2025-01-01T19:20:18.000Z","size":4327,"stargazers_count":4,"open_issues_count":5,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-01-01T20:24:28.958Z","etag":null,"topics":["json","jsonpath","postgres","sql"],"latest_commit_sha":null,"homepage":"https://pkg.go.dev/github.com/theory/sqljson/path","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/theory.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-07-04T01:00:55.000Z","updated_at":"2025-01-01T19:20:21.000Z","dependencies_parsed_at":"2024-12-20T16:29:03.771Z","dependency_job_id":"9b5f6dd1-deb2-402c-a43b-212a95efd2a8","html_url":"https://github.com/theory/sqljson","commit_stats":null,"previous_names":["theory/sqljson"],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/theory%2Fsqljson","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/theory%2Fsqljson/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/theory%2Fsqljson/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/theory%2Fsqljson/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/theory","download_url":"https://codeload.github.com/theory/sqljson/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":234424877,"owners_count":18830638,"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":["json","jsonpath","postgres","sql"],"created_at":"2024-11-17T01:26:53.246Z","updated_at":"2025-09-27T09:31:54.153Z","avatar_url":"https://github.com/theory.png","language":"Go","readme":"Go SQL/JSON\n===========\n\n[![License](https://img.shields.io/badge/License-PostgreSQL-blue.svg)](https://opensource.org/license/postgresql \"⚖️ License\")\n[![GoDoc](https://godoc.org/github.com/theory/sqljson?status.svg)](https://pkg.go.dev/github.com/theory/sqljson \"📄 Documentation\")\n[![Go Report Card](https://goreportcard.com/badge/github.com/theory/sqljson)](https://goreportcard.com/report/github.com/theory/sqljson \"🗃️ Report Card\")\n[![Build Status](https://github.com/theory/sqljson/actions/workflows/ci.yml/badge.svg)](https://github.com/theory/sqljson/actions/workflows/ci.yml \"🛠️ Build Status\")\n[![Code Coverage](https://codecov.io/gh/theory/sqljson/graph/badge.svg?token=DIFED324ZY)](https://codecov.io/gh/theory/sqljson \"📊 Code Coverage\")\n\nThe SQL/JSON package provides PostgreSQL-compatible SQL-standard SQL/JSON\nfunctionality in Go. For now that means [jsonpath](path/). An example:\n\n``` go\nfunc main() {\n    src := []byte(`{\n      \"track\": {\n        \"segments\": [\n          {\n            \"location\":   [ 47.763, 13.4034 ],\n            \"start time\": \"2018-10-14 10:05:14\",\n            \"HR\": 73\n          },\n          {\n            \"location\":   [ 47.706, 13.2635 ],\n            \"start time\": \"2018-10-14 10:39:21\",\n            \"HR\": 135\n          }\n        ]\n      }\n    }`)\n\n    // Parse the JSON.\n    var value any\n    if err := json.Unmarshal(src, \u0026value); err != nil {\n        log.Fatal(err)\n    }\n\n    // Parse the SQL-standard jsonpath query.\n    p, err := path.Parse(`$.track.segments[*] ? (@.HR \u003e 130).\"start time\"`)\n    if err != nil {\n        log.Fatal(err)\n    }\n\n    // Execute the query against the JSON.\n    items, err := p.Query(context.Background(), value)\n    if err != nil {\n        log.Fatal(err)\n    }\n\n    // Print the results.\n    fmt.Printf(\"%v\\n\", items)\n    // Output: [2018-10-14 10:39:21]\n}\n```\n\nSee the [path README](./path/README.md) for a complete description of the\nSQL/JSON path language, and the [Go doc] for usage and examples.\n\nOr take the [🛝 Playground] for a spin ([direct link for above example]).\nImplemented as a single-page stateless JavaScript and [TinyGo]-compiled [Wasm]\napp.\n\n## Copyright\n\nCopyright © 1996-2025 The PostgreSQL Global Development Group\n\nCopyright © 2024-2025 David E. Wheeler\n\n  [Go doc]: https://pkg.go.dev/github.com/theory/sqljson/path\n  [🛝 Playground]: https://theory.github.io/sqljson/playground\n  [direct link for above example]: https://theory.github.io/sqljson/playground/?p=%2524.track.segments%255B*%255D%2520%253F%2520%28%2540.HR%2520%253E%2520130%29.%2522start%2520time%2522\u0026j=%257B%250A%2520%2520%2522track%2522%253A%2520%257B%250A%2520%2520%2520%2520%2522segments%2522%253A%2520%255B%250A%2520%2520%2520%2520%2520%2520%257B%250A%2520%2520%2520%2520%2520%2520%2520%2520%2522location%2522%253A%2520%2520%2520%255B%252047.763%252C%252013.4034%2520%255D%252C%250A%2520%2520%2520%2520%2520%2520%2520%2520%2522start%2520time%2522%253A%2520%25222018-10-14%252010%253A05%253A14%2522%252C%250A%2520%2520%2520%2520%2520%2520%2520%2520%2522HR%2522%253A%252073%250A%2520%2520%2520%2520%2520%2520%257D%252C%250A%2520%2520%2520%2520%2520%2520%257B%250A%2520%2520%2520%2520%2520%2520%2520%2520%2522location%2522%253A%2520%2520%2520%255B%252047.706%252C%252013.2635%2520%255D%252C%250A%2520%2520%2520%2520%2520%2520%2520%2520%2522start%2520time%2522%253A%2520%25222018-10-14%252010%253A39%253A21%2522%252C%250A%2520%2520%2520%2520%2520%2520%2520%2520%2522HR%2522%253A%2520135%250A%2520%2520%2520%2520%2520%2520%257D%250A%2520%2520%2520%2520%255D%250A%2520%2520%257D%250A%257D\u0026a=\u0026o=1\u0026v=v0.1.0\n  [TinyGo]: https://tinygo.org\n  [Wasm]: https://webassembly.org \"WebAssembly\"\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftheory%2Fsqljson","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftheory%2Fsqljson","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftheory%2Fsqljson/lists"}