Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
citizen-science
symbai
Commits
f98cd416
Commit
f98cd416
authored
May 15, 2014
by
dave griffiths
Browse files
racket dep fix for reals
parent
6e626733
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
7 deletions
+8
-7
eavdb/entity-get.ss
eavdb/entity-get.ss
+6
-0
eavdb/entity-insert.ss
eavdb/entity-insert.ss
+2
-7
No files found.
eavdb/entity-get.ss
View file @
f98cd416
...
...
@@ -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;"
))))
...
...
eavdb/entity-insert.ss
View file @
f98cd416
...
...
@@ -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
)))
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment