/*
 * Copyright © 2012-2025 by Data Virtuality GmbH
 */
package org.teiid.util;

import com.datavirtuality.dv.core.interfaces.CreateTable;
import org.teiid.query.sql.lang.Command;
import org.teiid.query.sql.lang.Create;
import org.teiid.query.sql.symbol.GroupSymbol;

/**
 * Used for testing purposes to emulate CreateTableImpl in TestTempTableResolver
 * @see TestTempTableResolver
 * @author Arseniy Kaleshnyk
 * @date 2025.03.17
 */
public class TestingCreateTableWrapper extends Create implements CreateTable {

    private final Create createCommand;

    public TestingCreateTableWrapper(Command original) {
        if (!(original instanceof Create)) throw new RuntimeException("Create command expected");
        createCommand = (Create) original;
    }

    public GroupSymbol getTable() {
        return createCommand.getTable();
    }

}
