Class: DB::MariaDB::Native::Types::JSON
- Inherits:
-
Object
- Object
- DB::MariaDB::Native::Types::JSON
- Defined in:
- lib/db/mariadb/native/types.rb
Overview
A JSON type converter.
Instance Method Summary collapse
-
#name ⇒ Object
Get the SQL type name for JSON.
-
#parse(string) ⇒ Object
Parse a JSON value from the database.
Instance Method Details
#name ⇒ Object
Get the SQL type name for JSON.
175 176 177 |
# File 'lib/db/mariadb/native/types.rb', line 175 def name "JSON" end |
#parse(string) ⇒ Object
Parse a JSON value from the database.
182 183 184 |
# File 'lib/db/mariadb/native/types.rb', line 182 def parse(string) ::JSON.parse(string, symbolize_names: true) if string end |