Fork me on GitHub
#datomic
<
2022-05-25
>
johanatan20:05:42

does the pull many api support sorting? i'm not seeing it in the pull pattern grammar but just wanted to double check

thumbnail21:05:48

No. As far as i know the reason for this is that sorting in the db isnt more efficient (at least when using peer)

johanatan21:05:40

Yea it's more of a syntactic cleanliness issue for me. Would rather pack as much “logic” into the db queries as possible

thumbnail06:05:39

Well, your app “is” the database when using datomic. Its doing the query-logic itself etc too. But i know the feeling 😅 have been searching for ways to support sorting / pagination in the past too

jdkealy21:05:35

any way to enforce a character limit on a text field in datomic.

favila21:05:25

Attribute predicate

jdkealy21:05:06

is it possible to add a predicate to an attribute after it's been installed

jdkealy22:05:46

i see it is yeah

jdkealy22:05:20

how does datomic find the classes for things like attribute predicates? I installed a predicate but it says it can't find my namespace.

jdkealy22:05:39

Attribute predicates must be on the classpath of a process that is performing a transaction. Does that mean it needs to be in the transactor ?

favila00:05:16

You set an env var

jdkealy00:05:49

i was looking for a quick way to stop a user from inputting like 20k characters into my API and then storing it in datomic. It seems that i'll have to rethink deployments and source code going this route. I'll just more tightly control the HTTP API. This is definitely interesting, but was not expecting to ever have to touch the transactor's container after starting it.

Linus Ericsson02:05:13

These checks should most likely be done in the peer-process, not the transactor. Also you can transact DB functions to the transactor if they are just using standard clojure/java.

jdkealy22:05:21

i can't seem to make it work on either

jdkealy22:05:48

is it possible to use an installed function as a predicate ?