Skip to content

Releases

v4.7.2

Choose a tag to compare

@reliktbk reliktbk released this 13 Nov 20:05

Fixed

  • SQLite: saving an object again after its transaction rolled back no longer overwrites another object. Since 4.0.0,
    ids a save took inside a transaction that rolled back went to the next save too: saving the first object again silently
    replaced the second one's data, and later saves and deletes could fail with UNIQUE constraint failed on _objects._id
    or _values._id. SQLite now never hands out an id twice. On every provider the ids a save assigned inside a rolled-back
    transaction go back to 0 on the objects, and a scheme created there is created again. Packages: redb.Core, redb.Core.Pro, redb.SQLite, redb.SQLite.Pro.

v4.7.1

Choose a tag to compare

@reliktbk reliktbk released this 11 Nov 19:33

Fixed

  • Constant and captured bool conditions in Where, WhereRedb and AllAsync. A bool variable of the caller in a
    condition (Where(x => includeAll || x.Age >= 32), Where(x => !skip)) failed with "Expression must be a property
    access"; it is now read as the value it holds. On the free providers Where(x => true), Where(x => false) and
    AllAsync with such a predicate failed in the SQL module; they now keep every object or none. Packages: redb.Core.
  • A filter by an array or list element taken by index, or through a method call in the path, read another field.
    Where(x => x.Items[0].Name == "a") and Where(x => x.Items.First().Name == "a") compared the field Name of the
    object itself and returned its rows, or failed later with "field not found". Such a filter now fails at once with
    NotSupportedException naming the path; use Contains(...) for an array of simple values, Any(...) for an array
    of list items, or keep the data in a dictionary
    and read the entry by its key. Packages: redb.Core.
  • Pro: a constant inside OR returned wrong rows. Where(x => x.Age >= 32 || true) returned only the objects
    matching the comparison and Where(x => x.Age >= 32 || false) returned nothing; they now return every object and the
    matching ones, as LINQ does. The same holds for the redbQuery forms x not in <empty list> OR ... and
    x in <empty list> OR .... On PostgreSQL Pro AllAsync(x => true) answered false for a set with objects; it answers
    true. A constant alone or inside AND answered right and is unchanged. Packages: redb.Core.
  • SQL Server: the database module never reached the version the package asks for (4.6.1 to 4.7.0). Every start
    applied the module again, and a start with AutoApplyDatabaseUpgrades = false or under a role without schema rights
    stopped with RedbSchemaOutdatedException, also right after the upgrade script was applied. Update the package: the
    module goes to 0.2.40 once and later starts leave the schema alone. Packages: redb.MSSql, redb.MSSql.Pro.

v4.7.0

Choose a tag to compare

@reliktbk reliktbk released this 07 Nov 01:55

Added

  • dotnet new redb-route-xmljson: XML to JSON and back without a class. A Tsak module whose XML routes turn an
    order into JSON by an XSD (arrays, numbers, booleans) and an HTTP API that turns it back into namespaced XML and
    checks it; the same round trip in C# with MarshalXmlJson / UnmarshalXmlJson. Packages: redb.Templates.

Changed

  • redb-route-beans shows the bean step and a bean call in a condition. The order route prices a line with
    <bean ref="#pricing" method="Gross(...)"/> and marks bulk lines with <filter expr="bean:pricing.IsBulk(header.qty)">;
    PriceCalculator has the synchronous IsBulk(int) the condition calls. Packages: redb.Templates.

Deprecated

  • .NET 8 and .NET 9 targets end with 4.7. Microsoft's support for both ends on 10 November 2026, so 4.7.0 is the
    last release whose packages target them; from 4.8.0 the packages target .NET 10 and later. Fixes on the 4.7.x line
    are still built for .NET 8, 9 and 10 while those lines can be built without known vulnerabilities. Move your projects
    to .NET 10 before taking 4.8.

Earlier versions

Earlier releases are archived by line in changelog/: 4.6.x, 4.5.x, 4.4.x, 4.3.x, 4.2.x, 4.1.x, 4.0.x, 3.x, 2.x, 1.x.

v4.6.2

Choose a tag to compare

@reliktbk reliktbk released this 05 Nov 05:18

Changed

  • Released in lockstep with redb.Identity 4.6.2. No change in redb itself: the packages move to 4.6.2 so the whole
    ecosystem stays on one number. Nothing to do on your side.

v4.6.1

Choose a tag to compare

@reliktbk reliktbk released this 04 Nov 06:50

Added

  • CreateStringCollationIndex builds the trigram index of StringCollation at start-up. Off by default. PostgreSQL
    Pro with the planner on builds IX__values__String_pattern_<collation> with CREATE INDEX CONCURRENTLY when no index
    serves the collation; under database ctype C it serves ASCII patterns only. The free provider logs that it has no
    effect there. See "Building it at start-up" in COLLATION.md. Packages: redb.Core, redb.Postgres, redb.Postgres.Pro.

Changed

  • PostgreSQL Pro warns at start-up when StringCollation has no index to search with. With the setting on, Pro
    (planner on) runs ignore-case searches over (_String COLLATE "<collation>"), which the stock trigram index cannot
    serve; the Warning gives the matching CREATE INDEX, the script redb.Postgres/sql/maintenance/string_collation_index.sql
    and what the database ctype means for it. See "PostgreSQL: decide by the database ctype" in COLLATION.md. Packages: redb.Postgres, redb.Postgres.Pro.

Fixed

  • SQL Server: the average of an integer field keeps its fraction in every form. A window average (Win.Avg) on the
    free provider, and AverageRedbAsync / AggregateRedbAsync over a base field such as Id on Pro, returned 32 for
    32.25. The free module moves to 0.2.40 and is applied at the next start. Packages: redb.MSSql, redb.MSSql.Pro.

v4.6.0

Choose a tag to compare

@reliktbk reliktbk released this 03 Nov 10:26

Breaking

  • Custom query providers: array groupings take one request. ExecuteArrayGroupedAggregateAsync is replaced by
    ExecuteArrayGroupQueryAsync(ArrayGroupQuery), grouped windows take havingJson, and the grouping interfaces drop the
    class, new() constraint on the item type. Only code that implements IRedbQueryProvider or IRedbQueryable changes. Packages: redb.Core. Upgrade: UPGRADING.md.
  • Custom contexts: IRedbContext.QueryRowsAsJsonAsync(sql, parameters) returns the rows of a statement as a JSON
    array of objects, as one command and one telemetry span. Only code that implements IRedbContext or derives from
    RedbContextBase changes. Packages: redb.Core. Upgrade: UPGRADING.md.
  • Custom list providers: IListProvider.GetListItemsByIdsAsync(ids) reads list items by their ids in one query, and
    ISqlDialect.ListItems_SelectByIds() is its statement. Only code that implements IListProvider or ISqlDialect
    changes. Packages: redb.Core. Upgrade: UPGRADING.md.

Added

  • GroupByArray groups inner arrays, arrays of simple values and fields of classes in the element. SelectMany over
    an inner array, s => s on string[], int[] and other value arrays, Agg.Count(g, condition) (also for GroupBy),
    WithWindow after GroupByArray, real SQL from ToSqlStringAsync, and a tree query groups only its subtree.
    See README, GroupBy. Packages: redb.Core, redb.Core.Pro, redb.Postgres, redb.MSSql, redb.SQLite.

Changed

  • Groupings throw instead of answering wrong. A computed key or aggregate, an unsupported array path or condition now
    throws NotSupportedException; a provider row without a selected column throws InvalidOperationException instead of
    giving a default value. Having(...).WithWindow(...) keeps the HAVING, and Win.Ntile(n) uses n. Packages: redb.Core, redb.Core.Pro, redb.Postgres, redb.MSSql, redb.SQLite. Upgrade: UPGRADING.md.
  • Pro analytics over array, dictionary and nested-class filters: one statement on SQL Server and SQLite.
    Aggregates, GroupBy, windows, GroupByArray and their tree forms read such a filter inside the same statement instead
    of passing the ids back as a parameter; on SQL Server a grouping over 67 000 such objects went from 2.4 s to 0.3-0.5 s.
    A != null on a member of the GroupByArray path is no longer evaluated. SQL previews show the embedded filter. Packages: redb.Core.Pro, redb.MSSql.Pro, redb.SQLite.Pro, redb.Postgres.Pro.
  • Manual index scripts in sql/maintenance/ of every provider. free_value_indexes.sql brings back the value
    indexes the free provider read before the PVT module retired them, under names upgrades do not drop; run it if free
    queries got slower. New SQL Server and SQLite databases no longer put _date_modify into three _objects indexes,
    and rebuild_objects_indexes_without_date_modify.sql brings an existing database to that shape. Nothing runs these
    scripts automatically. Packages: redb.Postgres, redb.MSSql, redb.SQLite.

Fixed

  • GroupBy(x => x.Status) with a list item as the key returned an item that carried only its id; the key is now
    the item a loaded object carries (Id, IdList, Value, Alias, IdObject), on every provider, flat and over a tree, in
    GroupBy, GroupByArray and grouped windows. The SQL is unchanged; the items are read in one extra query. Packages: redb.Core.
  • Pro: AggregateAsync over the elements of an array on a tree query (Agg.Sum(x.Props.Levels.Select(v => v)))
    threw NotSupportedException; it now returns the sum, average, minimum, maximum and count of the elements, as the
    flat query and Free do. Packages: redb.Core.Pro, redb.Postgres.Pro, redb.MSSql.Pro, redb.SQLite.Pro.
  • SQL Server Pro: GroupByArray with a condition on the objects was several times slower with the query planner on
    than off
    ; it now runs as fast either way (the example E142 went from 0.9 s to 0.25 s with the planner on). Packages: redb.MSSql.Pro.
  • SQL Server Pro: a tree GroupBy(...).WithWindow(...) with a filter on a nested-class field failed with
    "Invalid column name"; it now runs like the flat form. Packages: redb.MSSql.Pro.
  • Free: analytics skipped objects that store no value for the fields they read. Agg.Count() next to an aggregate
    over an array counted only objects with elements, and GroupBy (also with WithWindow) lost the group of objects
    whose key is unset. Both now match LINQ over the same objects, so such counts can grow: the example E150 reports
    101 831 employees where it reported 101 800. A Props filter on a tree query keeps its speed: about a second over a
    subtree of 100 thousand nodes. Packages: redb.Postgres, redb.MSSql, redb.SQLite.
  • Free: a list ordered by a field some objects leave unset returned only the objects that have it; all objects
    come back now, the unset ones first or last as the order says. The same holds for Skip/Take, Count and Any over
    such an order, flat and over a tree. Packages: redb.Postgres, redb.MSSql, redb.SQLite.
  • Free: WhereDescendantsOf(node, maxDepth) ignored its maxDepth and returned the whole subtree of the node. A second
    tree filter was dropped: WhereDescendantsOf(node).WhereLeaves() returned every descendant, now the leaves under the
    node. On SQL Server, TreeQuery(root, maxDepth).WhereLeaves() returned the leaves below maxDepth too; it now returns
    the leaves within it, as the other providers do. Packages: redb.Postgres, redb.MSSql, redb.SQLite.
  • Free: WhereLevel on TreeQuery(node) counted levels from the root of the whole tree; it now counts from the node
    the query starts from, as maxDepth and Pro do.
    TreeQuery<T>() without a start node is unchanged. Packages: redb.Postgres, redb.MSSql, redb.SQLite.
  • Free: TreeQuery(root, maxDepth) returned the whole subtree (4.0.0 to 4.5.1), and a subtree deeper than the props
    depth (10 by default) was cut there. Lists, counts and analytics of a tree query now stop at maxDepth, and without it
    they cover the whole subtree. Packages: redb.Postgres, redb.MSSql, redb.SQLite.
  • Pro: GroupByArray ran several metadata queries per call, one for each segment of the array path and each element
    field, and its SQL preview ran them again. The field metadata is now cached as for the other query forms: a repeated
    call runs the data statement alone. Packages: redb.Postgres.Pro, redb.MSSql.Pro, redb.SQLite.Pro.
  • Pro: GroupBy(x => x.Status.Value) on a list item field returned the id of the item as the key when the query
    planner was turned off (EnablePvtPrefilter = false); it now returns the text of the item, as with the planner on.
    Grouped windows and the tree forms likewise. Packages: redb.Postgres.Pro, redb.MSSql.Pro, redb.SQLite.Pro.
  • Pro: WhereHasAncestor and WhereHasDescendant on a tree query were ignored by aggregates, GroupBy, windows and
    GroupByArray; the figures covered the whole tree.
    They now cover the nodes the list returns. On PostgreSQL,
    CountAsync of TreeQuery(several roots, maxDepth) with the prefilter planner off no longer fails with a syntax error. Packages: redb.Postgres.Pro, redb.MSSql.Pro, redb.SQLite.Pro.
  • Pro: WhereLevel on a tree query was ignored by GroupBy, windows and aggregates; the figures covered the whole
    tree.
    They now cover the chosen levels, as the list does (SumAsync, AggregateAsync, GroupBy, WithWindow,
    GroupBy(...).WithWindow(...)). Packages: redb.Postgres.Pro, redb.MSSql.Pro, redb.SQLite.Pro.
  • SQLite: the grouping, window and aggregate statements now appear in telemetry as commands, as on the other
    providers. Packages: redb.SQLite, redb.SQLite.Pro.
  • SQLite Free: Agg.Average over the elements of an integer array was rounded down to a whole number; it is now
    the exact average (1, 2, 2 average 1.67, not 1). Packages: redb.SQLite.

Earlier versions

Earlier releases are archived by line in changelog/: 4.5.x, 4.4.x, 4.3.x, 4.2.x, 4.1.x, 4.0.x, 3.x, 2.x, 1.x.

v4.5.1

Choose a tag to compare

@reliktbk reliktbk released this 30 Oct 10:57

Changed

  • The redb-route-* template descriptions (dotnet new <name> -h) name the C# routes too. Each one says what the template's
    RouteBuilder in routes/*.cs does next to the XML routes, as the table in the package README does. Packages: redb.Templates.

v4.5.0

Choose a tag to compare

@reliktbk reliktbk released this 29 Oct 20:08

Added

  • IUserProvider.SetPasswordHashAsync(user, passwordHash) stores a ready password hash. Use it for an administrator
    password given in configuration as a BCrypt hash; the default hasher accepts it at login. Custom IUserProvider
    implementations keep compiling: the default member throws NotSupportedException. Packages: redb.Core.
  • dotnet new redb-identity-app: an application on redb.Identity. A Tsak module in the same worker as
    Identity, whose API checks bearer tokens by introspection over direct-vm (cached, 401/403/503 as RFC 6750
    says), and a Blazor web server that signs users in with OpenID Connect. Options: --web, --framework. Packages: redb.Templates.
  • dotnet new redb-route-eip creates a Tsak module with the common integration patterns in XML markup. A seda
    queue, an idempotent consumer, a throttle, a wire tap into an aggregator, a content-based router, a splitter and the
    context's dead letter channel, driven by a timer: it runs without a broker or a database. Packages: redb.Templates.
  • dotnet new redb-route-kafka creates a Tsak module for Kafka in XML markup. One connection bean for all
    endpoints, a producer keyed by the order id, a consumer group that retries a failed record twice and then moves
    it to a topic of failed records, and a compose file for a local single-node Kafka. The brokers are a required key. Packages: redb.Templates.
  • dotnet new redb-route-rabbitmq creates a Tsak module for RabbitMQ in XML markup. One connection bean for all
    endpoints, a producer, a consumer that retries a failed message twice and then moves it to a queue of failed
    messages, and a compose file for a local broker. The password is a required configuration key. Packages: redb.Templates.
  • dotnet new redb-route-rest creates a Tsak module with an HTTP JSON API in XML markup. A <rest> block with
    a GET and a POST, the POST body checked against a JSON schema from resources/, a 400 answer on a bad body and
    the OpenAPI document at /api/openapi.json. Packages: redb.Templates.
  • dotnet new redb-route-sql-batch creates a Tsak module that writes to SQL in batches in XML markup. Single
    messages are aggregated into batches of 20 and written in one transaction; a row the database refuses is undone
    under its savepoint and reported, the others commit. --db sqlite (the default), postgres or mssql. Packages: redb.Templates.
  • dotnet new redb-route-sql creates a Tsak module with the SQL outbox pattern in XML markup. A route writes
    rows, a poll consumer reads the new ones and marks each done, or failed with the reason. --db sqlite (the default,
    no server needed), postgres or mssql picks the driver, the connection string and the table definition. Packages: redb.Templates.
  • dotnet new redb-route creates a Tsak module with routes in XML markup. A timer route, context.xml, the
    context configuration sample and the redb-route-xml tool as a local tool; dotnet build -p:PackRouteOnBuild=true
    checks the markup and writes the .tpkg. Options: --context, --framework. Packages: redb.Templates.
  • Every redb-route-* template puts an AGENTS.md into the project. It tells an AI coding agent what the
    project is, where the schema and the connector options come from, how keys, secrets and beans are written, how to
    check a change and how the module is deployed, plus a section on the routes of that template. Packages: redb.Templates.
  • dotnet new redb-route-as2 creates a Tsak module for AS2 in XML markup. It sends a signed and encrypted
    document and verifies the partner's signed MDN, and receives with duplicate detection. A compose file makes test keys
    and runs a local exchange with OpenAS2 in both directions. Packages: redb.Templates.
  • dotnet new redb-route-as4 creates a Tsak module for AS4 (eDelivery) in XML markup. A route that sends a
    signed and encrypted message and waits for the partner's signed receipt, a receiving route with duplicate detection,
    and a compose file for a local exchange with Holodeck B2B. The key file, its password and the partner's
    certificate are required configuration keys. Packages: redb.Templates.
  • dotnet new redb-route-beans creates a Tsak module whose XML routes call a C# class of the project. The bean is
    built in context.xml from configuration (constructor argument and property), the routes call a method with
    expression arguments and one that takes the exchange; the project's assembly travels in the package. Packages: redb.Templates.
  • dotnet new redb-route-cron creates a Tsak module with scheduled jobs in XML markup. A job on a Quartz cron
    expression in a configured time zone, never started beside a run still going and skipping runs missed while the
    worker was down, and an interval on the same scheduler. Packages: redb.Templates.
  • dotnet new redb-route-email creates a Tsak module that sends and reads e-mail in XML markup. A sender over SMTP
    with retries and a reader of the unseen messages of an IMAP inbox that marks each read once processed, with one
    connection bean per server. A compose file runs GreenMail and the module on a worker. Packages: redb.Templates.
  • dotnet new redb-route-file creates a Tsak module that processes files in XML markup. An inbox polled for new
    files, each checked against a schema, moved to a done or an error folder, with a receipt written to an outbox.
    --transport file (the default), ftp or sftp picks the connector; a compose file runs a local FTP or SFTP server. Packages: redb.Templates.
  • dotnet new redb-route-ldap creates a Tsak module for LDAP in XML markup. A watch that loads the user entries
    once and then follows their changes, a search on a timer and a password check by bind, all through one connection
    bean. A compose file starts OpenLDAP with test entries and the module on a worker. Packages: redb.Templates.
  • dotnet new redb-route-redb creates a Tsak module that stores redb objects from XML routes. A props class of
    the project is the scheme, synced at context start; the routes save objects by a unique key and query them through
    a named redb instance of the context on Pro with ChangeTracking. --db sqlite (the default), postgres or mssql. Packages: redb.Templates.
  • dotnet new redb-route-s3 creates a Tsak module for S3 in XML markup. A route writes objects into a bucket, a
    poll consumer reads the new ones and moves each to an archive bucket once it is processed. One connection bean serves
    AWS S3 and S3-compatible stores; a compose file runs a local store and the module on a worker. Packages: redb.Templates.
  • dotnet new redb-route-scatter-gather creates a Tsak module with scatter-gather in XML markup. One request
    goes to three recipients in parallel, the answers that arrive within the timeout are folded into the best price,
    a recipient that is too slow is left out. It runs without a broker. Packages: redb.Templates.
  • dotnet new redb-route-validator-xslt creates a Tsak module that checks XML against an XSD and transforms it
    with XSLT, in XML markup.
    The schema and the stylesheet live in resources/ and travel in the package; a document
    the schema refuses goes to its own route with the reason. It runs without a broker. Packages: redb.Templates.
  • dotnet new redb-route-amqp creates a Tsak module for AMQP 1.0 in XML markup. One connection bean for all
    endpoints, a producer, a consumer that retries a failed message twice and then moves it to a queue of failed
    messages, and a compose file that runs ActiveMQ Artemis and the module on a worker. Packages: redb.Templates.
  • dotnet new redb-route-mqtt creates a Tsak module for MQTT in XML markup. One connection bean, test sensors
    that publish with QoS 1, a retained status topic, a subscriber with topic wildcards that forwards readings over a
    limit, and a compose file that runs Mosquitto and the module on a worker. Packages: redb.Templates.
  • Every redb-route-* template shows its scenario in XML markup and in C#. Next to the XML route files each
    module has a RouteBuilder in routes/*.cs, added to the same context by <routeBuilder type="..."> in
    context.xml, with the same beans and configuration keys; the package carries the module's DLL. The README of each
    template names the one difference to notice between the two forms. Packages: redb.Templates.

Changed

  • The props cache fills a loaded graph in one pass. Loading an object with nested references no longer walks its Props twice, so the load path is faster; cache contents, hash checks and invalidation stay the same. Packages: redb.Core.

Fixed

  • DistinctRedb() is applied by the free providers. It returned every object; it now keeps one object per value of
    the object's own fields, as the Pro providers do. Packages: redb.Core, redb.Postgres, redb.MSSql, redb.SQLite.
  • A cached object is no longer served with a reference that has changed or left for the trash. The free providers
    returned the graph they had cached, so an object loaded before a soft-delete kept showing the trashed target as live. Packages: redb.Core, redb.Postgres, redb.MSSql, redb.SQLite.
  • After SaveAsync and SaveByUniqueAsync the object carries the dates its row holds. An object without dates
    (deserialized from JSON, say) saved onto an existing row came back with DateCreate and DateModify equal to
    0001-01-01; now it has the stored creation date and the new modification date, as a reload shows. Packages: redb.Core, redb.Postgres, redb.MSSql, redb.SQLite, redb.Postgres.Pro, redb.MSSql.Pro, redb.SQLite.Pro.
  • Redb.Maintenance works on SQL Server for a login without VIEW SERVER STATE. GetStatisticsWindowAsync and
    ...
Read more

v4.4.2

Choose a tag to compare

@reliktbk reliktbk released this 23 Oct 21:23

Changed

  • AnyAsync over a tree stops at the first node. TreeQuery(...).AnyAsync() used to count the whole subtree; Pro
    now asks for one node. On PostgreSQL and SQLite a large subtree with matching nodes answers many times faster. Packages: redb.Core, redb.Postgres.Pro, redb.MSSql.Pro, redb.SQLite.Pro.
  • Tree services read a subtree in one query. LoadTreeAsync, GetDescendantsAsync, GetPathToRootAsync, their
    polymorphic forms, DeleteSubtreeAsync and the cycle check of MoveObjectAsync no longer query once per node: the
    shape comes in one statement and the objects in one batch (11 thousand descendants: tens of seconds before). A cycle in
    the parent links now raises an error naming the object instead of being walked to the depth limit. Packages: redb.Core, redb.Postgres, redb.MSSql, redb.SQLite.
  • DistinctBy over a tree is faster on SQL Server and SQLite. On a subtree of 100 thousand nodes it takes about
    2 s instead of 5 to 17 s on SQL Server and 1.6 s instead of 2.7 to 3.4 s on SQLite; on smaller subtrees SQLite answers
    in a tenth of the time it took before. Packages: redb.MSSql.Pro, redb.SQLite.Pro.
  • A window over a large tree is several times faster on SQL Server. The result is no longer built as one value on
    the server before it is sent: a window over 100 thousand nodes takes about 5 s instead of 25 to 40 s. Packages: redb.MSSql.Pro.
  • Window queries with Take are faster. The window is computed over the fields it needs (partition, ordering,
    function arguments, filter), and the other selected fields are read only for the rows returned: on 100 thousand objects
    a ranked page of 50 takes about 210 ms instead of up to 1 s on SQL Server, and about half the time on PostgreSQL. Packages: redb.Postgres.Pro, redb.MSSql.Pro, redb.SQLite.Pro.
  • A window over a tree honours Take, Skip and OrderBy. TreeQuery(...).OrderBy(...).Skip(...).Take(...).WithWindow(...)
    returned every node of the subtree; it now returns the requested page, in the requested order, with the window computed
    over the whole filtered subtree. With Take, the selected fields the window does not need are read for the returned rows only. Packages: redb.Postgres.Pro, redb.MSSql.Pro, redb.SQLite.Pro.

Fixed

  • PostgreSQL and SQLite keep one root field name per scheme. A new unique index stops a root field being written
    twice; existing databases get it at the next module upgrade (PostgreSQL) or start (SQLite), after empty duplicates are
    removed. Duplicates holding values are logged as errors at every start and listed by IRedbService.SchemaProblems;
    IRedbService.CheckSchemaAsync() looks again without a restart. Packages: redb.Core, redb.Postgres, redb.Postgres.Pro, redb.SQLite, redb.SQLite.Pro. Upgrade: UPGRADING.md.
  • Nodes sharing one database no longer fail on each other's schema work. Creating the schema, deploying the SQL
    module, building the Pro indexes, upgrading a SQLite file and every scheme sync that has something to write (at start-up
    or at run time) now run under a schema lock: one node writes, the others wait (SchemaLockTimeout, 15 minutes by
    default) and find it done. A database already in step takes no lock, so limited logins keep starting as before. Packages: redb.Core, redb.Postgres, redb.Postgres.Pro, redb.MSSql, redb.MSSql.Pro, redb.SQLite, redb.SQLite.Pro.
  • The SQL preview of a window query shows its filter. ToSqlStringAsync of WithWindow(...) after Where(...)
    returned the SQL without the filter; it now returns the statement SelectAsync runs. Packages: redb.Core, redb.Postgres.Pro, redb.MSSql.Pro, redb.SQLite.Pro.
  • ToTreeListAsync, ToRootListAsync and LoadWithParentsAsync work on SQL Server trees deeper than 100 levels.
    Reading the ancestors stopped there with a recursion limit error; the object ids now also go to the server as a
    parameter instead of being written into the statement. Packages: redb.Core, redb.Postgres, redb.MSSql, redb.SQLite.
  • LoadWithParentsAsync works for an object that has a parent. It failed with "An item with the same key has already
    been added" whenever an ancestor was loaded along with the object. Packages: redb.Core.
  • A scheme keeps its CLR type after a module that carried the same types unloads. When a collectible
    AssemblyLoadContext loaded a copy of an assembly the host also uses and was then unloaded, the host's schemes of that
    assembly could no longer be matched to their types by name: polymorphic loads read such objects without their Props type. Packages: redb.Core.
  • DistinctBy keeps the ordering of the query on SQL Server and SQLite. OrderByDescending(x => x.Key).DistinctBy(x => x.Key)
    came back ascending on SQLite and in no order on SQL Server, and an ordering by another field, as in
    OrderBy(x => x.Salary).DistinctBy(x => x.Department), failed with "pvt_cte" in the error. Packages: redb.MSSql.Pro, redb.SQLite.Pro.
  • CountAsync after DistinctBy counts the distinct keys. Query<T>().DistinctBy(x => x.Key).CountAsync() counted
    every object, not one per key. Packages: redb.Postgres.Pro, redb.MSSql.Pro, redb.SQLite.Pro.
  • Several tree filters in one query all apply. Only the first of WhereChildrenOf, WhereRoots, WhereLeaves and
    WhereDescendantsOf was used and the others were silently dropped: WhereChildrenOf(a).WhereLeaves() returned every
    child of a. Each filter now narrows the result, in any order. Packages: redb.Postgres.Pro, redb.MSSql.Pro, redb.SQLite.Pro.
  • Win.Ntile(n) over a tree uses n. A window over a tree always split the rows into 4 buckets, whatever was asked. Packages: redb.Postgres.Pro, redb.MSSql.Pro, redb.SQLite.Pro.
  • DistinctBy over a tree keeps the direction of the ordering by its key on SQLite.
    OrderByDescending(x => x.Key).DistinctBy(x => x.Key) returned the rows in ascending order. Packages: redb.SQLite.Pro.

v4.4.1

Choose a tag to compare

@reliktbk reliktbk released this 21 Oct 21:45

Changed

  • No changes of its own. Released as 4.4.1 together with redb.Route 4.4.1, which fixes seda: after a context restart. 4.4.0 was withdrawn on the day of release; 4.4.1 carries the same code of this module.