Skip to content

SQLite upsert does not work #1728

Closed
@Elara6331

Description

@Elara6331

Version

Other

What happened?

SQLite upsert syntax is not working using the beta SQLite engine from the latest main branch.

Relevant log output

mismatched input '=' expecting '=='

Database schema

CREATE TABLE IF NOT EXISTS locations (
    id              INTEGER PRIMARY KEY,
    name            TEXT    NOT NULL,
    address         TEXT    NOT NULL,
    zip_code        INT     NOT NULL,
    latitude        REAL    NOT NULL,
    longitude       REAL    NOT NULL,
    UNIQUE(name)
);

SQL queries

INSERT INTO locations (
    name,
    address,
    zip_code,
    latitude,
    longitude
)
VALUES (?, ?, ?, ?, ?)
ON CONFLICT(name) DO UPDATE SET 
    name = excluded.name,
    address = excluded.address
    zip_code = excluded.zip_code
    latitude = excluded.latitude
    longitude = excluded.longitude;

Configuration

No response

Playground URL

No response

What operating system are you using?

Linux

What database engines are you using?

No response

What type of code are you generating?

Go

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions