Package org.jooq.util

Examples of org.jooq.util.ColumnDefinition


            String uniqueKey = record.getValue(trim(IirefConstraints.UNIQUE_CONSTRAINT_NAME));

            TableDefinition referencingTable = getTable(foreignKeySchema, foreignKeyTable);

            if (referencingTable != null) {
                ColumnDefinition referencingColumn = referencingTable.getColumn(foreignKeyColumn);
                relations.addForeignKey(foreignKey, uniqueKey, referencingColumn, uniqueKeySchema);
            }
        }
    }
View Full Code Here


            if (referencingTable != null) {

                // [#986] Add the table name as a namespace prefix to the key
                // name. In Postgres, foreign key names are only unique per table
                ColumnDefinition referencingColumn = referencingTable.getColumn(foreignKeyColumn);
                relations.addForeignKey(foreignKeyTable + "__" + foreignKey, uniqueKey, referencingColumn, uniqueKeySchema);
            }
        }
    }
View Full Code Here

                record.getValue(COLUMNS.CHARACTER_MAXIMUM_LENGTH),
                record.getValue(COLUMNS.NUMERIC_PRECISION),
                record.getValue(COLUMNS.NUMERIC_SCALE),
                record.getValue(COLUMNS.UDT_NAME));

      ColumnDefinition column = new DefaultColumnDefinition(
          getDatabase().getTable(getSchema(), getName()),
          record.getValue(COLUMNS.COLUMN_NAME),
          record.getValueAsInteger(COLUMNS.ORDINAL_POSITION),
          type,
          record.getValue(COLUMNS.IS_NULLABLE, boolean.class),
View Full Code Here

            String uniqueKey = record.getValue(REFERENTIAL_CONSTRAINTS.UNIQUE_CONSTRAINT_NAME);

            TableDefinition referencingTable = getTable(foreignKeySchema, foreignKeyTable);

            if (referencingTable != null) {
                ColumnDefinition referencingColumn = referencingTable.getColumn(foreignKeyColumn);
                relations.addForeignKey(foreignKey, uniqueKey, referencingColumn, uniqueKeySchema);
            }
        }
    }
View Full Code Here

                record.getValue(COLUMNS.CHARACTER_MAXIMUM_LENGTH),
                record.getValue(COLUMNS.NUMERIC_PRECISION),
                record.getValue(COLUMNS.NUMERIC_SCALE),
                "");

      ColumnDefinition column = new DefaultColumnDefinition(
          getDatabase().getTable(getSchema(), getName()),
          record.getValue(COLUMNS.COLUMN_NAME),
          record.getValueAsInteger(COLUMNS.ORDINAL_POSITION),
          type,
          record.getValue(COLUMNS.IS_NULLABLE, boolean.class),
View Full Code Here

                record.getValue(Columns.CHARACTER_MAXIMUM_LENGTH),
                record.getValue(Columns.NUMERIC_PRECISION),
                record.getValue(Columns.NUMERIC_SCALE),
                getName() + "_" + record.getValue(Columns.COLUMN_NAME));

      ColumnDefinition column = new DefaultColumnDefinition(
        getDatabase().getTable(getSchema(), getName()),
          record.getValue(Columns.COLUMN_NAME),
          record.getValueAsInteger(Columns.ORDINAL_POSITION),
          type,
          record.getValue(Columns.IS_NULLABLE, boolean.class),
View Full Code Here

            String referencedTableName = record.getValue(ReferentialConstraints.REFERENCED_TABLE_NAME);

            TableDefinition foreignKeyTable = getTable(foreignKeySchema, foreignKeyTableName);

            if (foreignKeyTable != null) {
                ColumnDefinition column = foreignKeyTable.getColumn(foreignKeyColumn);

                String key = getKeyName(referencedTableName, referencedKey);
                relations.addForeignKey(foreignKey, key, column, uniqueKeySchema);
            }
        }
View Full Code Here

            // [#1237] Don't generate enum classes for columns in MySQL tables
            // that are excluded from code generation
            TableDefinition tableDefinition = getTable(schema, table);
            if (tableDefinition != null) {
                ColumnDefinition columnDefinition = tableDefinition.getColumn(column);

                if (columnDefinition != null) {

                  // [#1137] Avoid generating enum classes for enum types that
                  // are explicitly forced to another type
View Full Code Here

                    String foreignKeyName = record.getValueAsString("fk");
                    String foreignKeyColumnName = record.getValueAsString(i + 3);
                    String uniqueKeyName = record.getValueAsString("pk");

                    ColumnDefinition column = referencingTable.getColumn(foreignKeyColumnName);
                    relations.addForeignKey(foreignKeyName, uniqueKeyName, column, getSchema());
                }
            }
        }
    }
View Full Code Here

                record.getValue(Columns.TYPENAME),
                record.getValue(Columns.LENGTH),
                record.getValue(Columns.LENGTH),
                record.getValue(Columns.SCALE));

            ColumnDefinition column = new DefaultColumnDefinition(
              getDatabase().getTable(getSchema(), getName()),
                record.getValue(Columns.COLNAME),
                record.getValue(Columns.COLNO),
                type,
                record.getValue(Columns.NULLS, boolean.class),
View Full Code Here

TOP

Related Classes of org.jooq.util.ColumnDefinition

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.