diff options
| author | lsces <lester@lsces.co.uk> | 2026-02-27 15:45:17 +0000 |
|---|---|---|
| committer | lsces <lester@lsces.co.uk> | 2026-02-27 15:45:17 +0000 |
| commit | cf9856d492df525be16b1e4613dbfa0f4eb4dde3 (patch) | |
| tree | e4697f84e46bdb9f01ca59179a175148b92fe544 | |
| parent | b122b69bddebc95a0427f051d980aa6cbd95b993 (diff) | |
| download | illuminate-firebird-cf9856d492df525be16b1e4613dbfa0f4eb4dde3.tar.gz illuminate-firebird-cf9856d492df525be16b1e4613dbfa0f4eb4dde3.tar.bz2 illuminate-firebird-cf9856d492df525be16b1e4613dbfa0f4eb4dde3.zip | |
Extend wrapValue to add double quotes to reserve words. This will need extending at some point to cover all reserved words, currently only thouse used in webtrees are covered
| -rwxr-xr-x | src/Query/Grammars/FirebirdGrammar.php | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/src/Query/Grammars/FirebirdGrammar.php b/src/Query/Grammars/FirebirdGrammar.php index 888d150..f7780dd 100755 --- a/src/Query/Grammars/FirebirdGrammar.php +++ b/src/Query/Grammars/FirebirdGrammar.php @@ -152,12 +152,11 @@ class FirebirdGrammar extends Grammar */ protected function wrapValue($value) { - // still working on the potential problem of reserved words needing wrapping - // year is certainly one but others depend on version of Firebird -// if ($value !== '*') { -// return '"'.str_replace('"', '""', $value).'"'; -// } -// + // wrap reserved words in firebird + if ($value == 'year' or $value == 'pending' or $value == 'value') { + return '"'.$value.'"'; + } + // Currently just return unwrapped return $value; } |
