Path: redb/redb.Core/Exceptions/RedbValueStringTooLongException.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.Core/Exceptions/RedbValueStringTooLongException.cs
----
using System;
namespace redb.Core.Exceptions;
///
/// _objects._value_string is an identifier column (owner decision 2026-09-02): 450
/// characters, the MSSQL index-key width, enforced in C# so the text-typed PostgreSQL and SQLite
/// columns hold the same contract. Long text belongs in _note or in a Props field.
///
public class RedbValueStringTooLongException : InvalidOperationException
{
/// Id of the object whose value was rejected (0 for a new object).
public long ObjectId { get; }
/// The rejected value's length.
public int Length { get; }
public RedbValueStringTooLongException(long objectId, int length)
: base($"object id={objectId}: _value_string is {length} characters, the limit is 450. " +
"The column is for identifiers and external keys; long text belongs in _note or in a Props field.")
{
ObjectId = objectId;
Length = length;
}
}