public DataFieldKeyAttribute(DataFieldKeys key, string keyName) { this.key = key; switch (key) { case DataFieldKeys.Primary: this.index = new PrimaryKey(); break; case DataFieldKeys.Unique: this.index = new UniqueKey(keyName); break; case DataFieldKeys.Index: this.index = new Index(keyName); break; default: break; } }
public DataFieldAttribute(string fieldName, DataFieldKeys key) { this.key = key; this.fieldName = fieldName; this.indicies = new List<Index>(); switch (key) { case DataFieldKeys.Primary: this.indicies.Add(new PrimaryKey()); break; case DataFieldKeys.Unique: this.indicies.Add(new UniqueKey("u_" + fieldName)); break; case DataFieldKeys.Index: this.indicies.Add(new Index("i_" + fieldName)); break; default: break; } this.length = 0; }
public DataFieldInfo(string name, Type type, long length, DataFieldKeys key) { this.fieldName = name; this.fieldType = type; this.fieldLength = length; this.indicies = new List<Index>(); switch (key) { case DataFieldKeys.Primary: this.indicies.Add(new PrimaryKey()); break; case DataFieldKeys.Unique: this.indicies.Add(new UniqueKey("u_" + fieldName)); break; case DataFieldKeys.Index: this.indicies.Add(new Index("i_" + fieldName)); break; default: break; } this.key = key; }
public DataFieldInfo(string name, Type type, long length, Index key) { this.fieldName = name; this.fieldType = type; this.fieldLength = length; this.indicies = new List<Index>(); this.indicies.Add(key); if (key != null) { this.key |= key.KeyType; } else { this.key = DataFieldKeys.None; } }
public DataFieldInfo(string name, Type type, long length, Index[] indicies) { this.fieldName = name; this.fieldType = type; this.fieldLength = length; this.indicies = new List<Index>(); this.indicies.AddRange(indicies); foreach (Index index in indicies) { if (key != null) { this.key |= index.KeyType; } } }
public DataFieldAttribute(string fieldName, Type parentType, string parentFieldName, long fieldLength, params Index[] indicies) { this.fieldName = fieldName; this.length = fieldLength; this.parentType = parentType; this.parentFieldName = parentFieldName; this.indicies = new List<Index>(); foreach (Index index in indicies) { this.key |= index.KeyType; this.indicies.Add(index); } }
public DataFieldAttribute(string fieldName, Type parentType, string parentFieldName, DataFieldKeys key, string keyName, long fieldLength) { this.key = key; this.fieldName = fieldName; this.length = fieldLength; this.parentType = parentType; this.parentFieldName = parentFieldName; this.indicies = new List<Index>(); switch (key) { case DataFieldKeys.Primary: this.indicies.Add(new PrimaryKey()); break; case DataFieldKeys.Unique: this.indicies.Add(new UniqueKey(keyName)); break; case DataFieldKeys.Index: this.indicies.Add(new Index(keyName)); break; default: break; } }
public DataFieldAttribute(string fieldName, Type parentType, DataFieldKeys key, string keyName, long fieldLength) : this(fieldName, parentType, fieldName, key, keyName) { }
public DataFieldAttribute(string fieldName, Type parentType, DataFieldKeys key) : this(fieldName, parentType, fieldName, key) { }
public DataFieldAttribute(string fieldName, params Index[] indicies) { this.fieldName = fieldName; this.length = 0; this.indicies = new List<Index>(); foreach (Index index in indicies) { this.key |= index.KeyType; this.indicies.Add(index); } }