Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add filters option to fetchFirestoreCollection #1

Open
wants to merge 1 commit into
base: feat/add-missing-methods-firebasex-plugin
Choose a base branch
from

Conversation

abilbaotm
Copy link

this PR complements danielsogl#3458

The fetchFirestoreCollection function now requires a filter to be set. It can be an array or a boolean

var collection = "my_collection";
var filters = [
    ['where', 'field', '==', 'value'],
    ['orderBy', 'field', 'desc']
];
FirebasePlugin.fetchFirestoreCollection(collection, filters, function(documents){
    console.log("Successfully fetched collection: "+JSON.stringify(documents));
}, function(error){
    console.error("Error fetching collection: "+error);
});

example from https://github.com/dpa99c/cordova-plugin-firebasex#fetchfirestorecollection

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant