3 ms·
The "lack of functions" is what allows SQLite to be what it is: a small, efficient SQL database that works on everything from mainframes to a watch. The fact it
by mikece 4y ago
The "lack of functions" is what allows SQLite to be what it is: a small, efficient SQL database that works on everything from mainframes to a watch. The fact it doesn't have every possible feature you want or need is not a deficiency of SQLite: if you need tons of features then, by definition, you're outside the niche of what SQLite was built to handle and you need a large, full-featured database server.
- Beltalowda 4y agoSQLite isn't that small, about 1.3M compiled as a shared library on my system, and the "amalgamation file" is 240k lines of code, or 8.2M (160k lines w/o comments). I don't think a bunch of functions will add that much to it; it's probably more about developer time, maintenance burden, etc.
- lmkg 4y ago> it's probably more about developer time, maintenance burden, etc. I mean... SQLite is famous for having almost a thousand lines of test code per line of application code. So yeah, I think they view the functions not just in terms of implementing, but also in terms of a commitment to robust maintenance.
- sgbeal 4y ago> it's probably more about developer time, maintenance burden, etc. That's a large part of it, yes. The sqlite project has only 2 full-time core developers and, AFAIK, only 3 current part-timers who tend to work on more "outer rim" features like the shell app, the .Net bindings, and the new WASM/JS parts. Richard (sqlite architect/lead) has an explicit goal of supporting sqlite through at least 2050, and sqlite has a long history of strong backwards compatibility guarantees. Every feature (e.g. new SQL-facing function) added to it may well have to be maintained until 2050 by that small group of people. Thus Richard is necessarily extremely selective about what goes in.
- sicp-enjoyer 4y agohow much code do you think some stats functions would add?
- UncleEntity 4y agoTFA says a bunch of math functions are included but aren’t built by default. I’m wondering if they have a probation (—edit— prohibition even, stupid spellcheck) on new utility functions (so they would only have to be written once and everyone would benefit) hidden behind feature flags or if nobody has bothered to send in a patch? Also wondering if there’s a benefit to having the database call the functions over just doing it yourself in whatever language you are using? Not a db person so don’t know.
- banana_giraffe 4y agoTFA is kinda wrong about them being disabled by default. They are behind a define macro, but that macro is enabled by default on the makefiles that ship with SQLite. I'd certainly expect them to be available in a normal build of SQLite. > if nobody has bothered to send in a patch Quoting from SQLite: > SQLite is open-source, meaning that you can make as many copies of it as you want and do whatever you want with those copies, without limitation. But SQLite is not open-contribution. They pretty tightly control who can contribute to the code base for a few reasons .. they don't accept patches from the outside.