Skip to content

Instantly share code, notes, and snippets.

@yrashk
Created June 23, 2017 05:16
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save yrashk/636ef73067387eb1a42c0ca24e98e443 to your computer and use it in GitHub Desktop.
Save yrashk/636ef73067387eb1a42c0ca24e98e443 to your computer and use it in GitHub Desktop.
This is a simplified example [attributes have unprefixed/unversioned names, etc] of ViewDB journalling
[
<b3da98d2-57cf-11e7-b564-6c4008925d80> -- fact ID
DUP "name" "something" 'INDEX/STRING (value => key component transformer) ATTR/ASSOC
DUP "tags" ["nature" "photo"] [] ATTR/ASSOCVAL ( associate value only, no index )
DUP "hasTag" "nature" 'INDEX/STRING ATTR/ASSOC
DUP "hasTag" "photo" 'INDEX/STRING ATTR/ASSOC
(the above tagging example can be simplified by adding some "list" primitives)
DUP "timestamp" HLC [] ATTR/ASSOCUNIQ (can't have more than 1 "timestamp" attribute indexed)
] WRITE
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment