Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
Bulk data operations: UPDATE Users SET IsActive = 0 WHERE LastLogin < '2010-05-10'
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  17 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Ayende Rahien  
View profile  
 More options May 22 2010, 5:19 pm
From: Ayende Rahien <aye...@ayende.com>
Date: Sun, 23 May 2010 00:19:25 +0300
Local: Sat, May 22 2010 5:19 pm
Subject: [RavenDB] Bulk data operations: UPDATE Users SET IsActive = 0 WHERE LastLogin < '2010-05-10'

Raven supports patching:
http://www.ravendb.net/documentation/docs-http-api-patch

<http://www.ravendb.net/documentation/docs-http-api-patch>And while
answering a question in the mailing list it occurred to me that it would be
pretty simple to extend that support further.

Imagine:

PATCH /indexes/UsersByLastLogin?query=LastLogin:[NULL TO 20100510]

[
  { "Type": "set", "Name": "IsActive", "Value": false }
]

Which is the equivalent of:

UPDATE Users
SET IsActive = false
WHERE LastLogin < '2010-05-10'

Would be pretty simple, but might have some problems with regards to
consistency.
I think we can solve that by making cutOff date mandatory, then, if the
request is stale according to the cutoff, we fail the request.
The client can retry until they are happy about it or time out.

Thoughts?


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Rob Ashton  
View profile  
 More options May 22 2010, 5:29 pm
From: Rob Ashton <robash...@CodeOfRob.com>
Date: Sat, 22 May 2010 14:29:34 -0700 (PDT)
Local: Sat, May 22 2010 5:29 pm
Subject: [RavenDB] Re: Bulk data operations: UPDATE Users SET IsActive = 0 WHERE LastLogin < '2010-05-10'
I'm all for this sort of behaviour being added in if we can - because
bulk operations *are* useful from time to time.

It's weird the notion of it failing, although I can see why you'd
potentially want it to - Perhaps make it okay to update against a
stale index (another option)? Then we can always re-run the batch
operation if necessary


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Ayende Rahien  
View profile  
 More options May 22 2010, 5:43 pm
From: Ayende Rahien <aye...@ayende.com>
Date: Sun, 23 May 2010 00:43:37 +0300
Local: Sat, May 22 2010 5:43 pm
Subject: Re: [RavenDB] Re: Bulk data operations: UPDATE Users SET IsActive = 0 WHERE LastLogin < '2010-05-10'

It is certainly a feature that would be pretty unique, CouchDB doesn't do
it, and I don't think MongoDB does.

The point of it failing is that the idea of a partially successful update is
pretty scary.
You mean it _didn't_ update everything?

On the other hand, people are already used to stuff like that when you have
concurrent writes, because read committed and repeatable read explicitly
allows for that.
I know that I fell into that trap before:
http://ayende.com/Blog/archive/2007/03/25/Transactions-and-concurrenc...

On Sun, May 23, 2010 at 12:29 AM, Rob Ashton <robash...@codeofrob.com>wrote:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Discussion subject changed to "Bulk data operations: UPDATE Users SET IsActive = 0 WHERE LastLogin < '2010-05-10'" by Jan Benny Thomas
Jan Benny Thomas  
View profile  
 More options May 22 2010, 5:49 pm
From: "Jan Benny Thomas" <jan.tho...@lyse.net>
Date: Sat, 22 May 2010 23:49:32 +0200
Local: Sat, May 22 2010 5:49 pm
Subject: RE: [RavenDB] Bulk data operations: UPDATE Users SET IsActive = 0 WHERE LastLogin < '2010-05-10'

This looks awesome, we should have something like this, although it is more
of a dba feature. Do we need to make cutOff mandatory? Why not give it a
strict default value?

And when we are at it, why not?

DELETE /indexes/UsersByLastLogin?query=LastLogin:[NULL TO 20100510]

Which is the equivalent of:

DELETE Users

WHERE LastLogin < '2010-05-10'

From: ravendb@googlegroups.com [mailto:ravendb@googlegroups.com] On Behalf
Of Ayende Rahien
Sent: 22. mai 2010 23:19
To: ravendb
Subject: [RavenDB] Bulk data operations: UPDATE Users SET IsActive = 0 WHERE
LastLogin < '2010-05-10'

Raven supports patching:
http://www.ravendb.net/documentation/docs-http-api-patch

And while answering a question in the mailing list it occurred to me that it
would be pretty simple to extend that support further.

Imagine:

PATCH /indexes/UsersByLastLogin?query=LastLogin:[NULL TO 20100510]

[

  { "Type": "set", "Name": "IsActive", "Value": false }

]

Which is the equivalent of:

UPDATE Users

SET IsActive = false

WHERE LastLogin < '2010-05-10'

Would be pretty simple, but might have some problems with regards to
consistency.

I think we can solve that by making cutOff date mandatory, then, if the
request is stale according to the cutoff, we fail the request.

The client can retry until they are happy about it or time out.

Thoughts?


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Discussion subject changed to "Bulk data operations: UPDATE Users SET IsActive = 0 WHERE LastLogin < '2010-05-10'" by Ben Hall
Ben Hall  
View profile  
 More options May 22 2010, 5:53 pm
From: Ben Hall <ben200...@googlemail.com>
Date: Sat, 22 May 2010 22:53:21 +0100
Local: Sat, May 22 2010 5:53 pm
Subject: Re: [RavenDB] Bulk data operations: UPDATE Users SET IsActive = 0 WHERE LastLogin < '2010-05-10'
How come you are doing NULL TO <value> ??


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Ayende Rahien  
View profile  
 More options May 22 2010, 5:54 pm
From: Ayende Rahien <aye...@ayende.com>
Date: Sun, 23 May 2010 00:54:53 +0300
Local: Sat, May 22 2010 5:54 pm
Subject: Re: [RavenDB] Bulk data operations: UPDATE Users SET IsActive = 0 WHERE LastLogin < '2010-05-10'

That is the lucene syntax for range queries.
It means anything up to that value.


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Ayende Rahien  
View profile  
 More options May 22 2010, 5:55 pm
From: Ayende Rahien <aye...@ayende.com>
Date: Sun, 23 May 2010 00:55:31 +0300
Local: Sat, May 22 2010 5:55 pm
Subject: Re: [RavenDB] Bulk data operations: UPDATE Users SET IsActive = 0 WHERE LastLogin < '2010-05-10'

Pretty scary here, because DELETE would delete the index.
I think that we need another endpoint for this, not /indexes

On Sun, May 23, 2010 at 12:49 AM, Jan Benny Thomas <jan.tho...@lyse.net>wrote:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Ayende Rahien  
View profile  
 More options May 22 2010, 5:57 pm
From: Ayende Rahien <aye...@ayende.com>
Date: Sun, 23 May 2010 00:57:22 +0300
Local: Sat, May 22 2010 5:57 pm
Subject: Re: [RavenDB] Bulk data operations: UPDATE Users SET IsActive = 0 WHERE LastLogin < '2010-05-10'

we already have /bulk_docs :-)


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Discussion subject changed to "Bulk data operations: UPDATE Users SET IsActive = 0 WHERE LastLogin < '2010-05-10'" by Jan Benny Thomas
Jan Benny Thomas  
View profile  
 More options May 22 2010, 6:05 pm
From: "Jan Benny Thomas" <jan.tho...@lyse.net>
Date: Sun, 23 May 2010 00:05:53 +0200
Local: Sat, May 22 2010 6:05 pm
Subject: RE: [RavenDB] Bulk data operations: UPDATE Users SET IsActive = 0 WHERE LastLogin < '2010-05-10'

That's true.

But that tells us that we might make another endpoint for the patch too,
maybe the same endpoint for the two operations.

DELETE /[batchoperation]/UsersByLastLogin?query=LastLogin:[NULL TO 20100510]

PATCH /[batchoperation]/UsersByLastLogin?query=LastLogin:[NULL TO 20100510]

[

  { "Type": "set", "Name": "IsActive", "Value": false }

]

From: ravendb@googlegroups.com [mailto:ravendb@googlegroups.com] On Behalf
Of Ayende Rahien
Sent: 22. mai 2010 23:56
To: ravendb@googlegroups.com
Subject: Re: [RavenDB] Bulk data operations: UPDATE Users SET IsActive = 0
WHERE LastLogin < '2010-05-10'

Pretty scary here, because DELETE would delete the index.

I think that we need another endpoint for this, not /indexes

On Sun, May 23, 2010 at 12:49 AM, Jan Benny Thomas <jan.tho...@lyse.net>
wrote:

This looks awesome, we should have something like this, although it is more
of a dba feature. Do we need to make cutOff mandatory? Why not give it a
strict default value?

And when we are at it, why not?

DELETE /indexes/UsersByLastLogin?query=LastLogin:[NULL TO 20100510]

Which is the equivalent of:

DELETE Users

WHERE LastLogin < '2010-05-10'

From: ravendb@googlegroups.com [mailto:ravendb@googlegroups.com] On Behalf
Of Ayende Rahien
Sent: 22. mai 2010 23:19
To: ravendb
Subject: [RavenDB] Bulk data operations: UPDATE Users SET IsActive = 0 WHERE
LastLogin < '2010-05-10'

Raven supports patching:
http://www.ravendb.net/documentation/docs-http-api-patch

And while answering a question in the mailing list it occurred to me that it
would be pretty simple to extend that support further.

Imagine:

PATCH /indexes/UsersByLastLogin?query=LastLogin:[NULL TO 20100510]

[

  { "Type": "set", "Name": "IsActive", "Value": false }

]

Which is the equivalent of:

UPDATE Users

SET IsActive = false

WHERE LastLogin < '2010-05-10'

Would be pretty simple, but might have some problems with regards to
consistency.

I think we can solve that by making cutOff date mandatory, then, if the
request is stale according to the cutoff, we fail the request.

The client can retry until they are happy about it or time out.

Thoughts?


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Discussion subject changed to "Bulk data operations: UPDATE Users SET IsActive = 0 WHERE LastLogin < '2010-05-10'" by Ayende Rahien
Ayende Rahien  
View profile  
 More options May 23 2010, 4:22 am
From: Ayende Rahien <aye...@ayende.com>
Date: Sun, 23 May 2010 11:22:23 +0300
Local: Sun, May 23 2010 4:22 am
Subject: Re: [RavenDB] Bulk data operations: UPDATE Users SET IsActive = 0 WHERE LastLogin < '2010-05-10'

Yep, I think we can add both to /bulk_docs with no issues.

On Sun, May 23, 2010 at 1:05 AM, Jan Benny Thomas <jan.tho...@lyse.net>wrote:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Ayende Rahien  
View profile  
 More options May 23 2010, 5:04 am
From: Ayende Rahien <aye...@ayende.com>
Date: Sun, 23 May 2010 12:04:57 +0300
Local: Sun, May 23 2010 5:04 am
Subject: Re: [RavenDB] Bulk data operations: UPDATE Users SET IsActive = 0 WHERE LastLogin < '2010-05-10'

Implemented, when the test finish running, it will be on github


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Ayende Rahien  
View profile  
 More options May 23 2010, 6:42 am
From: Ayende Rahien <aye...@ayende.com>
Date: Sun, 23 May 2010 13:42:23 +0300
Local: Sun, May 23 2010 6:42 am
Subject: Re: [RavenDB] Bulk data operations: UPDATE Users SET IsActive = 0 WHERE LastLogin < '2010-05-10'

On github.
Any good ideas about how to name this feature?


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
nabils  
View profile  
 More options May 23 2010, 10:03 am
From: nabils <a...@shuhaiber.com>
Date: Sun, 23 May 2010 07:03:25 -0700 (PDT)
Local: Sun, May 23 2010 10:03 am
Subject: [RavenDB] Re: Bulk data operations: UPDATE Users SET IsActive = 0 WHERE LastLogin < '2010-05-10'
Nice feature. How does this integrate into the c-sharp client api? Do
you have sample code?

On May 23, 11:42 am, Ayende Rahien <aye...@ayende.com> wrote:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Barry King  
View profile  
 More options May 23 2010, 12:44 pm
From: Barry King <sqlcode...@gmail.com>
Date: Sun, 23 May 2010 17:44:32 +0100
Local: Sun, May 23 2010 12:44 pm
Subject: Re: [RavenDB] Re: Bulk data operations: UPDATE Users SET IsActive = 0 WHERE LastLogin < '2010-05-10'
"Raven sets" as it sounds like a set operation from SQL world.

Sent from my iPhone

On 23 May 2010, at 15:03, nabils <a...@shuhaiber.com> wrote:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Barry King  
View profile  
 More options May 23 2010, 12:45 pm
From: Barry King <sqlcode...@gmail.com>
Date: Sun, 23 May 2010 17:45:43 +0100
Local: Sun, May 23 2010 12:45 pm
Subject: Re: [RavenDB] Bulk data operations: UPDATE Users SET IsActive = 0 WHERE LastLogin < '2010-05-10'

"Raven sets" as it's a set operation in SQL terminolgy.

Sent from my iPhone

On 23 May 2010, at 11:42, Ayende Rahien <aye...@ayende.com> wrote:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Ayende Rahien  
View profile  
 More options May 24 2010, 5:01 am
From: Ayende Rahien <aye...@ayende.com>
Date: Mon, 24 May 2010 12:01:11 +0300
Local: Mon, May 24 2010 5:01 am
Subject: Re: [RavenDB] Re: Bulk data operations: UPDATE Users SET IsActive = 0 WHERE LastLogin < '2010-05-10'

Bails,
No, not currently, will be soon.


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Ayende Rahien  
View profile  
 More options May 24 2010, 5:01 am
From: Ayende Rahien <aye...@ayende.com>
Date: Mon, 24 May 2010 12:01:22 +0300
Local: Mon, May 24 2010 5:01 am
Subject: Re: [RavenDB] Bulk data operations: UPDATE Users SET IsActive = 0 WHERE LastLogin < '2010-05-10'

Set based operations sounds perfect


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »