Added parsing of database query arguments. Closes ##544.