interface
SQL.Transform
interface Transform
The transform option
const sql = new SQL({ transform: SQL.camel });
await sql`INSERT INTO users ${sql({ firstName: "Alice" })}`; // "first_name"
const [user] = await sql`SELECT first_name FROM users`;
console.log(user.firstName);- column?: ColumnTransform | (name: string) => string
Renames columns. A function means ColumnTransform.from.
- undefined?: unknown
The value that Bun sends for an
undefinedparameter. When it is set (nullcounts), the insert and update helpers leave no column out. Without it,undefinedisNULL, and the helpers leave out a column that isundefined.