public DuplicatedField DuplicateField(string memberName) { var field = FieldFor(memberName); var duplicate = new DuplicatedField(field.Members); _fields[memberName] = duplicate; return(duplicate); }
public DuplicatedField DuplicateField(string memberName, string pgType = null) { var field = FieldFor(memberName); var duplicate = new DuplicatedField(_storeOptions.Serializer().EnumStorage, field.Members); if (pgType.IsNotEmpty()) { duplicate.PgType = pgType; } setField(memberName, duplicate); return(duplicate); }
public DuplicatedField DuplicateField(string memberName, string pgType = null) { var field = FieldFor(memberName); var duplicate = new DuplicatedField(field.Members); if (pgType.IsNotEmpty()) { duplicate.PgType = pgType; } _fields[memberName] = duplicate; return(duplicate); }
public DuplicatedField DuplicateField(MemberInfo[] members, string pgType = null) { var memberName = members.Select(x => x.Name).Join(""); var duplicatedField = new DuplicatedField(_storeOptions.Serializer().EnumStorage, members); if (pgType.IsNotEmpty()) { duplicatedField.PgType = pgType; } _fields[memberName] = duplicatedField; return(duplicatedField); }
public IndexDefinition DuplicateField(MemberInfo[] members, string pgType = null) { var memberName = members.Select(x => x.Name).Join(""); var duplicatedField = new DuplicatedField(members); if (pgType.IsNotEmpty()) { duplicatedField.PgType = pgType; } _fields[memberName] = duplicatedField; return(AddIndex(duplicatedField.ColumnName)); }
public static DuplicatedField For <T>(EnumStorage enumStorage, Expression <Func <T, object> > expression, bool useTimestampWithoutTimeZoneForDateTime = true, string pgType = null) { var accessor = ReflectionHelper.GetAccessor(expression); // Hokey, but it's just for testing for now. if (accessor is PropertyChain) { throw new NotSupportedException("Not yet supporting deep properties yet. Soon."); } var duplicate = new DuplicatedField(enumStorage, new MemberInfo[] { accessor.InnerProperty }, useTimestampWithoutTimeZoneForDateTime); if (pgType.IsNotEmpty()) { duplicate.PgType = pgType; } return(duplicate); }