Skip to content

Commit bdfe279

Browse files
committed
Soundex.
1 parent a86937a commit bdfe279

File tree

6 files changed

+10
-8
lines changed

6 files changed

+10
-8
lines changed

embed/README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ The following optional features are compiled in:
99
- [JSON](https://www.sqlite.org/json1.html)
1010
- [R*Tree](https://www.sqlite.org/rtree.html)
1111
- [GeoPoly](https://www.sqlite.org/geopoly.html)
12+
- [soundex](https://www.sqlite.org/lang_corefunc.html#soundex)
1213
- [base64](https://github.com/sqlite/sqlite/blob/master/ext/misc/base64.c)
1314
- [decimal](https://github.com/sqlite/sqlite/blob/master/ext/misc/decimal.c)
1415
- [regexp](https://github.com/sqlite/sqlite/blob/master/ext/misc/regexp.c)

embed/sqlite3.wasm

523 Bytes
Binary file not shown.

ext/unicode/unicode.go

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -130,12 +130,10 @@ func like(ctx sqlite3.Context, arg ...sqlite3.Value) {
130130

131131
re, ok := ctx.GetAuxData(0).(likeData)
132132
if !ok || re.escape != escape {
133-
r, err := regexp.Compile(like2regex(arg[0].Text(), escape))
134-
if err != nil {
135-
ctx.ResultError(err)
136-
return
133+
re = likeData{
134+
regexp.MustCompile(like2regex(arg[0].Text(), escape)),
135+
escape,
137136
}
138-
re = likeData{r, escape}
139137
ctx.SetAuxData(0, re)
140138
}
141139
ctx.ResultBool(re.Match(arg[1].RawBlob()))

gormlite/go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,6 @@ require (
1111
github.com/jinzhu/inflection v1.0.0 // indirect
1212
github.com/jinzhu/now v1.1.5 // indirect
1313
github.com/ncruces/julianday v0.1.5 // indirect
14-
github.com/tetratelabs/wazero v1.2.1 // indirect
14+
github.com/tetratelabs/wazero v1.3.1 // indirect
1515
golang.org/x/sys v0.10.0 // indirect
1616
)

gormlite/go.sum

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@ github.com/ncruces/go-sqlite3 v0.8.2 h1:U28YYK/Kl5aUsRljcnvShZZHBgWLzuR26zUntP4u
66
github.com/ncruces/go-sqlite3 v0.8.2/go.mod h1:yGeN+m3ug1wD/+Kg2A3TnochT6H6Or6+2q8KHN//r9k=
77
github.com/ncruces/julianday v0.1.5 h1:hDJ9ejiMp3DHsoZ5KW4c1lwfMjbARS7u/gbYcd0FBZk=
88
github.com/ncruces/julianday v0.1.5/go.mod h1:Dusn2KvZrrovOMJuOt0TNXL6tB7U2E8kvza5fFc9G7g=
9-
github.com/tetratelabs/wazero v1.2.1 h1:J4X2hrGzJvt+wqltuvcSjHQ7ujQxA9gb6PeMs4qlUWs=
10-
github.com/tetratelabs/wazero v1.2.1/go.mod h1:wYx2gNRg8/WihJfSDxA1TIL8H+GkfLYm+bIfbblu9VQ=
9+
github.com/tetratelabs/wazero v1.3.1 h1:rnb9FgOEQRLLR8tgoD1mfjNjMhFeWRUk+a4b4j/GpUM=
10+
github.com/tetratelabs/wazero v1.3.1/go.mod h1:wYx2gNRg8/WihJfSDxA1TIL8H+GkfLYm+bIfbblu9VQ=
1111
golang.org/x/sys v0.10.0 h1:SqMFp9UcQJZa+pmYuAKjd9xq1f0j5rLcDIk0mj4qAsA=
1212
golang.org/x/sys v0.10.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
1313
golang.org/x/text v0.10.0 h1:UpjohKhiEgNc0CSauXmwYftY1+LlaC75SJwh0SgCX58=

sqlite3/sqlite_cfg.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@
2929
#define SQLITE_USE_ALLOCA
3030

3131
// Other Options
32+
3233
#define SQLITE_ALLOW_URI_AUTHORITY
3334
#define SQLITE_ENABLE_BATCH_ATOMIC_WRITE
3435
#define SQLITE_ENABLE_ATOMIC_WRITE
@@ -55,5 +56,7 @@
5556
// #define SQLITE_ENABLE_SESSION
5657
// #define SQLITE_ENABLE_PREUPDATE_HOOK
5758

59+
#define SQLITE_SOUNDEX
60+
5861
// Implemented in vfs.c.
5962
int localtime_s(struct tm *const pTm, time_t const *const pTime);

0 commit comments

Comments
 (0)