Forum BigDB About Delete Range

Discussion and help relating to the PlayerIO database solution, BigDB.

About Delete Range

Postby kidkid » January 27th, 2011, 11:16 am

hi,
I have created a index with only one property string.
I want to delete all of records which has a specify value.
So what should I do ?

example:

Table: MyTable

Key: mykey1
name: String = "My Name 1"
type : String = "type_x"
value: int = 10;

Key: mykey2
name: String = "My Name 2"
type : String = "type_x"
value: int = 10;

Key: mykey3
name: String = "My Name 3"
type : String = "type_y"
value: int = 10;

And I have created a index associated with type property.
Now, I want to delete all of key which has type = "type_x"

So I use this code:

client.bigDB.deleteRange("MyTable","ByType",null,"type_x","type_x",FnCbSuccess,FnCbFail);

FnCbSuccess callback function has been called, but when I check in browser it still exist.

btw, why don't the framework pass the number of delected record to FnCbSuccess ?
kidkid
 
Posts: 54
Joined: December 1st, 2010, 4:43 am

Re: About Delete Range

Postby Henrik » January 27th, 2011, 2:22 pm

Hi kidkid,

That is pretty strange. We'll investigate this issue as soon as we can!
Henrik
.IO
 
Posts: 1880
Joined: January 4th, 2010, 1:53 pm

Re: About Delete Range

Postby Henrik » February 8th, 2011, 4:01 pm

Hey kidkid, sorry for the late reply.

Do you still have this problem with your table? The code you pasted in should work, and it works fine for me when I try to reproduce it.
Henrik
.IO
 
Posts: 1880
Joined: January 4th, 2010, 1:53 pm

Re: About Delete Range

Postby kidkid » February 9th, 2011, 9:00 am

Hi thanks it's worked right now.
It's my fault, when my partners has changed the table name from config file for testing.

I hope at the later version, the DeleteRange function will pass number of record which has been deleted as a callback function param.

Thanks so much, Henrik.
kidkid
 
Posts: 54
Joined: December 1st, 2010, 4:43 am


Return to BigDB



cron