add upsert support to query builder

fixes #93