lib/database_utils.rb
Returns the class_hierachy

To fetch all Vertices:
   class_hiearchie(base_class: 'V').flatten
To fetch all Edges:
   class_hierachy(base_class: 'E').flatten
--
notice: 
To retrieve the class hierarchy from Objects avoid calling `ORD.classname (obj)`,  because it depends on class_hierarchy.


To retrieve the class hierarchy from Objects avoid calling `ORD.classname (obj)`,  because it depends on class_hierarchy.
To retrieve the class hierarchy from Objects avoid calling ` ORD . classname ( obj ) ` because it depends on class_hierarchy .
def class_hierarchy base_class: '',  system_classes: nil
    @actual_class_hash = get_classes('name', 'superClass') 
    def fv s   
  	@actual_class_hash.find_all{|x| x['superClass']== s}.map{|v| v['name']}
    end
    def fx v 
  	  fv(v.strip).map{|x| ar = fx(x); ar.empty? ? x : [x, ar]}
    end
    if system_classes.present?
	 fx base_class.to_s
    else
    	 fx( base_class.to_s ) - system_classes()  - [ ["OIdentity", ["ORole", "OUser"]]]
    end
  end
def class_hierarchy base_class : '' , system_classes : nil @actual_class_hash = get_classes ( 'name' , 'superClass' ) def fv s @actual_class_hash . find_all { | x | x [ 'superClass' ] == s } . map { | v | v [ 'name' ] } end def fx v fv ( v . strip ) . map { | x | ar = fx ( x ) ; ar . empty? ? x : [ x , ar ] } end if system_classes . present? fx base_class . to_s else fx ( base_class . to_s ) - system_classes ( ) - [ [ "OIdentity" , [ "ORole" , "OUser" ] ] ] end end
Returns the class_hierachy
To fetch all Vertices:
class_hiearchie(base_class: 'V').flatten
To fetch all Edges:
class_hierachy(base_class: 'E').flatten
Returns the class_hierachy To fetch all Vertices : class_hiearchie ( base_class : ' V ' ) . flatten To fetch all Edges : class_hierachy ( base_class : ' E ' ) . flatten
#if requery || @all_classes.blank? # :nodoc: # :nodoc:
base_class
<not_specific>
system_classes
<not_specific>