Skip to content

Commit

Permalink
fix: remove eval from lib/gzr/commands/connection/dialects.rb
Browse files Browse the repository at this point in the history
  • Loading branch information
drstrangelooker committed Nov 7, 2023
1 parent e4b20b3 commit 1a45294
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions lib/gzr/commands/connection/dialects.rb
Original file line number Diff line number Diff line change
Expand Up @@ -47,11 +47,8 @@ def execute(input: $stdin, output: $stdout)
table_hash = Hash.new
fields = field_names(@options[:fields])
table_hash[:header] = data[0].keys unless @options[:plain]
expressions = fields.collect { |fn| field_expression_hash(fn) }
table_hash[:rows] = data.map do |row|
expressions.collect do |e|
eval "row#{e}"
end
field_expressions_eval(fields,row)
end
table = TTY::Table.new(table_hash)
alignments = fields.collect do |k|
Expand Down

0 comments on commit 1a45294

Please sign in to comment.