Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我这里有一个示例代码。
有人可以在不使用的情况下将其翻译成 knexknex.raw吗?
knex.raw
SELECT DISTINCT (columna + '-' + columnb) AS column FROM table
knex 有明显的
const rows = await knex('table').distinct('columna', 'columnb') rows.map(row => `${columna}-${columnb}`)