org.jooq.Record.intoArray()方法的使用及代码示例

x33g5p2x  于2022-01-29 转载在 其他  
字(3.5k)|赞(0)|评价(0)|浏览(71)

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

Record.intoArray介绍

[英]Convert this record into an array.

The resulting array has the same number of elements as this record has fields. The resulting array contains data as such:

``

// For arbitrary values of i 
record.getValue(i) == record.intoArray()[i]

This is the same as calling into(Object[].class)
[中]将此记录转换为数组。
结果数组的元素数与此记录的字段数相同。结果数组包含如下数据:
``

// For arbitrary values of i 
record.getValue(i) == record.intoArray()[i]

这与呼叫into(Object[].class)相同

代码示例

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

@Override
public final Object[] fetchAnyArray() {
  R record = fetchAny();
  return record == null ? null : record.intoArray();
}

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

@Override
public final Object[] fetchSingleArray() {
  return fetchSingle().intoArray();
}

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

@Override
public final Object[] fetchOneArray() {
  R record = fetchOne();
  return record == null ? null : record.intoArray();
}

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

@Override
public final Object[] fetchOneArray() {
  R record = fetchOne();
  return record == null ? null : record.intoArray();
}

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

@Override
public final Object[][] intoArrays() {
  int size = size();
  Object[][] array = new Object[size][];
  for (int i = 0; i < size; i++) {
    array[i] = get(i).intoArray();
  }
  return array;
}

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

@Override
public final Object[][] intoArray() {
  int size = size();
  Object[][] array = new Object[size][];
  for (int i = 0; i < size; i++) {
    array[i] = get(i).intoArray();
  }
  return array;
}

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

@Override
public final Condition and(Record record) {
  RowN r = new RowImpl(Tools.fields(record.intoArray(), record.fields()));
  return and(r);
}

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

@Override
public final Condition and(Record record) {
  RowN r = new RowImpl(Utils.fields(record.intoArray(), record.fields()));
  return and(r);
}

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

@Override
public final void formatInsert(Writer writer, Table<?> table, Field<?>... f) {
  DSLContext ctx = configuration.dsl();
  try {
    for (R record : this) {
      if (table == null)
        if (record instanceof TableRecord)
          table = ((TableRecord<?>) record).getTable();
        else
          table = table(name("UNKNOWN_TABLE"));
      writer.append(ctx.renderInlined(insertInto(table, f).values(record.intoArray())))
         .append(";\n");
    }
    writer.flush();
  }
  catch (java.io.IOException e) {
    throw new IOException("Exception while writing INSERTs", e);
  }
}

代码示例来源:origin: io.github.jklingsporn/vertx-jooq-shared

@Override
public EXECUTE insert(Collection<P> pojos, boolean onDuplicateKeyIgnore) {
  Arguments.require(!pojos.isEmpty(), "No elements");
  return queryExecutor().execute(dslContext -> {
    InsertSetStep<R> insertSetStep = dslContext.insertInto(getTable());
    InsertValuesStepN<R> insertValuesStepN = null;
    for (P pojo : pojos) {
      insertValuesStepN = insertSetStep.values(newRecord(dslContext, pojo).intoArray());
    }
    return onDuplicateKeyIgnore?insertValuesStepN.onDuplicateKeyIgnore():insertValuesStepN;
  });
}

代码示例来源:origin: jklingsporn/vertx-jooq

@Override
public EXECUTE insert(Collection<P> pojos, boolean onDuplicateKeyIgnore) {
  Arguments.require(!pojos.isEmpty(), "No elements");
  return queryExecutor().execute(dslContext -> {
    InsertSetStep<R> insertSetStep = dslContext.insertInto(getTable());
    InsertValuesStepN<R> insertValuesStepN = null;
    for (P pojo : pojos) {
      insertValuesStepN = insertSetStep.values(newRecord(dslContext, pojo).intoArray());
    }
    return onDuplicateKeyIgnore?insertValuesStepN.onDuplicateKeyIgnore():insertValuesStepN;
  });
}

相关文章