Skip to content

Add UPDATE_SET clause to upsert query #60

@isuru89

Description

@isuru89

When writing an upsert query, user may want to update only subset of columns other than the scenario when inserting.

So, now user can write UPDATE_SET clause to indicate the fields only need to update for the existing record in database.
UPDATE_SET is an optional clause, when it is not declared NyQL will use SET clause to update.

$DSL.upsert {
    TARGET (...)
    SET {
        // using when a insert happens
    }
    UPDATE_SET {
        // using when update happens
    }

}

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions