Class: Jabara::MySQL::Output
- Inherits:
-
Object
- Object
- Jabara::MySQL::Output
- Defined in:
- lib/jabara/mysql/output.rb
Direct Known Subclasses
Instance Method Summary collapse
- #encode(object_repr) ⇒ Object
-
#initialize ⇒ Output
constructor
A new instance of Output.
Constructor Details
#initialize ⇒ Output
Returns a new instance of Output.
7 8 |
# File 'lib/jabara/mysql/output.rb', line 7 def initialize end |
Instance Method Details
#encode(object_repr) ⇒ Object
10 11 12 13 14 15 16 17 |
# File 'lib/jabara/mysql/output.rb', line 10 def encode(object_repr) table_name = ::Jabara.object_type(object_repr) mysql_value_hash = {} ::Jabara.data(object_repr).each do |key, repr| mysql_value_hash[key] = mysql_value(repr) end build_insert_query(table_name, mysql_value_hash) end |