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: Add row access policy to the SDK #2363

Merged
merged 18 commits into from
Jan 18, 2024

Conversation

sfc-gh-asawicki
Copy link
Collaborator

Add row access policy to the SDK

References

Copy link

Integration tests failure for 828955294e2152b7ee80eb9ad3d9196318749d75

@sfc-gh-asawicki sfc-gh-asawicki marked this pull request as ready for review January 17, 2024 14:02
Copy link

Integration tests failure for 828955294e2152b7ee80eb9ad3d9196318749d75

Name: "h",
Type: DataTypeVARCHAR,
}}
assertOptsValidAndSQLEquals(t, opts, "CREATE ROW ACCESS POLICY %s AS (n VARCHAR, h VARCHAR) RETURNS BOOLEAN -> true", id.FullyQualifiedName())
Copy link
Collaborator

Choose a reason for hiding this comment

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

is it possible to create a row access policy with no arguments?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Not according to the docs.

There is unit test for no args:

	t.Run("validation: [opts.args] should be set", func(t *testing.T) {
		opts := defaultOpts()
		opts.args = []CreateRowAccessPolicyArgs{}
		assertOptsInvalidJoinedErrors(t, opts, errNotSet("CreateRowAccessPolicyOptions", "args"))
	})

so we do not allow it.

Copy link

Integration tests failure for 37b08f0b1bf2a696fc8bd81e354128e044e0c562

@sfc-gh-asawicki sfc-gh-asawicki merged commit 14a3e5b into main Jan 18, 2024
7 of 8 checks passed
@sfc-gh-asawicki sfc-gh-asawicki deleted the add-row-access-policy-to-sdk branch January 18, 2024 14:55
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