Closed vladfaust closed 6 years ago
Hello,
require "db" require "pg" db = DB.open(ENV["DATABASE_URL"]) db.query("SELECT '{1,2}'") do |rs| values = rs.read(PG::Int16Array) end
in lib/pg/src/pg/result_set.cr:98: undefined constant T def read(t : Array(T)?.class) : Array(T)? forall T ^
I suppose the issue is in this recursive alias:
https://github.com/will/crystal-pg/blob/cafeb945be2003dd2d9b25620d693e4eab420e85/src/pg/decoders/array_decoder.cr#L108
/cc @will @asterite
Ah, so noone should read raw PG::{Type}Array. read(Array(Int16)) works as expected.
PG::{Type}Array
read(Array(Int16))
Hello,
I suppose the issue is in this recursive alias:
https://github.com/will/crystal-pg/blob/cafeb945be2003dd2d9b25620d693e4eab420e85/src/pg/decoders/array_decoder.cr#L108
/cc @will @asterite