Sha256: 59ef77be17720175654a986b92e18a2aba3b44f82e1c248d74a4b38609ddd965
Contents?: true
Size: 1.23 KB
Versions: 1
Compression:
Stored size: 1.23 KB
Contents
module OrientDbPrivate private def translate_property_hash field, type: nil, linked_class: nil, **args type = type.presence || args[:propertyType].presence || args[:property_type] linked_class = linked_class.presence || args[:linkedClass] || args[:other_class] if type.present? if linked_class.nil? {field => {propertyType: type.to_s.upcase}} else {field => {propertyType: type.to_s.upcase, linkedClass: classname(linked_class)}} end end end # def property_uri this_classname # if block_given? # "property/#{@database}/#{this_classname}/" << yield # else # "property/#{@database}/#{this_classname}" # end # end # # def self.simple_uri *names # names.each do |name| # m_name = ("#{name.to_s}_uri").to_sym # define_method(m_name) do |&b| # if b # "#{name.to_s}/#{@database}/#{b.call}" # else # "#{name.to_s}/#{@database}" # end # branch # end # end # end # # def self.sql_uri *names # names.each do |name| # define_method(("#{name.to_s}_sql_uri").to_sym) do # "#{name.to_s}/#{@database}/sql/" # end # end # end # # simple_uri :database, :document, :class, :batch, :function # sql_uri :command, :query end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
active-orient-0.5 | lib/orientdb_private.rb |