Class: TableSaw::Queries::SerializeSqlInClause
- Inherits:
-
Object
- Object
- TableSaw::Queries::SerializeSqlInClause
- Defined in:
- lib/table_saw/queries/serialize_sql_in_clause.rb
Instance Attribute Summary collapse
-
#column ⇒ Object
readonly
Returns the value of attribute column.
-
#table_name ⇒ Object
readonly
Returns the value of attribute table_name.
-
#values ⇒ Object
readonly
Returns the value of attribute values.
Instance Method Summary collapse
- #call ⇒ Object
-
#initialize(table_name, column, values) ⇒ SerializeSqlInClause
constructor
A new instance of SerializeSqlInClause.
Constructor Details
#initialize(table_name, column, values) ⇒ SerializeSqlInClause
Returns a new instance of SerializeSqlInClause.
8 9 10 11 12 |
# File 'lib/table_saw/queries/serialize_sql_in_clause.rb', line 8 def initialize(table_name, column, values) @table_name = table_name @column = column @values = values end |
Instance Attribute Details
#column ⇒ Object (readonly)
Returns the value of attribute column.
6 7 8 |
# File 'lib/table_saw/queries/serialize_sql_in_clause.rb', line 6 def column @column end |
#table_name ⇒ Object (readonly)
Returns the value of attribute table_name.
6 7 8 |
# File 'lib/table_saw/queries/serialize_sql_in_clause.rb', line 6 def table_name @table_name end |
#values ⇒ Object (readonly)
Returns the value of attribute values.
6 7 8 |
# File 'lib/table_saw/queries/serialize_sql_in_clause.rb', line 6 def values @values end |
Instance Method Details
#call ⇒ Object
14 15 16 |
# File 'lib/table_saw/queries/serialize_sql_in_clause.rb', line 14 def call "#{column} in (#{serialized_values.join(', ')})" end |