Gravity: added support for INSERT...RETURNING

Review Request #731 — Created Feb. 10, 2021 and submitted

m.vanberkum
Lunr
feature/insertReturning
65797b3...
lunr
Gravity: added support for INSERT...RETURNING

Made sure query works in MariaDB.
Wrote unit test.
Ran unit tests.

  • 0
  • 0
  • 2
  • 0
  • 2
Description From Last Updated
pprkut
  1. 
      
  2. src/Lunr/Gravity/Database/DatabaseDMLQueryBuilder.php (Diff revision 1)
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     

    Close, but not quite :)

    This should work as part of the existing get_insert_query() method.

  3. 
      
m.vanberkum
pprkut
  1. 
      
  2. src/Lunr/Gravity/Database/DatabaseDMLQueryBuilder.php (Diff revision 2)
     
     
     
     
     
     
     
     
     

    That's not how $components works.

    $this->returning contains the RETURNING part of the query. That's more than just the RETURNING key word. It also already contains the columns.

    column_names_trimmed isn't needed at all.

  3. 
      
m.vanberkum
pprkut
  1. Ship It!
  2. 
      
pprkut
Review request changed

Status: Closed (submitted)

Change Summary:

Merged into master

Loading...