gyli / DictMySQL

More convenient database manipulation with Python dictionary.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

upsert is not working

suryasr007 opened this issue · comments

I tried use upsert(). But nothing is reflecting in database, However it is not generating even errors

db.upsert(table = SERVER_STORAGE_TABLE,
                 value = {'name':server, 'ping':'no'}
                  update_columns=['ping'])

Here is my code

This query looks good to me, but it also depends on the data and db structure, like if there is UNIQUE index or not.

So I think you can set db.debug = True and it will print the query it should be running, then you can debug the raw sql query directly.

Thx, this is fixed in 0.6.6