Skip to content

Commit

Permalink
Rename HasCopyGrants method.
Browse files Browse the repository at this point in the history
  • Loading branch information
sfc-gh-ngaberel committed Mar 30, 2023
1 parent cb28fd6 commit b5d0264
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion pkg/resources/view.go
Original file line number Diff line number Diff line change
Expand Up @@ -235,7 +235,7 @@ func ReadView(d *schema.ResourceData, meta interface{}) error {
if err = d.Set("is_secure", v.IsSecure); err != nil {
return err
}
if err = d.Set("copy_grants", v.CopyGrants()); err != nil {
if err = d.Set("copy_grants", v.HasCopyGrants()); err != nil {
return err
}
if err = d.Set("comment", v.Comment.String); err != nil {
Expand Down
2 changes: 1 addition & 1 deletion pkg/snowflake/view.go
Original file line number Diff line number Diff line change
Expand Up @@ -254,6 +254,6 @@ func ListViews(databaseName string, schemaName string, db *sql.DB) ([]View, erro
return dbs, nil
}

func (v *View) CopyGrants() bool {
func (v *View) HasCopyGrants() bool {
return strings.Contains(v.Text.String, " COPY GRANTS ")
}

0 comments on commit b5d0264

Please sign in to comment.