Skip to content
This repository has been archived by the owner on Oct 15, 2020. It is now read-only.

add default mapping for binary/blob #24

Open
mvorisek opened this issue Jan 20, 2020 · 2 comments
Open

add default mapping for binary/blob #24

mvorisek opened this issue Jan 20, 2020 · 2 comments

Comments

@mvorisek
Copy link
Member

Add mapping for blob to/from persistence

@mvorisek mvorisek mentioned this issue Jan 21, 2020
@DarkSide666
Copy link
Member

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.

@mvorisek
Copy link
Member Author

implement once BLOB field is added, see atk4/data#506

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Development

Successfully merging a pull request may close this issue.

2 participants