Skip to content

Can't save blobs with db.update_rows(...) #41

@mrimvo

Description

@mrimvo

Using db.update_rows(...), saving blobs does not work.

Output is:

UPDATE users SET myblob=[PoolByteArray] WHERE uid = 4026253021;
SQL error: no such column: PoolByteArray

But I think it should be something like:

UPDATE users SET myblob=x'789c....' WHERE uid = 4026253021;

I can save blobs with db.insert_row(...) though. But updating blobs doesn't work.


As a side note, I also tried

db.query_with_bindings(
    "UPDATE users SET ?=? WHERE uid = ?;",
    ["myblob", PoolByteArray([1,2]), uid])

But in the log it says:

UPDATE users SET ?=? WHERE uid = ?;
SQL error: near "?": syntax error

So there seems to be another issue with query_with_bindings

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions