Skip to content

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

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
TomFinley opened this issue Dec 19, 2018 · 0 comments
Assignees
Labels
API Issues pertaining the friendly API
Milestone

Comments

@TomFinley
Copy link
Contributor

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.

@TomFinley TomFinley added the API Issues pertaining the friendly API label Dec 19, 2018
@TomFinley TomFinley added this to the 1218 milestone Dec 19, 2018
@TomFinley TomFinley self-assigned this Dec 19, 2018
@ghost ghost locked as resolved and limited conversation to collaborators Mar 26, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
API Issues pertaining the friendly API
Projects
None yet
Development

No branches or pull requests

1 participant