Function Connection.lastCommandID

This gets incremented every time a command is issued or results are purged, so a mysql.result.ResultRange can tell whether it's been invalidated.

ulong lastCommandID() pure nothrow @property @safe const;