horaedb
horaedb copied to clipboard
Support create/drop database
Describe This Problem
In current implementation, there is only one database(called schema
in src), we should support database creation to allow one server holding multiple databases.
Proposal
Support those SQL
create database NAME;
drop database NAME;
As for distributed deployment, ceresmeta need to distribute newly-created database to all servers.
Additional Context
For distributed mode, the default database is created when server start up, it should first communicate with ceresmeta to check whether this database is already existing.
https://github.com/CeresDB/ceresmeta/issues/136
Hi, is it done? any documentation for it? how to implement it?
//->#go-sdk
client, err := ceresdb.NewClient(endpoint, ceresdb.Direct)
if err != nil {
return err
}
resp, err := client.SQLQuery(context.Background(), ceresdb.SQLQueryRequest{
Tables: []string{},
SQL: "create database NAME;",
})
is it correct? i got this error with those script:
err: add request ctx: no database selected, you can use database in client initial options or WriteRequest/SqlQueryRequest
Hi, this feature hasn't got implemented yet.