2022-05-24 12:57:15 -04:00
|
|
|
(mito:deftable category ()
|
|
|
|
((name :col-type (:varchar 128))
|
|
|
|
(percentage :col-type (:varchar 128)))
|
|
|
|
(:record-timestamps nil)
|
|
|
|
(:conc-name category-))
|
|
|
|
|
|
|
|
(mito:deftable category-split ()
|
|
|
|
((name :col-type (:varchar 128))
|
2022-07-10 19:18:36 -04:00
|
|
|
(category :col-type category :accessor category-split-category))
|
2022-05-24 12:57:15 -04:00
|
|
|
(:record-timestamps nil)
|
|
|
|
(:conc-name category-split-))
|
|
|
|
|
|
|
|
(defun category-splits (category)
|
|
|
|
(mito:select-dao 'category-split
|
|
|
|
(sxql:where (:= :category category))
|
|
|
|
;; Assumption that split categories are entered in the correct order by id
|
|
|
|
(sxql:order-by :id)))
|