Open luiskhernandez opened 4 days ago
As a workaround I'm excluding those types
def build_types_hash
connection_class = defined?(::ResourceRecord) ? ::ResourceRecord : ActiveRecord::Base
type_map = connection_class.connection.send(:type_map)
array = type_map.instance_variable_get(:@mapping)
strings_to_filter = [
'geography',
'geometry',
'geometry_collection',
'line_string',
'multi_line_string',
'multi_point',
'multi_polygon',
'st_point',
'st_polygon'
]
filtered_array = array.reject { |string, _proc| strings_to_filter.include?(string) }
filtered_array.map do |name, type|
next unless name.is_a?(String)
[type.call.class.to_s, name]
end.compact.to_h
end
But not sure if they could be added here?
UNIFIED_TYPES = {
'smallint' => 'integer',
'int' => 'integer',
'int4' => 'integer',
'int8' => 'integer',
'int16' => 'integer',
'bigint' => 'integer',
'numeric' => 'float',
'decimal' => 'float',
'float4' => 'float',
'bpchar' => 'string',
'float8' => 'float',
'float16' => 'float',
'text' => 'string',
'citext' => 'string',
'jsonb' => 'json',
'bool' => 'boolean',
'timestamp' => 'datetime',
'timestamptz' => 'datetime'
}.freeze
Hi, I'm working on a project that uses PostgreSQL with the PostGIS extension. After enabling this extension, I encounter an error whenever I try to create a query or dashboard, even for queries on tables that do not contain PostGIS data.