org.jooq.Table.getQualifiedName()方法的使用及代码示例

x33g5p2x  于2022-01-30 转载在 其他  
字(2.8k)|赞(0)|评价(0)|浏览(233)

本文整理了Java中org.jooq.Table.getQualifiedName()方法的一些代码示例,展示了Table.getQualifiedName()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Table.getQualifiedName()方法的具体详情如下:
包路径:org.jooq.Table
类名称:Table
方法名:getQualifiedName

Table.getQualifiedName介绍

暂无

代码示例

代码示例来源:origin: org.jooq/jooq

  1. private final Name generatedName() {
  2. Name t = table.getQualifiedName();
  3. StringBuilder sb = new StringBuilder(table.getName());
  4. for (SortField<?> f : sortFields)
  5. sb.append('_').append(f.getName());
  6. sb.append("_idx");
  7. if (t.qualified())
  8. return t.qualifier().append(sb.toString());
  9. else
  10. return name(sb.toString());
  11. }

代码示例来源:origin: org.jooq/jooq

  1. static final <T> Field<T> qualify(Table<?> table, Field<T> field) {
  2. Field<T> result = table.field(field);
  3. if (result != null)
  4. return result;
  5. Name[] part = table.getQualifiedName().parts();
  6. Name[] name = new Name[part.length + 1];
  7. System.arraycopy(part, 0, name, 0, part.length);
  8. name[part.length] = field.getUnqualifiedName();
  9. return DSL.field(DSL.name(name), field.getDataType());
  10. }

代码示例来源:origin: mevdschee/java-crud-api

  1. @SuppressWarnings("unchecked")
  2. public ReflectedTable(Table<?> table) {
  3. super(table.getQualifiedName());
  4. this.table = table;
  5. for (Field<?> field : table.fields()) {
  6. String name = field.getName();
  7. DataType<Object> dataType = (DataType<Object>) field.getDataType();
  8. TableField newField = createField(name, dataType);
  9. fields.put(name, newField);
  10. }
  11. UniqueKey<?> primaryKey = table.getPrimaryKey();
  12. if (primaryKey != null) {
  13. if (primaryKey.getFields().size() == 1) {
  14. pk = primaryKey.getFields().get(0);
  15. }
  16. }
  17. for (ForeignKey<?, ?> fk : table.getReferences()) {
  18. fks.put(findForeignKeyFieldName(fk), findForeignKeyReference(fk));
  19. }
  20. }

代码示例来源:origin: org.jooq/jooq

  1. static final void pgRenderRecordCast(RenderContext render, Record value) {
  2. if (value instanceof UDTRecord)
  3. render.sql("::").visit(((UDTRecord<?>) value).getUDT().getQualifiedName());
  4. else if (value instanceof TableRecord)
  5. render.sql("::").visit(((TableRecord<?>) value).getTable().getQualifiedName());
  6. }

代码示例来源:origin: org.jooq/jooq

  1. /**
  2. * Factory method for path aliases.
  3. */
  4. public static final Name createPathAlias(Table<?> child, ForeignKey<?, ?> path) {
  5. Name name = DSL.name(path.getName());
  6. if (child instanceof TableImpl) {
  7. Table<?> ancestor = ((TableImpl<?>) child).child;
  8. if (ancestor != null)
  9. name = createPathAlias(ancestor, ((TableImpl<?>) child).childPath).append(name);
  10. else
  11. name = child.getQualifiedName().append(name);
  12. }
  13. return DSL.name("alias_" + Tools.hash(name));
  14. }

代码示例来源:origin: org.jooq/jooq

  1. private static final DDLQuery parseCreateTable(ParserContext ctx, boolean temporary) {
  2. boolean ifNotExists = !temporary && parseKeywordIf(ctx, "IF NOT EXISTS");
  3. Table<?> tableName = DSL.table(parseTableName(ctx).getQualifiedName());
  4. CreateTableCommentStep commentStep;
  5. CreateTableStorageStep storageStep;

相关文章