Method: Db#grant_future_view_access
- Defined in:
- lib/service/db.rb
#grant_future_view_access(user, role, schema) ⇒ Object
77 78 79 80 81 82 |
# File 'lib/service/db.rb', line 77 def grant_future_view_access(user, role, schema) query = <<-SQL ALTER DEFAULT PRIVILEGES FOR ROLE #{role} IN SCHEMA #{schema} GRANT SELECT ON TABLES TO #{user}; SQL @connection.exec(query) end |