Commit 30af427
committed
Generalization: Allow setting condition for running SQL commands
If a condition is set with "if_has_rows", the SQL command in
"if_has_rows" will be run and only if that returns any rows, the main
sql command is run. This check happens only in "append" mode, in
"create" mode the command is always run.
To be used with something like "SELECT 1 FROM some_table LIMIT 1" to
check whether the table has any rows (for instance an expire table).1 parent a969ab0 commit 30af427
1 file changed
+15
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
373 | 373 | | |
374 | 374 | | |
375 | 375 | | |
| 376 | + | |
| 377 | + | |
| 378 | + | |
376 | 379 | | |
377 | 380 | | |
378 | 381 | | |
| |||
403 | 406 | | |
404 | 407 | | |
405 | 408 | | |
| 409 | + | |
| 410 | + | |
| 411 | + | |
| 412 | + | |
| 413 | + | |
| 414 | + | |
| 415 | + | |
| 416 | + | |
| 417 | + | |
| 418 | + | |
| 419 | + | |
| 420 | + | |
406 | 421 | | |
407 | 422 | | |
408 | 423 | | |
409 | | - | |
410 | 424 | | |
411 | 425 | | |
412 | 426 | | |
| |||
0 commit comments