Path: redb/redb.Tests.Integration/Models/ArrayGroupModels.cs
Snapshot: redb, development snapshot 2026-12-06. This is the development state of the public mirrors; it may differ from the published packages.
License: Apache-2.0. Repository: https://github.com/redbase-app/redb
Page: https://redbase.app/src/dev-2026-12-06/redb/redb.Tests.Integration/Models/ArrayGroupModels.cs
----
using redb.Core.Attributes;
using redb.Core.Models.Entities;
namespace redb.Tests.Integration.Models;
///
/// GroupByArray over arrays of every simple value column, over an array of classes whose element holds a class
/// and over elements with a missing key. Each test writes its own objects under a fresh and
/// reads them back by it, so objects other tests leave in the shared database do not count.
///
[RedbScheme("TestArrayValues")]
public class ArrayValuesProps
{
public string Marker { get; set; } = string.Empty;
public string[]? Words { get; set; }
public long[]? Longs { get; set; }
public double[]? Doubles { get; set; }
public decimal[]? Decimals { get; set; }
public bool[]? Flags { get; set; }
public DateTime[]? Dates { get; set; }
public Guid[]? Ids { get; set; }
public ArrayItem[]? Items { get; set; }
}
public class ArrayItem
{
/// Null on some elements: the group of the null key.
public string? Kind { get; set; }
public int Size { get; set; }
public bool Active { get; set; }
public ArrayItemPlace? Place { get; set; }
}
public class ArrayItemPlace
{
public string City { get; set; } = string.Empty;
}
///
/// Arrays GroupByArray refuses by name: list items and object references. Never saved; the refusal comes first.
///
[RedbScheme("TestArrayRefusedElements")]
public class ArrayRefusedElementsProps
{
public List? Roles { get; set; }
public RedbObject[]? Links { get; set; }
}