Skip to content

as fou multiple conditions #48

@cjz9032

Description

@cjz9032
    $indexedDBProvider
    .connection('myIndexedDB11')
    .upgradeDatabase(1, function(event, db, tx) {
        var objStore = db.createObjectStore('5173', {
            keyPath: "id",
            autoIncrement: true
        });
        objStore.createIndex('i3n_idx', ['hero','skin','price'], {
            unique: false
        });
    });

$indexedDB.openStore('5173', function(store) {
        var find = store.query();
        //  $between(lower, upper, doNotIncludeLowerBound? true/false, doNotIncludeUpperBound true/false) - between two bounds 
        find.$between(
            [$scope.vm.Hmin, $scope.vm.Smin, $scope.vm.Pmin], [$scope.vm.Hmax, $scope.vm.Smax, $scope.vm.Pmax], true, true
        );
        find.$index("i3n_idx");
        store.eachWhere(find).then(function(accounts) {
            $scope.vm.result = accounts; 
        });
    });

It looks like it just looking at the first condition( Hmin,Hmax ), ignoring the other conditions [(Smin,Smax)...].

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions