Sha256: 2b7860e9c1647d38bee1bf7669460eac4af1d37a53bf6e4423f1ec4da1f2feda

Contents?: true

Size: 877 Bytes

Versions: 2

Compression:

Stored size: 877 Bytes

Contents

require_relative "../lib/active-orient.rb"

ActiveOrient::OrientDB.default_server = { user: 'root', password: 'tretretre' }
r = ActiveOrient::OrientDB.new database: 'NewTest'

doc1 = r.open_class "DocumentTest" # Create Document/Vertex/Edge class
doc2 = r.open_class "DocumentArrive_Test"
doc1.create_property :familyname, type: :string
doc1.create_property :family, type: :linkset, other_class: "DocumentTest"

a1 = doc1.create name: "DocA", value: 34
a2 = doc1.create name: "DocB", value: 34
a3 = doc1.create name: "DocC", value: 34
a4 = doc1.create name: "DocD", value: 30
doc1.create name: "DocE", value: 30
doc1.create name: "DocF", value: 30

print "#{a1.ciao} \n"
a1.family = [a2, a3]
print "#{a1["family"].name} \n"
print "---> #{a1.family.class}\n"
a1["family"] << a4
print "#{a1.family.name} \n"


# ActiveOrient::OrientDB.methods.each do |m|
# print "#{m} \n"
# end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
active-orient-0.6 examples/test_commands_4.rb
active-orient-0.5 examples/test_commands_4.rb