Class: OrientDB::AR::Embedded

Inherits:
Object
  • Object
show all
Includes:
ActiveModel::AttributeMethods, DocumentMixin
Defined in:
lib/orientdb-ar/embedded.rb

Instance Attribute Summary

Attributes included from DocumentMixin

#odocument

Attributes included from Validations

#errors

Class Method Summary collapse

Instance Method Summary collapse

Methods included from DocumentMixin

#<=>, #connection, #embedded?, #field?, included, #initialize, #inspect, #method_missing, #oclass, #oclass_name, #respond_to?, #rid

Methods included from Validations

#valid?

Methods included from Conversion

#to_key, #to_model, #to_param

Methods included from Attributes

#[], #[]=, #attribute_names, #attributes, #changed, #changed?, #changed_attributes, #changes, #previous_changes, #to_orientdb

Dynamic Method Handling

This class handles dynamic methods through the method_missing method in the class OrientDB::AR::DocumentMixin

Class Method Details

.all(conditions = {}) ⇒ Object



81
82
83
# File 'lib/orientdb-ar/embedded.rb', line 81

def all(conditions = {})
  raise "Not implemented on Embedded models"
end

.clearObject



105
106
107
# File 'lib/orientdb-ar/embedded.rb', line 105

def clear
  raise "Not implemented on Embedded models"
end

.connectionObject



39
40
41
# File 'lib/orientdb-ar/embedded.rb', line 39

def connection
  OrientDB::AR::Base.connection
end

.countObject



101
102
103
# File 'lib/orientdb-ar/embedded.rb', line 101

def count
  raise "Not implemented on Embedded models"
end

.create(fields = {}) ⇒ Object



55
56
57
# File 'lib/orientdb-ar/embedded.rb', line 55

def create(fields = {})
  raise "Not implemented on Embedded models"
end

.delete(*args) ⇒ Object



93
94
95
# File 'lib/orientdb-ar/embedded.rb', line 93

def delete(*args)
  raise "Not implemented on Embedded models"
end

.descends_from_base?Boolean

Returns:

  • (Boolean)


47
48
49
# File 'lib/orientdb-ar/embedded.rb', line 47

def descends_from_base?
  superclass && superclass == OrientDB::AR::Embedded
end

.embeddable?Boolean

Returns:

  • (Boolean)


3
4
5
# File 'lib/orientdb-ar/embedded.rb', line 3

def self.embeddable?
  true
end

.first(conditions = {}) ⇒ Object



85
86
87
# File 'lib/orientdb-ar/embedded.rb', line 85

def first(conditions = {})
  raise "Not implemented on Embedded models"
end

.insert(*args) ⇒ Object



97
98
99
# File 'lib/orientdb-ar/embedded.rb', line 97

def insert(*args)
  raise "Not implemented on Embedded models"
end

.limit(max_records) ⇒ Object



73
74
75
# File 'lib/orientdb-ar/embedded.rb', line 73

def limit(max_records)
  raise "Not implemented on Embedded models"
end

.oclassObject



43
44
45
# File 'lib/orientdb-ar/embedded.rb', line 43

def oclass
  @oclass ||= connection.get_or_create_class oclass_name, fields.dup
end

.order(*args) ⇒ Object



69
70
71
# File 'lib/orientdb-ar/embedded.rb', line 69

def order(*args)
  raise "Not implemented on Embedded models"
end

.range(lower_rid, upper_rid = nil) ⇒ Object



77
78
79
# File 'lib/orientdb-ar/embedded.rb', line 77

def range(lower_rid, upper_rid = nil)
  raise "Not implemented on Embedded models"
end

.schema!Object



51
52
53
# File 'lib/orientdb-ar/embedded.rb', line 51

def schema!
  raise "Not implemented on Embedded models"
end

.select(*args) ⇒ Object Also known as: columns



59
60
61
# File 'lib/orientdb-ar/embedded.rb', line 59

def select(*args)
  raise "Not implemented on Embedded models"
end

.update(*args) ⇒ Object



89
90
91
# File 'lib/orientdb-ar/embedded.rb', line 89

def update(*args)
  raise "Not implemented on Embedded models"
end

.where(*args) ⇒ Object



65
66
67
# File 'lib/orientdb-ar/embedded.rb', line 65

def where(*args)
  raise "Not implemented on Embedded models"
end

Instance Method Details

#deleteObject



17
18
19
# File 'lib/orientdb-ar/embedded.rb', line 17

def delete
  raise "Not implemented on Embedded models"
end

#deleted?Boolean

Returns:

  • (Boolean)


29
30
31
# File 'lib/orientdb-ar/embedded.rb', line 29

def deleted?
  false
end

#persisted?Boolean

Returns:

  • (Boolean)


33
34
35
# File 'lib/orientdb-ar/embedded.rb', line 33

def persisted?
  false
end

#reloadObject



21
22
23
# File 'lib/orientdb-ar/embedded.rb', line 21

def reload
  raise "Not implemented on Embedded models"
end

#saveObject



13
14
15
# File 'lib/orientdb-ar/embedded.rb', line 13

def save
  raise "Not implemented on Embedded models"
end

#saved?Boolean

Returns:

  • (Boolean)


25
26
27
# File 'lib/orientdb-ar/embedded.rb', line 25

def saved?
  false
end