Exemplo n.º 1
0
 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;
     }
 }
Exemplo n.º 2
0
 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;
 }
Exemplo n.º 3
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;
 }
Exemplo n.º 4
0
 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;
     }
 }
Exemplo n.º 5
0
 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;
         }
     }
 }
Exemplo n.º 6
0
        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);
            }
        }
Exemplo n.º 7
0
 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;
     }
 }
Exemplo n.º 8
0
 public DataFieldAttribute(string fieldName, Type parentType, DataFieldKeys key, string keyName, long fieldLength)
     : this(fieldName, parentType, fieldName, key, keyName)
 {
 }
Exemplo n.º 9
0
 public DataFieldAttribute(string fieldName, Type parentType, DataFieldKeys key)
     : this(fieldName, parentType, fieldName, key)
 {
 }
Exemplo n.º 10
0
        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);
            }
        }