• v3 fc045d021c

    Version 3 Stable

    danieljsummers released this 2024-04-21 03:05:06 +00:00 | 0 commits to main since this release

    This is the official release of version 3 - no more RCs! The API has been stable, and these libraries have been implemented in several projects successfully.

    NOTE: This replaces BitBadger.Npgsql.Documents and BitBadger.Npgsql.FSharp.Documents. The namespace for PostgreSQL is BitBadger.Documents.Postgres, and both C# and F# syntax is contained in that namespace. A migration guide is available at the prior project site.

    Downloads
  • v3-rc2 06daa4ea5c

    v3 (RC 2) Pre-Release

    danieljsummers released this 2024-01-24 02:23:24 +00:00 | 10 commits to main since this release

    Release Candidate 2

    • Uses Field type for by-field queries (BREAKING)

    For by-field queries using RC 1, the functions required three parameters: the field name, an operator, and a value. The query building functions took just the name and operator, and the parameter building functions required just the name and value. Now, there is a Field type for this criteria, and it incorporates all three items. It has functions to create these easily, and they follow the form of Field.OP(name, value). (EX and NEX require no value.)

    This is a breaking change; what used to be three parameters ("FieldName" EQ 22) is now a function call (Field.EQ("FieldName", 22) in C# or (Field.EQ "FieldName" 22) in F#). Also, though value is defined as obj/object, PostgreSQL only recognizes string values; SQLite allows strings, numbers, and boolean values.

    • Adds RemoveFields* functions

    While the Patch* functions can be used to update portions of documents (including setting fields to null), if the calling application has the JSON serializer set to ignore null values, the null field is removed from the patch document, so the destination document is not updated. While a full update would replace the document, a better option here is to remove the fields from the document. These functions take an IEnumerable<string> (C#) or string list (F#) as their final parameter, and will remove the specified fields from the matching documents (by-ID, by-field for both, by-contains and by-JSON-path for PostgreSQL). (If using .NET 8/C# 12, this is a great place for the new collection syntax [ "Field1", "Field2" ].)


    Packages are available on NuGet.

    Downloads