这不起作用
let rawResult = await AuthorModel.query((qb) => {
qb.column(Bookshelf.knex.raw('SELECT LEFT(authors.last_name, 1) AS first_char'));
});
这也不起作用:
let rawResult = await AuthorModel.query((qb) => {
qb.column(AuthorModel.knex.raw('SELECT LEFT(authors.last_name, 1) AS first_char'));
});
这也不起作用:
let rawResult = await AuthorModel.query((qb) => {
qb.column(qb.raw('SELECT LEFT(authors.last_name, 1) AS first_char'));
});
我的想法和选择都用光了。