2 using System.Collections.Generic;
8 namespace Deveel.Data.Mapping {
14 this.memberInfo = memberInfo;
15 this.typeMapping = typeMapping;
20 private string ColumnName {
get; set; }
24 private int? Size {
get; set; }
26 private int? Precision {
get; set; }
31 get {
return memberInfo; }
35 string columnName = null;
41 var attributes = memberInfo.GetCustomAttributes(
false);
42 foreach (var attribute
in attributes) {
44 var columnNameAttr = (ColumnNameAttribute) attribute;
45 ColumnName = columnNameAttr.ColumnName;
47 var columnAttr = (ColumnAttribute) attribute;
48 columnName = columnAttr.ColumnName;
49 typeCode = columnAttr.SqlType;
50 size = columnAttr.Size;
51 scale = columnAttr.Scale;
53 var constraintAttr = (ColumnConstraintAttribute) attribute;
54 constraints |= constraintAttr.Constraints;
58 ColumnName = columnName;
59 ColumnTypeCode = typeCode;
66 get {
return ColumnName; }
70 get {
return ColumnTypeCode; }
82 get {
return Precision; }
86 ColumnName = columnName;
91 ColumnTypeCode = typeCode;
131 typeMapping.Ignore(memberInfo.Name);
MemberMappingConfiguration< T > IsUnique(bool flag=true)
ColumnConstraints ColumnConstraints
MemberMappingConfiguration< T > IsNotNull(bool flag=true)
readonly MemberInfo memberInfo
MemberMappingConfiguration< T > HasType(SqlTypeCode typeCode)
SqlTypeCode
Enumerates the codes of all SQL types handled by the system.
MemberMappingConfiguration< T > HasName(string columnName)
void DiscoverAttributes()
MemberMappingConfiguration(TypeMappingConfiguration< T > typeMapping, MemberInfo memberInfo)
MemberMappingConfiguration< T > IsPrimaryKey(bool flag=true)
readonly TypeMappingConfiguration< T > typeMapping
MemberMappingConfiguration< T > HasSize(int size)