Add the ability to specify the type of record to query