Пример #1
0
        public Column(string name, DataType type)
        {
            InitializeMembers();

            this.Name = name;
            this.DataType = type;
        }
Пример #2
0
        public ColumnReference(TableReference tableReference, Column columnDescription)
        {
            InitializeMembers();

            this.tableReference = tableReference;
            this.columnName = columnDescription.Name;
            this.dataType = columnDescription.DataType;
        }
Пример #3
0
 public DataType(DataType old)
 {
     CopyMembers(old);
 }
Пример #4
0
 private void CopyMembers(DataType old)
 {
     this.name = old.name;
     this.type = old.type;
     this.sqlDbType = old.sqlDbType;
     this.byteSize = old.byteSize;
     this.scale = old.scale;
     this.precision = old.precision;
     this.length = old.length;
     this.maxLength = old.maxLength;
     this.isVarLength = old.isVarLength;
     this.isSqlArray = old.isSqlArray;
     this.arrayLength = old.arrayLength;
     this.isVarArrayLength = old.isVarArrayLength;
     this.isNullable = old.isNullable;
 }
Пример #5
0
        public bool Compare(DataType other)
        {
            var res = true;

            res &= SchemaManager.Comparer.Compare(this.Name, other.name) == 0;
            res &= this.type == other.type;
            res &= this.scale == other.scale;
            res &= this.precision == other.precision;
            res &= !this.HasLength || (this.length == other.length);
            res &= this.isNullable == other.isNullable;

            return res;
        }
Пример #6
0
 private void InitializeMembers(StreamingContext context)
 {
     this.parent = null;
     this.id = -1;
     this.name = String.Empty;
     this.dataType = null;
     this.metadata = new LazyProperty<VariableMetadata>(LoadMetadata);
 }
Пример #7
0
 private void CopyMembers(Variable old)
 {
     this.parent = old.parent;
     this.id = old.id;
     this.name = old.name;
     this.dataType = old.dataType;
     this.metadata = new LazyProperty<VariableMetadata>(LoadMetadata);
 }
Пример #8
0
        private void InitializeMembers()
        {
            this.columnExpression = null;
            this.columnIdentifier = null;
            this.tableReference = null;

            this.columnName = null;
            this.dataType = DataType.Unknown;
            this.columnAlias = null;

            this.isStar = false;
            this.isComplexExpression = false;
            this.selectListIndex = -1;
            this.columnContext = Graywulf.SqlParser.ColumnContext.None;
        }
Пример #9
0
        private void CopyMembers(ColumnReference old)
        {
            this.columnExpression = old.columnExpression;
            this.columnIdentifier = old.columnIdentifier;
            this.tableReference = old.tableReference;

            this.columnName = old.columnName;
            this.dataType = old.dataType;
            this.columnAlias = old.columnAlias;

            this.isStar = old.isStar;
            this.isComplexExpression = old.isComplexExpression;
            this.selectListIndex = old.selectListIndex;
            this.columnContext = old.columnContext;
        }