Skip to content

use bulk_upsert with MySQL #76

Description

@aksranka

I am trying to use bulk_upsert with django ORM. I am using MySQL database as my backend. It does the insert part when some new rows are added but every time I triy to do an update using the update_fieldslist it throws an error complaining that the MySQL syntax is wrong:
'''
django.db.utils.ProgrammingError: (1064, "You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'FROM (VALUES
'''

When I tried to debug this further I realized that manager_utils uses django-query-builder which is build for postgre sql by default.
Any help would be greatly appreciated. Thanks

Akshar Ranka

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions