Is there a curated list of extensions for SQLite?
(1) By midijohnny on 2022-03-11 22:51:33 [link] [source]
Is there a curated list of extensions for SQLite?
background:
My immediate interest in this - I'm wondering whether anybody has created a Mustache extension for formatting JSON?
I found a C library called mustach which might be a useful starting point for such an extension - but I lack the expertise currently to build this (never mind turn it into a SQLite extension) : it could be a good learning exercise for me - but I'm more interested at this point to see if somebody has already build a such an extension.
(2) By anonymous on 2022-03-15 01:43:42 in reply to 1 [link] [source]
What problem are you trying to solve with mustache template extension. There is already print functions you can use to format strings.
(3) By midijohnny on 2022-03-15 11:57:18 in reply to 2 [source]
Thanks for this - yup - I'm already making good use of printf/format functions - it works great. The only downside is for templating tasks - the list of '%s' (etc) placeholders isn't quite a readable as named placeholders and combining various formats together can be a bit bulky.
Since JSON is now built-in and here-to-stay in sqlite - was thinking that maybe a mustache extension would be a natural way to leverage this. (Maybe not: was going to play around and see).
(4) By anonymous on 2022-03-15 23:36:42 in reply to 3 [link] [source]
There is a project on GitHub for a sqlite gui at https://github.com/little-brother/sqlite-gui. You can install it or there is an experimental extension in the repo which uses the c++ inja library. I am not the maintainer but the extension does compile and from a brief test does work. I would use it with extreme caution and for expiermenta as it is.
Hope this helps.
(5) By midijohnny on 2022-03-16 09:05:42 in reply to 4 [link] [source]
Thanks for this - I will take a look. I see that goes one-step further even - allowing a procedural-style mix of SQL and templating - interesting.
(6) By bucweat on 2022-03-16 13:51:19 in reply to 1 [link] [source]
I realize that this may not answer your immediate interest, but as for your first question, this was mentioned on the forum a while back:
(7) By midijohnny on 2022-03-16 15:50:13 in reply to 6 [link] [source]
Great - that's what I wanted. nice one.
(10) By anonymous on 2022-03-18 01:25:57 in reply to 7 [link] [source]
+1
For users of the Windows CLI: He also compiled a 64-bit version (actually for Ubuntu and macOS as well)
https://github.com/nalgeon/sqlite
as an alternative, so no need to compile 32-bit *•dll for the CLI
(8) By anonymous on 2022-03-16 21:06:00 in reply to 6 [link] [source]
Some of the extensions you have seem like good thing to have.
I had also written several SQLite extensions but I do not use git and they are not in there. Some of my extensions include:
Read-only compressed databases
Download files (using any protocol supported by cURL) (in order that calling
sqlite3_interrupt()
will interrupt the download, it checks for interrupts using a recursive CTE, since I cannot figure out any other way to do so in a loadable extension) (also includes URL escaping/unescaping)PCRE (Unicode and non-Unicode)
Magnet virtual table (can be used to pass parameters to a view)
2D CSV parser
Non-Unicode text functions
Conversion of SQL values into PostScript tokens (you can then have a PostScript program using
token
orrun
to read the returned data, and then plot the data graphically on a page or do whatever else you might want with it)Test hooks and test virtual table, explaining what callback functions in your program are called by SQLite
Send data to external program using a pipe and receive the result
Audio processing
Access ZZT world files
The record storage format of SQLite database files (which SQLite has built-in but it is not exposed, meaning that it is necessary to use a separate copy of the same logic to access it from application programs)
Blob dealing functions (concatenation, making bytes, etc)
Some of these are experimental, unstable, and/or incomplete, while some of them are simple enough and work OK. Some had been posted elsewhere in this forums (and/or mailing list). Some may need more changed before being posted, too (in some cases, due to new features of SQLite allowing things to be done in a cleaner and more reliable way than before). There are also some things that I had wanted, but that I do not have.
I will also note a problem with the existing eval
extension (I don't know if it had been fixed yet), which is that if the first value is empty then it will not properly add a delimiter. (I fixed this problem on my computer, though.)
(9) By Larry Brasfield (larrybr) on 2022-03-16 21:38:09 in reply to 8 [link] [source]
I will also note a problem with the existing eval extension (I don't know if it had been fixed yet), which is that if the first value is empty then it will not properly add a delimiter. (I fixed this problem on my computer, though.)
What delimiter do you believe needs to be (properly) added? I do not understand what the problem is from your above assertion. If the first value is empty, then there is nothing to execute and no results, so it does not matter what the separator is. Can you show an example of improperly handled input and its effects?