Package org.jooq.util

Examples of org.jooq.util.SchemaDefinition


        for (String name : create()
                .select(SCHEMATA.SCHEMA_NAME)
                .from(SCHEMATA)
                .fetch(SCHEMATA.SCHEMA_NAME)) {

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

        return result;
    }
View Full Code Here


                .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, 0, 0);
View Full Code Here

                .orderBy(
                    TABLES.TABLE_SCHEMA,
                    TABLES.TABLE_NAME)
                .fetch()) {

            SchemaDefinition schema = getSchema(record.getValue(TABLES.TABLE_SCHEMA));
            String name = record.getValue(TABLES.TABLE_NAME);
            String comment = "";

            result.add(new HSQLDBTableDefinition(schema, name, comment));
        }
View Full Code Here

    }

    @Override
    protected void loadPrimaryKeys(DefaultRelations relations) throws SQLException {
        for (Record record : fetchKeys("P")) {
            SchemaDefinition schema = getSchema(record.getValue(Keycoluse.TABSCHEMA.trim()));
            String key = record.getValue("constraint_name", String.class);
            String tableName = record.getValue(Keycoluse.TABNAME);
            String columnName = record.getValue(Keycoluse.COLNAME);

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

    }

    @Override
    protected void loadUniqueKeys(DefaultRelations relations) throws SQLException {
        for (Record record : fetchKeys("U")) {
            SchemaDefinition schema = getSchema(record.getValue(Keycoluse.TABSCHEMA.trim()));
            String key = record.getValue("constraint_name", String.class);
            String tableName = record.getValue(Keycoluse.TABNAME);
            String columnName = record.getValue(Keycoluse.COLNAME);

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

                    References.TABNAME,
                    References.CONSTNAME,
                    References.FK_COLNAMES)
                .fetch()) {

            SchemaDefinition foreignKeySchema = getSchema(record.getValue(References.TABSCHEMA.trim()));
            SchemaDefinition uniqueKeySchema = getSchema(record.getValue(References.REFTABSCHEMA.trim()));

            String foreignKey = record.getValue("constraint_name", String.class);
            String foreignKeyTableName = record.getValue(References.TABNAME);
            String foreignKeyColumn = record.getValue(References.FK_COLNAMES);
            String uniqueKey = record.getValue("referenced_constraint_name", String.class);
View Full Code Here

        for (String name : create()
                .select(Schemata.SCHEMANAME.trim())
                .from(SCHEMATA)
                .fetch(Schemata.SCHEMANAME.trim())) {

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

        return result;
    }
View Full Code Here

                .orderBy(
                    Sequences.SEQSCHEMA,
                    Sequences.SEQNAME)
                .fetch()) {

            SchemaDefinition schema = getSchema(record.getValue(Sequences.SEQSCHEMA.trim()));

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

        q.addConditions(Tables.TYPE.in("T", "V")); // tables and views
        q.addOrderBy(Tables.TABNAME);
        q.execute();

        for (Record record : q.getResult()) {
            SchemaDefinition schema = getSchema(record.getValue(Tables.TABSCHEMA.trim()));
            String name = record.getValue(Tables.TABNAME);
            String comment = "";

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

public class DerbyDatabase extends AbstractDatabase {

  @Override
  protected void loadPrimaryKeys(DefaultRelations relations) throws SQLException {
      for (Record record : fetchKeys("P")) {
          SchemaDefinition schema = getSchema(record.getValue(Sysschemas.SCHEMANAME));
          String key = record.getValue(Sysconstraints.CONSTRAINTNAME);
            String tableName = record.getValue(Systables.TABLENAME);
            String descriptor = record.getValueAsString(Sysconglomerates.DESCRIPTOR);

            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.