- This topic has 1 reply, 2 voices, and was last updated 9 years, 1 month ago by .
Viewing 2 posts - 1 through 2 (of 2 total)
Viewing 2 posts - 1 through 2 (of 2 total)
- You must be logged in to reply to this topic.
Integrated Application Platform
Integrated Application Platform › Forums › General › QueryAll and empty columns
Hi,
I noticed that a query in QueryView will show empty columns, but that when I use that same query in QueryAll, all empty columns are removed. Is there a reason for this difference? It does not matter, but I was just wondering why.
When a record is read from the database and converted to a Suneido object, empty fields are ignored – members are not created for them. This “works” because records have a default value for members of “”. This is why QueryAll (and other queries) work this way. (I have wondered if this was the best choice, but it is the way it has worked from the beginning.)
QueryView gets the fields for the query and then creates columns for all of them, regardless of whether there is data.
QueryView does not load all the data into memory, so it does not know if a given field is empty on all records.
I hope that explains it.