Commit 4942f35
committed
db: Add IS NULL and IS NOT NULL unary operators
If you try to (mysql) prepare a statement with "... column IS ?" you'd
get an error.
For mysql, you could fix this by using the "... column <=> ?" special
operator ('IS NOT DISTINCT FROM'), but that's not standard SQL.
Instead, you can now do:
update_cols[0] = &some_column;
update_ops[0] = OP_IS_NULL;
update_vals[0].nul = 1;
You still need to set .nul=1 because prepared statements have to consume
a single value.1 parent 7f7118b commit 4942f35
2 files changed
+33
-5
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
40 | 40 | | |
41 | 41 | | |
42 | 42 | | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
43 | 54 | | |
44 | 55 | | |
45 | 56 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
334 | 334 | | |
335 | 335 | | |
336 | 336 | | |
337 | | - | |
338 | | - | |
339 | | - | |
340 | | - | |
| 337 | + | |
| 338 | + | |
| 339 | + | |
| 340 | + | |
| 341 | + | |
| 342 | + | |
| 343 | + | |
| 344 | + | |
| 345 | + | |
| 346 | + | |
| 347 | + | |
| 348 | + | |
| 349 | + | |
| 350 | + | |
| 351 | + | |
| 352 | + | |
| 353 | + | |
| 354 | + | |
| 355 | + | |
341 | 356 | | |
342 | 357 | | |
343 | 358 | | |
344 | 359 | | |
345 | 360 | | |
346 | | - | |
| 361 | + | |
| 362 | + | |
| 363 | + | |
347 | 364 | | |
348 | 365 | | |
349 | 366 | | |
| |||
0 commit comments