Open mvorisek opened 4 years ago
Currently atk4/data don't support blob
field type.
Array
and object
types are almost the same in atk/data. They both store somehow serialized (as text - json, php serialize or any other textual conversion) structure. So on DB side it's a huge text - longtext or cblob in some engines. It's not binary lob.
Blob could be useful if we wanted to store files (for example, user profile avatar image) in DB table field. Yes, then it could be useful, but currently we don't support that in atk4/data by default. As workaround it's possible to use bin2hex in custom serialize callback to convert binary data to textual before saving in db.
But if we look into future, then probably atk/data should have at least one such binary field type.
implement once BLOB field is added, see https://github.com/atk4/data/issues/506
Add mapping for blob to/from persistence