ColumnDescriptor
Stores mapping entity column descriptor.
Gets whether a column can contain null values.
Gets the name of a column in database.
If not specified, MemberName value will be used.
Custom template for column definition in create table SQL expression, generated using
CreateTable<T> methods.
Template accepts following string parameters:
- {0} - column name;
- {1} - column type;
- {2} - NULL specifier;
- {3} - identity specification.
Gets LINQ to DB type for column.
Gets the name of the database column type.
Gets whether the column has specific values that should be skipped on insert.
Gets whether the column has specific values that should be skipped on update.
Gets whether a column contains a discriminator value for a LINQ to DB inheritance hierarchy.
InheritanceMappingAttribute for more details.
Default value: false.
Gets whether a column contains values that the database auto-generates.
Gets whether this member represents a column that is part or all of the primary key of the table.
Also see PrimaryKeyAttribute.
Gets the length of the database column.
Gets column mapping member accessor.
Gets column mapping member (field or property).
Gets the name of mapped member.
When applied to class or interface, should contain name of property of field.
If column is mapped to a property or field of composite object, MemberName should contain a path to that
member using dot as separator.
public class Address
{
public string City { get; set; }
public string Street { get; set; }
public int Building { get; set; }
}
[Column("city", "Residence.Street")]
[Column("user_name", "Name")]
public class User
{
public string Name;
[Column("street", ".Street")]
[Column("building_number", MemberName = ".Building")]
public Address Residence { get; set; }
}
Gets type of column mapping member (field or property).
Sort order for column list.
Positive values first, then unspecified (null), then negative values.
Gets the precision of the database column.
Gets order of current column in composite primary key.
Order is used for query generation to define in which order primary key columns must be mentioned in query
from columns with smallest order value to greatest.
Gets the Scale of the database column.
Gets sequence name for specified column.
Gets flags for which operation values are skipped.
Gets whether a column is insertable.
This flag will affect only insert operations with implicit columns specification like
Insert<T>
method and will be ignored when user explicitly specifies value for this column.
Gets whether a column is updatable.
This flag will affect only update operations with implicit columns specification like
Update<T>
method and will be ignored when user explicitly specifies value for this column.
Gets storage property or field to hold the value from a column.
Could be usefull e.g. in combination of private storage field and getter-only mapping property.
Gets value storage member (field or property).
Gets type of column value storage member (field or property).
public ColumnDescriptor(MappingSchema mappingSchema, ColumnAttribute columnAttribute, MemberAccessor memberAccessor)
Creates descriptor instance.
Extracts column value, converted to database type, from entity object.
Checks if the passed object has values that should bes skipped based on the given flags.