Module: PgRls::Schema::Solo::Statements

Includes:
UpStatements, PgRls::Schema::Statements
Defined in:
lib/pg_rls/schema/solo/statements.rb

Overview

Schema Solo Statements

Instance Method Summary collapse

Methods included from UpStatements

#append_blocking_function, #create_rls_blocking_function, #create_rls_setter_function, #create_rls_solo_tenant_table, #create_rls_user, #setup_rls_tenant_table

Methods included from PgRls::Schema::Statements

#convert_to_rls_table, #convert_to_rls_tenant_table, #create_rls_tenant_table, #drop_rls_table, #drop_rls_tenant_table, #revert_rls_table, #revert_rls_tenant_table

Methods included from DownStatements

#detach_blocking_function, #detach_trigger_function, #drop_rls_blocking_function, #drop_rls_column, #drop_rls_policy, #drop_rls_setter_function, #drop_rls_user

Methods included from UpStatements

#add_rls_column, #add_rls_column_to_tenant_table, #append_blocking_function, #append_trigger_function, #create_rls_blocking_function, #create_rls_policy, #create_rls_setter_function, #create_rls_user

Instance Method Details

#create_rls_table(table_name, **options) ⇒ Object



14
15
16
17
18
19
20
# File 'lib/pg_rls/schema/solo/statements.rb', line 14

def create_rls_table(table_name, **options, &)
  setup_rls_tenant_table
  create_table(table_name, **options, &)
  add_rls_column(table_name)
  create_rls_policy(table_name)
  append_trigger_function(table_name)
end