Class: Clickhouse::CLI
- Inherits:
-
Thor
- Object
- Thor
- Clickhouse::CLI
show all
- Defined in:
- lib/clickhouse/cli.rb,
lib/clickhouse/cli/client.rb,
lib/clickhouse/cli/server.rb,
lib/clickhouse/cli/console.rb
Defined Under Namespace
Modules: Client, Console
Classes: Server
Constant Summary
collapse
- DEFAULT_URLS =
"http://localhost:8123"
Instance Method Summary
collapse
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
#method_missing(method, *_args) ⇒ Object
41
42
43
|
# File 'lib/clickhouse/cli.rb', line 41
def method_missing(method, *_args)
raise Error, "Unrecognized command \"#{method}\". Please consult `clickhouse help`."
end
|
Instance Method Details
#console(urls = DEFAULT_URLS) ⇒ Object
20
21
22
|
# File 'lib/clickhouse/cli.rb', line 20
def console(urls = DEFAULT_URLS)
run! :console, urls, options
end
|
#server(urls = DEFAULT_URLS) ⇒ Object
12
13
14
15
16
|
# File 'lib/clickhouse/cli.rb', line 12
def server(urls = DEFAULT_URLS)
run! :server, urls, options do
Launchy.open "http://localhost:#{options[:port]}"
end
end
|