Skip to content

Commit

Permalink
Fixes Rails 7
Browse files Browse the repository at this point in the history
  • Loading branch information
fdeschenes committed Aug 9, 2022
1 parent fad5d4b commit e651a63
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ module AmazonTimestream
module DatabaseStatements
def execute(sql, name = nil)
log(sql, name) do
@connection.query({ query_string: sql })
@connection.query query_string: sql
end
end

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,14 @@ module ConnectionAdapters
module AmazonTimestream
module SchemaStatements
def tables(_name = nil)
response = @connection.query({ query_string: "SHOW TABLES FROM \"#{@database}\"" })
response = @connection.query query_string: "SHOW TABLES FROM \"#{@database}\""
response.rows.map { |r| r.data[0].scalar_value }
end

def columns(table_name, _name = nil)
response = @connection.query({ query_string: "DESCRIBE \"#{@database}\".\"#{table_name}\"" })
response = @connection.query query_string: "DESCRIBE \"#{@database}\".\"#{table_name}\""
response.rows.map do |r|
AmazonTimestreamColumn.new r.data[0].scalar_value, nil, lookup_cast_type(r.data[1].scalar_value)
AmazonTimestreamColumn.new r.data[0].scalar_value, nil, fetch_type_metadata(r.data[1].scalar_value)
end
end

Expand Down

0 comments on commit e651a63

Please sign in to comment.