Is it possible to serialize, or/and save to a file a DS db?
@kingcode yes https://github.com/tonsky/datascript/wiki/Tips-&-tricks#edn-serialization
cool thx @carkh!
How would I specify uniqueness with compound attributes, e.g. by [:first-name :last-name] with :db/unique in a DS schma?
@kingcode that's a sore point about datascript ...i've been going around that problem by adding these compound values as regular attributes... Unlike datomic (afaik), datascript attributes accept compound data
or you could go more free form, and access your database in a more "graph database" way
or just check this constraint in your business layer
ok thanks @carkh - so I might try :name [“first” “last”] and specify :name as :db/unique right?
yes
Thx!
i usually have both :customer/first-name and :customer/last-name ...and the :customer/full-name