Skip to content

Releases: ipavlic/apex-fp

Post Strike

26 Nov 20:11
Compare
Choose a tag to compare
  • renames noun-like functions to verb-like (for example FieldsMatch to MatchFields)
  • removes custom exception classes
  • small cleanups

Summit Series

28 Sep 16:06
Compare
Choose a tag to compare
  • null values now compared in PrimitiveComparer. Where relevant, null is smaller than non null.
  • OptionalDouble and OptionalDecimal values are final.
  • DoubleCollection, DecimalCollection and ObjectCollection constructors take Iterable instead of List. Constructors are private and collections are build with of to match SObjectCollection.
  • Directory structure was simplified to match an empty sf (sfdx) template.
  • Github action has been updated to work.

HMCS Shawinigan

25 Nov 17:07
Compare
Choose a tag to compare
  • Adds min and max to DoubleCollection and DecimalCollection
  • Renames AssignTo to Modify
  • Simplifies Fn structure

Mischief Night

30 Oct 19:24
Compare
Choose a tag to compare
  • Adds support for mapping to objects on Fn.MapTo
  • Introduces ObjectCollection to serve as a target for object mappings

Nathan Cirillo

23 Oct 02:23
Compare
Choose a tag to compare
  • Introduces MapTo
  • Raises test coverage
  • Consolidates many function factories into Fp

Thanksgiving Day

23 Oct 02:23
Compare
Choose a tag to compare
  • Lazy evaluation was added through SObjectStream
  • Library name has changed to apex-fp, to avoid confusion with apex/up for AWS Lambda
  • Documentation improvements and clean-ups

September Rain

27 Sep 18:03
Compare
Choose a tag to compare

Project moved to SFDX

March Break

04 Mar 12:56
Compare
Choose a tag to compare

Transform and resulting RecordTransform functionality were moved to explicitly named CopyFields to make the purpose clearer.

Polar Vortex

01 Feb 13:23
Compare
Choose a tag to compare

Experimental reduceType methods were removed in favour of mapToType style of methods, which return TypeCollection. This is similar to Java's Stream. For example,

Decimal totalAmount = Collection.of(opps).mapToDecimal(Opportunity.Amount).sum();

Current API is also unstable, and will possibly change to make the naming more consistent or to remove redundancies.

Previous naming favoured plural endings (groupByStrings, pluckDoubles), while new type collections use Java's singular convention.

One example of redundancy is Collection.of(opps).pluckDecimals(Opportunity.Amount) which yields the same result as Collection.of(opps).mapToDecimal(Opportunity.Amount).asList().

Black Tuesday

20 Nov 19:30
Compare
Choose a tag to compare

Adds Transform to support prototype-matching definition of SObjectToSobject functions. Put simply,

Opportunity prototype = new Opportunity(Name = 'Test')
Collection.of(opps).mapAll(Transform.record(prototype));

will copy all defined field values on the provided prototype to records in collection, overwriting any existing values for those fields. Other fields will not be touched.