Use special lergic_kv versions of queries; support {lookup,rel} for query metaprogramming