Metadata<T> Class
The cache of the metadata for reflection.
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
Create |
|
Drop |
|
Insert |
|
Update |
|
Table |
|
Delete |
|
Select |
|
Fields |
Gets all the fields of |
Methods
New |
Description copied from interface: WildMetadata
|
New |
Description copied from interface: WildMetadata
|
To |
Description copied from interface: WildMetadata
|
New |
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.
public Metadata()
Properties Detail
CreateTableStatements
public IEnumerable<string> CreateTableStatements { get; }
Property Value
Implements
DropTableStatements
public IEnumerable<string> DropTableStatements { get; }
Property Value
Implements
InsertStatement
public string InsertStatement { get; }
Property Value
Implements
UpdateStatement
public string UpdateStatement { get; }
Property Value
Implements
TableName
public string TableName { get; }
Property Value
Implements
DeleteStatement
public string DeleteStatement { get; }
Property Value
Implements
SelectAllStatement
public string SelectAllStatement { get; }
Property Value
Implements
Fields
Gets all the fields of T
.
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.
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.
public string NewSelectAllStatement(string alias)
Parameters
- alias
- string
Returns
Implements
ToColumnName(string)
Description copied from interface: WildMetadata
Gets the column name associated with the specified parameter name.
public string ToColumnName(string parameterName)
Parameters
- parameterName
- string
Returns
Implements
NewInsertParameterMap(T)
Gets a new map of the parameter name to the parameter value.
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.