Skip to content
This repository was archived by the owner on May 6, 2026. It is now read-only.

Parameters

Nicuvëo edited this page Mar 29, 2014 · 4 revisions

When building a query statement, one can specify parameters that ought to be specified at a later time (as specified in sqlite3's documentation. SAW provides a few helper macros and types around this usage.

--

Types

Name Underlying type
ParameterIndex int
ParameterName const char*
ParameterKey boost::variant<ParameterIndex, ParameterName>
Parameter std::pair<ParameterKey, Value>
Parameters std::vector

--

Macros

The SAW_PLIST macros allows you to inline parameters:

Parameters ps1 = SAW_PLIST(("host", "localhost")("port", 8080));
Parameters ps2 = SAW_PLIST((1, saw::Null())
                           (2, 42.)
                           (3, "foo")
                           (4, saw::Blob("bar")));

Clone this wiki locally