Definition at line 10 of file MappingContext.cs.
Deveel.Data.Mapping.MappingContext.MappingContext |
( |
| ) |
|
|
inlinepackage |
Definition at line 13 of file MappingContext.cs.
INamingConvention ColumnNameConvention
INamingConvention TableNameConvention
MappingModel Deveel.Data.Mapping.MappingContext.CreateModel |
( |
| ) |
|
|
inlinepackage |
Definition at line 47 of file MappingContext.cs.
48 var model =
new MappingModel();
Dictionary< Type, ITypeMappingConfiguration > configurations
TypeMapping CreateTypeMapping(MappingModel model, ITypeMappingConfiguration configuration)
Definition at line 73 of file MappingContext.cs.
75 var mapping =
new TypeMapping(model, configuration.ElementType, tableName);
77 foreach (var pair
in configuration.Members) {
78 var member = pair.Value;
79 var memberMapping =
MapMember(mapping, member);
80 mapping.AddMember(memberMapping);
string GetTableName(ITypeMappingConfiguration configuration)
MemberMapping MapMember(TypeMapping mapping, IMemberMappingConfiguration configuration)
SqlTypeCode Deveel.Data.Mapping.MappingContext.DiscoverSqlType |
( |
MemberInfo |
member | ) |
|
|
inlineprivate |
Definition at line 122 of file MappingContext.cs.
123 var memberType = TypeHelper.GetMemberType(member);
124 if (memberType == typeof(
bool))
126 if (memberType == typeof(byte))
128 if (memberType == typeof(
short))
130 if (memberType == typeof(
int))
132 if (memberType == typeof (
long))
135 if (memberType == typeof(
string))
138 throw new NotSupportedException();
SqlTypeCode
Enumerates the codes of all SQL types handled by the system.
Definition at line 108 of file MappingContext.cs.
109 var sqlType = configuration.ColumnType;
113 var meta =
new List<DataTypeMeta>();
114 if (configuration.Size != null)
115 meta.Add(
new DataTypeMeta(
"Size", configuration.Size.Value.ToString()));
116 if (configuration.Precision != null)
117 meta.Add(
new DataTypeMeta(
"Precision", configuration.Precision.Value.ToString()));
SqlTypeCode DiscoverSqlType(MemberInfo member)
Defines the properties of a specific SQL Type and handles the values compatible.
static SqlType Resolve(SqlTypeCode typeCode)
Definition at line 97 of file MappingContext.cs.
98 var columnName = configuration.ColumnName;
99 if (
String.IsNullOrEmpty(columnName))
100 columnName = configuration.Member.Name;
INamingConvention ColumnNameConvention
A long string in the system.
string FormatName(string inputName)
Definition at line 62 of file MappingContext.cs.
63 var tableName = configuration.TableName;
64 if (
String.IsNullOrEmpty(tableName))
65 tableName = configuration.ElementType.Name;
A long string in the system.
string FormatName(string inputName)
INamingConvention TableNameConvention
Definition at line 26 of file MappingContext.cs.
28 configurations =
new Dictionary<Type, ITypeMappingConfiguration>();
30 var type = typeof (T);
32 if (configuration == null) {
33 ITypeMappingConfiguration config;
35 configuration =
new TypeMappingConfiguration<T>();
38 configuration = (TypeMappingConfiguration<T>) config;
Dictionary< Type, ITypeMappingConfiguration > configurations
Definition at line 86 of file MappingContext.cs.
90 var primary = (configuration.ColumnConstraints &
ColumnConstraints.PrimaryKey) != 0;
92 bool uniqueKey = mapping.IsUniqueKey(configuration.Member.Name);
94 return new MemberMapping(mapping, configuration.Member, columnName, sqlType, notNull, primary, unique, uniqueKey);
string GetColumnName(IMemberMappingConfiguration configuration)
SqlType FormSqlType(IMemberMappingConfiguration configuration)
The documentation for this class was generated from the following file:
- /var/calculate/remote/distfiles/egit-src/deveeldb.git/src/deveeldb-linq/Deveel.Data.Mapping/MappingContext.cs