OpenGen / GenSQL.query

40 stars 5 forks source link

fix: Don't assume attributes are keywords when outputting CSVs #117

Closed zane closed 3 months ago

zane commented 3 months ago

What does this do?

Changes the logic that handles writing CSVs such that it no longer assumes that relation attributes are keywords.

Why should we do this?

Currently when you try to output to CSV from the command-line you get an error about a string being used as a function.

Execution error (ClassCastException) at gensql.query.main/print-csv (main.clj:XX).
class java.lang.String cannot be cast to class clojure.lang.IFn (java.lang.String is in module java.base of loader 'bootstrap'; clojure.lang.IFn is in unnamed module of loader 'app')

This is due to the use of juxt on line XX. Since attributes are no longer keywords juxt cannot call them as functions.

codecov[bot] commented 3 months ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 76.61%. Comparing base (32adb67) to head (42c4b52).

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #117 +/- ## ========================================== + Coverage 75.89% 76.61% +0.72% ========================================== Files 30 30 Lines 1535 1531 -4 Branches 64 64 ========================================== + Hits 1165 1173 +8 + Misses 306 294 -12 Partials 64 64 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.