Skip to content
Daniel Higginbotham edited this page Oct 25, 2022 · 2 revisions

Intro

This tutorial will give you a complete understanding of how datapotato works so that you can use all of its powers for even your gnarliest data needs, including:

  • Uniqueness constraints. Imagine you’ve written a forum application where users can like posts, but can only like them once. If you want to generate multiple likes, then each like must belong to a unique user. Datapotato can handle this scenario for you.
  • Polymorphic references. Databases like datomic and xtdb allow abstract reference fields, which can refer to any “type” of record. For example, in a forum users might want to watch a post for replies, or they might want to watch the parent topic for any new posts. Internally, you might represent this with a record that has the keys :watch/watched and :watch/watcher. When generating such records you might want to specify whether the record that :watch/watched refers to is a post or a topic. Datapotato lets you do this.

This tutorial will take about an hour, perhaps two. I get that that’s a pretty big time investment. My hope is that, in the long run, datapotato will save you much more than that by eliminating busywork and helping you avoid making errors.

Clone this wiki locally