import { freeze } from '../util/object-utils.js' ; import { OperationNode } from './operation-node.js' ; export interface RawNode extends OperationNode { readonly kind : 'RawNode' ; readonly sqlFragments : ReadonlyArray < string > ; readonly params : ReadonlyArray < OperationNode > ; } internal export const RawNode = freeze ( { is ( node ) { return node . kind === 'RawNode' ; } , create ( sqlFragments , params ) { return freeze ( { kind : 'RawNode' , sqlFragments : freeze ( sqlFragments ) , params : freeze ( params ) , } ) ; } , createWithSql ( sql ) { return RawNode . create ( [ sql ] , [ ] ) ; } , } ) ;