Scanamo v1.0-M13 Release Notes

Release Date: 2020-10-05 // over 3 years ago
  • Hey folks.

    ๐Ÿš€ Loads happened since last milestone release and my apologies to those who have been waiting. In February, I left the Guardian for pastures new and have since had zero motivation to work on this project. In fact I took no pleasure in working to this project, and the lack of people from the Guardian contributing has not been encouraging. So, this will be my last release, I take much more pleasure in other projects that I had to leave aside for this one. The highlights in this release are mostly syntactic, but since this is the only selling point for this library, I think they are important.

    ๐Ÿ—„ Deprecating tuple syntax

    ๐Ÿ‘€ The API has not aged well, I feel. Among others, the weird syntax for key equality conditions, which perhaps made sense when the library was created, is not something you would see in other recent libraries. So, this is gone:

    table.get(key -\> value)
    

    and instead I've introduced an operator very similar to Slick's own:

    table.get(key === value)
    

    Same for key IN (value1, value2, ..., valueN) conditions. Gone is

    table.getAll(key -\> Set(value1, value2, ..., valueN))
    

    welcome

    table.getAll(key in Set(value1, value2, ..., valueN))
    

    Ultimately I think both should go anyway and be reduced to:

    table.get(value) table.getAll(value1, value2, ..., valueN)
    

    as the key for a table or secondary index should be defined once, at the creation site.

    โž• Add support for CONTAINS queries

    You can now filter for rows where an attribute contains a substrings, just like that:

    table.filter(attribute.contains("substring")).scan
    

    ๐Ÿ‘Œ Improved BETWEEN queries

    You should be able to just write

    table.filter(attribute between value1 and value2).scan
    

    which previously was unsightly:

    table.filter(attribute between (value1 and value2)).scan
    

    ๐Ÿฑ ๐Ÿคฎ

    โฌ†๏ธ Upgrade to AWS SDK v2 ๐ŸŽ‰

    ๐Ÿš€ You're welcome. It also allowed me to remove all the retry logic that was added for the alpakka interpreter in the previous release.

    First shot at transactional APIs

    โšก๏ธ The great @rmckirby was kind enough to contribute transactional updates and deletes, given by the folowing APIs:

    table.transactUpdateAll(List( key1 -\> update1, key2 -\> update2, ..., keyN -\> updateN )) table.transactDeleteAll(List(key1, key2,..., keyN))
    

    Ultimately, a transaction crosses table boundaries so a bespoke abstraction should be added, e.g.

    (table1.update(key, update) \>\> index2.delete(key) \>\> table3.put(key, value)).transactionally
    

    ๐Ÿ‘Œ Improve semi auto-derivation

    The first release of Magnolia-based derivation worked a bit too well, as it automatically derived all types involved in semi auto-derivation. Now, the compiler will report an error, which is the expected behaviour.

    โฌ‡๏ธ Drop support for Scala 2.11

    Sorry if you're stuck with that version, but it was starting to become problematic, esp. as Magnolia was adopted.

    Too many @scala-steward contributions to count

    This is such a valuable project, everyone should use it in their own environment, even as a standalone installation.