Skip to content

Improve robustness of CrateAdapter::columns method #24

Description

@amotl

def columns(table_name) #:nodoc:
cols = @connection.table_structure(table_name).map do |field|
name = dotted_name(field[2])
CrateColumn.new(name, nil, field[4], nil)
end
cols
end

This feels a bit fishy, see also CrateRuby::Client::table_structure, where select * from information_schema.columns is used, which, when used in combination, is prone to break sooner than later.

Originally posted by @amotl in #16 (comment)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions