package com.lingniu.ingest.tdenginehistory;

import java.util.ArrayList;
import java.util.Collections;
import java.util.List;

public record TdengineQueryStatement(String sql, List<Object> values) {

    public TdengineQueryStatement {
        if (sql == null || sql.isBlank()) {
            throw new IllegalArgumentException("sql must not be blank");
        }
        values = values == null ? List.of() : Collections.unmodifiableList(new ArrayList<>(values));
    }
}
