Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update to latest DBConnection #321

Merged
merged 9 commits into from
Nov 20, 2017
Merged

Update to latest DBConnection #321

merged 9 commits into from
Nov 20, 2017

Conversation

fishcakez
Copy link
Member

WIP: awaiting DBConnection release

  • Adds support for non-stream cursors
  • Adds support for advance transaction handling

@@ -1409,22 +1409,27 @@ defmodule Postgrex.Protocol do
sync_recv(s, status, result, buffer)
end

defp suspend(s, status, query, cursor, rows, buffer) do
defp cont(s, status, query, cursor, rows, buffer) do

Choose a reason for hiding this comment

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

Function takes too many parameters (arity is 6, max is 5).

{:error, Postgrex.Error.t, state} |
{:error | :disconnect, %RuntimeError{}, state} |
{:disconnect, %DBConnection.ConnectionError{}, state}
{DBConnecation.status, state} |

Choose a reason for hiding this comment

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

Seems like a typo?

Copy link
Member Author

Choose a reason for hiding this comment

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

Thanks fixed.

Copy link
Member Author

Choose a reason for hiding this comment

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

Thanks fixed.

@fishcakez
Copy link
Member Author

max_rows should be a fetch only option and not stored in cursor, the behaviour in this branch is confusing.

The mode should be stored in cursor so that when the cursor is deallocated the savepoint is cleaned up if option is not passed. This problem is a particular issue when copying from the database.

@josevalim
Copy link
Member

@fishcakez I believe I have addressed the two concerns you had left. :)

@elixir-ecto elixir-ecto deleted a comment from sourcelevel-bot bot Sep 29, 2017
@elixir-ecto elixir-ecto deleted a comment from sourcelevel-bot bot Sep 29, 2017
@elixir-ecto elixir-ecto deleted a comment from sourcelevel-bot bot Sep 29, 2017
@elixir-ecto elixir-ecto deleted a comment from sourcelevel-bot bot Sep 29, 2017
@elixir-ecto elixir-ecto deleted a comment from sourcelevel-bot bot Sep 29, 2017
@elixir-ecto elixir-ecto deleted a comment from sourcelevel-bot bot Sep 29, 2017
@elixir-ecto elixir-ecto deleted a comment from sourcelevel-bot bot Sep 29, 2017
@elixir-ecto elixir-ecto deleted a comment from sourcelevel-bot bot Sep 29, 2017
@fishcakez fishcakez mentioned this pull request Oct 2, 2017
@fishcakez
Copy link
Member Author

@josevalim yes the changes are good 👍

@fishcakez fishcakez merged commit 726057b into master Nov 20, 2017
@fishcakez fishcakez deleted the jf-trans-status branch November 20, 2017 01:36
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.

3 participants