SQLite Forum

BLOB
Login

BLOB

(1) By anonymous on 2020-12-24 06:19:47 [link] [source]

Does a BLOB column impart any clues as regards its content or do you need another column to hold that information (e.g. Hex values, JPG, TXT etc.)?

(2) By Stephan Beal (stephan) on 2020-12-24 06:23:06 in reply to 1 [link] [source]

Does a BLOB column impart any clues as regards its content

Blob content is entirely opaque to sqlite. sqlite has zero insight into their content, other than their length, and it is incapable of guessing the content type. That's an app-level detail.

(3) By Warren Young (wyoung) on 2020-12-24 08:50:27 in reply to 1 [link] [source]

You could run its raw content thru libmagic

(4) By Ryan Smith (cuz) on 2020-12-24 11:58:52 in reply to 1 [source]

To actually answer the question:

NO, the BLOB column is clueless. Add other fields to hold any Type, Format, Name, Streaming, Timestamp, File, etc. information that may be applicable to your BLOB.