{"id":13562723,"url":"https://github.com/chaisql/chai","last_synced_at":"2025-12-15T15:05:33.043Z","repository":{"id":37003000,"uuid":"138411034","full_name":"chaisql/chai","owner":"chaisql","description":"Modern embedded SQL database","archived":false,"fork":false,"pushed_at":"2025-11-05T18:05:44.000Z","size":5683,"stargazers_count":1642,"open_issues_count":21,"forks_count":100,"subscribers_count":33,"default_branch":"main","last_synced_at":"2025-12-04T13:38:25.450Z","etag":null,"topics":["database","embedded-database","go","golang","sql"],"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/chaisql.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":".github/CONTRIBUTING.md","funding":null,"license":"LICENSE","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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2018-06-23T15:12:03.000Z","updated_at":"2025-12-03T07:42:52.000Z","dependencies_parsed_at":"2023-07-13T04:10:46.435Z","dependency_job_id":"7d067a87-c027-4b10-886f-1c5375a2641d","html_url":"https://github.com/chaisql/chai","commit_stats":{"total_commits":2033,"total_committers":33,"mean_commits":61.60606060606061,"dds":"0.15002459419576974","last_synced_commit":"0409f2bfa08d6b4ce8b63a09de8f50fecb0c82ff"},"previous_names":["asdine/genji","genjidb/genji","chaisql/chaisql"],"tags_count":62,"template":false,"template_full_name":null,"purl":"pkg:github/chaisql/chai","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chaisql%2Fchai","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chaisql%2Fchai/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chaisql%2Fchai/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chaisql%2Fchai/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/chaisql","download_url":"https://codeload.github.com/chaisql/chai/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chaisql%2Fchai/sbom","scorecard":{"id":211189,"data":{"date":"2025-08-11","repo":{"name":"github.com/chaisql/chai","commit":"0409f2bfa08d6b4ce8b63a09de8f50fecb0c82ff"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":4.1,"checks":[{"name":"Code-Review","score":0,"reason":"Found 1/30 approved changesets -- score normalized to 0","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":"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/go.yml: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":"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":"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":"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":"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/go.yml:17: update your workflow using https://app.stepsecurity.io/secureworkflow/chaisql/chai/go.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/go.yml:20: update your workflow using https://app.stepsecurity.io/secureworkflow/chaisql/chai/go.yml/main?enable=pin","Info:   0 out of   2 GitHub-owned 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":"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":"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":"Fuzzing","score":10,"reason":"project is fuzzed","details":["Info: GoBuiltInFuzzer integration found: internal/sql/parser/parser_fuzz_test.go:10"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"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":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'main'","Warn: branch protection not enabled for branch 'release-v0.15'"],"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":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 1 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"}},{"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"}}]},"last_synced_at":"2025-08-17T00:47:41.835Z","repository_id":37003000,"created_at":"2025-08-17T00:47:41.835Z","updated_at":"2025-08-17T00:47:41.835Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":27719069,"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","status":"online","status_checked_at":"2025-12-14T02:00:11.348Z","response_time":56,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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","embedded-database","go","golang","sql"],"created_at":"2024-08-01T13:01:11.615Z","updated_at":"2025-12-15T15:05:33.035Z","avatar_url":"https://github.com/chaisql.png","language":"Go","readme":"# ChaiSQL\n\nChaiSQL is a modern embedded SQL database, written in pure Go, with a PostgreSQL-inspired API.\nIt’s designed for developers who want the familiarity of Postgres with the simplicity of an embedded database.\n\n[![Build Status](https://github.com/chaisql/chai/actions/workflows/go.yml/badge.svg)](https://github.com/chaisql/chai/actions/workflows/go.yml)\n[![go.dev reference](https://img.shields.io/badge/go.dev-reference-007d9c?logo=go\u0026logoColor=white\u0026style=flat-square)](https://pkg.go.dev/github.com/chaisql/chai)\n![Status](https://img.shields.io/badge/Project%20Stage-Development-yellow)\n\n## ✨ Highlights\n\n- **Postgres-like SQL** – the syntax you already know, embedded in your Go app.\n- **Pure Go** – no CGO or external dependencies.\n- **Flexible Storage** – keep data on disk or run fully in-memory.\n- **Built on Pebble** – powered by [CockroachDB’s Pebble engine](https://github.com/cockroachdb/pebble).\n\n## 🔎 Current Capabilities\n\nChaiSQL already supports a useful core of SQL features, including:\n\n- Creating and dropping tables \u0026 indexes (with composite indexes)\n- Inserting, updating, deleting rows\n- Basic SELECT queries with filtering, ordering, grouping\n- DISTINCT, UNION / UNION ALL\n\n👉 Joins and many advanced features are not implemented yet.\nThe goal is steady growth toward broader PostgreSQL compatibility, but today ChaiSQL is best suited for _simpler schemas and embedded use cases_.\n\n## 🗺 Roadmap\n\nChaiSQL is still in active development and not production-ready. Planned milestones include:\n\n- [ ] Finalize stable on-disk storage format (90% complete)\n- [ ] Broader SQL-92 coverage\n- [ ] Drivers for other languages (JS/TS, Python, …)\n- [ ] RocksDB backend support\n- [ ] Compatibility with PostgreSQL drivers/ORMs\n\n## Installation\n\nInstall the ChaiSQL driver and CLI:\n\n```bash\ngo install github.com/chaisql/chai@latest\ngo install github.com/chaisql/chai/cmd/chai@latest\n```\n\n## Quickstart\n\nHere’s a simple Go example that creates a table, inserts rows, and queries them:\n\n```go\npackage main\n\nimport (\n    \"database/sql\"\n    \"fmt\"\n    \"log\"\n\n    _ \"github.com/chaisql/chai\"\n)\n\nfunc main() {\n    // Open an on-disk database called \"mydb\"\n    db, err := sql.Open(\"chai\", \"mydb\")\n    if err != nil {\n        log.Fatal(err)\n    }\n    defer db.Close()\n\n    // Create schema\n    _, err = db.Exec(`\n        CREATE TABLE users (\n            id          INTEGER PRIMARY KEY,\n            name        TEXT NOT NULL UNIQUE,\n            email       TEXT NOT NULL,\n            age         INT  NOT NULL,\n            created_at  TIMESTAMP DEFAULT CURRENT_TIMESTAMP\n        );\n    `)\n    if err != nil {\n        log.Fatal(err)\n    }\n\n    // Insert some data\n    _, err = db.Exec(`\n        INSERT INTO users (id, name, email, age)\n        VALUES\n            (1, 'Alice', 'alice@example.com', 30),\n            (2, 'Bob',   'bob@example.com',   25),\n            (3, 'Carol', 'carol@example.com', 40);\n    `)\n    if err != nil {\n        log.Fatal(err)\n    }\n\n    // Query active adults\n    rows, err := db.Query(`\n        SELECT id, name, email, age\n        FROM users\n        WHERE age \u003e= 18\n        ORDER BY age DESC\n    `)\n    if err != nil {\n        log.Fatal(err)\n    }\n    defer rows.Close()\n\n    for rows.Next() {\n        var id, age int\n        var name, email string\n        if err := rows.Scan(\u0026id, \u0026name, \u0026email, \u0026age); err != nil {\n            log.Fatal(err)\n        }\n        fmt.Printf(\"User %d: %s (%s), %d years old\\n\", id, name, email, age)\n    }\n}\n```\n\n### In-memory Database\n\nFor ephemeral databases, just use `:memory:`:\n\n```go\ndb, err := sql.Open(\"chai\", \":memory:\")\n```\n\n## Chai shell\n\nThe chai command-line tool provides an interactive SQL shell:\n\n```bash\n# In-memory database:\nchai\n\n# Disk-based database:\nchai dirName\n```\n\n## Contributing\n\nContributions are welcome!\n\nA big thanks to our [contributors](https://github.com/chaisql/chai/graphs/contributors)!\n\n\u003ca href=\"https://github.com/chaisql/chai/graphs/contributors\"\u003e\n  \u003cimg src=\"https://contrib.rocks/image?repo=chaisql/chai\" /\u003e\n\u003c/a\u003e\n\nMade with [contrib.rocks](https://contrib.rocks).\n\nFor any questions or discussions, open an [issue](https://github.com/chaisql/chai/issues/new).\n\n## ❓ FAQ\n\n### Why not just use SQLite?\n\nSQLite is fantastic, but it has its own SQL dialect. ChaiSQL is designed for PostgreSQL compatibility, so it feels familiar if you already use Postgres.\n\n### Is it production-ready?\n\nNot yet. We’re actively building out SQL support and stability.\n\n### Can I use existing Postgres tools?\n\nNot yet. ChaiSQL is PostgreSQL-API _inspired_, but it does not speak the Postgres wire protocol and is not compatible with psql, pg_dump, or drivers that expect a Postgres server.\n","funding_links":[],"categories":["Go"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchaisql%2Fchai","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fchaisql%2Fchai","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchaisql%2Fchai/lists"}