Skip to content

Commit

Permalink
Fixed error with Trilogy, non-ASCII column names, and charts - fixes #…
Browse files Browse the repository at this point in the history
  • Loading branch information
ankane committed Jan 6, 2024
1 parent ccad905 commit fd04dd0
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## 3.0.3 (unreleased)

- Fixed error with Trilogy, non-ASCII column names, and charts

## 3.0.2 (2023-11-28)

- Fixed error with SQLite and prepared statements
Expand Down
5 changes: 5 additions & 0 deletions lib/blazer/adapters/sql_adapter.rb
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,11 @@ def run_statement(statement, comment, bind_params = [])
reconnect if error.include?("PG::ConnectionBad")
end

# fix for non-ASCII column names and charts
if adapter_name == "Trilogy"
columns.map! { |k| k.dup.force_encoding(Encoding::UTF_8) }
end

[columns, rows, error]
end

Expand Down

0 comments on commit fd04dd0

Please sign in to comment.