Skip to content

hydrolix/clickhouse-sql-parser

 
 

Repository files navigation

clickhouse-sql-parser

A Go library for parsing ClickHouse SQL statements.

🛠️ This is a maintained fork of AfterShip/clickhouse-sql-parser, with improvements and customizations by Hydrolix.

✨ Features

  • Converts ClickHouse SQL into an abstract syntax tree (AST)
  • Lightweight and easy to embed in Go applications

📦 How to use

You can use it as your Go library

go get github.com/hydrolix/clickhouse-sql-parser@latest
import "github.com/hydrolix/clickhouse-sql-parser/parser"

input := "SELECT count() FROM events"

ast, err := parser.Parse(input)
if err != nil {
log.Fatalf("parse error: %v", err)
}

// Use AST...

📄 License

Licensed under the MIT License, same as the original project.

🙏 Credits

Originally created by AfterShip. Forked and maintained by Hydrolix.

About

ClickHouse SQL Parser writing in Go

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Go 99.9%
  • Makefile 0.1%