CPC G06F 21/6218 (2013.01) [G06F 16/213 (2019.01); G06F 16/24552 (2019.01)] | 27 Claims |
1. A method comprising:
invoking, via a role of a consumer account, an operation referencing a set of shared objects stored within a database of a provider account using an imported database of the consumer account that makes the set of shared objects available within the consumer account;
updating, by a processing device, a call context of the operation to save the imported database as a current database used to resolve the operation, wherein the imported database references a share created from the database of the provider account, the share having grants to the set of shared objects, and wherein the call context comprises a role used to resolve the operation, a virtual warehouse used to resolve the operation, the current database, and a schema used to resolve the operation;
discovering one or more database level objects in a context of the share referenced by the imported database;
obtaining each role granted to the share based on the one or more database level objects;
saving each of the one or more database level objects as a class object that includes a reference to the imported database as a database from which the database level object originated;
using the reference of each of the one or more database level objects to obtain each role granted to the share;
determining whether any role granted to the share has access to any of the set of shared objects; and
executing the operation for each of the set of shared objects to which any role granted to the share has access.
|