Skip to content

SELECT: REPLACE

Ali Amirnezhad edited this page Jul 24, 2019 · 1 revision
const query = myQueryBuilder
    .SELECT({ $REPLACE: 'field', $ARGS: ['$ftom', '$to'] })
    .from('table')
    .get();

// SELECT REPLACE(`field`, 'ftom', 'to') FROM `table`
const query = myQueryBuilder
    .SELECT({ $REPLACE: { field: 'fieldREPLACE' }, $ARGS: ['$ftom', '$to'] })
    .from('table')
    .get();

// SELECT REPLACE(`field`, 'ftom', 'to') AS `fieldREPLACE` FROM `table`
Clone this wiki locally