Skip to content

Split one query definition file into many smaller ones #51

@fvclaus

Description

@fvclaus

Is there some built-in functionality that already does that?

I added the following code to my ns:

(defmacro rebind-connection []
  (cons 'do
    (->> (io/file (io/resource "sql"))
     (file-seq)
     (filter #(.isFile %))
     (map #(str "sql/" (.getName %)))
     (map #((fn [] `(conman/bind-connection *db* ~%)))))))

It works, but feels hackish, because bind-connection requires a string as first argument and passing a symbol does not work.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions