Magic sql'' operator concat

I'm getting a strange error when I try to use concat with the sql operator. I'm getting error: column " " does not exist when running this query:
  const result = await db.query.user.findMany({
    columns: {
      id: true,
      firstName: true,
      lastName: true,
      email: true,
    },
    extras: {
      fullName:
        sql<string>`concat(${user.firstName}, " ", ${user.lastName})`.as(
          "full_name",
        ),
    },
  });


Any ideas?
Was this page helpful?