chaisql/chai
chaisql/chai has 1,708 GitHub stars and 101 forks. GitHot measured -1 in 7 days. Last checked 2026-11-10 01:10 UTC. Last push 2026-10-20.
Modern embedded SQL database
What you can do
- Postgres-like SQL – the syntax you already know, embedded in your Go app.
- Pure Go – no CGO or external dependencies.
- Flexible Storage – keep data on disk or run fully in-memory.
- Built on Pebble – powered by CockroachDB’s Pebble engine.
측정된 스타 증가
- in 24h
- 업데이트 지연
- in 7 days
- -1
- in 15 days
- 업데이트 지연
- in 1 month
- 업데이트 지연
서로 겹치는 기간의 순증가량이며 일별 합계가 아닙니다. 측정값이 없으면 비워 둡니다. 스타는 관심도를 나타내며 품질을 보장하지 않습니다.
README.md
OriginalChaiSQL
ChaiSQL is a modern embedded SQL database, written in pure Go, with a PostgreSQL-inspired API. It’s designed for developers who want the familiarity of Postgres with the simplicity of an embedded database.
✨ Highlights
- Postgres-like SQL – the syntax you already know, embedded in your Go app.
- Pure Go – no CGO or external dependencies.
- Flexible Storage – keep data on disk or run fully in-memory.
- Built on Pebble – powered by CockroachDB’s Pebble engine.
🔎 Current Capabilities
ChaiSQL already supports a useful core of SQL features, including:
- Creating and dropping tables & indexes (with composite indexes)
- Inserting, updating, deleting rows
- Basic SELECT queries with filtering, ordering, grouping
- DISTINCT, UNION / UNION ALL
👉 Joins and many advanced features are not implemented yet. The goal is steady growth toward broader PostgreSQL compatibility, but today ChaiSQL is best suited for simpler schemas and embedded use cases.
🗺 Roadmap
ChaiSQL is still in active development and not production-ready. Planned milestones include:
- Finalize stable on-disk storage format (90% complete)
- Broader SQL-92 coverage
- Drivers for other languages (JS/TS, Python, …)
- RocksDB backend support
- Compatibility with PostgreSQL drivers/ORMs
Installation
Install the ChaiSQL driver and CLI:
go install github.com/chaisql/chai@latest
go install github.com/chaisql/chai/cmd/chai@latest
Quickstart
Here’s a simple Go example that creates a table, inserts rows, and queries them:
package main
import (
"database/sql"
"fmt"
"log"
_ "github.com/chaisql/chai"
)
func main() {
// Open an on-disk database called "mydb"
db, err := sql.Open("chai", "mydb")
if err != nil {
log.Fatal(err)
}
defer db.Close()
// Create schema
_, err = db.Exec(`
CREATE TABLE users (
id INTEGER PRIMARY KEY,
name TEXT NOT NULL UNIQUE,
email TEXT NOT NULL,
age INT NOT NULL,
created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP
);
`)
if err != nil {
log.Fatal(err)
}
// Insert some data
_, err = db.Exec(`
INSERT INTO users (id, name, email, age)
VALUES
(1, 'Alice', '[email protected]', 30),
(2, 'Bob', '[email protected]', 25),
(3, 'Carol', '[email protected]', 40);
`)
if err != nil {
log.Fatal(err)
}
// Query active adults
rows, err := db.Query(`
SELECT id, name, email, age
FROM users
WHERE age >= 18
ORDER BY age DESC
`)
if err != nil {
log.Fatal(err)
}
defer rows.Close()
for rows.Next() {
var id, age int
var name, email string
if err := rows.Scan(&id, &name, &email, &age); err != nil {
log.Fatal(err)
}
fmt.Printf("User %d: %s (%s), %d years old\n", id, name, email, age)
}
}
In-memory Database
For ephemeral databases, just use :memory::
db, err := sql.Open("chai", ":memory:")
Chai shell
The chai command-line tool provides an interactive SQL shell:
# In-memory database:
chai
# Disk-based database:
chai dirName
Contributing
Contributions are welcome!
A big thanks to our contributors!
Made with contrib.rocks.
For any questions or discussions, open an issue.
❓ FAQ
Why not just use SQLite?
SQLite is fantastic, but it has its own SQL dialect. ChaiSQL is designed for PostgreSQL compatibility, so it feels familiar if you already use Postgres.
Is it production-ready?
Not yet. We’re actively building out SQL support and stability.
Can I use existing Postgres tools?
Not 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.
관련 프로젝트 살펴보기
Asabeneh/30-Days-Of-Python
30 Days of Python 프로그래밍 챌린지는 Python 프로그래밍 언어를 30일 동안 배우기 위한 단계별 가이드입니다. 이 챌린지는 100일 이상 걸릴 수 있습니다. 자신의 속도에 맞춰 진행하세요. 다음 동영상도 도움이 될 수 있습니다: https://www.youtube.com/channel/UC7PNRuno1rzYPb1xLa4yktw
78,560 스타grafana/grafana
개방적이고 조합 가능한 옵저버빌리티 및 데이터 시각화 플랫폼입니다. Prometheus, Loki, Elasticsearch, InfluxDB, Postgres 등 여러 소스의 메트릭, 로그, 트레이스를 시각화합니다.
77,830 스타redis/redis
실시간 데이터 기반 애플리케이션을 구축하는 개발자에게 Redis는 가장 선호되고, 가장 빠르며, 기능이 가장 풍부한 캐시, 데이터 구조 서버이자 문서 및 벡터 쿼리 엔진입니다.
77,395 스타apache/superset
Apache Superset는 데이터 시각화 및 데이터 탐색 플랫폼입니다.
75,473 스타