Sha256: 5a023274399cd6e047b0b98261dda178e8c573076f8b1636262da1d8e64658be

Contents?: true

Size: 867 Bytes

Versions: 2

Compression:

Stored size: 867 Bytes

Contents

# Specs

Some code which might define the future interface of the gem.
    
    # Finding records
    Instrument.all
    Instrument.find_by_name("Piano")
    Instrument.find_by_name("Klavier", :de)
    Instrument.find_by_cypher("start cat=(123) match (cat)--(x) return x limit 2")
    
    # Filter associations by relationship type (:incoming, :outgoing, :all)
    instrument.links(:outgoing)
    
    # Query by model or type
    @user.links(:all, Fanship, 'studies')
    
    # Create a custom relationship
    relationship = Architect4r::Model::Relationship.create(start_node, end_note, 'CustomType', { :active => true })
    # or
    instrument.links(:incoming).create(:category, @other_node, { :created_at => DateTime.new, :active => true })
    instrument.links(:incoming).create(CategoryRelation, @other_node, { :created_at => DateTime.new, :active => true })

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
architect4r-0.3.3.1 Specs.md
architect4r-0.3.2 Specs.md