
support for has_list - ordered list of items
Reported by Andreas Ronge | November 17th, 2010 @ 02:33 PM | in 1.0.0.beta.21
Would be nice to have (like in 0.4.6) support for lists.
I think we can use
http://api.neo4j.org/current/org/neo4j/index/timeline/Timeline.html
API Example, without timeline index
class Person
include Neo4j::NodeMixin
has_list :tweets
end
person = Person.new
person.tweets << tweet_1 << tweet_2
person.tweets # => [tweet_1, tweet_2] in the order it was inserted
Example with timeline index
class Person
include Neo4j::NodeMixin
has_list :tweets
end
person = Person.new
person.tweets[ Time.utc(value.year, value.month, value.day).to_i ] = tweet_1 # use any fixnum as index
person.tweets[ Time.utc(value.year, value.month, value.day).to_i ] = tweet_2
person.tweets.between(5313..136136)
person.tweets #=> all tweets
Size
It should a directly calculate the size of the list without traversing all items
person.tweets.size
Comments and changes to this ticket
-
Andreas Ronge November 18th, 2010 @ 11:26 AM
- Milestone set to 1.0.0.beta.21
- Milestone order changed from 22 to 0
-
Andreas Ronge November 18th, 2010 @ 11:29 AM
- State changed from new to resolved
(from [5ae58085da7c06f3ea855c2d5143fa8016d70c93]) Implemented support for list and timeline index [#136 state:resolved]
Wrapped the Java Neo4j API: http://api.neo4j.org/current/org/neo4j/index/timeline/Timeline.html
https://github.com/andreasronge/neo4j/commit/5ae58085da7c06f3ea855c... -
Andreas Ronge January 17th, 2012 @ 09:31 AM
(from [eb9791f0fd8d83d8fa3eff633833fa7f6311e1a7]) Fixed concurrency problem in RSpec for rule_spec, removed shared state closes #136 https://github.com/andreasronge/neo4j/commit/eb9791f0fd8d83d8fa3eff...
Please Sign in or create a free account to add a new ticket.
With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.
Create your profile
Help contribute to this project by taking a few moments to create your personal profile. Create your profile ยป
Neo4j.rb is a graph database framework for JRuby.
It provides:
* Mapping of ruby objects to nodes in networks rather than in tables.
* Storage of ruby object to a file system.
* Fast traversal of relationships between nodes in a hugh node space.
* Transaction with rollbacks support.
* Indexing and quering of ruby objects.
* Integration with Rails
People watching this ticket
Referenced by
-
136 support for has_list - ordered list of items (from [5ae58085da7c06f3ea855c2d5143fa8016d70c93]) Impleme...