Comments (4)
Hi @waynexia , I am interested in working on this, but I'll like some clarifications.
- How is this different from
--attach
? Because I see it commented out in the code here - The
repl.rs
file does the heavy lifting of parsing the texts and lines and I can also see that there is aUSE DATABASE
command. Should this also be part of this new client?
Those are the question I have for now, I will add more as I continue to go through the code.
Thanks
from greptimedb.
Hi @Lilit0x!
How is this different from --attach? Because I see it commented out in the code here
--attach
is primarily for connecting to "datanode" and for debug purposes. While this one is only a gRPC client, and can only connect to one "frontend" (in case you need, this doc explains what datanode and frontend are). This cli client
is mainly for two things:
- Provide a built-in, simple client with the binary
greptime
, so we don't need another client (likepsql
ormysql
) for some simple operations. - Provide an interactive interface for our SQL dialect. It's slightly different from pg and MySQL.
The repl.rs file does the heavy lifting of parsing the texts and lines and I can also see that there is a USE DATABASE command. Should this also be part of this new client?
We don't need to do this, at least for now. At this stage, this client only needs to support some fundamental functionalities. Others like switching database or client-side states are not on the list.
For setting up database, you can take cli export
as an example. It accept --database
from cli arg, and parses it to catalog and schema.
from greptimedb.
Thanks for expatiating, it should be pretty easy. Below is a rough outline of how I'll implement it.
-
Basic arguments:
- host
- port
- database
- user(this will come in the second stage after basic implementation)
- file(sql file to run. this will also come after basic implementation)
-
Initiate a
Client
by combining the host and port into an address (since we're using psql as a model is why I separate the host and port as different args) and create aQueryEngine
. -
Pass these to an instance of the
Repl
struct. -
Lastly, displaying the results.
from greptimedb.
Looks good. If the input file is not provided we should start an interactive prompt interface like before.
from greptimedb.
Related Issues (20)
- Supports InfluxQL
- Execute `create database` in procedure HOT 5
- Enable `LeaderCachedKvStore` for meta server
- Correct the behaviors in KvBackend implements
- Add tests for `KvBackend` trait implements
- "created_on" in table info is set to UTC time 0
- create_or_open should always set writable flag HOT 2
- Enhance sqlness harness to accept a connection string
- Remove `InactiveRegionManager`
- Add more sqlness case for special characters in identifier
- Introduce the Readonly flag in `TableRouteValue` HOT 1
- Refactor heartbeat to contains region role
- Remove redundant `try_flush` invoking HOT 1
- Avoid buffering all rows for the same primary key in merge reader
- S3 EntityTooSmall error in flush/compaction HOT 5
- Support `trunc` function for python script
- Offer an HTTP service for query table metadata
- Reduce the `PAGE_SIZE` if the response size reaches limitation of grpc message
- Support Decimal128 type for datatype system HOT 4
- Tracking issue for Region Migration
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from greptimedb.