Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding Spellfix1 virtual table #1160

Open
elmarw opened this issue Apr 28, 2023 · 2 comments
Open

Adding Spellfix1 virtual table #1160

elmarw opened this issue Apr 28, 2023 · 2 comments

Comments

@elmarw
Copy link

elmarw commented Apr 28, 2023

Is it possible to add the Spellfix1 virtual table? I tried adding "spellfix1" to the build tags but it does not work.

@Kuzz2
Copy link

Kuzz2 commented Jun 18, 2023

Same question

@walterwanderley
Copy link

walterwanderley commented Aug 13, 2023

This library doesn't have an option to enable the spellfix extension.

You have to download spellfix.c.
Compile:

gcc -g -fPIC -shared spellfix.c -o spellfix.so 

Register and use the extension:

sql.Register("sqlite3-spellfix1", &sqlite3.SQLiteDriver{
   ConnectHook: func(conn *sqlite3.SQLiteConn) error {
       return conn.LoadExtension("./spellfix", "sqlite3_spellfix_init")
   },
})
db, err := sql.Open("sqlite3-spellfix1", dsn)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants