Commit 6e626733 authored by Dave Griffiths's avatar Dave Griffiths
Browse files

dep fix for racket

parent 5fb8662b
...@@ -33,12 +33,6 @@ ...@@ -33,12 +33,6 @@
"select * from " table "_entity where unique_id = ?") "select * from " table "_entity where unique_id = ?")
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) (define (get-all-entity-types db table)
(cdr (db-select db (string-append "select distinct entity_type from " table "_entity;")))) (cdr (db-select db (string-append "select distinct entity_type from " table "_entity;"))))
......
...@@ -38,6 +38,12 @@ ...@@ -38,6 +38,12 @@
(insert-entity-wholesale db table entity-type uid 1 0 ktvlist) (insert-entity-wholesale db table entity-type uid 1 0 ktvlist)
uid)) 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 ;; used for the app preferences
(define (insert-entity-if-not-exists db table entity-type user entity-id ktvlist) (define (insert-entity-if-not-exists db table entity-type user entity-id ktvlist)
(let ((found (get-entity-type db table entity-id))) (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