I'm upserting a list of custom objects in an Apex controller that are retrieved on demand from an external source. My object has an external identifier field used to help the database call determine if the indiviudual objects needs to be inserted/updated.
Basically, after the upsert, I would like to know which of these objects have been inserted, and which have been updated. Is this possible? I see in external API integrations you have access to the UpsertResult class, which has an attribute isCreated(), which tells you exactly this, but I can't see any way to get this from directly inside Apex.
I know I could do a SOQL interrogation of the objects before the upsert, just curious to see if I could get this information directly from the DML call.