import { ColumnNode } from '../operation-node/column-node.js' ; import { isOperationNodeSource , OperationNodeSource , } from '../operation-node/operation-node-source.js' ; import { ReferenceNode } from '../operation-node/reference-node.js' ; import { parseStringReference } from '../parser/reference-parser.js' ; import { isObject , isString } from '../util/object-utils.js' ; export class DynamicReferenceBuilder < R extends string = never > implements OperationNodeSource { readonly #dynamicReference : string ; get dynamicReference ( ) : string { return this . #dynamicReference ; } private protected get refType ( ) : R { return undefined as unknown as R ; } constructor ( reference ) { this . #dynamicReference = reference ; } toOperationNode ( ) { return parseStringReference ( this . #dynamicReference ) ; } } export function isDynamicReferenceBuilder ( obj ) { return ( isObject ( obj ) && isOperationNodeSource ( obj ) && isString ( obj . dynamicReference ) ) ; }