-
Notifications
You must be signed in to change notification settings - Fork 5
Changlog after Gem 0.79
topofocus edited this page Jul 24, 2019
·
23 revisions
- OrientQuery: Arguments can be chained
- OrientQuery: (Match-Syntax) methods connect and statement return an OrientQuery-Object instead of a Matchstatement.
- Delete: Class#delete, Vertex#delete removed any record when called without a condition. Now:
all: trueis required
SomeClass.delete all: true # leads to an empty class- Edge.create: To put attributes (properties) to the edge, the keyword »set« is used. We are following the syntax of OrientDB#CreateEdge. As for Vertex#Create, the keyword :set is optional.
- ORD.create_vertex, ORD.create_edge (file: class_utils.rb):: removed in favor of Vertex.create and Edge.create
- ActiveOrient::Model Objects respond to
to_human, which is alias byto_s - Vertex.edges selects adjacent edges by /pattern/ or by EDGE_CLASS. If a pattern is used, inheritance is respected. If a EDGE_CLASS is used, only edges of this particular class are selected.
- Multiple connections supported
- ORD.delete_class now correctly removes the database- and ruby-class
- OrientQuery: Support for NULL values in queries:
G.count( where: { abc: [nil] } ) # Array with nil element is translated into 'is NULL'
G.update( set: {abc: nil} , where: 'something > 0' ) # Hash with nil-value translates to '= NULL'- Model.update!: the count of affected records is returned. (Where statement is not required) Document.update: The updated record is returned (unchanged) Model.update: A list of updated records is returned. (Where statement is required)
- Monkey-Patching: Added »to_or« to any Object. The method aims the low level representation of the objects to the database. Its purpose: include any ruby-Object in a raw database query.
"#56:0".expand.update{ "set karo = #{ass.to_or} " }
# fires » update #56:0 set karo = [ 3,4,5 ] return after $this « - Unified initialization of queries through Model.query and Record.query. The queries are prebuild and then transmitted via
.execute. notice This breaks the previous coding ofRecord.query( some query-code). It has to be changed
#old
some_record.query( OrientSupport::OrientQuery.new( where:{ a:56 }) )
# to
some_record.query( where: { a:56 } ).execute
# or
some_record.query.where( a:56 ).executeOverview
Data Management
- Joining Tables, embedded Lists
- Links and Link Lists
- Relations
- Bidirectional Connections
- Working with Hashes
Public API
- Database
- Model CRUD
Misc