Use a pointer to the string when building clauses in SQLite
Handle results from views correctly for CouchDB and finished building the map function.