As of April 12th, you must go to Progress SupportLink to create new support cases or to access existing cases. Please, bookmark the SupportLink URL and use the new portal to contact the support team.
How to i fetch a entire specific column from my collection. IOS
h
harishmaddula32
started a topic
over 8 years ago
Hi I had a question. How to i fetch a entire specific column from my collection.
Best Answer
P
Pranav J
said
over 5 years ago
Tayger,
While reviewing Kinvey's REST API guide, I found there is a modifier called "fields" which is used to only return a certain set of properties from matching entities. Check this link. Please ignore my earlier comment since use of 'fields' went unnoticed as the SDK guide doesn't mention it. While using iOS SDK, you would pass this as Query fields, and specify the fields you want to be returned. Check this link for the details. Certain fields that are essential to each entity will always be returned e.g. _id, _acl and _kmd.
Good morning Harish,
Unfortunately there is no "easy" way to do this with MongoDB.
Thanks,
T
Tayger
said
over 5 years ago
Is it still (3 years later) still a fact (based by concept) that I always will get all columns of a collection on querying it?
Example in RDB:
SELECT a, b, c FROM table;
-> Returns values from columns a, b, c
SELECT a FROM table;
-> Returns only values from column a
So there is no similar option using MongoDB? Just considering to reduce traffic by querying what I really need at that time.
P
Pranav J
said
over 5 years ago
Tayger,
Yes. When you are querying a datastore, you will always get the complete entity rows which are matching the query in the JSON format i.e. it will contain all the columns available for that entity row/ record.
Thanks,
Pranav
Kinvey
P
Pranav J
said
over 5 years ago
Answer
Tayger,
While reviewing Kinvey's REST API guide, I found there is a modifier called "fields" which is used to only return a certain set of properties from matching entities. Check this link. Please ignore my earlier comment since use of 'fields' went unnoticed as the SDK guide doesn't mention it. While using iOS SDK, you would pass this as Query fields, and specify the fields you want to be returned. Check this link for the details. Certain fields that are essential to each entity will always be returned e.g. _id, _acl and _kmd.
Thanks,
Pranav
T
Tayger
said
over 5 years ago
While doing some researches I have found them too and tried them out yesterday - work smoothly! It's no problem to get some other additional default values back just no "big" JSON documents. ;)
harishmaddula32
Tayger,
While reviewing Kinvey's REST API guide, I found there is a modifier called "fields" which is used to only return a certain set of properties from matching entities. Check this link. Please ignore my earlier comment since use of 'fields' went unnoticed as the SDK guide doesn't mention it. While using iOS SDK, you would pass this as Query fields, and specify the fields you want to be returned. Check this link for the details. Certain fields that are essential to each entity will always be returned e.g.
_id
,_acl
and_kmd
.Thanks,
Pranav
1 person has this question
- Oldest First
- Popular
- Newest First
Sorted by Oldest FirstDamien Bell
Tayger
Is it still (3 years later) still a fact (based by concept) that I always will get all columns of a collection on querying it?
Example in RDB:
SELECT a, b, c FROM table;
-> Returns values from columns a, b, c
SELECT a FROM table;
-> Returns only values from column a
So there is no similar option using MongoDB? Just considering to reduce traffic by querying what I really need at that time.
Pranav J
Tayger,
Yes. When you are querying a datastore, you will always get the complete entity rows which are matching the query in the JSON format i.e. it will contain all the columns available for that entity row/ record.
Thanks,
Pranav
Kinvey
Pranav J
Tayger,
While reviewing Kinvey's REST API guide, I found there is a modifier called "fields" which is used to only return a certain set of properties from matching entities. Check this link. Please ignore my earlier comment since use of 'fields' went unnoticed as the SDK guide doesn't mention it. While using iOS SDK, you would pass this as Query fields, and specify the fields you want to be returned. Check this link for the details. Certain fields that are essential to each entity will always be returned e.g.
_id
,_acl
and_kmd
.Thanks,
Pranav
Tayger
While doing some researches I have found them too and tried them out yesterday - work smoothly! It's no problem to get some other additional default values back just no "big" JSON documents. ;)
-
Why do I get "Undefined symbols" errors when building with KinveyKit?
-
How do I register push tokens?
-
When using social login, to perform a log-out, do I need to log out of the social network, Kinvey, o
-
How can I assign additional properties to users?
-
Does KinveyKit support 64-bit ARM devices, such as iPhone 5s?
-
Authorization Token Invalid or Expired
-
BOOL and how it is stored in the database.
-
Offline saving throwing errors
-
Custom endpoint not able to form request object
-
Security through business logic
See all 437 topics