Esempio n. 1
0
        public static ResultColumn createStarResultColumn(SelectResultSet resultSet, Tuple <TResultColumn, TObjectName> starColumnPair)
        {
            if (ModelBindingManager.getModel(starColumnPair) is ResultColumn)
            {
                return((ResultColumn)ModelBindingManager.getModel(starColumnPair));
            }
            ResultColumn column = new ResultColumn(resultSet, starColumnPair);

            ModelBindingManager.bindModel(starColumnPair, column);
            return(column);
        }
Esempio n. 2
0
        public static SelectResultSet createResultSet(TSelectSqlStatement select)
        {
            if (ModelBindingManager.getModel(select.ResultColumnList) is ResultSet)
            {
                return((SelectResultSet)ModelBindingManager.getModel(select.ResultColumnList));
            }
            SelectResultSet resultSet = new SelectResultSet(select);

            ModelBindingManager.bindModel(select.ResultColumnList, resultSet);
            return(resultSet);
        }
Esempio n. 3
0
        public ResultColumn(SelectResultSet resultSet, Tuple <TResultColumn, TObjectName> starColumnPair)
        {
            if (starColumnPair == null || resultSet == null)
            {
                throw new System.ArgumentException("ResultColumn arguments can't be null.");
            }

            id = ++TableColumn.TABLE_COLUMN_ID;

            this.resultSet = resultSet;
            resultSet.addColumn(this);

            this.columnObject = starColumnPair.Item1;

            TSourceToken startToken = columnObject.startToken;
            TSourceToken endToken   = columnObject.endToken;

            this.name     = ((TObjectName)columnObject).ColumnNameOnly;
            this.fullName = columnObject.ToString();

            this.startPosition = new Tuple <long, long>(startToken.lineNo, startToken.columnNo);
            this.endPosition   = new Tuple <long, long>(endToken.lineNo, endToken.columnNo + endToken.astext.Length);
        }