import { queryBuilder } from './queryBuilder' ; import { ArrayFunctions , QueryField } from './types' ; export const arrayFunctions = { $arrayCompact : ( val ) : string => { return `ARRAYCOMPACT(${ queryBuilder ( val ) })` ; } , $arrayFlatten : ( val ) : string => { return `ARRAYFLATTEN(${ queryBuilder ( val ) })` ; } , $arrayUnique : ( val ) : string => { return `ARRAYUNIQUE(${ queryBuilder ( val ) })` ; } , $arrayJoin : ( val , seperator = ',' ) : string => { return `ARRAYJOIN(${ queryBuilder ( val ) }, ${ queryBuilder ( seperator ) })` ; } , } ;