Commit dd6bd6b
Add support for
While SQLite does support `CURRENT_TIMESTAMP` function calls natively,
it doesn't support calling the function with parentheses in the form of
`CURRENT_TIMESTAMP()`.
This pull request removes the parentheses after `CURRENT_TIMESTAMP`
keyword for all types of queries.
The following types of queries will now work:
```sql
SELECT
current_timestamp AS t1,
CURRENT_TIMESTAMP AS t2,
current_timestamp() AS t3,
CURRENT_TIMESTAMP() AS t4;
INSERT INTO _dates (option_name, option_value) VALUES ('first', current_timestamp());
UPDATE _dates SET option_value = CURRENT_TIMESTAMP();
DELETE FROM _dates WHERE option_value = CURRENT_TIMESTAMP();
```
Closes
#129.
---------
Co-authored-by: Bero <[email protected]>CURRENT_TIMESTAMP() calls with parentheses (#151)1 parent e7b8ce7 commit dd6bd6b
File tree
2 files changed
+57
-1
lines changed- tests
- wp-includes/sqlite
2 files changed
+57
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3008 | 3008 | | |
3009 | 3009 | | |
3010 | 3010 | | |
| 3011 | + | |
| 3012 | + | |
| 3013 | + | |
| 3014 | + | |
| 3015 | + | |
| 3016 | + | |
| 3017 | + | |
| 3018 | + | |
| 3019 | + | |
| 3020 | + | |
| 3021 | + | |
| 3022 | + | |
| 3023 | + | |
| 3024 | + | |
| 3025 | + | |
| 3026 | + | |
| 3027 | + | |
| 3028 | + | |
| 3029 | + | |
| 3030 | + | |
| 3031 | + | |
| 3032 | + | |
| 3033 | + | |
| 3034 | + | |
| 3035 | + | |
| 3036 | + | |
| 3037 | + | |
| 3038 | + | |
| 3039 | + | |
| 3040 | + | |
| 3041 | + | |
| 3042 | + | |
| 3043 | + | |
| 3044 | + | |
| 3045 | + | |
| 3046 | + | |
| 3047 | + | |
| 3048 | + | |
| 3049 | + | |
| 3050 | + | |
3011 | 3051 | | |
3012 | 3052 | | |
3013 | 3053 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
772 | 772 | | |
773 | 773 | | |
774 | 774 | | |
775 | | - | |
| 775 | + | |
| 776 | + | |
| 777 | + | |
| 778 | + | |
| 779 | + | |
| 780 | + | |
| 781 | + | |
| 782 | + | |
| 783 | + | |
| 784 | + | |
| 785 | + | |
| 786 | + | |
| 787 | + | |
| 788 | + | |
| 789 | + | |
| 790 | + | |
| 791 | + | |
776 | 792 | | |
777 | 793 | | |
778 | 794 | | |
| |||
0 commit comments