Giter Club home page Giter Club logo

Comments (4)

borkdude avatar borkdude commented on May 25, 2024

It seems honey.sql stumbles over the metadata which seems to be added by rewrite-clj?

"^{:end-row 8, :end-column 54, :column 1, :line 17, :col 1, :clojure.core/eval-file \"/Users/borkdude/dev/clerk-table-stats/notebooks/table_stats.clj\", :end-line 24, :end-col 54, :row 1} (^{:row 1, :col 2, :end-row 1, :end-col 5} def ^{:row 1, :col 6, :end-row 1, :end-col 19} query-results ^{:row 2, :col 3, :end-row 8, :end-col 53} (^{:row 2, :col 4, :end-row 2, :end-col 7} let ^{:row 2, :col 8, :end-row 3, :end-col 74} [^{:row 2, :col 9, :end-row 2, :end-col 16} _run-at #inst \"2021-05-20T08:28:29.445-00:00\" ^{:row 3, :col 9, :end-row 3, :end-col 11} ds ^{:row 3, :col 12, :end-row 3, :end-col 73} (^{:row 3, :col 13, :end-row 3, :end-col 32} jdbc/get-datasource ^{:row 3, :col 33, :end-row 3, :end-col 72} {:dbtype \"sqlite\", :dbname \"chinook.db\"})] ^{:row 4, :col 5, :end-row 8, :end-col 52} (^{:row 4, :col 6, :end-row 4, :end-col 15} with-open ^{:row 4, :col 16, :end-row 4, :end-col 47} [^{:row 4, :col 17, :end-row 4, :end-col 21} conn ^{:row 4, :col 22, :end-row 4, :end-col 46} (^{:row 4, :col 23, :end-row 4, :end-col 42} jdbc/get-connection ^{:row 4, :col 43, :end-row 4, :end-col 45} ds)] ^{:row 5, :col 7, :end-row 8, :end-col 51} (^{:row 5, :col 8, :end-row 5, :end-col 21} jdbc/execute! ^{:row 5, :col 22, :end-row 5, :end-col 26} conn ^{:row 7, :col 22, :end-row 8, :end-col 50} (^{:row 7, :col 23, :end-row 7, :end-col 33} sql/format ^{:row 7, :col 34, :end-row 8, :end-col 49} {:select ^{:row 7, :col 43, :end-row 7, :end-col 86} [:AlbumId :Bytes :Name :TrackID :UnitPrice], :from :tracks})))))"

from clerk.

borkdude avatar borkdude commented on May 25, 2024

Ah yes, got a repro here:

(honey.sql/format
 {:select ^{:row 7, :col 43, :end-row 7, :end-col 86} [:AlbumId :Bytes :Name :TrackID :UnitPrice]
  :from :tracks})

from clerk.

borkdude avatar borkdude commented on May 25, 2024

There's probably a workaround in honey.sql to ignore certain metadata (via options) but I think it would be better if clerk evaluated values exactly how the user wrote it, without having to work around it. What do yo think @mk? Depending on your answer I could take a look to strip the rewrite-clj metadata.

from clerk.

mk avatar mk commented on May 25, 2024

I think it would be better if clerk evaluated values exactly how the user wrote it, without having to work around it

I agree.

I could take a look to strip the rewrite-clj metadata

That would be great, please do.

from clerk.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.