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’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Does chdb supports orm? If supports, how to use? #213
Comments
chDB do have Python DB-API support. See https://github.com/chdb-io/chdb/blob/main/examples/dbapi.py |
seems not support, coz uri is a fundamental parameter. with uri(user:password@dbip:port/dbname), client side can connect with database server. from sqlalchemy import create_engine
# format 1, disk mode, uri = sqlite:///home/stephen/db1.db
engine = create_engine('sqlite:///home/stephen/db1.db')
# format 2, memory mode, uri = sqlite:///:memory:
engine = create_engine('sqlite:///:memory:')
session = sessionmaker(bind=engine)() if chdb wants to support sqlalchemy, first need to negotiate one recognized uri, for example chdb:///:memory: |
@auxten I also ask sqlalchemy for this question ^_^ |
Thank you! I will look into this tomorrow. BTW, are you interested to contribute this for chDB?😉 |
Yes, I am interested😊, but I am not familar with lower level logics of sqlalchemy dialect. |
Use orm, we doesn't need to write raw sql to do crud operation, instead of using sqlalchemy package to deal with database.
Usually, with one orm class to map one database table. for example as below:
chdb is a superb package, very useful for testing and debug👍👍👍
But all code related with clickhouse uses orm in my softwore project, so I want to whether chdb supports orm?
uri is a very important parameter.
If supports, how to set uri? something like "clickhouse+chdb://xxx"?
The text was updated successfully, but these errors were encountered: