Giter Club home page Giter Club logo

rxsimplenosql's People

Contributors

ardacebi avatar bryant1410 avatar diegomedina248 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

rxsimplenosql's Issues

Deleting multiple items not possible as described in the readme

Trying to delete multiple items from a bucket as described like this

bucket.newQuery()
        .filter(sampleBean -> sampleBean.getName().startsWith("S"))
        .delete()
        .subscribe();

will and cannot work, as the SimpleNoSQL documentation for the QueryBuilder#filter method already states that it will only be used when retrieving items from a bucket.
Also if you look at the DataDispatcher class in the SimpleNoSQL project, you will see that in fact, it really just deletes either a single item or a whole bucket.

This is my workaround (deltedItems is a list of items I want to delete, obviously):

 Completable completable = Completable.concat(
                                Observable.from(deletedItems)
                                    .map(item -> localBucket
                                                    .newQuery()
                                                    .entityId(item.getId())
                                                    .delete()));
return completable.andThen(Observable.just(true));

Can't access any method after bucket.newQuery()

Hi! Thank you for nice lib, but I can't build project because every time I get error "Cannot access xxx method in ""com.xmartlabs.rxsimplenosql.Bucket.BucketQueryBuilder".
Example:
`class SampleBean implements Entity {
private String name;
private String id;
private Map<String, Integer> mapping;

public String getName() {
    return name;
}

public void setName(String name) {
    this.name = name;
}

@Override
public String getId() {
    return id;
}

public void setId(String id) {
    this.id = id;
}

public Map<String, Integer> getMapping() {
    return mapping;
}

public void setMapping(Map<String, Integer> mapping) {
    this.mapping = mapping;
}

class sss{
    Bucket<SampleBean> bucket;
    public sss(Context context){
        Bucket<SampleBean> bucket = new Bucket<>(context, SampleBean.class, "bucketId");
    }

    public void single(){
        SampleBean entity = new SampleBean();
        entity.setId("1");
        entity.setName("Colin");
        Map<String, Integer> birthday = new HashMap<String, Integer>();
        birthday.put("day", 17);
        birthday.put("month", 2);
        birthday.put("year", 1982);
        entity.setMapping(birthday);

        bucket.newQuery()
                .save(entity)
                .subscribe();
    }
}

}`
Have you any ideas what is the problem?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.