More structured query API improvements