Package com.foundationdb.ais.model

Examples of com.foundationdb.ais.model.TableName


            String charsetName = fieldDef.column().getCharsetName();
            try {
                return value.toString().getBytes(charsetName).length + prefixWidth;
            }
            catch (UnsupportedEncodingException ex) {
                TableName table = fieldDef.column().getTable().getName();
                throw new UnsupportedCharsetException(charsetName);
            }
        }
    }
View Full Code Here


    protected void parseStatistics(Object obj, Map<Index,IndexStatistics> result, boolean statsIgnoreMissingIndexes) {
        if (!(obj instanceof Map))
            throw new AkibanInternalException("Document not in expected format");
        Map<?,?> map = (Map<?,?>)obj;
        TableName tableName = TableName.create(defaultSchema,
                                               (String)map.get(TABLE_NAME_KEY));
        Table table = ais.getTable(tableName);
        if (table == null)
            throw new NoSuchTableException(tableName);
        String indexName = (String)map.get(INDEX_NAME_KEY);
View Full Code Here

                    switch (dropAlias.getAliasType()) {
                    case PROCEDURE:
                    case FUNCTION:
                        stmtOkay = true;
                        {
                            TableName routineName = DDLHelper.convertName(server.getDefaultSchemaName(), dropAlias.getObjectName());
                            Routine routine = server.getAIS().getRoutine(routineName);
                            if (routine != null) {
                                SQLJJar sqljjar = routine.getSQLJJar();
                                thisjarOkay = ((sqljjar != null) &&
                                               jarName.equals(sqljjar.getName()));
View Full Code Here

            indexName = null;
            while((row = cursor.next()) != null) {
                String schema = row.value(0).getString();
                String tableName = row.value(1).getString();
                String iName = row.value(2).getString();
                indexName = new IndexName(new TableName(schema, tableName), iName);
                indexID = row.value(3).getInt32();

                Table table = getAIS(session).getTable(indexName.getFullTableName());
                Index index = (table != null) ? table.getFullTextIndex(indexName.getName()) : null;
                // May have been deleted or recreated
View Full Code Here

    @Override
    public CompoundExplainer getExplainer(ExplainContext context)
    {
        CompoundExplainer explainer = super.getExplainer(context);
        TableName tableName = table.getName();
        explainer.addAttribute(Label.TABLE_SCHEMA, PrimitiveExplainer.getInstance(tableName.getSchemaName()));
        explainer.addAttribute(Label.TABLE_NAME, PrimitiveExplainer.getInstance(tableName.getTableName()));
        return explainer;
    }
View Full Code Here

    public static List<String> dataPath(Index index) {
        return makeIndexPath(DATA_PATH_NAME, index);
    }

    public static List<String> dataPath(Sequence sequence) {
        TableName seqName = sequence.getSequenceName();
        return dataPathSequence(seqName.getSchemaName(), seqName.getTableName());
    }
View Full Code Here

    public static List<String> onlinePath(Index index) {
        return makeIndexPath(ONLINE_PATH_NAME, index);
    }

    public static List<String> onlinePath(Sequence sequence) {
        TableName seqName = sequence.getSequenceName();
        return onlinePathSequence(seqName.getSchemaName(), seqName.getTableName());
    }
View Full Code Here

    public synchronized byte[] generateGroupPrefixBytes(String schemaName, String groupName) {
        return generate(makeTablePath(pathPrefix, schemaName, groupName));
    }

    public synchronized byte[] generateSequencePrefixBytes(Sequence sequence) {
        TableName seqName = sequence.getSequenceName();
        return generate(makeSequencePath(pathPrefix, seqName.getSchemaName(), seqName.getTableName()));
    }
View Full Code Here

                    first = false;
                    // Delete the closing } for the object
                    StringBuilder builder = (StringBuilder)appender.getAppendable();
                    builder.deleteCharAt(builder.length()-1);
                }
                TableName tableName = TableName.parse(context.tableName.getSchemaName(), field.getKey());
                ProcessContext newContext = new ProcessContext(context.ais(), context.session, tableName);
                newContext.pkValues = context.pkValues;
                appender.append(",\"");
                appender.append(newContext.table.getNameForOutput());
                appender.append("\":");
View Full Code Here

    @Test
    public void groupStructure() {
        createFromDDL(SCHEMA,
          "CREATE TABLE t1(id INT PRIMARY KEY NOT NULL, abbrev CHAR(2), name VARCHAR(128)) STORAGE_FORMAT column_keys;" +
          "CREATE TABLE t2(id INT PRIMARY KEY NOT NULL, sid INT, GROUPING FOREIGN KEY(sid) REFERENCES t1(id), name VARCHAR(128));");
        int t1 = ddl().getTableId(session(), new TableName(SCHEMA, "t1"));
        int t2 = ddl().getTableId(session(), new TableName(SCHEMA, "t2"));

        Schema schema = SchemaCache.globalSchema(ddl().getAIS(session()));
        RowType t1Type = schema.tableRowType(getTable(t1));
        RowType t2Type = schema.tableRowType(getTable(t2));
        StoreAdapter adapter = newStoreAdapter(schema);
View Full Code Here

TOP

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

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.