s.q
SQL on the process's own DuckDB database: s)SELECT ... hands the line to .s.e; .s.ex runs a statement with parameters and answers its table.
Entity Summary
| Entities | Short Description |
|---|---|
| .s.ex[sql] | Run SQL on the main database, sql as .duckdb.exec takes it: a string, or the pair (string;dict) / (string;list) with parameters. |
| .s.params[sql] | The $name parameters a statement (string) declares, distinct and in first-occurrence order; $1 and ? |
Entity Details
.s.ex[sql]
Run SQL on the main database, sql as .duckdb.exec takes it: a string, or the pair (string;dict) / (string;list) with parameters.
Examples
.s.ex ("SELECT $a + $b AS n";`a`b!1 2).s.params[sql]
The $name parameters a statement (string) declares, distinct and in first-occurrence order; $1 and ? are named by number.
Examples
.s.params "SELECT $x FROM t WHERE s='$y' AND n>$z"