Documentation Source Text

Check-in Differences
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Difference From f04d4fdb9b8e09d7 To 109b40774c048a70

2022-01-22
18:22
Take .param set... clarification from trunk (check-in: adc3b9348f user: larrybr tags: branch-3.37)
2022-01-13
12:27
For printf family, mention "*" as a precision spec (check-in: 8bd010d038 user: larrybr tags: trunk)
06:25
Improve example for .parameter set with quoted value (check-in: 109b40774c user: larrybr tags: trunk)
02:16
Clarify treatment of .parameter set values (check-in: cdd22f8ea0 user: larrybr tags: trunk)
2022-01-12
20:46
Minor grammar fix for JSON functions doc (check-in: f04d4fdb9b user: larrybr tags: trunk)
20:36
Add JSON "pointer" operators to the expression operator table (check-in: 6a5389b258 user: larrybr tags: trunk)

Changes to pages/cli.in.

1350
1351
1352
1353
1354
1355
1356
















1357
1358
1359
1360
1361
1362
1363
<p>The ".parameter" command exists to simplify managing this table.  The
".parameter init" command (often abbreviated as just ".param init") creates
the temp.sqlite_parameters table if it does not already exist.  The ".param list"
command shows all entries in the temp.sqlite_parameters table.  The ".param clear"
command drops the temp.sqlite_parameters table.  The ".param set KEY VALUE" and
".param unset KEY" commands create or delete entries from the 
temp.sqlite_parameters table.

















<p>The temp.sqlite_parameters table only provides values for parameters in the
command-line shell.  The temp.sqlite_parameter table has no effect on queries
that are run directly using the SQLite C-language API.  Individual applications
are expected to implement their own parameter binding.  You can search for 
"sqlite_parameters" in the 
[https://sqlite.org/src/file/src/shell.c.in|command-line shell source code]







>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>







1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
<p>The ".parameter" command exists to simplify managing this table.  The
".parameter init" command (often abbreviated as just ".param init") creates
the temp.sqlite_parameters table if it does not already exist.  The ".param list"
command shows all entries in the temp.sqlite_parameters table.  The ".param clear"
command drops the temp.sqlite_parameters table.  The ".param set KEY VALUE" and
".param unset KEY" commands create or delete entries from the 
temp.sqlite_parameters table.

<p>The VALUE passed to ".param set KEY VALUE" can be either a SQL literal
or any other SQL expression or query which can be evaluated to yield a value.
This allows values of differing types to be set.
If such evaluation fails, the provided VALUE is instead quoted and inserted
as text.
Because such initial evaluation may or may not fail depending upon
the VALUE content, the reliable way to get a text value is to enclose it
with single-quotes protected from the above-described command-tail parsing.
For example, (unless one intends a value of -1365):<br>
<codeblock>
  .parameter init
  .parameter set @phoneNumber "'202-456-1111'"
</codeblock>
<p>Note that the double-quotes serve to protect the single-quotes
and ensure that the quoted text is parsed as one argument.

<p>The temp.sqlite_parameters table only provides values for parameters in the
command-line shell.  The temp.sqlite_parameter table has no effect on queries
that are run directly using the SQLite C-language API.  Individual applications
are expected to implement their own parameter binding.  You can search for 
"sqlite_parameters" in the 
[https://sqlite.org/src/file/src/shell.c.in|command-line shell source code]