NTFY-250 Added function to assemble metadata queries
NTFY-250 Added function to assemble metadata queries

Added a function that defines the complete metadata query as well as a
counting query

bridgeit/bridgeit-common