from Hacker News

SQLite 3.42.0

by nikbackm on 5/16/23, 2:16 PM with 105 comments

  • by gred on 5/16/23, 2:44 PM

    > Enhance the JSON SQL functions to support JSON5 extensions

    Wait, what's JSON5??

    > Object keys may be unquoted identifiers.

    > Objects may have a single trailing comma.

    > Arrays may have a single trailing comma.

    > Strings may be single quoted.

    > Strings may span multiple lines by escaping new line characters.

    > Strings may include new character escapes.

    > Numbers may be hexadecimal.

    > Numbers may have a leading or trailing decimal point.

    > Numbers may be "Infinity", "-Infinity", and "NaN".

    > Numbers may begin with an explicit plus sign.

    > Single (//...) and multi-line (/.../) comments are allowed.

    > Additional white space characters are allowed.

    Oh crap, the levees have broken!

  • by airstrike on 5/16/23, 3:57 PM

    Is there an unavoidable reason why SQLite won't allow foreign keys to be added with ALTER TABLE, only at table creation? The whole "select * into temporary table and create new table with FK constraint" seems so verbose / convoluted, my layman's mind can't comprehend why one can't simply

        ALTER TABLE "foo" ADD FOREIGN KEY...
  • by jksmith on 5/16/23, 7:58 PM

    Maybe this comment is worthless and has no information content, but SQLite is in the pantheon of open source projects, along with linux itself.
  • by say_it_as_it_is on 5/16/23, 3:55 PM

    How are people using sqlite within a multi-threaded, asynchronous runtime: are you using a synchronization lock? SQLite seems to "kinda, sorta" support multi-threading, requiring special configuration and caveats. Is there a good reference?
  • by pyrolistical on 5/16/23, 4:47 PM

    Wat > Note that SQLite interprets NaN, QNaN, and SNaN as just an alternative spellings for "null"
  • by maxpert on 5/16/23, 3:59 PM

    Wait! Can I store unicode escaped binary strings in JSON now?