Table of Contents

Class BelongsToColumn

Namespace
AbanoubNassem.Trinity.Columns
Assembly
AbanoubNassem.Trinity.dll

A class that represents a column in a table that has a relationship with another table.

public class BelongsToColumn : TrinityHasRelationshipColumn<string>, ITrinityColumn, ITrinityComponent, IHasRelationship
Inheritance
BelongsToColumn
Implements
Inherited Members

Constructors

BelongsToColumn(string, string, string, string, string)

public BelongsToColumn(string localColumnNames, string relationTables, string foreignColumnNames, string foreignColumnToSelect, string relationshipName)

Parameters

localColumnNames string
relationTables string
foreignColumnNames string
foreignColumnToSelect string
relationshipName string

BelongsToColumn(string, string, string?, string?)

public BelongsToColumn(string columnName, string foreignColumnToSelect, string? foreignTable = null, string? relationshipName = null)

Parameters

columnName string
foreignColumnToSelect string
foreignTable string
relationshipName string

Properties

ComponentName

The component name in the front-end side.

public override string ComponentName { get; }

Property Value

string

Type

Used on the front-end side to determine what type is the component , is it (field, columns , etc).

public override string Type { get; }

Property Value

string

Methods

Filter(Query, string)

Filters the data in this column according to the specified query and search term.

public override void Filter(Query query, string str)

Parameters

query Query
str string

SelectQuery(Query)

Adds a select clause for the current column to the specified query.

public override void SelectQuery(Query query)

Parameters

query Query

The query to modify.

SelectRelationshipQuery(QueryFactory, List<IDictionary<string, object?>>, Sort?)

A method that selects the relationship query using the specified queryFactory and list of records, returns a list of the selected relationships.

public override Task<List<IDictionary<string, object?>>> SelectRelationshipQuery(QueryFactory queryFactory, List<IDictionary<string, object?>> entities, Sort? sort = null)

Parameters

queryFactory QueryFactory

The query factory used to create the query

entities List<IDictionary<string, object>>
sort Sort

The sorting object

Returns

Task<List<IDictionary<string, object>>>

A list of selected relationships

SetAsSearchable(bool, bool, bool, bool, FiltersCallback?)

Sets this column as searchable with the specified search/filtering callback function.

public override TrinityHasRelationshipColumn<string> SetAsSearchable(bool searchable = true, bool isIndividuallySearchable = false, bool globallySearchable = true, bool caseSensitive = false, TrinityColumn<TrinityHasRelationshipColumn<string>, string>.FiltersCallback? searchCallback = null)

Parameters

searchable bool

A value indicating whether this column is searchable.

isIndividuallySearchable bool

A value indicating whether this column is individually searchable.

globallySearchable bool

A value indicating whether this column is globally searchable.

caseSensitive bool

A value indicating whether searches/filters on this column are case sensitive.

searchCallback TrinityColumn<TrinityHasRelationshipColumn<string>, string>.FiltersCallback

Returns

TrinityHasRelationshipColumn<string>

The current instance of the T column.