CakePHP Cookbook Documentation 5.xthis task we can use the mapReduce() function. We need two callable functions the $mapper and the $reducer. The $mapper callable receives the current result from the database as first argument, the iteration as second argument and finally it receives an instance of the MapReduce routine it is running: $mapper = function ($article, $key, $mapReduce) { $status = 'published'; if ($article->isDraft() || 'unpublished'; } $mapReduce->emitIntermediate($article, $status); }; In the above example $mapper is calculating the status of an article, either published or unpublished, then it calls emitIntermediate()0 码力 | 1080 页 | 939.39 KB | 1 年前3
CakePHP Cookbook 4.x
this task we can use the mapReduce() function. We need two callable functions the $mapper and the $reducer. The $mapper callable receives the current result from the database as first argument, the iteration as second argument and finally it receives an instance of the MapReduce routine it is running: $mapper = function ($article, $key, $mapReduce) { $status = 'published'; if ($article->isDraft() || 'unpublished'; } $mapReduce->emitIntermediate($article, $status); }; In the above example $mapper is calculating the status of an article, either published or unpublished, then it calls emitIntermediate()0 码力 | 1249 页 | 1.04 MB | 1 年前3
Spring Boot 1.2.9.BUILD-SNAPSHOT Reference Documentationgenerator.=true|false com.fasterxml.jackson.databind.MapperFeature spring.jackson.mapper. =true|false com.fasterxml.jackson.core.JsonParser.Feature spring.jackson.parser. size. # SPRING HATEOAS (HateoasProperties) spring.hateoas.apply-to-primary-object-mapper=true # if the primary mapper should also be configured # HTTP encoding (HttpEncodingProperties) spring.http.encoding configured encoding # HTTP message conversion spring.http.converters.preferred-json-mapper= # the preferred JSON mapper to use for HTTP message conversion. Set to "gson" to force the use of Gson when both 0 码力 | 393 页 | 360.45 KB | 1 年前3
Spring Boot 1.2.3.RELEASE Reference Documentationgenerator.=true|false com.fasterxml.jackson.databind.MapperFeature spring.jackson.mapper. =true|false com.fasterxml.jackson.core.JsonParser.Feature spring.jackson.parser. added # SPRING HATEOAS (HateoasProperties) spring.hateoas.apply-to-primary-object-mapper=true # if the primary mapper should also be configured # HTTP encoding (HttpEncodingProperties) spring.http.encoding configured encoding # HTTP message conversion spring.http.converters.preferred-json-mapper= # the preferred JSON mapper to use for HTTP message conversion. Set to "gson" to force the use of Gson when both 0 码力 | 390 页 | 358.87 KB | 1 年前3
Spring Boot 1.2.8.RELEASE Reference Documentationgenerator.=true|false com.fasterxml.jackson.databind.MapperFeature spring.jackson.mapper. =true|false com.fasterxml.jackson.core.JsonParser.Feature spring.jackson.parser. size. # SPRING HATEOAS (HateoasProperties) spring.hateoas.apply-to-primary-object-mapper=true # if the primary mapper should also be configured # HTTP encoding (HttpEncodingProperties) spring.http.encoding configured encoding # HTTP message conversion spring.http.converters.preferred-json-mapper= # the preferred JSON mapper to use for HTTP message conversion. Set to "gson" to force the use of Gson when both 0 码力 | 392 页 | 360.10 KB | 1 年前3
Spring Boot 1.2.7.RELEASE Reference Guidegenerator.=true|false com.fasterxml.jackson.databind.MapperFeature spring.jackson.mapper. =true|false com.fasterxml.jackson.core.JsonParser.Feature spring.jackson.parser. size. # SPRING HATEOAS (HateoasProperties) spring.hateoas.apply-to-primary-object-mapper=true # if the primary mapper should also be configured # HTTP encoding (HttpEncodingProperties) spring.http.encoding configured encoding # HTTP message conversion spring.http.converters.preferred-json-mapper= # the preferred JSON mapper to use for HTTP message conversion. Set to "gson" to force the use of Gson when both 0 码力 | 391 页 | 359.65 KB | 1 年前3
Spring Boot 1.2.6.RELEASE Reference Guidegenerator.=true|false com.fasterxml.jackson.databind.MapperFeature spring.jackson.mapper. =true|false com.fasterxml.jackson.core.JsonParser.Feature spring.jackson.parser. size. # SPRING HATEOAS (HateoasProperties) spring.hateoas.apply-to-primary-object-mapper=true # if the primary mapper should also be configured # HTTP encoding (HttpEncodingProperties) spring.http.encoding configured encoding # HTTP message conversion spring.http.converters.preferred-json-mapper= # the preferred JSON mapper to use for HTTP message conversion. Set to "gson" to force the use of Gson when both 0 码力 | 391 页 | 359.56 KB | 1 年前3
CakePHP Cookbook 3.x
this task we can use the mapReduce() function. We need two callable functions the $mapper and the $reducer. The $mapper callable receives the current result from the database as first argument, the iteration as second argument and finally it receives an instance of the MapReduce routine it is running: $mapper = function ($article, $key, $mapReduce) { $status = 'published'; if ($article->isDraft() || 'unpublished'; } $mapReduce->emitIntermediate($article, $status); }; In the above example $mapper is calculating the status of an article, either published or unpublished, then it calls emitIntermediate()0 码力 | 1244 页 | 1.05 MB | 1 年前3
Spring Boot 1.3.0.M2 Reference Documentationgenerator.=true|false com.fasterxml.jackson.databind.MapperFeature spring.jackson.mapper. =true|false com.fasterxml.jackson.core.JsonParser.Feature spring.jackson.parser.< size. # SPRING HATEOAS (HateoasProperties) spring.hateoas.apply-to-primary-object-mapper=true # if the primary mapper should also be configured # HTTP encoding (HttpEncodingProperties) spring.http.encoding configured encoding # HTTP message conversion spring.http.converters.preferred-json-mapper= # the preferred JSON mapper to use for HTTP message conversion. Set to "gson" to force the use of Gson when both 0 码力 | 453 页 | 414.34 KB | 1 年前3
Spring Boot 1.3.0.M3 Reference Documentationgenerator.=true|false com.fasterxml.jackson.databind.MapperFeature spring.jackson.mapper. =true|false com.fasterxml.jackson.core.JsonParser.Feature spring.jackson.parser.< accessed # SPRING HATEOAS (HateoasProperties) spring.hateoas.apply-to-primary-object-mapper=true # if the primary mapper should also be configured # HTTP encoding (HttpEncodingProperties) spring.http.encoding configured encoding # HTTP message conversion spring.http.converters.preferred-json-mapper= # the preferred JSON mapper to use for HTTP message conversion. Set to "gson" to force the use of Gson when both 0 码力 | 461 页 | 421.14 KB | 1 年前3
共 103 条
- 1
- 2
- 3
- 4
- 5
- 6
- 11













