Liking cljdoc? Tell your friends :D

actionho-commons.db-enums


enum-kvp-enum-map-map&clj


generate-enum-str-kvp-keyword-mapclj

(generate-enum-str-kvp-keyword-map enum-strs-vec)

For each enum-str, returns a kvp of {enum-str enum-keyword} where enum-keyword has turned all '_' into '-', e.g. 'aussie_rules' -> :aussie-rules.

Choosing to not have this run at startup as makes init much more complicatd, so just run this when dev to get enums, and have them be hard-coded.

For each enum-str, returns a kvp of {enum-str enum-keyword} where enum-keyword has turned all '_' into '-', e.g. 'aussie_rules' -> :aussie-rules.

Choosing to not have this run at startup as makes init much more complicatd, so just run this when dev to get enums, and have them be hard-coded.
raw docstring

get-enum-from-keywordclj


get-enum-from-keyword-innerclj

(get-enum-from-keyword-inner in-map-atom in-keyword)

Want to have clj throw an exception when no matching clause as that will be a programmer error.

Want to have clj throw an exception when no matching clause as that will be a programmer error.
raw docstring

get-enum-from-keyword-wrapperclj

(get-enum-from-keyword-wrapper enum-name-keyword in-keyword)

get-enum-str-from-keywordclj


get-enum-str-from-keyword-innerclj

(get-enum-str-from-keyword-inner in-map-atom in-keyword)

While honeysql is smart enough to convert enum to str, have to do taht manually myself to access it, want to have clj throw an exception when no matching clause as that will be a programmer error.

While honeysql is smart enough to convert enum to str, have to do taht manually myself to access it, want to have clj throw an exception when no matching clause as that will be a programmer error.
raw docstring

get-enum-str-from-keyword-wrapperclj

(get-enum-str-from-keyword-wrapper enum-name-keyword in-keyword)

get-keyword-from-enum-strclj


get-keyword-from-enum-str-innerclj

(get-keyword-from-enum-str-inner in-map-atom in-str nilable?)

nilable means in-str can be nil

Want to have clj throw an exception when no matching clause as that will be a programmer error.

nilable means in-str can be nil

Want to have clj throw an exception when no matching clause as that will be a programmer error.
raw docstring

get-keyword-from-enum-str-wrapperclj

(get-keyword-from-enum-str-wrapper enum-name-keyword in-str nilable?)

initialize-db-enum-atomsclj

(initialize-db-enum-atoms db-spec enum-name-vec)

Gets all the enums list in this method from the db, and creates the enum-map-atom atom and puts it into the global map. Needs to be called before enums are used.

enum-name-vec is vec of strings

Gets all the enums list in this method from the db, and creates the enum-map-atom atom and puts it into the global map.  Needs to be called before enums are used.

enum-name-vec is vec of strings
raw docstring

initialize-enum-map-atomclj

(initialize-enum-map-atom in-map-atom enum-name enum-str-vec)

Modifies in-map-atom, needs to run as part of system init.

Modifies in-map-atom, needs to run as part of system init.
raw docstring

postgres-enum->strclj

(postgres-enum->str pg-enum)

str->postgres-enumclj


str->postgres-enum*clj

(str->postgres-enum* type value)

Generally only used for inserts, converting from string form of enum to db form of enum from http://naiquevin.github.io/using-postgresqls-enum-types-with-korma.html

Generally only used for inserts, converting from string form of enum to db form of enum
from http://naiquevin.github.io/using-postgresqls-enum-types-with-korma.html
raw docstring

cljdoc is a website building & hosting documentation for Clojure/Script libraries

× close