Class TableAttribute
- Namespace
- BiExcellence.OpenBi.Api.TableAttributes
- Assembly
- BiExcellence.OpenBi.Api.Client.dll
A dynamic custom-attribute (EAV) column definition assigned to a table. Creating one adds a real column to
that table; its values then travel in the customAttributes of the table's rows.
public sealed record TableAttribute : ITableAttribute
- Inheritance
-
objectTableAttribute
- Implements
Properties
CustomAttributes
The values of the table attributes defined for table attributes themselves; short_description is
the label an editor shows for this attribute.
[JsonPropertyName("customAttributes")]
public Dictionary<string, JsonElement>? CustomAttributes { get; init; }
Property Value
- Dictionary<string, JsonElement>
DefaultValue
The column default, as text: numbers and dates in invariant format, X for a
Boolean that defaults to true.
[JsonPropertyName("defaultValue")]
public string? DefaultValue { get; init; }
Property Value
- string
DefaultValues
The values an editor proposes for this attribute - with IsExclusive, the only ones allowed. On a save, a list replaces the stored one and null leaves it as it is.
[JsonPropertyName("defaultValues")]
public string[]? DefaultValues { get; init; }
Property Value
- string[]
FieldLength
The column length. Empty or 0 means the type's default; a column that refers to another table gets the maximum key length automatically.
[JsonPropertyName("fieldLength")]
public int? FieldLength { get; init; }
Property Value
- int?
Id
The id of the table attribute, a GUID unless the creator chose one.
[JsonPropertyName("id")]
public string Id { get; init; }
Property Value
- string
IsExclusive
When set, a value has to be one of DefaultValues, so an editor offers a choice list instead of free text. Not enforced by the server.
[JsonPropertyName("isExclusive")]
public bool IsExclusive { get; init; }
Property Value
- bool
IsMultiple
When set, the attribute holds a list of values rather than one; it travels as a JSON array in
customAttributes.
[JsonPropertyName("isMultiple")]
public bool IsMultiple { get; init; }
Property Value
- bool
Name
The column name: a letter followed by letters, digits or underscores, unique within the table.
[JsonPropertyName("name")]
public string? Name { get; init; }
Property Value
- string
Table
The table the attribute adds a column to - one of the Table values of GetTableAttributeTablesAsync(IOpenBiApiClient, CancellationToken). Stored in upper case.
[JsonPropertyName("table")]
public string? Table { get; init; }
Property Value
- string
Type
The value type - one of the Type values of
GetTableAttributeTypesAsync(IOpenBiApiClient, CancellationToken), see
TableAttributeType. A table name, such as a base entity's tableName, makes the column a
reference to a row of that table. Stored in upper case.
[JsonPropertyName("type")]
public string? Type { get; init; }
Property Value
- string