• Fargeol
    link
    fedilink
    462 months ago

    “You know what ELSE everybody likes? Postgres! Have you ever met a person, you say, ‘Let’s use some Postgres,’ they say, ‘Hell no, I don’t like Postgres’? Postgres is perfect!”

    • @RustyNova@lemmy.world
      link
      fedilink
      122 months ago

      I 100% agree… If you don’t need portable databases. For those, everybody like SQLite (even if it can be annoying sometimes)

      • You can pry sqlite out of my cold dead hands. Because I’ll probably die while using it out of frustration due to the poor performance of triggers.

        • @RustyNova@lemmy.world
          link
          fedilink
          32 months ago

          Tbh trigger performance isn’t that much of a concern unless you need to write lots of data, which most usage don’t need.

          Also try check statements instead or even re-evaluate your schema to prevent them if you really need to.

          Personally my death would be multiple write transaction deadlocks. Sadly it doesn’t play that well with async code, like with sqlx (rust).

            • @RustyNova@lemmy.world
              link
              fedilink
              22 months ago

              This is also part of my death, because it’s much easier to not deadlock when you are FIFO.

              Personally I went for the nuclear option, and any transaction is sent as a tokio task to make sure the transaction keeps getting polled despite other futures getting polled. Coupled with a generous busy timeout timer (60secs) and Wal mode, it works pretty well.

              Probably should also put the mutex strategy (perhaps a tokio semaphore instead?) although due to lifetimes it might be hard to make a begin() function on my DB pool wrapper.

              … Congratulations. You nerd snipped me. Time for it to go on the todo stack.

              Hyped for it too, but wouldn’t use until sqlx suport. Compile time checked queries are just so good. I don’t use rustsqlite for that reason alone (you often don’t need async SQLite anyways)

  • Psaldorn
    link
    fedilink
    52 months ago

    Had to roll my own JSON storage system after spending weeks trying to get sqlite to work on Godot/android.

    It took a day and will suck at scale because there are no indexes. It just goes through the whole file, line by line when you search for an id.

    BUT IT WORKS.

    Hopefully the repos and stuff I piled on top have made it abstract able enough I can move it to a real database if the issue ever gets resolved.

    • @sunbeam60@lemmy.ml
      link
      fedilink
      152 months ago

      I’m confused about your SQLite troubles … it compiles for pretty much everything - as long as you have a file system mapping.

      • Psaldorn
        link
        fedilink
        22 months ago

        No, you misunderstand. Sqlite just does not work when it’s packaged by Godot mono for mobile (see the ticket in the other replies)

        It worked fine on desktop which made it more frustrating