Module: Parts::GenericModelMethods

Defined in:
lib/parts/generic_model_methods.rb

Instance Method Summary collapse

Instance Method Details

#partitioned?Boolean

Returns:

  • (Boolean)


5
6
7
# File 'lib/parts/generic_model_methods.rb', line 5

def partitioned?
  connection.select_values("SELECT 1 FROM pg_partitioned_table WHERE partrelid = #{connection.quote(table_name)}::regclass LIMIT 1;").any?
end