oracle / quicksql

A library for generating DDL SQL and entity-relationship-diagrams from Quick SQL code
Universal Permissive License v1.0
53 stars 11 forks source link

QuickSQL additional VIEW configuration to accommodate Tenant_ID #74

Open pallasinfotech opened 2 weeks ago

pallasinfotech commented 2 weeks ago

To create quickly secure views for multi-tenant applications, allow a switch line

Example:

view Knowledge_articles_v Knowledge_articles /where tenant_id = SYS_CONTEXT('APEX$SESSION', 'APP_TENANT_ID');

after "/where" the user can add his portion of where statement that can be utilized in the creation of a secure view.

Use Case Multi-tenant applications require all tables to be accessed through secure views. Having where statement ready with the argument, will make the development of the script tremendously easier and accurate.