Skip to main content

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

KeyTypeReadonlyDescription
_typeSerializationType.RAWYesDiscriminates this node during serialization.
_textstringNoThe literal text, emitted verbatim.

Methods

Raw has no chainable methods — it only exposes its serialization logic, which returns _text unchanged.

See also