IndexFieldNames vs SortedFields

The offical for ZeosLib 7.3 Report problems, ask for help, post proposals for the new version of Zeoslib 7.3/v8
Quick Info:
-We made two new drivers: odbc(raw and unicode version) and oledb
-GUID domain/field-defined support for FB
-extended error infos of Firebird
-performance ups are still in queue
In future some more feature will arrive, so stay tuned and don't hassitate to help
Post Reply
MJFShark
Expert Boarder
Expert Boarder
Posts: 211
Joined: 04.06.2020, 13:59

IndexFieldNames vs SortedFields

Post by MJFShark »

Hi All!

I've always used IndexFieldNames to sort and it seemingly works very well. I recently started using TZMemTable (very nice btw!) and ran into the issue that the base class for all of the various TZDataSet classes is TZAbstractRODataset and its IndexFieldNames property is protected (and so I'm using the standard "TZDatasetHack = class(TZAbstractRODataset);" hack to get access to it, but that's not ideal.) In looking at the code I noticed that there is a public "SortFields" property that seems similar. However, I often do multi-level sorts where ASC or DESC is on the field level (i.e. IndexFieldNames := 'EMPNAME ASC; EMPSALARY DESC" and it looks like perhaps SortFields doesn't allow that.

So basically, two questions:

1. What's the story on IndexFieldNames vs SortedFields?
2. Would promoting IndexFieldNames to public be possible or is there some reason to keep it protected?

Thanks, as always!

-Mark
Post Reply