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
I would like to have something that allows me to create unique ids for rethinkdb. There are a few ways it works i could just call it and it will give me just an id. if i call it from a table then it makes sure its unique with in that table. or maybe it does not? Also easy to get a large number of them if needed. If you like the rethinkdb id and want to tag your inserts with an id that you will know before hand this would be a great feature.
This would sometimes be nice to have. Note that r.uniqueId() (which I would rather call r.uuid()) would have to be a treated as a nondeterministic expression, the same way as r.js(...) -- you couldn't "send the query to the row" and then generate the UUID when updating a row atomically. You'd have to (assuming a straightforward implementation on the server) generate the UUID and then do the query.
Erm, something like that ^^^ only with r.uuid() in place of r.js(...).
Hypothetically, a query on the server could, on a single-row update, prove that some deep r.uuid() expression is evaluated once, generate a single UUID, and then pass it along the function to be evaluated.
Or you could use the non_atomic optarg.
Another general option would be to pass down parameters for a deterministic UUID generator. However, this wouldn't work well with the goal of how update queries might be evaluated, unless we evaluate the updates in some unnecessarily strict well-defined order. That would be bad, or it would complicate some code that doesn't need to be made complicated.
So I think r.uuid() or r.uniqueId(), if implemented, should be considered a nondeterministic function in the query evaluator.
@mlucy, this should be one of the simplest ReQL commands, and I don't have much scheduled for 1.14 yet, so I'm just trying to take some low-hanging fruit.
We need to write the docs for r.uuid, regenerate the reql_docs.json file before releasing.
It may be more reasonable to remove r.uuid from 1.14.x (we could also release without the docs for r.uuid I think -- but I'm not sure @AtnNn or @larkost want to do a point release later for that)
is there an issuse with leaving the code in place asuming that it works and then let drivers build the support when every they get around to. part of open source is offical drivers dont have to always be the first.
We can remove r.uuid from 1.14.x if the docs absolutely positively can't make it in, but I think @wojons has been waiting on it for a while, so it would be nice if we didn't. (I realize I'm breaking the rules here because it's the 11th hour and it isn't a bugfix, but it's a very small and self-contained change that won't break anything else.)
I'd like to move this into 1.15. We could cut a corner here if absolutely necessary, but in general I think we should respect feature freezes because it's too easy for things to go wrong (even for small commands).
@gchpaco -- would you mind reverting the commit in 1.14.x branch?
@wojons -- the issue with getting the command in and letting the drivers handle it later is organizational. It's easy for things to slip through the cracks, for drivers to get out of sync with each other in terms of functionality, missing documentation, etc. Getting everything in at once has drawbacks, but it's generally less painful than letting the drivers lag behind.
I agree fully that is why i changed my mind last night if i have to wait another version for it then That is fine with me I still have not even had a chance to intergrate changes or http into my applicaiton so what ever is coming in 1.14 is going to be more then i can handle
Activity
srh commentedon Mar 5, 2014
This would sometimes be nice to have. Note that
r.uniqueId()(which I would rather callr.uuid()) would have to be a treated as a nondeterministic expression, the same way asr.js(...)-- you couldn't "send the query to the row" and then generate the UUID when updating a row atomically. You'd have to (assuming a straightforward implementation on the server) generate the UUID and then do the query.Something like thisthis:
srh commentedon Mar 5, 2014
Erm, something like that ^^^ only with
r.uuid()in place ofr.js(...).Hypothetically, a query on the server could, on a single-row update, prove that some deep
r.uuid()expression is evaluated once, generate a single UUID, and then pass it along the function to be evaluated.Or you could use the
non_atomicoptarg.Another general option would be to pass down parameters for a deterministic UUID generator. However, this wouldn't work well with the goal of how
updatequeries might be evaluated, unless we evaluate the updates in some unnecessarily strict well-defined order. That would be bad, or it would complicate some code that doesn't need to be made complicated.So I think
r.uuid()orr.uniqueId(), if implemented, should be considered a nondeterministic function in the query evaluator.coffeemug commentedon Mar 5, 2014
Note, this is loosely related to #117.
danielytics commentedon Jun 12, 2014
👍 for
r.uuid(). I've found myself wanting this too.coffeemug commentedon Jun 12, 2014
Moving to subsequent. This has been coming up a lot recently.
Tryneus commentedon Jun 21, 2014
Anyone mind if we schedule this for 1.14? It should be a pretty simple API, unless we want to complicate it.
wojons commentedon Jun 21, 2014
@Tryneus 1.13.x jkjk
mlucy commentedon Jun 21, 2014
@Tryneus : It already looks like there are more ReQL issues in 1.14 then are actually going to make it in, but go ahead. We can trim down later.
mlucy commentedon Jun 21, 2014
(Also,
r.uuid()seems like a better name to me.)srh commentedon Jun 21, 2014
No it should obviously be
r.uuid_u().Tryneus commentedon Jun 21, 2014
@mlucy, this should be one of the simplest ReQL commands, and I don't have much scheduled for 1.14 yet, so I'm just trying to take some low-hanging fruit.
24 remaining items
neumino commentedon Aug 15, 2014
We need to write the docs for
r.uuid, regenerate thereql_docs.jsonfile before releasing.It may be more reasonable to remove
r.uuidfrom1.14.x(we could also release without the docs forr.uuidI think -- but I'm not sure @AtnNn or @larkost want to do a point release later for that)gchpaco commentedon Aug 15, 2014
There is a docs issue filed.
s/mt/st/change is done.gchpaco commentedon Aug 15, 2014
v1.14 wasn't my call, take it up with @mlucy.
wojons commentedon Aug 15, 2014
is there an issuse with leaving the code in place asuming that it works and then let drivers build the support when every they get around to. part of open source is offical drivers dont have to always be the first.
mlucy commentedon Aug 15, 2014
We can remove
r.uuidfrom 1.14.x if the docs absolutely positively can't make it in, but I think @wojons has been waiting on it for a while, so it would be nice if we didn't. (I realize I'm breaking the rules here because it's the 11th hour and it isn't a bugfix, but it's a very small and self-contained change that won't break anything else.)mlucy commentedon Aug 15, 2014
@AtnNn -- what do you think, can this go in?
wojons commentedon Aug 15, 2014
so no one gets in troble lets wait and do it in 1.15.
coffeemug commentedon Aug 15, 2014
I'd like to move this into 1.15. We could cut a corner here if absolutely necessary, but in general I think we should respect feature freezes because it's too easy for things to go wrong (even for small commands).
@gchpaco -- would you mind reverting the commit in 1.14.x branch?
@wojons -- the issue with getting the command in and letting the drivers handle it later is organizational. It's easy for things to slip through the cracks, for drivers to get out of sync with each other in terms of functionality, missing documentation, etc. Getting everything in at once has drawbacks, but it's generally less painful than letting the drivers lag behind.
wojons commentedon Aug 15, 2014
@coffeemug
I agree fully that is why i changed my mind last night if i have to wait another version for it then That is fine with me I still have not even had a chance to intergrate changes or http into my applicaiton so what ever is coming in 1.14 is going to be more then i can handle
mlucy commentedon Aug 15, 2014
No objections on my part then.
gchpaco commentedon Aug 15, 2014
Reverted in da09b85.