java.jdbc

postgres insert results should respect `indentifiers` option

Details

  • Type: Enhancement Enhancement
  • Status: Closed Closed
  • Priority: Minor Minor
  • Resolution: Completed
  • Affects Version/s: None
  • Fix Version/s: None
  • Component/s: None
  • Labels:
    None
  • Environment:
    postgres

Description

When `(insert-multi!)` is called against a postgres database with row maps, the inserted row is returned but there's not an `identifiers` option to change the field names into the application's normal key format.

I attached a failing test. If you want to provide a little direction, I'd be willing to work on a fix as well.

Activity

Hide
Sean Corfield added a comment -

Good catch. Yes, Postgres is the only DB that returns rows, rather than just numbers, and I only ran across that recently so there's never been a need for :identifiers on insertion. Does this apply only to insert-multi! or does it affect insert! too?

Show
Sean Corfield added a comment - Good catch. Yes, Postgres is the only DB that returns rows, rather than just numbers, and I only ran across that recently so there's never been a need for :identifiers on insertion. Does this apply only to insert-multi! or does it affect insert! too?
Hide
Ryan Fowler added a comment -

It affects both. Both return the result of insert-cols! without modification.

Show
Ryan Fowler added a comment - It affects both. Both return the result of insert-cols! without modification.
Hide
Sean Corfield added a comment -

Thanks for confirmation!

Show
Sean Corfield added a comment - Thanks for confirmation!
Hide
Sean Corfield added a comment -

Will be in 0.6.2. Also made sure the tests exercise :qualifier with inserts.

Show
Sean Corfield added a comment - Will be in 0.6.2. Also made sure the tests exercise :qualifier with inserts.
Hide
Ryan Fowler added a comment -

Awesome, Thanks!

Show
Ryan Fowler added a comment - Awesome, Thanks!
Hide
Sean Corfield added a comment -

Releasing 0.6.2-alpha1 with this change.

Show
Sean Corfield added a comment - Releasing 0.6.2-alpha1 with this change.
Hide
Andrea Richiardi added a comment -

I confirm this works in 0.6.2-alpha2 and it's faster then applying `:row-fn`

Show
Andrea Richiardi added a comment - I confirm this works in 0.6.2-alpha2 and it's faster then applying `:row-fn`

People

Vote (0)
Watch (0)

Dates

  • Created:
    Updated:
    Resolved: