• roadrunner_ex ( roadrunner_ex@lemmy.ca ) 
    link
    fedilink
    English
    arrow-up
    20
    ·
    2 years ago

    I get it…I’ve never been the maintainer of a codebase that’s deployed on trillions of devices, and backwards compatibility is something to be taken seriously and responsibly when you’re that prolific. I do not begrudge SQLite or any large projects when they make decisions in service to that.

    However

    It always makes me feel oddly icky when known bugs (particularly of the footgun variety) become the new standard that the project intentionally upholds.

    • chaos ( chaos@beehaw.org ) 
      link
      fedilink
      arrow-up
      7
      ·
      2 years ago

      I’m so confused that the same people can say “why does everyone get their undies in a bunch that we happily accept putting arbitrary data in columns regardless of type, that’s good, it’s flexible, but fine, we’ll put in a ‘strict’ keyword if you really want column types to mean something” and also “every other SQL says 1==‘1’ but this is madness, strings aren’t integers, what is everyone else thinking?!”

      • Strongly typed is orthogonal to strictly typed, so these two properties alone are not contradictory.

        However, it is a bit unsettling that, if a column has an INTEGER type affinity, and you try to put a string in it, then the string is implicitly converted to an integer if it represents an integer and just stored silently as-is otherwise.

        • Zykino ( Zykino@programming.dev ) 
          link
          fedilink
          arrow-up
          2
          ·
          2 years ago

          But they silently converted the string ‘1’ into the number 1. So now in my same code, I want to select back my stringy ‘1’ that I putted in the type affined INTEGER column.

          And you are telling me its normal that I don’t get it back ? Or maybe I’m misunderstanding something?

          • To clarify: I am saying that it is not “normal” that the type you get back out is not only not necessarily the type that you put in, but may be different depending on the value that you put in. Put another way, sqlite is strongly typed unless you mistakenly thought that type affinities by themselves made it be strictly typed, in which case it becomes neither strictly nor strictly typed.

            • Zykino ( Zykino@programming.dev ) 
              link
              fedilink
              arrow-up
              1
              ·
              2 years ago

              neither strictly nor strictly typed.

              I think one of them should be “strongly”, but I understood your point.

              Thinking back, I don’t have the doc easily accessible (on phone), but I think the C API state the type you want to read. Like get_int(smt, VALUE_INDEX, …), so at least in the C API, most of this should not be visible. Maybe only the SELECT 1 = '1' part (or others comparaison fully done in the SQL string)?

  • Jayjader ( Jayjader@jlai.lu ) 
    link
    fedilink
    arrow-up
    13
    ·
    2 years ago

    Why do we even need a server? Why can’t I pull this directly off the disk drive? That way if the computer is healthy enough, it can run our application at all, we don’t have dependencies that can fail and cause us to fail, and I looked around and there were no SQL database engines that would do that, and one of the guys I was working with says, “Richard, why don’t you just write one?” “Okay, I’ll give it a try.” I didn’t do that right away, but later on, it was a funding hiatus. This was back in 2000, and if I recall correctly, Newt Gingrich and Bill Clinton were having a fight of some sort, so all government contracts got shut down, so I was out of work for a few months, and I thought, “Well, I’ll just write that database engine now.”

    Gee, thanks Newt Gingrich and Bill Clinton?! Government shutdown leads to actual production of value for everyone instead of just making a better military vessel.

  • jbk ( jbk@discuss.tchncs.de ) 
    link
    fedilink
    arrow-up
    11
    ·
    2 years ago

    another one not mentioned there: sqlite is really tiny: (from https://sqlite.org/faq.html#q18 )

    The default configuration of SQLite only supports case-insensitive comparisons of ASCII characters. The reason for this is that doing full Unicode case-insensitive comparisons and case conversions requires tables and logic that would nearly double the size of the SQLite library.

  • Troy ( troyunrau@lemmy.ca ) 
    link
    fedilink
    arrow-up
    4
    ·
    2 years ago

    This article is written as though it is targeting FOSS newbie or something – a weird mix of jargon and simple language designed to overawe someone.

    Their VCS is at least as interesting as SQLite :)