struct Clickhouse::Response
- Clickhouse::Response
- Struct
- Value
- Object
Included Modules
- Enumerable(Array(Array(Float32) | Array(Float64) | Array(Int16) | Array(Int32) | Array(Int64) | Array(Int8) | Array(String) | Array(Time) | Array(UInt16) | Array(UInt32) | Array(UInt64) | Array(UInt8) | Float32 | Float64 | Int16 | Int32 | Int64 | Int8 | String | Time | UInt16 | UInt32 | UInt64 | UInt8 | Nil))
Defined in:
clickhouse/response.cr:1clickhouse/response.cr:9
Constructors
Instance Method Summary
- #body(*args, **options)
- #body(*args, **options, &)
- #clone
- #copy_with(uri _uri = @uri, req _req = @req, http _http = @http, time _time = @time)
- #data : Array(Array(JSON::Any))
- #data(*args, **options)
- #data(*args, **options, &)
- #data=(v : Array(Array(JSON::Any))) : Array(Array(JSON::Any))
-
#data=(v : Nil)
nil
assignments are always ignored - #data? : Array(Array(JSON::Any)) | Nil
-
#each(&)
define 'each' directly since 'delegate' fails
-
#each_hash(&)
TODO optimize
- #http : HTTP::Client::Response
-
#map(*types : *T) forall T
crystal 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(**types : **T) forall T
crystal 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"]]
-
#map_nil(*types : *T) forall T
crystal 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_nil(**types : **T) forall T
crystal 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)
- #meta(*args, **options, &)
- #parsed : JSONCompactParser
- #parsed=(v : JSONCompactParser) : JSONCompactParser
-
#parsed=(v : Nil)
nil
assignments are always ignored - #parsed? : JSONCompactParser | Nil
-
#records : Array(Record)
crystal 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 : Request | InsertRequest
- #rows(*args, **options)
- #rows(*args, **options, &)
- #scalar(*args, **options)
- #scalar(*args, **options, &)
- #statistics(*args, **options)
- #statistics(*args, **options, &)
- #status_code(*args, **options)
- #status_code(*args, **options, &)
- #success! : Response
- #success? : Response | Nil
- #time : Time::Span
- #to_json : String
- #uri : URI
Constructor Detail
Instance Method Detail
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]
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"]]
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]
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"]]
res = execute <<-SQL
SELECT engine, count(*)
FROM system.tables
GROUP BY engine
SQL
records = res.success!.records
records.each do |hash|
p hash["engine"]