Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

More documentation, albeit light.

  • Loading branch information...
commit a05eeb0bdf691a771cd2e803713d81b506bbc19a 1 parent 4ba997e
@duelinmarkers authored
View
1  src/clj_record/associations.clj
@@ -1,4 +1,5 @@
(ns clj-record.associations
+ "Support for the (init-model (associations ...)) form."
(:use clj-record.util)
(:require (clj-record [query :as q]
[core :as core])))
View
2  src/clj_record/boot.clj
@@ -1,5 +1,5 @@
(ns
- #^{:doc "Requiring this one namespace will require everything needed to use clj-record."}
+ "Requiring this one namespace will require everything needed to use clj-record."
clj-record.boot
(:require (clj-record
core
View
3  src/clj_record/callbacks.clj
@@ -1,4 +1,5 @@
(ns clj-record.callbacks
+ "Support for (init-model (callbacks ...)) form."
(:use clj-record.meta))
@@ -68,4 +69,4 @@
(defn before-validation
"Runs the before validation call back on all of the given rows."
[model-name attributes]
- (run-callbacks attributes model-name :before-validation))
+ (run-callbacks attributes model-name :before-validation))
View
2  src/clj_record/core.clj
@@ -197,7 +197,7 @@ instance."
in the model namespace (minus the model-name as first argument).
Optional forms for associations, validation, etc. are specified here.
- See clj_record/test/model/manufacturer.clj for an example."
+ See test/clj_record/test_model/manufacturer.clj for an example."
[& init-options]
(let [model-name (last (string/split (name (ns-name *ns*)) #"\."))
[top-level-options option-groups] (split-out-init-options init-options)
View
9 src/clj_record/meta.clj
@@ -1,7 +1,10 @@
-;; Note that clj-record's model-metadata has nothing to do with Clojure metadata.
-;; Suggestions of a reasonable name that's not overloaded are appreciated.
+(ns clj-record.meta
+ "Functions for managing all the metadata specified in (init-model ...) forms,
+ which are stored in this namespace's all-models-metadata ref. Nothing in this
+ namespace is likely to be used by code that uses clj-record.
-(ns clj-record.meta)
+ Note that clj-record's model-metadata has nothing to do with Clojure metadata.
+ Suggestions of a reasonable name that's not overloaded are appreciated.")
(def all-models-metadata (ref {}))
View
1  src/clj_record/query.clj
@@ -1,4 +1,5 @@
(ns clj-record.query
+ "Functions for use in specifying condition maps."
(:require [clojure.string :as string]))
View
1  src/clj_record/serialization.clj
@@ -1,4 +1,5 @@
(ns clj-record.serialization
+ "Support for (init-model (:serialization ...)) forms."
(:require [clj-record.callbacks :as callbacks]
[clj-record.callbacks.built-ins :as callb]))
View
1  src/clj_record/util.clj
@@ -1,4 +1,5 @@
(ns clj-record.util
+ "Assorted utilities for internal use."
(:require [clojure.string :as string]))
(defn singularize [plural]
View
1  src/clj_record/validation.clj
@@ -1,4 +1,5 @@
(ns clj-record.validation
+ "Support for (init-model (:validation ...)) forms."
(:use (clj-record core meta util))
(:require [clj-record.callbacks :as callbacks]))
View
2  src/clj_record/validation/built_ins.clj
@@ -14,7 +14,7 @@
(complement (match pattern)))
(def
- #^{:doc "Validation function that makes sure a value is numeric (though not necessarily a number)."}
+ #^{:doc "Validation function that makes sure a String value is numeric (though not necessarily a number)."}
numeric? (non-match #"\D"))
(defn email?
Please sign in to comment.
Something went wrong with that request. Please try again.