Package org.jooq.util

Examples of org.jooq.util.SchemaDefinition


                Columns.TABLE_NAME.asc(),
                Columns.COLUMN_NAME.asc())
            .fetch();

        for (Record record : records) {
            SchemaDefinition schema = getSchema(record.getValue(Columns.TABLE_SCHEMA));

            String comment = record.getValue(Columns.COLUMN_COMMENT);
            String table = record.getValue(Columns.TABLE_NAME);
            String column = record.getValue(Columns.COLUMN_NAME);
            String name = table + "_" + column;
View Full Code Here


            Result<?> overloads = entry.getValue();

            for (int i = 0; i < overloads.size(); i++) {
                Record record = overloads.get(i);

                SchemaDefinition schema = getSchema(record.getValue(DB));
                String name = record.getValue(Proc.NAME);
                String comment = record.getValue(Proc.COMMENT);
                String params = new String(record.getValue(Proc.PARAM_LIST));
                String returns = new String(record.getValue(Proc.RETURNS));
                ProcType type = record.getValue(Proc.TYPE);
View Full Code Here

public class CUBRIDDatabase extends AbstractDatabase {

    @Override
    protected void loadPrimaryKeys(DefaultRelations relations) throws SQLException {
        for (Record record : fetchKeys(DB_INDEX.IS_UNIQUE.isTrue().and(DB_INDEX.IS_PRIMARY_KEY.isFalse()))) {
            SchemaDefinition schema = getSchema(record.getValue(DB_CLASS.OWNER_NAME));
            String key = record.getValue("constraint_name", String.class);
            String tableName = record.getValue(DB_CLASS.CLASS_NAME);
            String columnName = record.getValue(DB_INDEX_KEY.KEY_ATTR_NAME);

            TableDefinition table = getTable(schema, tableName);
View Full Code Here

    }

    @Override
    protected void loadUniqueKeys(DefaultRelations relations) throws SQLException {
        for (Record record : fetchKeys(DB_INDEX.IS_PRIMARY_KEY.isTrue())) {
            SchemaDefinition schema = getSchema(record.getValue(DB_CLASS.OWNER_NAME));
            String key = record.getValue("constraint_name", String.class);
            String tableName = record.getValue(DB_CLASS.CLASS_NAME);
            String columnName = record.getValue(DB_INDEX_KEY.KEY_ATTR_NAME);

            TableDefinition table = getTable(schema, tableName);
View Full Code Here

                .from(DB_INDEX)
                .where(DB_INDEX.IS_FOREIGN_KEY.isTrue())
                .fetch(DB_INDEX.CLASS_NAME)) {

            for (Record record : create().fetch(meta.getImportedKeys(null, null, table))) {
                SchemaDefinition foreignKeySchema = getSchema(getInputSchemata().get(0));
                SchemaDefinition uniqueKeySchema = getSchema(getInputSchemata().get(0));

                String foreignKeyName =
                    record.getValue("FKTABLE_NAME", String.class) +
                    "__" +
                    record.getValue("FK_NAME", String.class);
View Full Code Here

        for (String name : create()
                .select(DB_USER.NAME)
                .from(DB_USER)
                .fetch(DB_USER.NAME)) {

            result.add(new SchemaDefinition(this, name, ""));
        }

        return result;
    }
View Full Code Here

                    field("owner.name", String.class).as("owner"))
                .from(DB_SERIAL)
                .where(field("owner.name", String.class).in(getInputSchemata()))
                .fetch()) {

            SchemaDefinition schema = getSchema(record.getValue("owner", String.class));
            BigInteger value = record.getValue(DB_SERIAL.MAX_VAL, BigInteger.class, BigInteger.valueOf(Long.MAX_VALUE));
            DataTypeDefinition type = getDataTypeForMAX_VAL(schema, value);

            result.add(new DefaultSequenceDefinition(
                schema,
View Full Code Here

                .orderBy(
                    DB_CLASS.OWNER_NAME.asc(),
                    DB_CLASS.CLASS_NAME.asc())
                .fetch()) {

            SchemaDefinition schema = getSchema(record.getValue(DB_CLASS.OWNER_NAME));
            String name = record.getValue(DB_CLASS.CLASS_NAME);

            CUBRIDTableDefinition table = new CUBRIDTableDefinition(schema, name, null);
            result.add(table);
        }
View Full Code Here

    }

    @Override
    protected void loadPrimaryKeys(DefaultRelations relations) throws SQLException {
        for (Record record : fetchKeys("PRIMARY KEY")) {
            SchemaDefinition schema = getSchema(record.getValue(Constraints.TABLE_SCHEMA));
            String tableName = record.getValue(Constraints.TABLE_NAME);
            String columnList = record.getValue(Constraints.COLUMN_LIST);
            String primaryKey = record.getValue(Constraints.CONSTRAINT_NAME);

            TableDefinition table = getTable(schema, tableName);
View Full Code Here

    }

    @Override
    protected void loadUniqueKeys(DefaultRelations relations) throws SQLException {
        for (Record record : fetchKeys("UNIQUE")) {
            SchemaDefinition schema = getSchema(record.getValue(Constraints.TABLE_SCHEMA));
            String tableName = record.getValue(Constraints.TABLE_NAME);
            String columnList = record.getValue(Constraints.COLUMN_LIST);
            String primaryKey = record.getValue(Constraints.CONSTRAINT_NAME);

            TableDefinition table = getTable(schema, tableName);
View Full Code Here

TOP

Related Classes of org.jooq.util.SchemaDefinition

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.