Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

馃殌 [Feature]: ClickHouse Implementation #1204

Open
3 tasks done
mirusky opened this issue Feb 6, 2024 · 8 comments
Open
3 tasks done

馃殌 [Feature]: ClickHouse Implementation #1204

mirusky opened this issue Feb 6, 2024 · 8 comments

Comments

@mirusky
Copy link

mirusky commented Feb 6, 2024

Feature Description

I'd like to use Clickhouse as storage layer and having control over the table engine being used so I could store into different places effortless.

Additional Context (optional)

No response

Code Snippet (optional)

package main

import "github.com/gofiber/storage/clickhouse"

func main() {
  store := clickhouse.New(clickhouse.Config{
	Host:      "127.0.0.1",
	Port:      9000,
	Username:  "",
	Password:  "",
	Engine: clickhouse.Memory
  })
}

Checklist:

  • I agree to follow Fiber's Code of Conduct.
  • I have checked for existing issues that describe my suggestion prior to opening this one.
  • I understand that improperly formatted feature requests may be closed without explanation.
@luk3skyw4lker
Copy link

I'll work on that!

@gaby
Copy link
Member

gaby commented Feb 28, 2024

@luk3skyw4lker Go driver is here https://github.com/ClickHouse/clickhouse-go seems the native interface is faster than the SQL one. The http one is experimental

@luk3skyw4lker
Copy link

@gaby thanks for finding it! I claimed the issue and was going to start looking for a driver now

@luk3skyw4lker
Copy link

I'm having some trouble executing the create table statement and I'm not finding any reference in their docs, so I opened an issue in the go client repository and will be waiting for an answer. Here's the issue: ClickHouse/clickhouse-go#1238

@luk3skyw4lker
Copy link

Turns out this isn't a thing in Clickhouse itself so I will have to come up with something different for this feature, I'll be working on some ideas and wil put up a PR soon

@gaby
Copy link
Member

gaby commented Mar 28, 2024

@luk3skyw4lker What was the issue?

@luk3skyw4lker
Copy link

@gaby the issue is that when creating the table inside the adapter (like all the other adapters do) you don't have a native way to safely bind a engine parameter.

@luk3skyw4lker
Copy link

I made everything work out, only missing a few docs, will send a PR this week!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants