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

feat: Schemas sdk v2 #1975

Merged
merged 5 commits into from
Aug 10, 2023
Merged

feat: Schemas sdk v2 #1975

merged 5 commits into from
Aug 10, 2023

Conversation

sfc-gh-jcieslak
Copy link
Collaborator

Summary

First pr for the schemas sdk migration (in the next one It'll be used in the resources/data sources)

Test Plan

  • unit tests
  • integration tests

References

Snowflake schema documentation

pkg/sdk/schemas.go Show resolved Hide resolved
pkg/sdk/schemas.go Show resolved Hide resolved
pkg/sdk/schemas.go Show resolved Hide resolved
pkg/sdk/schemas.go Show resolved Hide resolved
pkg/sdk/schemas.go Show resolved Hide resolved
pkg/sdk/schemas.go Show resolved Hide resolved
pkg/sdk/schemas.go Show resolved Hide resolved
pkg/sdk/schemas.go Show resolved Hide resolved
@github-actions
Copy link

Integration tests failure for bd97c19af3061ed8d91053c1601026a19a7ee60b

@sfc-gh-jcieslak sfc-gh-jcieslak changed the title Schemas sdk v2 feat: Schemas sdk v2 Jul 25, 2023
@github-actions
Copy link

Integration tests failure for 513c754a02d0918f83cc4fff7c41bdef6d36b31f

pkg/sdk/schemas.go Show resolved Hide resolved
pkg/sdk/schemas.go Show resolved Hide resolved
pkg/sdk/schemas.go Show resolved Hide resolved
pkg/sdk/schemas.go Show resolved Hide resolved
@github-actions
Copy link

Integration tests failure for 5ac27f1892088cbcc4e6416c78d7e48403e617a6

@github-actions
Copy link

Integration tests failure for 55f8ab93cac0d374c7adbf7d2cfac1c01c8b19b5

@sfc-gh-jcieslak sfc-gh-jcieslak force-pushed the migrate-schemas-to-new-sdk branch 2 times, most recently from 3ef7ec9 to 6525a31 Compare July 25, 2023 13:50
@github-actions
Copy link

Integration tests failure for 3ef7ec9c562b0878619de1b9b8189d2a313ced9a

@github-actions
Copy link

Integration tests failure for 6525a3171fcdfaf70ae7996eb2c4134dd4eeec5c

@github-actions
Copy link

Integration tests failure for 6525a3171fcdfaf70ae7996eb2c4134dd4eeec5c

@github-actions
Copy link

Integration tests success for 6525a3171fcdfaf70ae7996eb2c4134dd4eeec5c

.github/workflows/go-fmt.yml Outdated Show resolved Hide resolved
pkg/sdk/schemas.go Show resolved Hide resolved
pkg/sdk/schemas.go Show resolved Hide resolved
pkg/sdk/schemas.go Outdated Show resolved Hide resolved
pkg/sdk/schemas.go Outdated Show resolved Hide resolved
pkg/sdk/schemas.go Outdated Show resolved Hide resolved
pkg/sdk/schemas_integration_test.go Outdated Show resolved Hide resolved
pkg/sdk/schemas_integration_test.go Outdated Show resolved Hide resolved
pkg/sdk/schemas_integration_test.go Show resolved Hide resolved
pkg/sdk/schemas_test.go Outdated Show resolved Hide resolved
@sfc-gh-jcieslak sfc-gh-jcieslak force-pushed the migrate-schemas-to-new-sdk branch 3 times, most recently from 3495d70 to f3e1e89 Compare July 31, 2023 09:20
@github-actions
Copy link

Integration tests failure for 3495d70fd1b024a727eeb377e67c180dd769c1bc

@github-actions
Copy link

Integration tests success for f3e1e89cf413050ea47942f4a26a80be12f60dc9

@github-actions
Copy link

github-actions bot commented Aug 1, 2023

Integration tests success for bcae9cc72efb2e3dbcc41af6cadd8c7d13855d43

pkg/sdk/external_tables.go Outdated Show resolved Hide resolved
SwapWith SchemaIdentifier `ddl:"identifier" sql:"SWAP WITH"`
Set *SchemaSet `ddl:"list,no_parentheses" sql:"SET"`
Unset *SchemaUnset `ddl:"list,no_parentheses" sql:"UNSET"`
EnableManagedAccess *bool `ddl:"keyword" sql:"ENABLE MANAGED ACCESS"`
Copy link
Contributor

Choose a reason for hiding this comment

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

Nitpick: maybe add our // One of comment here unless you can do alter ... enable access disable access in one query

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I added the 'oneof' comment

schema bool `ddl:"static" sql:"SCHEMA"`
IfExists *bool `ddl:"keyword" sql:"IF EXISTS"`
name SchemaIdentifier `ddl:"identifier"`
Cascade *bool `ddl:"static" sql:"CASCADE"`
Copy link
Contributor

Choose a reason for hiding this comment

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

same comment as above

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

added

pkg/sdk/errors.go Outdated Show resolved Hide resolved
@github-actions
Copy link

github-actions bot commented Aug 2, 2023

Integration tests success for 2050c57a1e89e1ed0b8e8e158c98665f6a3e1356

@github-actions
Copy link

github-actions bot commented Aug 2, 2023

Integration tests success for 229addcd3b6100d3ba4cec48a80dd4fef907ab14

@github-actions
Copy link

github-actions bot commented Aug 2, 2023

Integration tests failure for 283a530d253f59cdf0e02f254315b1519446e7ac

@sfc-gh-asawicki sfc-gh-asawicki self-requested a review August 3, 2023 11:14
sfc-gh-asawicki
sfc-gh-asawicki previously approved these changes Aug 3, 2023
@github-actions
Copy link

github-actions bot commented Aug 3, 2023

Integration tests success for a4a5c65ec8d50c69674f9f44e5e07e34cbcf5a29

return details, err
}

type InSchema struct {
Copy link
Collaborator

Choose a reason for hiding this comment

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

this name is a bit confusing. im not sure what our naming convention is, but "InSchema" sounds like something that would be in a schema. As in a schema object. Whereas this is more about for showing schemas in something (database or account). perhaps "SchemaIn" would be more appropriate

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Right, changed to SchemaIn

@github-actions
Copy link

github-actions bot commented Aug 3, 2023

Integration tests success for 963f82b80325ffb3f63e6c801c4a3fcf8b5ac167

@sfc-gh-asawicki sfc-gh-asawicki self-requested a review August 4, 2023 10:17
sfc-gh-asawicki
sfc-gh-asawicki previously approved these changes Aug 4, 2023
sfc-gh-pbosak
sfc-gh-pbosak previously approved these changes Aug 7, 2023
@github-actions
Copy link

Integration tests success for 814f11558b6cc258e21bbf1b28d35a5b6b731d6c

@sfc-gh-jcieslak sfc-gh-jcieslak merged commit 289ad8a into main Aug 10, 2023
9 checks passed
@sfc-gh-jcieslak sfc-gh-jcieslak deleted the migrate-schemas-to-new-sdk branch August 10, 2023 15:53
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.

None yet

4 participants