You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
(defc (d/create-conn))
(posh/posh! c)
(d/transact! c [[:db/add1:person/name"Rich"]
[:db/add5.036617769192117e+47:person/name"Alex"]])
@(posh/pull c '[:person/name] 1)
;; {:db/id 2, :person/name "Rich"}
@(posh/pull c '[:person/name] 5.036617769192117e+47)
;; nil;; While it works in datascript
(d/pull @c '[:person/name] 5.036617769192117e+47)
{:person/name"Alex"}
The text was updated successfully, but these errors were encountered:
While it may be possible to use floating point ids in Datascript, I'm not sure its a good idea. There are likely performance implications, and I'd suspect you should be able to get around this by casting as an int.
I went for a reading and javascript stores everything as double precision floating point numbers, following the IEEE 754 standard. So everything is just 64 bit numbers where the number (the fraction) is stored in bits 0 to 51, the exponent in bits 52 to 62, and the sign in bit 63.
Looking at clojurescript code for "int casting" it just strip decimal places.
I think is a nice property to have posh pull interface to follow datascript pull one.
Steps to reproduce:
The text was updated successfully, but these errors were encountered: