Method: CreateProcedures#json_numeric_procedure
- Defined in:
- lib/generators/post_json/install/templates/create_procedures.rb
#json_numeric_procedure ⇒ Object
14 15 16 17 18 19 20 21 |
# File 'lib/generators/post_json/install/templates/create_procedures.rb', line 14 def json_numeric_procedure "CREATE OR REPLACE FUNCTION json_numeric(key text, data json) RETURNS numeric AS $$ if (data == null) { return null; } return data[key]; $$ LANGUAGE plv8 IMMUTABLE STRICT;" end |