Examples of AkibanInformationSchema


Examples of com.foundationdb.ais.model.AkibanInformationSchema

    public void crash() {
        stop();
    }

    protected void registerSystemObjects() {
        AkibanInformationSchema ais = buildSystemObjects();
        schemaManager.registerStoredInformationSchemaTable(ais.getTable(SCHEMA, ROLES_TABLE_NAME), TABLE_VERSION);
        schemaManager.registerStoredInformationSchemaTable(ais.getTable(SCHEMA, USERS_TABLE_NAME), TABLE_VERSION);
        schemaManager.registerStoredInformationSchemaTable(ais.getTable(SCHEMA, USER_ROLES_TABLE_NAME), TABLE_VERSION);
        schemaManager.registerSystemRoutine(ais.getRoutine(SCHEMA, ADD_ROLE_PROC_NAME));
        schemaManager.registerSystemRoutine(ais.getRoutine(SCHEMA, ADD_USER_PROC_NAME));
    }
View Full Code Here

Examples of com.foundationdb.ais.model.AkibanInformationSchema

            }
        }
        if(parts[0].isEmpty()) {
            parts[0] = context.getCurrentSchema();
        }
        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]);
View Full Code Here

Examples of com.foundationdb.ais.model.AkibanInformationSchema

        }
    }

    /** Be very careful using this, most methods should take it explicitly and pass it down. */
    private RowDef getGlobalRowDef(Session session, RowData rowData) {
        AkibanInformationSchema ais = getAIS(session);
        return getRowDef(ais, rowData.getRowDefId());
    }
View Full Code Here

Examples of com.foundationdb.ais.model.AkibanInformationSchema

    @Override
    public void delete(TableName tableName, String identifier) {
        ENTITY_DELETE.in();
        try (Session session = sessionService.createSession();
             CloseableTransaction txn = transactionService.beginCloseableTransaction(session)) {
            AkibanInformationSchema ais = dxlService.ddlFunctions().getAIS(session);
            deleteProcessor.processDelete(session, ais, tableName, identifier);
            txn.commit();
        } finally {
            ENTITY_DELETE.out();
        }
View Full Code Here

Examples of com.foundationdb.ais.model.AkibanInformationSchema

    @Override
    public void upsert(PrintWriter writer, TableName tableName, JsonNode node) {
        ENTITY_PATCH.in();
        try (Session session = sessionService.createSession();
                CloseableTransaction txn = transactionService.beginCloseableTransaction(session)) {
            AkibanInformationSchema ais = dxlService.ddlFunctions().getAIS(session);
            String pk = upsertProcessor.processUpsert(session, ais, tableName, node);
            writer.write(pk);
            txn.commit();
        } finally {
            ENTITY_PATCH.out();
View Full Code Here

Examples of com.foundationdb.ais.model.AkibanInformationSchema

        }
    }

    @Override
    public void insertNoTxn(Session session, PrintWriter writer, TableName tableName, JsonNode node) {
        AkibanInformationSchema ais = dxlService.ddlFunctions().getAIS(session);
        String pk = insertProcessor.processInsert(session, ais, tableName, node);
        if(writer != null) {
            writer.write(pk);
        }
    }
View Full Code Here

Examples of com.foundationdb.ais.model.AkibanInformationSchema

        }
    }

    @Override
    public void updateNoTxn(Session session, PrintWriter writer, TableName tableName, String pks, JsonNode node) {
        AkibanInformationSchema ais = dxlService.ddlFunctions().getAIS(session);
        String pk = updateProcessor.processUpdate(session, ais, tableName, pks, node);
        writer.write(pk);
    }
View Full Code Here

Examples of com.foundationdb.ais.model.AkibanInformationSchema

        this.scriptEngineManagerProvider = scriptEngineManagerProvider;
    }

    @Override
    public void start() {
        AkibanInformationSchema ais = createTablesToRegister(getTypesTranslator());
        attachFactories(ais);
    }
View Full Code Here

Examples of com.foundationdb.ais.model.AkibanInformationSchema

    @Override
    public void truncateTable(final Session session, final int tableId, final boolean descendants)
    {
        logger.trace("truncating tableId={}", tableId);
        final AkibanInformationSchema ais = schemaManager.getAis(session);
        final Table table = ais.getTable(tableId);

        if(canFastTruncate(session, table, descendants)) {
            store.truncateGroup(session, table.getGroup());
            // All other tables in the group have no rows. Only need to truncate this table.
            for(TableListener listener : listenerService.getTableListeners()) {
View Full Code Here

Examples of com.foundationdb.ais.model.AkibanInformationSchema

    /** Add the Sequence to the current AIS */
    @Override
    public void createSequence(final Session session, final Sequence sequence) {
        checkSequenceName(session, sequence.getSequenceName(), false);
        AISMerge merge = AISMerge.newForOther(aisCloner, getNameGenerator(session), getAISForChange(session));
        AkibanInformationSchema newAIS = merge.mergeSequence(sequence);
        saveAISChange(session, newAIS, Collections.singleton(sequence.getSchemaName()));
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.