Commit f98cd416 authored by dave griffiths's avatar dave griffiths

racket dep fix for reals

parent 6e626733
......@@ -33,6 +33,12 @@
"select * from " table "_entity where unique_id = ?")
unique-id))))
(define (get-entity-type db table entity-id)
(select-first
db (string-append
"select entity_type from " table "_entity where entity_id = ?")
entity-id))
(define (get-all-entity-types db table)
(cdr (db-select db (string-append "select distinct entity_type from " table "_entity;"))))
......
......@@ -20,7 +20,8 @@
"../web/scripts/sql.ss"
"ktv.ss"
"ktv-list.ss"
"entity-values.ss")
"entity-values.ss"
"entity-get.ss")
(provide (all-defined-out))
......@@ -38,12 +39,6 @@
(insert-entity-wholesale db table entity-type uid 1 0 ktvlist)
uid))
(define (get-entity-type db table entity-id)
(select-first
db (string-append
"select entity_type from " table "_entity where entity_id = ?")
entity-id))
;; used for the app preferences
(define (insert-entity-if-not-exists db table entity-type user entity-id ktvlist)
(let ((found (get-entity-type db table entity-id)))
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment