Skip to content
This repository has been archived by the owner on Dec 23, 2023. It is now read-only.

Latest commit

 

History

History
39 lines (29 loc) · 1.01 KB

README.md

File metadata and controls

39 lines (29 loc) · 1.01 KB

chDB-go

chdb-go

chDB go bindings for fun and hacking.

Status

  • experimental, unstable, subject to changes
  • requires libchdb on the system
  • requires CGO

Example

package main

import (
    "fmt"
    "github.com/chdb-io/chdb-go/chdb"
)

func main() {
    // Stateless Query (ephemeral)
    result := chdb.Query("SELECT version()", "CSV")
    fmt.Println(result)

    // Stateful Query (persistent)
    chdb.Session("CREATE FUNCTION IF NOT EXISTS hello AS () -> 'chDB'", "CSV", "/tmp")
    hello := chdb.Session("SELECT hello()", "CSV", "/tmp")
    fmt.Println(hello)
}

👋 C/GO developer? Jump in and help us evolve this prototype into a stable module!