Example #1
0
        public Column(string name, DataType type)
        {
            InitializeMembers();

            this.Name = name;
            this.DataType = type;
        }
Example #2
0
        public ColumnReference(TableReference tableReference, Column columnDescription)
        {
            InitializeMembers();

            this.tableReference = tableReference;
            this.columnName = columnDescription.Name;
            this.dataType = columnDescription.DataType;
        }
Example #3
0
 public DataType(DataType old)
 {
     CopyMembers(old);
 }
Example #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;
 }
Example #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;
        }
Example #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);
 }
Example #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);
 }
Example #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;
        }
Example #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;
        }