import { Utils } from '../utils/Utils.js';
/**
 * Wrapper class for polymorphic relation reference data.
 * Holds the discriminator value (type identifier) and the primary key value(s).
 * Used internally to track polymorphic FK values before hydration.
 */
export class PolymorphicRef {
  discriminator;
  id;
  constructor(discriminator, id) {
    this.discriminator = discriminator;
    this.id = id;
  }
  /** Returns `[discriminator, ...idValues]` tuple suitable for column-level expansion. */
  toTuple() {
    return [this.discriminator, ...Utils.asArray(this.id)];
  }
}
