Skip to content

ColumnInfo associated with RoleMappedSchema should be replaced with Schema.Column #1923

@TomFinley

Description

@TomFinley

We have a fun class called RoleMappedSchema. It operates over a class called ColumnInfo that looks like this:

public sealed class ColumnInfo
{
public readonly string Name;
public readonly int Index;
public readonly ColumnType Type;

This structure is quite useful -- oftentimes we want to have names and types and indices of columns, all bundled together. We used this hundreds of places. In fact it was so useful we decided to build something Schema.Column that looked a little something like this:

public struct Column
{
/// <summary>
/// The name of the column.
/// </summary>
public string Name { get; }
/// <summary>
/// The column's index in the schema.
/// </summary>
public int Index { get; }
/// <summary>
/// Whether this column is hidden (accessible only by index).
/// </summary>
public bool IsHidden { get; }
/// <summary>
/// The type of the column.
/// </summary>
public ColumnType Type { get; }

Clearly this new more fundamental structure and the older legacy structure have some things in common. In fact, the newer structure is what we are going with for our public API, so we should probably remove that older legacy structure.

We will shift usage of ColumnInfo to use Schema.Column instead (nullables where appropriate, where things can be null), and then remove ColumnInfo.

Metadata

Metadata

Assignees

Labels

APIIssues pertaining the friendly API

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions