Rename method to build selection clause for database

change method signature too: match can be caluclated from uri