code: private Object wrap(final Object value) {
  
  		if (value instanceof Map) {
  
  			return new MapResultWrapper(db, (Map)value);
  		}
  
  		if (value instanceof Collection) {
  
  			return wrap((Collection)value);
  		}
  
  		return wrapper.apply(value);
  	}
docs: ----- private methods -----