You are reading content from Scuttlebutt
@Daan Patchwork %EVH2k4SO2Rh0YwMY6GTsWsgrMdOHGp8rVImFXGG4LWg=.sha256

#sqlite and its new JSONB type seem really cool. Been playing around with it and while the thing isn't terribly well covered yet by third party arcticles, the original docs are pretty good and it seems to be able to do what I want. :)

@Cory ~😎 %JZMORjVr1Dt29wJP+EmiYLYpZMYF+8sMh1ynlrHlVDw=.sha256

Yeah, the potential performance improvement over JSON seems too good to pass up for Tilde Friends.

It's been on the back of my mind to investigate whether it's practical to migrate a JSON column to JSONB and create a view so that old queries continue to work.

@Daan Patchwork %pXsK8oTEEjrZUGny9E6dj//3mQkWhagR06cYmGCp09Q=.sha256

@Cory ~😎 do you have good material on views over JSON(B) fields? Like, "what I wish I had known before I tried..." kind of things? Asking for a friend. 😇

@Cory ~😎 %EMT0P3+bX4Z9dscmjfbXnJqo8B6wmrEnqwXd91Hhs9Q=.sha256

@Daan Patchwork ¯\_(ツ)_/¯ I was going to just try and find out.

Oh, actually this appears to clarify some things I was going to speculate about: https://sqlite.org/forum/forumpost/fa6f64e3dc1a5d97. The bit about migrating seems too magical to be true:

Just start writing out JSONB for new entries. The old entries will continue to work. The new entries will just work faster.

User has not chosen to be hosted publicly
@Cory ~😎 %EH3dX9JXuN/TdAXAEaC1hf9RzkwH8pSi1DCj7Txt7TQ=.sha256

I did a very cursory test, and it didn't Just Work. A TEXT column becoming a BLOB still has consequences when you're not just passing it to json*() functions.

I may make the leap regardless and update all of my usages. Might as well get it out of the way while it's basically just me making apps.

User has not chosen to be hosted publicly
@Daan Patchwork %V+3Ur9if9uu9lBIHyDC6Z9YhTqf9D7ZFh5O/W6xTQYs=.sha256

@Cory ~😎 I think the statement was probably referring to "old entries" being JSON (and not JSON*B*)?

Join Scuttlebutt now