class Safrano::FunctionImport::ResultAsComplexTypeColl
Public Class Methods
type_metadata()
click to toggle source
# File lib/odata/complex_type.rb, line 103 def self.type_metadata "Collection(#{@klassmod.type_name})" end
Public Instance Methods
to_odata_json(req)
click to toggle source
# File lib/odata/complex_type.rb, line 107 def to_odata_json(req) # "#{DJ_OPEN}#{{ RESULTSK => coll.map { |c| c.odata_h } }.to_json}#{DJ_CLOSE}" template = self.class.klassmod.output_template # TODO: Error handling if database contains binary BLOB data that cant be # interpreted as UTF-8 then JSON will fail here innerh = req.service.get_coll_odata_h(array: @value, template: template) innerj = innerh.to_json "#{DJ_OPEN}#{innerj}#{DJ_CLOSE}" end