Skip to content

Commit

Permalink
changes for db admin app
Browse files Browse the repository at this point in the history
  • Loading branch information
nebogeo committed Jul 9, 2014
1 parent 96bd706 commit a3ebe99
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 0 deletions.
13 changes: 13 additions & 0 deletions android/assets/dbsync.scm
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,19 @@
(entity-add-value-create! key type value))
)))

;; version to check the entity has the key
(define (entity-set-value-mem! key type value)
(when (not (check-type type value))
(msg "INCORRECT TYPE FOR" key ":" type ":" value))

;; then save to memory
(set-current!
'entity-values
(ktv-set
(get-current 'entity-values '())
(ktv key type value))))



(define (date-time->string dt)
(string-append
Expand Down
9 changes: 9 additions & 0 deletions eavdb/eavdb.ss
Original file line number Diff line number Diff line change
Expand Up @@ -79,3 +79,12 @@
(alog "get-entity-only")
(get-entity-only db table i kt-list))
(filter-entities db table type filter)))

;; only return (eg. name and photo)
(define (db-filter-only-inc-deleted db table type filter kt-list)
(alog "db-filter-only")
(map
(lambda (i)
(alog "get-entity-only")
(get-entity-only db table i kt-list))
(filter-entities-inc-deleted db table type filter)))

0 comments on commit a3ebe99

Please sign in to comment.