Code Monkey home page Code Monkey logo

chdb-go's People

Contributors

auxten avatar nmreadelf avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

Forkers

terryliu

chdb-go's Issues

Compiling a statically linked binary

Is it possible to have an option to compile a statically linked Go binary so there's no dependency on having libchdb.so present on the machine it's running on?
My understanding is you need to build a static library libchdb.a file instead of a dynamic library libchdb.so, I tried modifying the chdb build script to see if it was possible and ran into a linker issue which I couldn't get past.

Table system.parts does not exist

With the following program, I'm not able to query system.parts.

package main

import (
	"fmt"

	"github.com/chdb-io/chdb-go/chdb"
)

func main() {
	result, err := chdb.Query("SELECT version()", "CSV")
	if err != nil {
		fmt.Println(err)
		return
	}
	fmt.Println(result)

	session, _ := chdb.NewSession("./data")
	defer session.Close()

	q := `select * from system.parts`
	ret, err := session.Query(q)
	if err != nil {
		fmt.Println(err)
		return
	}

	fmt.Println(ret)
}

This outputs the following:

$ CGO_LDFLAGS="-L." go run .
"23.10.1.1"

Code: 60. DB::Exception: Table system.parts does not exist. (UNKNOWN_TABLE)

I am linking downloaded chdb v1.3.0. It is curious that the version is so old. It seems like system.parts was added in December 2023 based on these issues:

error handling: Query does not return error

Hi,
When creating a database or table, it does not return an error if it already exists, but it prints a debug on the terminal.
the example code:

db, err := chdb.NewSession("a") //path is option
	if err != nil {
		fmt.Println("hata", err)
		return
	}
	fmt.Print("\nburası\n")

	a := db.Query("CREATE DATABASE db")
	fmt.Println("a değeri",a)

	db.Query("USE db")

the terminal:

burası
Code: 82. DB::Exception: Database db already exists. (DATABASE_ALREADY_EXISTS)
a değeri 

Does anyone have any solution suggestions?
Thank you, happy new year

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.