>Ids</code></a> when they change, use the <a href="/api/queries/interfaces/queries/queries/methods/listener/addresultsortedrowidslistener/"><code>addResultSortedRowIdsListener</code></a> method.</p><section class="s2"><h2>Example</h2><p>This example creates a <a href="/api/queries/interfaces/queries/queries/"><code>Queries</code></a> object, a single query definition, and then calls this method on it (as well as a non-existent definition) to get the <a href="/api/queries/type-aliases/result/resultrow/"><cod