Package com.foundationdb.server.error

Examples of com.foundationdb.server.error.NoSuchTableException


    public void init(AkibanInformationSchema ais) {
        IndexName name = shared.getName();
        Table table = ais.getTable(name.getFullTableName());
        if (table == null) {
            throw new NoSuchTableException(name.getFullTableName());
        }
        index = table.getFullTextIndex(name.getName());
        if (index == null) {
            NoSuchIndexException ret =  new NoSuchIndexException(name.getName());
            ret.printStackTrace();
View Full Code Here


        }

        private Table getTable () {
            Table table = ais.getTable(tableName);
            if (table == null) {
                throw new NoSuchTableException(tableName.getSchemaName(), tableName.getTableName());
            } else if (table.isProtectedTable()) {
                throw  new ProtectedTableDDLException (table.getName());
            }
            return table;
        }
View Full Code Here

        AkibanInformationSchema ais = context.getQueryContext().getStore().schema().ais();
        Columnar columnar = ais.getTable(parts[0], parts[1]);
        if(columnar == null) {
            columnar = ais.getView(parts[0], parts[1]);
            if(columnar == null) {
                throw new NoSuchTableException(parts[0], parts[1]);
            }
        }
        Column column = columnar.getColumn(parts[2]);
        if(column == null) {
            throw new NoSuchColumnException(String.format("%s.%s.%s", parts[0], parts[1], parts[2]));
View Full Code Here

    @Override
    public int getTableId(Session session, TableName tableName) throws NoSuchTableException {
        logger.trace("getting table ID for {}", tableName);
        Table table = getAIS(session).getTable(tableName);
        if (table == null) {
            throw new NoSuchTableException(tableName);
        }
        return table.getTableId();
    }
View Full Code Here

    public Table getTable(Session session, TableName tableName) throws NoSuchTableException {
        logger.trace("getting AIS Table for {}", tableName);
        AkibanInformationSchema ais = getAIS(session);
        Table table = ais.getTable(tableName);
        if (table == null) {
            throw new NoSuchTableException(tableName);
        }
        return table;
    }
View Full Code Here

            !securityService.isAccessible(session, tableName.getSchemaName())) {
            throw new ProtectedTableDDLException(tableName);
        }
        final boolean tableExists = getAISForChange(session, !inIS).getTable(tableName) != null;
        if(shouldExist && !tableExists) {
            throw new NoSuchTableException(tableName);
        }
        if(!shouldExist && tableExists) {
            throw new DuplicateTableNameException(tableName);
        }
    }
View Full Code Here

    protected Table lookupTableName(TableName origName, String schemaName, String tableName) {
        Table result = ais.getTable(schemaName, tableName);
        if ((result == null) ||
            ((context != null) && !context.isAccessible(result.getName())))
            throw new NoSuchTableException(schemaName, tableName, origName);
        return result;
    }
View Full Code Here

                        return fromBaseTable;
                    }
                }
            }
        }
        throw new NoSuchTableException(schemaName, tableName, tableNameNode);
    }
View Full Code Here

        // Give an error if the qualification name did not match an exposed name.
        if (resultColumnList == null) {
            if (allTableName == null) {
                throw new NoTableSpecifiedInQueryException ();
            } else {
                throw new NoSuchTableException(allTableName.getSchemaName(), allTableName.getTableName(), allTableName);
            }
        }

        return resultColumnList;
    }
View Full Code Here

                                         QueryContext context) {
        final AkibanInformationSchema curAIS = ddlFunctions.getAIS(session);
        final TableName tableName = convertName(defaultSchemaName, alterTable.getObjectName());
        final Table table = curAIS.getTable(tableName);
        if((table == null) &&
           skipOrThrow(context, alterTable.getExistenceCheck(), null, new NoSuchTableException(tableName))) {
            return null;
        }

        if (alterTable.isUpdateStatistics()) {
            Collection<String> indexes = null;
View Full Code Here

TOP

Related Classes of com.foundationdb.server.error.NoSuchTableException

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.