Skip to content

fix: Move cqtypes#357

Merged
yevgenypats merged 7 commits intomainfrom
fix/move_cqtypes
Nov 7, 2022
Merged

fix: Move cqtypes#357
yevgenypats merged 7 commits intomainfrom
fix/move_cqtypes

Conversation

@yevgenypats
Copy link
Copy Markdown
Contributor

@yevgenypats yevgenypats commented Nov 7, 2022

This is a split of this PR #348 so it will be easier to review.

Also, Im going to push the move to v2 maybe another week as we dont really have anything that requires protocol changes for now. even though it is the right way to do it and will make the cli much easier including the need to things like that - cloudquery/cloudquery#3657 as it will be all handles on protobuf and go versioning side.

This current PR just moves cqtypes to schema and removes enumerating all types in different locations to make sure when we add a new type tests will catch if a type is not added to the right place and or not connected to TypeValue.

Also this removes TimeInterval which 1) wasn't used 2) it is incorrect because it used time.Duration as TimeInterval but it's not a TimeInterval it's just a duration which is uint64 so there no need for a special type for that. In PostgreSQL TimeInterval is actually completely different type that contains timezones and it is not go time.Duration

@github-actions github-actions bot added fix and removed fix labels Nov 7, 2022
@disq
Copy link
Copy Markdown
Member

disq commented Nov 7, 2022

Looks like schema package has way too many files now? Maybe prefix files coming from cqtypes with something? type_*.go?

Copy link
Copy Markdown
Contributor

@hermanschaaf hermanschaaf left a comment

Choose a reason for hiding this comment

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

I actually ended up reviewing the other PR first in any case 👍 I'll leave it up to you how you want to merge the changes.

@yevgenypats
Copy link
Copy Markdown
Contributor Author

I actually ended up reviewing the other PR first in any case 👍 I'll leave it up to you how you want to merge the changes.

Thanks! I'll go with that first and then open a new one on top as I ended up making it backward compatible and not breaking the protocol.

@yevgenypats yevgenypats merged commit 9064bc0 into main Nov 7, 2022
@yevgenypats yevgenypats deleted the fix/move_cqtypes branch November 7, 2022 10:24
kodiakhq bot pushed a commit that referenced this pull request Nov 7, 2022
🤖 I have created a release *beep* *boop*
---


## [0.13.23](v0.13.22...v0.13.23) (2022-11-07)


### Bug Fixes

* Move cqtypes ([#357](#357)) ([9064bc0](9064bc0))

---
This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please).
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