Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

You may want to use the $$ way to declare strings for your examples. Something like:

-- Create a todo for "frectonz"

UPDATE people

SET database = execute_sqlite(

    database,

    $sqlite$INSERT INTO todos VALUES ('solve multitenancy')$sqlite$
)

WHERE name = 'frectonz';



oh nice, i didn't know this existed, thanks


The string between the dollar signs can only be closed by another set of dollar quotes with the same string between them. So it allows you to do quotes within quotes within quotes if necessary.




Consider applying for YC's Winter 2026 batch! Applications are open till Nov 10

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: