I have written a SOQL-tool which allows me stuff like SELECT * FROM ...
It is based on APEX Schema functions and works very good. It expands and compiles a full list of fields in a string, which I feed into Database.query() like this:
Database.query( xs.soql('SELECT * FROM User') );
For Standard Objects I have this use case:
I like to keep the APEX class which contains the Database.query() lets say at v36.0 for some reasons or simply because I don't want to touch it. At the same time I want to upgrade library APEX class xs which contains xs.soql() to e.g. v40.0 or v42.0. Now obviously the schema is composing me fields introduced post v36 by the xs-class which I'm querying in a v36 context in which those fields do not exist and this will and up in an exception. Sure thing and well understood. I have already a down-compatibility filter in place, but the setup of this logic and maintainace of it requires some manual work and testing. I want to avoid or reduce it - but still do the crazy thing described above ;-)
I wonder if there is some documentation available, which states in which API version every standard field has been introduced or depreciated or removed from the schema? Same question for objects itself.
User is the most important affected SObject, but also others like Order, ContentDocument or the Fieldservice-Stuff introduced around v39/40.
At least these documentations are not stating the API Versions for fields:
Are the other documentations for that?
Has someone maybe created a script or tool which digs this out of the schema by comparing result of different API versions to each others and digest the diff? I ask because we have started to do that and I don't want to reinvent the wheel...