v1.3.1
Main Changes
insert and update functions modified to optionally retrieve the newly inserted or updated rows, so the user doesn't need to perform a select query after that.
Insert function
insert(table, data, options)
object options is optional. It accepts the boolean property returning to retrieve inserted data.
Update function
update(table, update, where, options)
objects where and options are optional. where accepts where conditions, options is analogous to insert usage.
Other Changes
- Explain new feature in README
- Add test for the new feature
Changelog
- 6373d55 feat: add insert and update queries with returning by @neodmy
- 257f149 feat: add optional returing option for insert and update by @neodmy
- 7d50342 test: add tests for returning option in insert and update by @neodmy
- 8c5ee58 docs: document new option parameter for insert and update by @neodmy
- fd846b6 fix: polish changes by @neodmy
- 84352cf refactor: rename returning option and add as an extra param to update by @neodmy
- 9609ae0 test: amend tests after refactor by @neodmy
- 09a01f2 docs: amend README after refactor by @neodmy
- 2960815 Merge branch 'returning_option_for_insert_update' of github.com:neodmy/handy-postgres into returning_option_for_insert_update by @neodmy
- e2c36b3 chore: update package version to 1.3.0 by @neodmy