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

Rename SessionTx() to CreateTx() ? #362

Closed
VojtechVitek opened this issue Apr 24, 2017 · 4 comments
Closed

Rename SessionTx() to CreateTx() ? #362

VojtechVitek opened this issue Apr 24, 2017 · 4 comments

Comments

@VojtechVitek
Copy link
Member

I always forget how to create new DB transaction in upper/db.

err := DB.SessionTx(func(tx bond.Session) error {
     // tx
}

Whenever I search my codebase to remind myself, I end up git-grepping "CreateTransaction" or "CreateTx" but nothing comes up.

@xiam would you be open to renaming the SessionTx() method (or having an alias) to CreateTx() instead?

err := DB.CreateTx(func(tx bond.Session) error {
     // tx
}

@pkieltyka @c2h5oh @diogogmt @pxue thoughts?

@pkieltyka
Copy link
Member

pkieltyka commented Apr 24, 2017 via email

@VojtechVitek
Copy link
Member Author

@pkieltyka sorry - you like the original SessionTx() name? Or the proposed CreateTx() name?

@pkieltyka
Copy link
Member

pkieltyka commented Apr 24, 2017 via email

@xiam
Copy link
Member

xiam commented Apr 26, 2017

CreateTx sounds good, I opened an issue on bond to keep track of this one.

@xiam xiam closed this as completed Apr 26, 2017
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

No branches or pull requests

3 participants