Metadata<T> Class

The cache of the metadata for reflection.

C#
public sealed class Metadata<T> : WildMetadata
where T : notnull

Type Parameters

T
notnull

The type qualified with TableAttribute.

Inheritance
Metadata<T>
Implements

Constructors

Metadata()

Initializes a new instance of the Metadata<T> class.

Properties

Methods

NewSelectStatement(string)

Description copied from interface: WildMetadata

Gets a new string representing the SELECT statement to find the row where the specified column is equal to the specific value.

NewSelectAllStatement(string)

Description copied from interface: WildMetadata

Gets a new string representing the incomplete select statement.

ToColumnName(string)

Description copied from interface: WildMetadata

Gets the column name associated with the specified parameter name.

NewInsertParameterMap(T)

Gets a new map of the parameter name to the parameter value.

Equals(object) (Inherited from object)
GetHashCode() (Inherited from object)
GetType() (Inherited from object)
MemberwiseClone() (Inherited from object)
ToString() (Inherited from object)

Constructors Detail

Metadata()

Initializes a new instance of the Metadata<T> class.

C#
public Metadata()

Properties Detail

CreateTableStatements

C#
public IEnumerable<string> CreateTableStatements { get; }

Property Value

Implements

DropTableStatements

C#
public IEnumerable<string> DropTableStatements { get; }

Property Value

Implements

InsertStatement

C#
public string InsertStatement { get; }

Property Value

Implements

UpdateStatement

C#
public string UpdateStatement { get; }

Property Value

Implements

TableName

C#
public string TableName { get; }

Property Value

Implements

DeleteStatement

C#
public string DeleteStatement { get; }

Property Value

Implements

SelectAllStatement

C#
public string SelectAllStatement { get; }

Property Value

Implements

Fields

Gets all the fields of T.

C#
public IEnumerable<Field<T>> Fields { get; }

Property Value

Methods Detail

NewSelectStatement(string)

Description copied from interface: WildMetadata

Gets a new string representing the SELECT statement to find the row where the specified column is equal to the specific value.

C#
public string NewSelectStatement(string columnName)

Parameters

columnName
string

Returns

Description copied from interface: WildMetadata

The new string: SELECT ... FROM ... WHERE columnName = $columnName.

Implements

NewSelectAllStatement(string)

Description copied from interface: WildMetadata

Gets a new string representing the incomplete select statement.

C#
public string NewSelectAllStatement(string alias)

Parameters

alias
string

Returns

Description copied from interface: WildMetadata

The new string: SELECT ... FROM ... alias.

Implements

ToColumnName(string)

Description copied from interface: WildMetadata

Gets the column name associated with the specified parameter name.

C#
public string ToColumnName(string parameterName)

Parameters

parameterName
string

Returns

Description copied from interface: WildMetadata

The column name.

Implements

NewInsertParameterMap(T)

Gets a new map of the parameter name to the parameter value.

C#
public IReadOnlyDictionary<string, object> NewInsertParameterMap(T row)

Parameters

row
T

The row object containing the all field values.

Returns

The new dictionary containing the parameter name-value pairs.