module Safrano::EntityClassSinglePK

special handling for single key

Public Instance Methods

parse_odata_key(rawid) click to toggle source
# File lib/odata/model_ext.rb, line 654
def parse_odata_key(rawid)
  if (md = @iuk_rgx.match(rawid))
    if (@pk_cast_from_string)
      Contract.valid(@pk_cast_from_string.call(md[1]))
    else
      Contract.valid(md[1]) # no cast needed, eg for string
    end
  else
    Contract::NOK
  end
rescue StandardError => e
  RubyStandardErrorException.new(e)
end
pk_lookup_expr(id) click to toggle source
# File lib/odata/model_ext.rb, line 668
def pk_lookup_expr(id)
  id
end