BLOB handling with length-specified table definition
Hi,
I am working on a database where I store GUIDs which I use as primary keys as BLOBs. For this, I did specify the columns as BLOB(16) to specify the length of the field (I know that this has no effect in SQLite, but I auto-generate the database script from MySQL Workbench, and it makes sense to see it in the ERM). For this column, phpliteadmin does not show the download/upload options I would expect and also get if I define the column as BLOB.
Also, another question: BLOB handling is currently implemented in a way that it makes sense if files are stored in the database. Would it be simple to add the possibility to handle the data as hex-strings? For GUIDs this makes much more sense instead of downloading and uploading 16-byte-files. This could be for example a config-option.
Thank you for your work!
Comments (10)
-
repo owner -
repo owner Oh, sorry. your main concerns are
- BLOB works, but BLOB(16) does not
- Hex-Option for BLObs
I got it, sorry.
-
reporter Hi,
Thank you for your answer. I am already using the development version. This works if the Column is specified as (precisely) "BLOB", but not when specified as "BLOB(16)". This is one part of my request.
The second part would be if it's possible to implement a direct editing of (small) BLOBs in the webinterface, for example in a hex-encoded textfield.
Thank you Christof
-
reporter I just saw your second answer. You perfectly got my points.
Thank you Christof
-
repo owner With commit 58ba700, phpLiteAdmin now treats every column with a type name starting with "BLOB" as a BLOB field, so BLOB(16) now works the same as BLOB. This should solve your first point. Please check the development version to let me know if it suits your needs in this regard.
-
reporter Thank you very much. This commit perfectly solves my first point.
If you give me some hints where I have to look, I could try to implement the Hex-Option. I would need to know where the display and the edit-parts for the field type are (I think).
-
reporter Okay, I had a look without the pointers, and found the parts where I had to make changes (mostly searching for "BLOB" ;-)). I have created a pull request #5, please have a look at it and accept it if you are interested in the functionality.
-
repo owner Sorry for the late reply. At the time you sent your pull request last year I had no time for this project. With commit 709f63dfef0803c2fa922a6260a9dc103b4e767f I integrated your changes. I adjusted them slightly.
-
repo owner - changed milestone to 1.9.9
-
assigned issue to
-
repo owner - changed status to resolved
- Log in to comment
Hi
please check the development version: http://www.phpliteadmin.org/phpliteadmin-dev.zip
It has support for uploading/downloading BLOB fields. Please let me know if this satisfies what you are searching for.
We should really do a new stable release...
See also issue
#305.