qbs icon indicating copy to clipboard operation
qbs copied to clipboard

Faster Insert row

Open schmitch opened this issue 11 years ago • 1 comments

Currently I only read the docs and i read this:

If Id is set to a positive integer, Save would query the count of the row to find out if the row already exists, if not then execute INSERT statement. otherwise execute UPDATE.

This is not the best solution, since you need 3 queries to check if a row exists. It would be way easier to just update the row. Check if the query was successfull or greater than zero and if not just insert the statement.

schmitch avatar Dec 23 '13 22:12 schmitch

I will take a look at it this weekend, thank you for your feedback.

coocood avatar Dec 23 '13 23:12 coocood