Fork me on GitHub
#datomic
<
2019-05-10
>
marshall00:05:14

Not sure youll get nil like that

marshall00:05:20

Pull returns maps

wei00:05:51

i see. what's the reasoning for returning #:db{:id nil} vs {} or just nil for no matching result?

wei00:05:50

makes it harder to do nil punning, although that's easy enough to add a helper function for

snurppa05:05:53

@(d/transact (user/conn) [[:db/add :application/address :db/fulltext true]])
Execution error (Exceptions$IllegalArgumentExceptionInfo) at datomic.error/deserialize-exception (error.clj:124).
:db.error/invalid-alter-attribute Error: {:db/error :db.error/unsupported-alter-schema, :attribute :db/fulltext, :from :disabled, :to true}
So I guess the docs are right about “You cannot alter :db/valueType or :db/fulltext”…? Initially I hopefully thought that maybe this means that you can’t remove the :db/fulltext after you have set it to true, but I guess hopes were slightly too high. What would be the best way to continue? Create new entity attribute :application/address2 with :db/fulltext true and migrate entities to use that? Any other suggestions? Thanks! 🙂

Ivar Refsdal07:05:21

How about renaming :application/address to :application/addressOld and then copy the old to the new attribute that has :db/fulltext true?

snurppa10:05:04

Yeah that could be option, thanks!

stijn14:05:56

is there a JVM or Linux setting that might cause datomic client to not properly read UTF-8 characters (e.g. é) from the database?

stijn14:05:11

this is for the cloud platform

stijn14:05:14

I can properly read in an ion, also on localhost when connecting to the bastion, but we run a Beanstalk application which uses datomic client api and that one consistently reads UTF8 characters wrongly

stijn14:05:12

we're using Java 8 running on 64bit Amazon Linux/2.8.1

stijn14:05:35

the weird thing is, the data comes in on the same instance through an API call, gets properly written to datomic (we can validate that at an ion or local dev), but when reading it back on the same instance, it doesn't have the proper encoding

wei19:05:35

what's a good schema for a message body with versions in multiple languages? I was thinking something like:

:message/en
:message/zh
:message/fr
...
but I'd have to modify the schema every time I add a new language. curious if there are any other options.

kenny19:05:15

Another option could be :message/body: string :message/language: keyword

wei19:05:38

thanks! that would work too

Drew Verlee23:05:45

Do Ident and DB.uqiue/identity always go together? Like, can you use ident when your declaring it unique? It would seem so from the docs, but I don't understand what the relationship is then

Drew Verlee23:05:49

At ok, so ident is for the attribute, which is an entity itself, but to say this attribute plus a value is a pointer to an entity you have to declare it unique. Right?

Drew Verlee23:05:56

And unsure value, means there can only be one such pointer to the entity

benoit23:05:11

:db/ident can be added to any entity, not just attribute. And it is used to be able to refer to the entity with a keyword.

Drew Verlee23:05:31

Ok, what makes an attribute an attribute?

favila23:05:05

An entity is an attribute by being asserted on :db.part/db :db.install/attribute

favila23:05:17

:db.part/db is entity 0

favila23:05:44

:db.install/attribute is a special bootstrapped attribute created in the first three transactions of a fresh db

favila23:05:03

you used to have to assert :db.install/attribute explicitly when adding an attribute but it's implicit now

Drew Verlee23:05:03

All attributes are entities right? So we must have to add information to make it an attribute.

Drew Verlee23:05:34

This assuming I understand the idea of an entity, which I take to be, the set of facts/datoms connected to this entity id.

Drew Verlee23:05:14

Ok right, so if you don't use ident then you can only refer to it by it's id

Drew Verlee23:05:09

So if you give it unique identity but not an ident then you could use the entity id plus a value to look up?

Drew Verlee23:05:00

Like saying :name is a unique identity, but without ident, would mean I would have to use the entity id plus the name. [5677 "Drew"]