Skip to content
This repository was archived by the owner on Mar 4, 2025. It is now read-only.

Commit 2bfcdb5

Browse files
committed
commit: Add some missing core SQLite functions to the whitelist
* iif() * sign() * substring() * unhex()
1 parent f5f21c8 commit 2bfcdb5

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

common/sqlite.go

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ const (
3333
fnGlob function = "glob"
3434
fnHex function = "hex"
3535
fnIfNull function = "ifnull"
36+
fnIif function = "iif"
3637
fnInstr function = "instr"
3738
fnLastInsertRowID function = "last_insert_rowid"
3839
fnLength function = "length"
@@ -51,16 +52,19 @@ const (
5152
fnReplace function = "replace"
5253
fnRound function = "round"
5354
fnRTrim function = "rtrim"
55+
fnSign function = "sign"
5456
fnSoundEx function = "soundex"
5557
fnSQLiteCompileOptionGet function = "sqlite_compileoption_get"
5658
fnSQLiteCompileOptionUsed function = "sqlite_compileoption_used"
5759
fnSQLiteOffset function = "sqlite_offset"
5860
fnSQLiteSourceID function = "sqlite_source_id"
5961
fnSQLiteVersion function = "sqlite_version"
6062
fnSubstr function = "substr"
63+
fnSubstring function = "substring"
6164
fnTotalChanges function = "total_changes"
6265
fnTrim function = "trim"
6366
fnTypeOf function = "typeof"
67+
fnUnhex function = "unhex"
6468
fnUnlikely function = "unlikely"
6569
fnUpper function = "upper"
6670
fnZeroBlob function = "zeroblob"
@@ -145,6 +149,7 @@ var SQLiteFunctions = []function{
145149
fnGlob,
146150
fnHex,
147151
fnIfNull,
152+
fnIif,
148153
fnInstr,
149154
fnLastInsertRowID,
150155
fnLength,
@@ -163,16 +168,19 @@ var SQLiteFunctions = []function{
163168
fnReplace,
164169
fnRound,
165170
fnRTrim,
171+
fnSign,
166172
fnSoundEx,
167173
fnSQLiteCompileOptionGet,
168174
fnSQLiteCompileOptionUsed,
169175
fnSQLiteOffset,
170176
fnSQLiteSourceID,
171177
fnSQLiteVersion,
172178
fnSubstr,
179+
fnSubstring,
173180
fnTotalChanges,
174181
fnTrim,
175182
fnTypeOf,
183+
fnUnhex,
176184
fnUnlikely,
177185
fnUpper,
178186
fnZeroBlob,

0 commit comments

Comments
 (0)