Skip to content

Releases: google/mug

Release 8.2

10 Nov 22:18
Compare
Choose a tag to compare

Mug Core

  • Substring.RepeatingPattern supports matching from the middle of a string:
    word().repeatedly().match(input, fromIndex)

Mug Guava

  • SafeSql - an injection-safe dynamic SQL template for JDBC. User-friendly API supporting powerful yet intuitive dynamic SQL composition and parameterization:
    SafeSql usersByName(String who, @CompileTimeConstant List<String> columns) {
      return SafeSql.of("SELECT `{columns}` FROM Users WHERE name LIKE '%{who}%'", columns, who);
    }
    
    try (var connection = DriverManager.getConnection(...)) {
      // SELECT `id`, `name` FROM Users WHERE name LIKE '%Emma%'
      List<User> users = usersByName("Emma", asList("id", "name"))
          .query(connection, row -> new User(row.getLong("id"), row.getString("name")));
      ...
    }

Release 8.1

29 Sep 18:06
Compare
Choose a tag to compare

Core:

Guava Addons

Release 8.0

13 Apr 16:50
Compare
Choose a tag to compare

Release 8.0

Release 7.2

09 Mar 22:31
Compare
Choose a tag to compare
  • Substring.replaceAllFrom().
  • Support up to 8 lambda args in Substring.

Release 7.1

21 Dec 04:57
Compare
Choose a tag to compare

Release 7.0

03 Dec 04:32
Compare
Choose a tag to compare
  • StringFormat template support
  • SafeQuery and GoogleSql for injection-safe SQL
  • ErrorProne (mug-errorprone) checks to provide compile-time safety for StringFormat parsing, formatting and templating.
  • Bazel build integration

Thanks to xingyutangyuan for the contribution to the ErrorProne plugin and Bazel integration!

Release 6.6

25 Mar 03:58
Compare
Choose a tag to compare
  • StringFormat - parsing structured data from strings.
  • MoreCollectors.combining() to combine elements of a short stream with lambdas.

Release 6.5

30 Dec 05:30
Compare
Choose a tag to compare

Release 6.4

17 Sep 04:59
Compare
Choose a tag to compare

Release 6.3

10 Jul 04:02
Compare
Choose a tag to compare