Skip to content

ON CONFLICT support doesn't take camelCase into account #341

@artis3n

Description

@artis3n

The recent addition of ON CONFLICT in #335 uses in a test the format:

post.insert({
 +    content: 'test',
 +    userId: 2
 +  }).onConflict({
 +    columns: ['userId'],
 +    update: ['content']
 +  }),

However, if a SQL definition is constructed as:

sql.define({
  name: 'test',
  columns: [
    { name: 'start_time' }
  ],
  snakeToCamel: true,
});

Then, the ON CONFLICT clause will not respect the snakeToCamel setting, and will require update: ['start_time'] instead of update: ['startTime'].

This should be noted somewhere or modified to support the snakeToCamel property.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions