Clickhouse::Response
Inherits Enumerable / Struct / Value / Object
Constructors
new(uri : URI, req : Request, http : HTTP::Client::Response, time : Time::Span)
SourceInstance methods
body(*args, **options)
Sourcebody(*args, **options, &)
Sourceclone
Sourcecopy_with(uri _uri = @uri, req _req = @req, http _http = @http, time _time = @time)
Sourcedata
data(*args, **options)
Sourcedata(*args, **options, &)
Sourcedata=(v : Array(Array(JSON::Any))) : Array(Array(JSON::Any))
data=(v : Nil)
nil assignments are always ignored
data?
http
map(*types : *T) forall T
res = execute <<-SQL
SELECT engine, count(*)
FROM system.tables
GROUP BY engine
SQL
records = res.success!.map(String, UInt64)
records.each do |(name, cnt)|
p [name, cnt]
map
res = execute <<-SQL
SELECT engine, count(*)
FROM system.tables
GROUP BY engine
SQL
records = res.success!.map(name: String, cnt: UInt64)
records.each do |record|
p [record["name"], record["cnt"]]
meta(*args, **options)
Sourcemeta(*args, **options, &)
Sourceparsed
parsed=(v : JSONCompactParser) : JSONCompactParser
parsed=(v : Nil)
nil assignments are always ignored
parsed?
records
res = execute <<-SQL
SELECT engine, count(*)
FROM system.tables
GROUP BY engine
SQL
records = res.success!.records
records.each do |hash|
p hash["engine"]
req
rows(*args, **options)
Sourcerows(*args, **options, &)
Sourcescalar(*args, **options)
Sourcescalar(*args, **options, &)
Sourcestatistics(*args, **options)
Sourcestatistics(*args, **options, &)
Sourcestatus_code(*args, **options)
Sourcestatus_code(*args, **options, &)
Sourcesuccess!
Sourcesuccess?
Sourcetime
to_json
Sourceuri