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

Separate drivers #75

Closed
hound672 opened this issue Aug 13, 2023 · 9 comments
Closed

Separate drivers #75

hound672 opened this issue Aug 13, 2023 · 9 comments
Labels
enhancement New feature or request

Comments

@hound672
Copy link
Contributor

Hello.
For now this github repository contains main functionality and drivers/plugins for different databases.
Do you think about separated repositories?
One with main functionality, and another for drivers/plugins (each for plugin: 1 for pgx, 1 for redis etc).

@maranqz
Copy link
Member

maranqz commented Aug 14, 2023

Hello,
I don't think about it, but it is a good idea.
If you create a pull request with these changes, I'll be happy to review it.

@hound672
Copy link
Contributor Author

Ok, but now i'd like to implement pgx support, if you don't mind.
I really like you approach. I made an approach that similar to yours (also use ctx to share transaction).

@hound672
Copy link
Contributor Author

I think that the main repository should contain only trm package and hence only basic deps.
And for each adapters should be its own repository. But where? This space?
What do you think?

@maranqz
Copy link
Member

maranqz commented Aug 20, 2023

I think we can add go.mod to each adapter and store it all in the one repository.
Creating repos for each adapter adds extra work.

Also I would check what will happen with the old code.
Should version be bumped up to v2, or is it enough for the lib users to update go.mod?

@hound672
Copy link
Contributor Author

I think we can add go.mod to each adapter and store it all in the one repository.

Hm... go get https://github.com/avito-tech/go-transaction-manager/pgx for example to install pgx adapter?

version be bumped up to v2

I think yes, since it breaks current api.

@maranqz
Copy link
Member

maranqz commented Aug 20, 2023

Hm... go get https://github.com/avito-tech/go-transaction-manager/pgx for example to install pgx adapter?

Yeap)

version be bumped up to v2

I think yes, since it breaks current api.

MAJOR version when you make incompatible API changes https://semver.org/
I'm not sure that we change API at all. I hope go mod tidy would be enough to update)

@maranqz maranqz added the enhancement New feature or request label Aug 26, 2023
This was referenced Dec 2, 2023
@maranqz
Copy link
Member

maranqz commented Dec 16, 2023

@hound672 you can check

go get github.com/avito-tech/go-transaction-manager/trm/[email protected]
go get github.com/avito-tech/go-transaction-manager/drivers/pgxv4/[email protected] 

#96

@hound672
Copy link
Contributor Author

Looks good!
Thanks!

@maranqz
Copy link
Member

maranqz commented Jan 4, 2024

#96 Merged

@maranqz maranqz closed this as completed Jan 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants