Esempio n. 1
0
		private void CreateColumnRefs()
		{
			List<ColumnRefBinding> tableColumnRefs = new List<ColumnRefBinding>();

			if (!(_definition is DerivedTableBinding) && !(_definition is CommonTableBinding))
			{
				// Create special row column ref

				ColumnRefBinding rowColumnRefBinding = CreateRowColumnRefBinding(this);
				tableColumnRefs.Add(rowColumnRefBinding);
			}

			// Create all column refs.

			foreach (ColumnBinding columnDefinition in _definition.Columns)
			{
				ColumnRefBinding columnRefBinding = new ColumnRefBinding(this, columnDefinition);

				RowBufferEntry rowBufferEntry = new RowBufferEntry(columnRefBinding.ColumnBinding.DataType);
				rowBufferEntry.Name = columnRefBinding.GetFullName();

				ColumnValueDefinition columnValueDefinition = new ColumnValueDefinition();
				columnValueDefinition.Target = rowBufferEntry;
				columnValueDefinition.ColumnRefBinding = columnRefBinding;

				columnRefBinding.ValueDefinition = columnValueDefinition;
				tableColumnRefs.Add(columnRefBinding);
			}

			// Assign column refs to table ref.

			_columnRefs = tableColumnRefs.ToArray();
		}
Esempio n. 2
0
		public override AstElement Clone(Dictionary<AstElement, AstElement> alreadyClonedElements)
		{
			ColumnValueDefinition result = new ColumnValueDefinition();
			result.Target = Target;
			result.ColumnRefBinding = _columnRefBinding;
			return result;
		}
        public override AstElement Clone(Dictionary <AstElement, AstElement> alreadyClonedElements)
        {
            ColumnValueDefinition result = new ColumnValueDefinition();

            result.Target           = Target;
            result.ColumnRefBinding = _columnRefBinding;
            return(result);
        }
Esempio n. 4
0
		private static ColumnRefBinding CreateRowColumnRefBinding(TableRefBinding tableRefBinding)
		{
			RowColumnBinding rowColumnBinding = new RowColumnBinding(tableRefBinding.TableBinding);
			ColumnRefBinding rowColumnRefBinding = new ColumnRefBinding(tableRefBinding, rowColumnBinding);

			RowBufferEntry rowColumnBufferEntry = new RowBufferEntry(rowColumnRefBinding.ColumnBinding.DataType);
			rowColumnBufferEntry.Name = rowColumnRefBinding.TableRefBinding.Name;

			ColumnValueDefinition rowColumnValueDefinition = new ColumnValueDefinition();
			rowColumnValueDefinition.Target = rowColumnBufferEntry;
			rowColumnValueDefinition.ColumnRefBinding = rowColumnRefBinding;

			rowColumnRefBinding.ValueDefinition = rowColumnValueDefinition;
			return rowColumnRefBinding;
		}