Class: PgPartitions::SQL::Partition
- Inherits:
-
Struct
- Object
- Struct
- PgPartitions::SQL::Partition
- Defined in:
- lib/pg_partitions/sql.rb
Instance Attribute Summary collapse
-
#check ⇒ Object
Returns the value of attribute check.
-
#table ⇒ Object
Returns the value of attribute table.
Instance Method Summary collapse
Instance Attribute Details
#check ⇒ Object
Returns the value of attribute check
3 4 5 |
# File 'lib/pg_partitions/sql.rb', line 3 def check @check end |
#table ⇒ Object
Returns the value of attribute table
3 4 5 |
# File 'lib/pg_partitions/sql.rb', line 3 def table @table end |
Instance Method Details
#to_sql ⇒ Object
4 5 6 |
# File 'lib/pg_partitions/sql.rb', line 4 def to_sql "(LIKE #{table} INCLUDING ALL, CHECK (#{check})) INHERITS (#{table})" end |