WIP: fold sync queries into ResourceTable protocol.