(require-queries & params)
Finds, parses, and imports one or more queries from files, using provided rules on whether to isolate them in another namespace or just load it into the current one.
Options Options are provided through vectors that must contain the filename in which the queries were defined, and either an :as or :refer option to indicate where to load them. Recognized options: :as, :refer
:as: accepts a symbol indicating in which namespace to load functions. This will load all available queries into the provided namespace. :refer: accepts a vector of symbols indicating which queries will be loaded in the current namespace.
Example:
The following would load 'user-queries' into a namespace 'user', and a 'deactivated-users' query into the current namespace: (require-queries [user-queries :as user] [user-queries :refer [deactivated-users])
Finds, parses, and imports one or more queries from files, using provided rules on whether to isolate them in another namespace or just load it into the current one. Options Options are provided through vectors that must contain the filename in which the queries were defined, and either an :as or :refer option to indicate where to load them. Recognized options: :as, :refer :as: accepts a symbol indicating in which namespace to load functions. This will load all available queries into the provided namespace. :refer: accepts a vector of symbols indicating which queries will be loaded in the current namespace. Example: The following would load 'user-queries' into a namespace 'user', and a 'deactivated-users' query into the current namespace: (require-queries [user-queries :as user] [user-queries :refer [deactivated-users])
(require-query name & {:keys [as refer]})
Finds, parses, and imports queries from a given filename during compilation time.
Options
Options are provided through a hashmap. It must be used to instruct whether
queries are being imported directly into this file, or to an isolated
namespace. Both options were designed to work like the :require option
provided to the ns
form.
Recognized options: :as, :refer
:as: accepts a symbol indicating in which namespace to load functions. This will load all available queries into the provided namespace. :refer: accepts a vector of symbols indicating which queries will be loaded in the current namespace.
Example:
The following would load 'user-queries' into a namespace 'user': (require-query user-queries :as user)
The following would load a query named 'deactivated-users' into the current namespace: (require-query user-queries :refer [deactivated-users])
Finds, parses, and imports queries from a given filename during compilation time. Options Options are provided through a hashmap. It must be used to instruct whether queries are being imported directly into this file, or to an isolated namespace. Both options were designed to work like the :require option provided to the `ns` form. Recognized options: :as, :refer :as: accepts a symbol indicating in which namespace to load functions. This will load all available queries into the provided namespace. :refer: accepts a vector of symbols indicating which queries will be loaded in the current namespace. Example: The following would load 'user-queries' into a namespace 'user': (require-query user-queries :as user) The following would load a query named 'deactivated-users' into the current namespace: (require-query user-queries :refer [deactivated-users])
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close