Create a literal SQL expression (inserted as-is into the query) Returns { __type: 'literal', sql: string } format Use with caution - this can lead to SQL injection if user input is included
Optional
literalExpr('COUNT(*)') // -> { __type: 'literal', sql: 'COUNT(*)' }literalExpr('NOW()') // -> { __type: 'literal', sql: 'NOW()' }literalExpr('1 + 1') // -> { __type: 'literal', sql: '1 + 1' } Copy
literalExpr('COUNT(*)') // -> { __type: 'literal', sql: 'COUNT(*)' }literalExpr('NOW()') // -> { __type: 'literal', sql: 'NOW()' }literalExpr('1 + 1') // -> { __type: 'literal', sql: '1 + 1' }
Create a literal SQL expression (inserted as-is into the query) Returns { __type: 'literal', sql: string } format Use with caution - this can lead to SQL injection if user input is included