package com.cloudhandson.ddsbackoffice.domain;

import java.util.List;
import java.util.Map;

/** Result of a vector search executed through a DDS END USER connection. */
public record DdsVectorSearchResult(
    String userKey,
    String userLabel,
    String objectName,
    String query,
    String embeddingMode,
    String embeddingModel,
    boolean success,
    String title,
    String message,
    String sessionUser,
    String endUser,
    Integer oracleCode,
    List<Map<String, Object>> rows,
    DdsSqlEvidence sqlEvidence
) {

  public DdsVectorSearchResult {
    rows = rows == null ? List.of() : List.copyOf(rows);
  }

  public boolean hasRows() {
    return !rows.isEmpty();
  }
}
