org.jooq.Field.getComment()方法的使用及代码示例

x33g5p2x  于2022-01-19 转载在 其他  
字(2.6k)|赞(0)|评价(0)|浏览(111)

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

Field.getComment介绍

[英]The comment given to the field.

If this Field is a generated field from your database, it may provide its DDL comment through this method. All other column expressions return the empty string "" here, never null.
[中]给字段的注释。
如果此Field是从数据库生成的字段,则它可以通过此方法提供其DDL注释。所有其他列表达式在此处返回空字符串"",而不是null

代码示例

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

CollatedField(Field<?> field, Collation collation) {
  super(field.getQualifiedName(), type(field), DSL.comment(field.getComment()), binding(field));
  this.field = field;
  this.collation = collation;
}

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

private List<Query> commentOn(Table<?> table) {
  List<Query> result = new ArrayList<Query>();
  if (flags.contains(COMMENT)) {
    String tComment = table.getComment();
    if (!StringUtils.isEmpty(tComment))
      result.add(ctx.commentOnTable(table).is(tComment));
    for (Field<?> field : table.fields()) {
      String fComment = field.getComment();
      if (!StringUtils.isEmpty(fComment))
        result.add(ctx.commentOnColumn(field).is(fComment));
    }
  }
  return result;
}

代码示例来源:origin: com.ning.billing/killbill-osgi-bundles-analytics

/**
 * Register fields for this table alias
 */
@SuppressWarnings({ "rawtypes", "unchecked" })
private final Fields<R> init(String[] fieldAliases) {
  List<Field<?>> result = new ArrayList<Field<?>>();
  Row row = this.alias.wrapped().fieldsRow();
  int size = row.size();
  for (int i = 0; i < size; i++) {
    Field<?> field = row.field(i);
    String name = field.getName();
    if (fieldAliases != null && fieldAliases.length > i) {
      name = fieldAliases[i];
    }
    result.add(new TableFieldImpl(name, field.getDataType(), this, field.getComment()));
  }
  return new Fields<R>(result);
}

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

/**
 * Register fields for this table alias
 */
@SuppressWarnings({ "rawtypes", "unchecked" })
private final Fields<R> init(Name[] fieldAliases) {
  Row row = this.alias.wrapped().fieldsRow();
  int size = row.size();
  List<Field<?>> result = new ArrayList<Field<?>>(size);
  for (int i = 0; i < size; i++) {
    Field<?> field = row.field(i);
    Name name = (fieldAliases != null && fieldAliases.length > i)
      ? fieldAliases[i]
      : field.getUnqualifiedName();
    result.add(new TableFieldImpl(name, field.getDataType(), this, DSL.comment(field.getComment()), field.getBinding()));
  }
  return new Fields<R>(result);
}

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

ic.setComment(f.getComment());
ic.setDataType(f.getDataType().getTypeName(configuration));

相关文章