Class BelongsToColumn
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
stringrelationTables
stringforeignColumnNames
stringforeignColumnToSelect
stringrelationshipName
string
BelongsToColumn(string, string, string?, string?)
public BelongsToColumn(string columnName, string foreignColumnToSelect, string? foreignTable = null, string? relationshipName = null)
Parameters
Properties
ComponentName
The component name in the front-end side.
public override string ComponentName { get; }
Property Value
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
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
Querystr
string
SelectQuery(Query)
Adds a select clause for the current column to the specified query.
public override void SelectQuery(Query query)
Parameters
query
QueryThe 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
QueryFactoryThe query factory used to create the query
entities
List<IDictionary<string, object>>sort
SortThe 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
boolA value indicating whether this column is searchable.
isIndividuallySearchable
boolA value indicating whether this column is individually searchable.
globallySearchable
boolA value indicating whether this column is globally searchable.
caseSensitive
boolA 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.