Examples of SchemaDefinition


Examples of org.jooq.util.SchemaDefinition

                .join(cc)
                .using(tc.CONSTRAINT_CATALOG, tc.CONSTRAINT_SCHEMA, tc.CONSTRAINT_NAME)
                .where(tc.TABLE_SCHEMA.in(getInputSchemata()))
                .fetch()) {

            SchemaDefinition schema = getSchema(record.getValue(tc.TABLE_SCHEMA));
            TableDefinition table = getTable(schema, record.getValue(tc.TABLE_NAME));

            if (table != null) {
                relations.addCheckConstraint(table, new DefaultCheckConstraintDefinition(
                    schema,
View Full Code Here

Examples of org.jooq.util.SchemaDefinition

                    .and(PG_PROC.PRORETSET))
                .asTable("tables"))
                .orderBy(1, 2)
                .fetch()) {

            SchemaDefinition schema = getSchema(record.getValue(TABLES.TABLE_SCHEMA));
            String name = record.getValue(TABLES.TABLE_NAME);
            boolean tableValuedFunction = record.getValue("table_valued_function", boolean.class);
            String comment = record.getValue(PG_DESCRIPTION.DESCRIPTION, String.class);

            if (tableValuedFunction) {
                result.add(new PostgresTableValuedFunction(schema, name, record.getValue(ROUTINES.SPECIFIC_NAME), comment));
            }
            else {
                PostgresTableDefinition t = new PostgresTableDefinition(schema, name, comment);
                result.add(t);
                map.put(name(schema.getName(), name), t);
            }
        }

        PgClass ct = PG_CLASS.as("ct");
        PgNamespace cn = PG_NAMESPACE.as("cn");
View Full Code Here

Examples of org.jooq.util.SchemaDefinition

        for (String name : create()
                .select(PG_NAMESPACE.NSPNAME)
                .from(PG_NAMESPACE)
                .fetch(PG_NAMESPACE.NSPNAME)) {

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

        return result;
    }
View Full Code Here

Examples of org.jooq.util.SchemaDefinition

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

            SchemaDefinition schema = getSchema(record.getValue(SEQUENCES.SEQUENCE_SCHEMA));

            DataTypeDefinition type = new DefaultDataTypeDefinition(
                this, schema,
                record.getValue(SEQUENCES.DATA_TYPE),
                0,
View Full Code Here

Examples of org.jooq.util.SchemaDefinition

                String nspname = type.getValue(PG_NAMESPACE.NSPNAME);
                String typname = type.getValue(PG_TYPE.TYPNAME);

                DefaultEnumDefinition definition = null;
                for (String label : enumLabels(nspname, typname)) {
                    SchemaDefinition schema = getSchema(nspname);
                    String typeName = String.valueOf(typname);

                    if (definition == null || !definition.getName().equals(typeName)) {
                        definition = new DefaultEnumDefinition(schema, typeName, null);
                        result.add(definition);
View Full Code Here

Examples of org.jooq.util.SchemaDefinition

                    .orderBy(
                        ATTRIBUTES.UDT_SCHEMA,
                        ATTRIBUTES.UDT_NAME)
                    .fetch()) {

                SchemaDefinition schema = getSchema(record.getValue(ATTRIBUTES.UDT_SCHEMA));
                String name = record.getValue(ATTRIBUTES.UDT_NAME);

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

Examples of org.jooq.util.SchemaDefinition

    }

    @Override
    protected List<SchemaDefinition> getSchemata0() throws SQLException {
        List<SchemaDefinition> result = new ArrayList<SchemaDefinition>();
        result.add(new SchemaDefinition(this, "", ""));
        return result;
    }
View Full Code Here

Examples of org.jooq.util.SchemaDefinition

                .select(RDB$GENERATORS.RDB$GENERATOR_NAME.trim())
                .from(RDB$GENERATORS)
                .orderBy(1)
                .fetch(RDB$GENERATORS.RDB$GENERATOR_NAME.trim())) {

            SchemaDefinition schema = getSchemata().get(0);
            DataTypeDefinition type = new DefaultDataTypeDefinition(
                this, schema, FirebirdDataType.BIGINT.getTypeName()
            );

            result.add(new DefaultSequenceDefinition(schema, sequenceName, type ));
View Full Code Here

Examples of org.jooq.util.SchemaDefinition

    private static final JooqLogger log = JooqLogger.getLogger(MySQLDatabase.class);

    @Override
    protected void loadPrimaryKeys(DefaultRelations relations) throws SQLException {
        for (Record record : fetchKeys(true)) {
            SchemaDefinition schema = getSchema(record.getValue(Statistics.TABLE_SCHEMA));
            String constraintName = record.getValue(Statistics.INDEX_NAME);
            String tableName = record.getValue(Statistics.TABLE_NAME);
            String columnName = record.getValue(Statistics.COLUMN_NAME);

            String key = getKeyName(tableName, constraintName);
View Full Code Here

Examples of org.jooq.util.SchemaDefinition

    }

    @Override
    protected void loadUniqueKeys(DefaultRelations relations) throws SQLException {
        for (Record record : fetchKeys(false)) {
            SchemaDefinition schema = getSchema(record.getValue(Statistics.TABLE_SCHEMA));
            String constraintName = record.getValue(Statistics.INDEX_NAME);
            String tableName = record.getValue(Statistics.TABLE_NAME);
            String columnName = record.getValue(Statistics.COLUMN_NAME);

            String key = getKeyName(tableName, constraintName);
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.