From 1860790027d1422776cee580b4482984dfb1bbfb Mon Sep 17 00:00:00 2001 From: Simon Brooke Date: Sun, 16 Sep 2018 16:52:28 +0100 Subject: [PATCH] Added `column-name` --- src/adl_support/utils.clj | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/adl_support/utils.clj b/src/adl_support/utils.clj index f692422..a5d1325 100644 --- a/src/adl_support/utils.clj +++ b/src/adl_support/utils.clj @@ -500,6 +500,14 @@ (user-distinct-properties entity)))) +(defn column-name + "Return, as a string, the name for the column which represents this `property`." + [property] + (safe-name + (or (-> property :attrs :column) (-> property :attrs :name)) + :sql)) + + (defmacro insertable-properties "Return all the properties of this `entity` (including key properties) into which user-supplied data can be inserted"