How to edit a sqlite3 large text field with paragraphs & newlines?

23 Views Asked by At

Looking to edit a large text field in sqlite3 ver 3.42.0 on linusx Ubuntu 23.10.

Insert does not allow multiline text using 'insert into tablename (field1, field2) values ("text1", "text2");'

But if I use 'insert into tablename (field1, field2) values (edit("", gedit), edit("", gedit);' I can enter large text multiline data with newlines in the editor and this is then saved to sqlite3 table in the proper column.

If sqlite3 is set to '.mode column --wrap 40 --wordwrap on --noquote' then the data can be displayed nicely. 40 works well but so does 60.

I also tried the sqlite3 '.mode insert' but this is very cumbersome as I have to manually supply the newlines and carriage returns.

My question is this: Is this a good way to insert large text fields into sqlite3?

0

There are 0 best solutions below