github
html_url | issue_url | id | node_id | user | created_at | updated_at | author_association | body | reactions | issue | performed_via_github_app |
---|---|---|---|---|---|---|---|---|---|---|---|
https://github.com/simonw/sqlite-utils/issues/126#issuecomment-664065597 | https://api.github.com/repos/simonw/sqlite-utils/issues/126 | 664065597 | MDEyOklzc3VlQ29tbWVudDY2NDA2NTU5Nw== | 9599 | 2020-07-27T00:51:11Z | 2020-07-27T00:51:11Z | OWNER | I'm going to implement this as the reverse of #125 - binary columns in JSON are now output like this: ```json { "name": "lorem.txt", "mode": 33188, "mtime": 1595805965, "sz": 16984, "data": { "$base64": true, "encoded": "eJzt0c1xAyEMBeC7q1ABHleR3HxNAQrIjmb4M0gelx+RTY7p4N2WBYT0vmufUknH8kq5lz5pqRFXsTOl3pYkE/NJnHXoStruJEVjc0mOCyTqq/ZMJnXEZW1Js2ZvRm5U+DPKk9hRWqjyvTFx0YfzhT6MpGmN2lR1fzxjyfVMD9dFrS+bnkleMpMam/ZGXgrX1I/K+5Au3S/9lNQRh0k4Gq/RUz8GiKfsQm+7JLsJ6fTo5JhVG00ZU76kZZkxePx49uIjnpNoJyYlWUsoaSl/CcVATje/Kxu13RANnrHweaH3V5Jh4jvGyKCnxJLiXPKhmW3fiCnG7Jql7RR3UvFo8jJ4z039dtOkTFmWzL1be9lt8A5II471m6vXy+l0BR/4wAc+8IEPfOADH/jABz7wgQ984AMf+MAHPvCBD3zgAx/4wAc+8IEPfOADH/jABz7wgQ984AMf+MAHPvCBD3zgAx/4wAc+8IEPfOADH/jABz7wgQ984PuP7xubBoN9" } } ] ``` So the `sqlite-utils insert` command should learn to spot `{"$base64": true...}` values and base64 decode them before inserting them. | { "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
665819048 | |
https://github.com/simonw/sqlite-utils/issues/126#issuecomment-664106405 | https://api.github.com/repos/simonw/sqlite-utils/issues/126 | 664106405 | MDEyOklzc3VlQ29tbWVudDY2NDEwNjQwNQ== | 9599 | 2020-07-27T04:00:08Z | 2020-07-27T04:00:33Z | OWNER | ``` $ echo '[ { "name": "transparent.gif", "content": { "$base64": true, "encoded": "R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7" } } ]' | sqlite-utils insert trans.db files - --pk=name ``` | { "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
665819048 |