question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

How to declare a query in the Collection options?

See original GitHub issue

The docs claim that query is part of the options argument of the Collection constructor, but don’t mention how to declare it. The only examples I found set the query on the already created collection reference like so:

// Create a collection and set a query on it
const col3 = new Collection('artists');
col3.query = col3.ref.orderBy('name', 'asc');

How would you pass this query as part of the options?

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:10 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
IjzerenHeincommented, Apr 3, 2018

Hey that’s actually a really elegant solution, I hadn’t considered that one, nice! I’ll take it into consideration when I continue work on the Query API.

0reactions
IjzerenHeincommented, Jun 5, 2018

Sweet!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Create a query collection - OCLC Support
Navigate to Metadata > Collection Manager > Create a Collection > Query collection. Note: To find query collections after you create them, you ......
Read more >
Create collections - Configuration Manager - Microsoft Learn
Configure a query rule for a collection · Name: Specify a unique name for the query. · Import Query Statement: Opens the Browse...
Read more >
5 PL/SQL Collections and Records - Database
"Querying a Collection". "BULK COLLECT Clause" for information about retrieving query results into a collection. "Collection Variable Declaration" for ...
Read more >
Perform simple and compound queries in Cloud Firestore
Cloud Firestore provides powerful query functionality for specifying which documents you want to retrieve from a collection or collection group.
Read more >
Query Documents — MongoDB Manual
Select All Documents in a Collection · Specify Equality Condition · Specify Conditions Using Query Operators · Specify AND Conditions · Specify OR...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found