Fork me on GitHub
#datomic
<
2015-11-26
>
robert-stuttaford08:11:53

@sdegutis: we have an Onyx system that watches the Datomic log and inspects the datoms to figure out if it needs to do any stats work

aspra10:11:31

Hi! Not sure if this the right place to ask or the clojure channel is better. But here it goes: is there some sort of naming convention for functions that call datomic queries?

aspra10:11:00

for instance how would you name a query function that retrieves all entities of a specific type and how one that takes a specific input?

robert-stuttaford12:11:42

we use Datomic as our sole database. i don’t think we have any sort of definable convention for our function names

robert-stuttaford12:11:35

we’ve taken the pragmatic approach of naming them as simply as possible, based on the semantic meaning - (defn active-users-for-group [group]) - that sort of thing

aspra13:11:38

thanks @robert-stuttaford. Probably it is a good enough approach. Only it can get verbose I suppose for multiple inputs?

aspra13:11:03

I was wondering if there was some kind of styling standard a bit like https://github.com/bbatsov/clojure-style-guide#naming

robert-stuttaford14:11:30

it definitely can get verbose, but we apply pragmatism to that, too. quite often, we end up breaking the function part

robert-stuttaford14:11:42

wonderful thing about Datomic; no need to query the whole world in one go!

robert-stuttaford14:11:06

i don’t think Datomic has seen broad enough use to warrant there being a guide such as that

robert-stuttaford14:11:16

what’s really cool about Datomic is that you can almost forget that the data is not inside your app process… that is, it’s just normal data filtering code like any other FP

dobladez18:11:00

Is there any tool/script to convert an existing SQL schema to a set of Datomic attribute definitions? I know there's no 1-to-1 correspondence, and cannot be 100% automated. I only expect something rough to start from