Back

Query select returns fields, that are not specificly requested.

  • 0
  • Databases
Camo
14 Feb, 2024, 18:33
TypeScript
Query.select(["status", "api_id", "owner", "$id"]),

returns databaseId, collectionId,

TypeScript
{
      status: "active",
      api_id: "12345",
      owner: "65cc7a4c9b65506c17cf",
      $id: "65cc823e3398ce82bf03",
      $databaseId: "dashboard",
      $collectionId: "jobs"
    }```
TL;DR
Developers are reporting that when using the Query.select function, unwanted fields are still being returned in the response. They want to know if there's a way to hide these unnecessary fields, such as databaseId and collectionId, from the response. It seems that querying on these attributes directly is not possible. There is no solution provided in the thread, but the developers suggest reporting the issue on GitHub if it hasn't been reported already.
Camo
14 Feb, 2024, 18:34

is there a way to hide the not neded data, databaseId and collectionId that we already know, because we are requesting in it ?

D5
14 Feb, 2024, 18:35

Looks like it's not possible to query select on those attributes 😬

Camo
14 Feb, 2024, 18:35

i don't want to query on them ,i want to get rid of them from the response

D5
14 Feb, 2024, 18:35

Yes, that's what I mean

Camo
14 Feb, 2024, 18:35

imagine you request 1 element, you get 3 instead, its too much data

D5
14 Feb, 2024, 18:36

Yes, I completely understand. It's like a bug. Not sure if it was reported previously on github, but if not, It would be great to make one

D5
14 Feb, 2024, 18:37

Previously something similar happened with id and creation/edit dates and got solved if I'm not wrong

Camo
14 Feb, 2024, 18:38

since we are on the topic of collections, one guy was asking today about due date, i was wondering if qe can querry with larger than dates as well?

Camo
14 Feb, 2024, 18:38

could not find any examples

Camo
14 Feb, 2024, 18:38

i will try to report that on github then, hope its not bilion questions to file in

Camo
14 Feb, 2024, 18:39

@D5 you know to which repo i should be reporting that? appwrite/console ?

Camo
14 Feb, 2024, 18:39

or is that sdk github?

D5
14 Feb, 2024, 18:40

Appwrite/appwrite will be best for this issue, I think

D5
14 Feb, 2024, 18:40

Check if it got reported previously, maybe someone else already created an issue

D5
14 Feb, 2024, 18:41

wdym?

Camo
14 Feb, 2024, 18:42

something like Query.greaterThan("score", 10) for datetime

Camo
14 Feb, 2024, 18:44

here's an example of the guy using due date -> https://discord.com/channels/564160730845151244/1207253709231366144

Camo
14 Feb, 2024, 18:44

i wrote an example for him, but it should be done with querying past date not like currently made, as its unefficent

Reply

Reply to this thread by joining our Discord

Reply on Discord

Need support?

Join our Discord

Get community support by joining our Discord server.

Join Discord

Get premium support

Join Appwrite Pro and get email support from our team.

Learn more