Raw
Wraps a literal SQL string that is emitted verbatim, with no escaping or validation. Accepted
anywhere an SQL element is expected — columns, from(), operator operands, orderBy(), table
names, and more. See
Raw SQL and Parameters for a full
walkthrough.
Constructor
Raw(str: string): Raw
new Raw(str: string): Raw
Dual-callable.
import { Raw, Select } from '@sqb/builder';
Select(Raw("'John''s Bike' f1")).from('table1');
// select 'John''s Bike' f1 from table1
Properties
| Key | Type | Readonly | Description |
|---|---|---|---|
_type | SerializationType.RAW | Yes | Discriminates this node during serialization. |
_text | string | No | The literal text, emitted verbatim. |
Methods
Raw has no chainable methods — it only exposes its serialization logic, which returns _text
unchanged.