|
|
@ -647,10 +647,7 @@ async function _formulaQueryBuilder( |
|
|
|
|
|
|
|
|
|
|
|
// create nested replace statement for each user
|
|
|
|
// create nested replace statement for each user
|
|
|
|
const finalStatement = baseUsers.reduce((acc, user) => { |
|
|
|
const finalStatement = baseUsers.reduce((acc, user) => { |
|
|
|
const qb = knex.raw(`REPLACE(${acc}, ?, ?)`, [ |
|
|
|
const qb = knex.raw(`REPLACE(${acc}, ?, ?)`, [user.id, user.email]); |
|
|
|
user.id, |
|
|
|
|
|
|
|
user.display_name || user.email, |
|
|
|
|
|
|
|
]); |
|
|
|
|
|
|
|
return qb.toQuery(); |
|
|
|
return qb.toQuery(); |
|
|
|
}, knex.raw(`??`, [col.column_name]).toQuery()); |
|
|
|
}, knex.raw(`??`, [col.column_name]).toQuery()); |
|
|
|
|
|
|
|
|
|
|
|