Skip to content

Replace calls to seq by adding a RETURNING * to all insert and replace statements#101

Merged
mattbucci merged 10 commits intov3from
returning-replaces-seq
Feb 29, 2024
Merged

Replace calls to seq by adding a RETURNING * to all insert and replace statements#101
mattbucci merged 10 commits intov3from
returning-replaces-seq

Conversation

@mattbucci
Copy link
Copy Markdown
Collaborator

@mattbucci mattbucci commented Feb 22, 2024

Closes:

This PR appends RETURNING * to all insert queries so that wpsqli_insert_id can check for a primary key on the table that was last inserted against and grab the last inserted value in a more robust way, especially for tables without sequences.

  • Removes of noop logic for term_relationships
  • Removes custom logic for handling post_author insertion

@mattbucci mattbucci force-pushed the returning-replaces-seq branch from 2aaf030 to 8d420dc Compare February 22, 2024 04:22
@mattbucci mattbucci changed the title WIP: replace calls to seq by adding a RETURNING * to all insert statements Replace calls to seq by adding a RETURNING * to all insert and replace statements Feb 27, 2024
@mattbucci mattbucci marked this pull request as ready for review February 27, 2024 07:34
@mattbucci mattbucci merged commit c7e3fbd into v3 Feb 29, 2024
@mattbucci mattbucci deleted the returning-replaces-seq branch February 29, 2024 08:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant