Package com.foundationdb.ais.model

Examples of com.foundationdb.ais.model.Column


            toColumns = toTable.getColumns();
        else {
            toColumns = new ArrayList<>(copyStmt.getColumnList().size());
            for (ResultColumn rc : copyStmt.getColumnList()) {
                ColumnReference cref = rc.getReference();
                Column column = toTable.getColumn(cref.getColumnName());
                if (column == null)
                    throw new NoSuchColumnException(cref.getColumnName(), cref);
                toColumns.add(column);
            }
        }
View Full Code Here


            return null;
        case Statement.RETURN_GENERATED_KEYS:
            return new ExecuteAutoGeneratedKeys() {
                    @Override
                    public List<Column> getTargetColumns(Table targetTable) {
                        Column identityColumn = targetTable.getIdentityColumn();
                        if (identityColumn == null)
                            return Collections.emptyList();
                        else
                            return Collections.singletonList(identityColumn);
                    }
View Full Code Here

                @Override
                public List<Column> getTargetColumns(Table targetTable) {
                    List<Column> result = new ArrayList<>();
                    for (int i = 0; i < columnNames.length; i++) {
                        String columnName = columnNames[i];
                        Column column = targetTable.getColumn(columnName);
                        if (column == null) {
                            throw JDBCException.wrapped("Invalid column name: " + columnName);
                        }
                        result.add(column);
                    }
View Full Code Here

        return columns.size();
    }

    @Override
    public boolean isAutoIncrement(int column) throws SQLException {
        Column aisColumn = getColumn(column).getAISColumn();
        if (aisColumn == null)
            return false;
        else
            // No isAutoIncrement().
            return (aisColumn.getInitialAutoIncrementValue() != null);
    }
View Full Code Here

            return (aisColumn.getInitialAutoIncrementValue() != null);
    }

    @Override
    public boolean isCaseSensitive(int column) throws SQLException {
        Column aisColumn = getColumn(column).getAISColumn();
        if (aisColumn == null)
            return false;
        AkCollator collator = aisColumn.getCollator();
        if (collator == null)
            return false;
        else
            return collator.isCaseSensitive();
    }
View Full Code Here

    }

    @Override
    public String getColumnName(int column) throws SQLException {
        ResultColumn jdbcColumn = getColumn(column);
        Column aisColumn = jdbcColumn.getAISColumn();
        if (aisColumn != null)
            return aisColumn.getName();
        return jdbcColumn.getName();
    }
View Full Code Here

        return jdbcColumn.getName();
    }

    @Override
    public String getSchemaName(int column) throws SQLException {
        Column aisColumn = getColumn(column).getAISColumn();
        if (aisColumn != null)
            return aisColumn.getTable().getName().getSchemaName();
        return "";
    }
View Full Code Here

        return getColumn(column).getScale();
    }

    @Override
    public String getTableName(int column) throws SQLException {
        Column aisColumn = getColumn(column).getAISColumn();
        if (aisColumn != null)
            return aisColumn.getTable().getName().getTableName();
        return "";
    }
View Full Code Here

            TInstance type = type(node);
            return type == null || type.nullability();
        }

        ExpressionNode handleColumnExpression(ColumnExpression expression) {
            Column column = expression.getColumn();
            ColumnSource columnSource = expression.getTable();
            if (column != null) {
                assert columnSource instanceof TableSource : columnSource;
                TInstance columnInstance = column.getType();
                if ((Boolean.FALSE == columnInstance.nullability()) &&
                    (expression.getSQLtype() != null) &&
                    (expression.getSQLtype().isNullable())) {
                    // With an outer join, the column can still be nullable.
                    columnInstance = columnInstance.withNullable(true);
View Full Code Here

                else if (leftField.getName() != null)
                    name = leftField.getName();
                else if (rightField.getName() != null)
                    name = rightField.getName();

                Column column = null;
                // If both side of the setPlan reference the same column, use it, else null
                if (leftField.getColumn() != null && rightField.getColumn() != null &&
                        leftField.getColumn() == rightField.getColumn())
                    column = leftField.getColumn();
View Full Code Here

TOP

Related Classes of com.foundationdb.ais.model.Column

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.