I'm very sorry if this is a very stupid question. Intuitively, I would
assume that of course, any TEXT or BLOB field may contain
newlines. I'm, however, puzzled about two things (it all refers to the
commandline interface):

- while I can insert values with newlines by using the X'ABCD'
  notation, i.e. saying sth like

  INSERT INTO my_table VALUES (x'0a');

  it does not seem possible to use a newline literally in a string,
  e.g. like this:

  INSERT INTO my_table VALUES ('
');

  But does this mean you can only specify newlines in x'abcd'
  notation? Or even, that SQLite stores any string with newlines as a
  BLOB?

- (Almost the same question) When I use quote() to SELECT some
  columns, is it conceivable that SQLite returns something like this
  (assuming line mode):

  quote(text) = '
'
  Or will it always use the X'ABCD' notation to output newlines? 

  (I have already found out that newlines stored as blobs are returned
  literally if you do not use quote(), but as I said, I haven't been
  able to store newlines as text, so I could not test how they are
  returned.)


The background of my question is not curiosity, but the fact that I
have designed an Elisp interface that uses SQLite's commandline
interface with quote() and parses its line output. As long as the
values cannot contain newlines, that's quite straightforward, but if
they can, it's suddenly very intricate. Thus, it's the output that I'm
chiefly concerned about, but also the fact whether I always have to
use the X'ABCD' notation to insert a value that contains newlines (and
perhaps also carriage returns, which I haven't tested).

I'm sorry if I merely haven't found the pertinent documentation, but I
have rummaged the docs.

Thanks for any help here!

Florian

_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to