Package org.jooq.util

Examples of org.jooq.util.SchemaDefinition


                    CrossReferences.FKTABLE_SCHEMA.asc(),
                    CrossReferences.FK_NAME.asc(),
                    CrossReferences.ORDINAL_POSITION.asc())
                .fetch()) {

            SchemaDefinition foreignKeySchema = getSchema(record.getValue(CrossReferences.FKTABLE_SCHEMA));
            SchemaDefinition uniqueKeySchema = getSchema(record.getValue(Constraints.CONSTRAINT_SCHEMA));

            String foreignKeyTableName = record.getValue(CrossReferences.FKTABLE_NAME);
            String foreignKeyColumn = record.getValue(CrossReferences.FKCOLUMN_NAME);
            String foreignKey = record.getValue(CrossReferences.FK_NAME);
            String uniqueKey = record.getValue(Constraints.CONSTRAINT_NAME);
View Full Code Here


                    Schemata.SCHEMA_NAME,
                    Schemata.REMARKS)
                .from(SCHEMATA)
                .fetch()) {

            result.add(new SchemaDefinition(this,
                record.getValue(Schemata.SCHEMA_NAME),
                record.getValue(Schemata.REMARKS)));
        }

        return result;
View Full Code Here

                .orderBy(
                    Sequences.SEQUENCE_SCHEMA,
                    Sequences.SEQUENCE_NAME)
                .fetch()) {

            SchemaDefinition schema = getSchema(record.getValue(Sequences.SEQUENCE_SCHEMA));
            String name = record.getValue(Sequences.SEQUENCE_NAME);

            DefaultDataTypeDefinition type = new DefaultDataTypeDefinition(
                this,
                schema,
View Full Code Here

                .orderBy(
                    Tables.TABLE_SCHEMA,
                    Tables.ID)
                .fetch()) {

            SchemaDefinition schema = getSchema(record.getValue(Tables.TABLE_SCHEMA));
            String name = record.getValue(Tables.TABLE_NAME);
            String comment = record.getValue(Tables.REMARKS);

            H2TableDefinition table = new H2TableDefinition(schema, name, comment);
            result.add(table);
View Full Code Here

                .and(TypeInfo.POS.equal(0))
                .where(FunctionAliases.ALIAS_SCHEMA.in(getInputSchemata()))
                .and(FunctionAliases.RETURNS_RESULT.in((short) 1, (short) 2))
                .orderBy(FunctionAliases.ALIAS_NAME).fetch()) {

            SchemaDefinition schema = getSchema(record.getValue(FunctionAliases.ALIAS_SCHEMA));
            String name = record.getValue(FunctionAliases.ALIAS_NAME);
            String comment = record.getValue(FunctionAliases.REMARKS);
            String typeName = record.getValue(TypeInfo.TYPE_NAME);
            Integer precision = record.getValue(TypeInfo.PRECISION);
            Short scale = record.getValue(TypeInfo.MAXIMUM_SCALE);
View Full Code Here

        for (String name : create()
                .select(SYSUSER.USER_NAME)
                .from(SYSUSER)
                .fetch(SYSUSER.USER_NAME)) {

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

        return result;
    }
View Full Code Here

            .orderBy(
                ALL_COLL_TYPES.OWNER,
                ALL_COLL_TYPES.TYPE_NAME)
            .fetch()) {

            SchemaDefinition schema = getSchema(record.getValue(ALL_COLL_TYPES.OWNER));

            String name = record.getValue(ALL_COLL_TYPES.TYPE_NAME);
            String dataType = record.getValue(ALL_COLL_TYPES.ELEM_TYPE_NAME);

            int length = record.getValue(ALL_COLL_TYPES.LENGTH, BigDecimal.ZERO).intValue();
View Full Code Here

                    ALL_OBJECTS.OWNER,
                    ALL_OBJECTS.OBJECT_NAME,
                    ALL_OBJECTS.OBJECT_ID)
                .fetch()) {

            SchemaDefinition schema = getSchema(record.getValue(ALL_OBJECTS.OWNER));
            String objectName = record.getValue(ALL_OBJECTS.OBJECT_NAME);
            BigDecimal objectId = record.getValue(ALL_OBJECTS.OBJECT_ID);

            result.add(new OracleRoutineDefinition(schema, null, objectName, "", objectId, null));
        }
View Full Code Here

                    ALL_OBJECTS.OWNER,
                    ALL_OBJECTS.OBJECT_NAME,
                    ALL_OBJECTS.OBJECT_ID)
                .fetch()) {

            SchemaDefinition schema = getSchema(record.getValue(ALL_OBJECTS.OWNER));
            String name = record.getValue(ALL_OBJECTS.OBJECT_NAME);

            result.add(new OraclePackageDefinition(schema, name, ""));
        }
View Full Code Here

     * {@inheritDoc}
     */
    @Override
    protected void loadPrimaryKeys(DefaultRelations relations) throws SQLException {
        for (Record record : fetchKeys("P")) {
            SchemaDefinition schema = getSchema(record.getValue(ALL_CONS_COLUMNS.OWNER));
            String key = record.getValue(ALL_CONS_COLUMNS.CONSTRAINT_NAME);
            String tableName = record.getValue(ALL_CONS_COLUMNS.TABLE_NAME);
            String columnName = record.getValue(ALL_CONS_COLUMNS.COLUMN_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.