Questions tagged [querying]
516 questions
4
votes
1 answer
Firebase database filtering with multiple values
On Firebase Youtube channel there is a tutorial showing how to convert common SQL queries to Firebase.
The last query is to select all users with age = 28 and who lives in Berlin. So to get them, we need to create an index, like 28_Berlin for user,…

Graykos
- 1,281
- 3
- 20
- 31
4
votes
1 answer
Rails: How to store a JSON object from a form and query it?
I am new to rails and am in need of help. I want my new post form to allow users to copy and paste the text from a JSON file into a text_area and have it stored as a JSON object in my Postgresql database. Then I want to be able to query the JSON…

Zach Bryant
- 41
- 4
4
votes
0 answers
Parse.com: Querying object items in array collection
Let's say I have a Parse class "Pages" with a column "index" and a row that contains the following value for index:
{
"date": "2016-05-14",
"tags": [
{
"score": 12,
"name": "Taekwondo"
}, {
…

Achim Koellner
- 913
- 12
- 22
4
votes
4 answers
Querying a polymorphic association
I have a polymorphic association like this -
class Image < ActiveRecord::Base
has_one :approval, :as => :approvable
end
class Page < ActiveRecord::Base
has_one :approval, :as => :approvable
end
class Site < ActiveRecord::Base
has_one…

dewdrops
- 277
- 2
- 8
4
votes
1 answer
mysql select statement with limit offset bigger than actually records
I create an mysql-statement that paginates the results using LIMIT x, n (where x is the offset and n the returned entries).
The offset is created using GET-Vars in the form of page=x.
Now Google has some strange entries in its index that come from…

Swissdude
- 3,486
- 3
- 35
- 68
4
votes
3 answers
How do you find the ParseRoles currently associated with the current ParseUser?
I want to populate a ListView with an Array or an ArrayList of the different ParseRoles that the current ParseUser has associated with them. I presume this requires some kind of query on the current User, however I'm just not really sure how you…

edwoollard
- 12,245
- 6
- 43
- 74
4
votes
1 answer
Lync - PowerShell - User status
G'day everyone,
I was checking out Lync PowerShell Blog and couldn't find much about querying Lync server for users by status (Available, Busy etc). There's this but it is for the SDK, can anyone give an example of retrieving users by their online…

Daniel Protopopov
- 6,778
- 3
- 23
- 39
3
votes
1 answer
pgAdmin 4 - very poor performance of Query-Tool autocomplete, is it normal?
Some time ago I've moved from mySql's phpMyAdmin to postgres's pgAdmin 4.
What I've noticed is that pgAdmin's query tool has very slow autocompletion. Usually it's just faster to type keyword/identifier on your own than waiting till autocompletion…

USHKA
- 647
- 4
- 18
3
votes
1 answer
Firestore document references, can you expand the document server side?
According to this What is firestore Reference data type good for?. Currently it looks like you have to do a round trip to fetch the data for each document reference in your original query.
Is this on the roadmap to do this expand/aggregation in the…

hobochild
- 73
- 5
3
votes
1 answer
Rails order by count based on values of column
Rails 5.1.2
I have a two models Student and Award this way:
class Student < ApplicationRecord
has_many :awards
end
class Award < Application Record
belongs_to :students
# Categories
scope :attendance, -> { where(category: 0) }
#...(other…

user2985898
- 1,173
- 1
- 8
- 21
3
votes
2 answers
mongodb php getting fields unique values
I'm trying to get a list of unique values from the 'type' field from my mongodb collection. Example documents below:
{
"_id" : ...,
"type" : "report",
"tasks" : ...
}
{
"_id" : ...,
"type" : "research",
…

Mark
- 32,293
- 33
- 107
- 137
3
votes
2 answers
How to properly query a Firebase list in AngularFire2?
I'm developing an Angular2 application with Firebase as a backend. On a subpage I want to display some tasks for a given week which is specified by a route parameter.
I'm using a BehaviorSubject as a parameter to the AngularFire2 query the following…

paweloque
- 18,466
- 26
- 80
- 136
3
votes
1 answer
Add column to Eloquent
I'm trying to get an Eloquent collection with the next line:
Document::with('more_information')->anyScope()->get()
I'm getting a collection with 20 "columns", but I want to add another one to format a date in order to easily interact with other…

WindSaber
- 323
- 1
- 3
- 15
3
votes
1 answer
Saving and/or Querying User Display Names in Firebase using caseInSensitive?
I'm moving my project over to Firebase from Swift. Firebase user's don't have usernames but I'm allowing them to save a display name which works more like a attribute than an actual object. How can I get users to query for other users/"friends"…

Charles Jr
- 8,333
- 15
- 53
- 74
3
votes
2 answers
MongoDB: Query using $gte and $lte in java
I want to perform a query on a field that is greater than or equal to, AND less than or equal to(I'm using java btw). In other words. >= and <=. As I understand, mongoDB has $gte and $lte operators, but I can't find the proper syntax to use it. The…

kongshem
- 322
- 1
- 5
- 23