Package org.jooq.util

Examples of org.jooq.util.TableDefinition


                field("col_name(tableid, fokey16)", String.class),
                field("object_owner_id(tableid)"))
            .from(Sysreferences.SYSREFERENCES)
            .fetch()) {

            TableDefinition referencingTable = getTable(getSchema(), record.getValueAsString("fk_table"));
            if (referencingTable != null) {
                for (int i = 0; i < 16; i++) {
                    if (record.getValue(i + 3) == null) {
                        break;
                    }

                    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

TOP

Related Classes of org.jooq.util.TableDefinition

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.