Skip to content

Conversation

arturaz
Copy link
Contributor

@arturaz arturaz commented Sep 5, 2020

Currently PostgreSQLExecutionContext.query does not have a way to know how many rows did that particular
query affected. The only way to get that information is to use PostgreSQLExecutionContext.execute.

Unfortunately execute uses slower, less efficient encoding to talk to the PostgreSQL
server and does not support all data types that query supports.

This allows you to use PostgreSQLExecutionContext.query for INSERT, UPDATE, DELETE statements
and get the affected row count.

…QLExecutionContext.query`

Currently `PostgreSQLExecutionContext.query` does not have a way to know how many rows did that particular
query affected. The only way to get that information is to use `PostgreSQLExecutionContext.execute`.

Unfortunately `execute` uses slower, less efficient encoding to talk to the PostgreSQL
server and does not support all data types that `query` supports.

This allows you to use `PostgreSQLExecutionContext.query` for INSERT, UPDATE, DELETE statements
and get the affected row count.
Copy link
Collaborator

@isoos isoos left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, I'm asking for a few small changes, and please also use dartfmt to format the source code.

@arturaz
Copy link
Contributor Author

arturaz commented Sep 6, 2020

Looks good, I'm asking for a few small changes, and please also use dartfmt to format the source code.

Updated.

Copy link
Collaborator

@isoos isoos left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, this looks good!

@isoos isoos merged commit 64c6ed2 into stablekernel:master Sep 7, 2020
@isoos
Copy link
Collaborator

isoos commented Sep 7, 2020

Published as part of 2.2.0

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.

2 participants