简体   繁体   中英

Neo4j and Rails: Query by date with neo4j.rb

I have a simple model in Rails called Shows. In my controller, if I do

@show = Show.all

it works as expected, all shows are displayed. If I want to edit an existing show and do this:

@show = Show.find(:id(params[:id]))

It finds it in the database and populates the form correctly.

If I want to present a list of only upcoming Shows, how would I do that? Every show has a property, show_date with type "Date," so the info is in there. I know I can do a range with Neo4j so I should be able to tell it to search from today's date until 20 years from now or something... but what is the query?

Beginner question here, apologies if I'm overlooking something simple.

Neo4j.rb的开发者Andreas在这里回答了我的问题: https ://groups.google.com/forum/?fromgroups=#!msg/neo4jrb/ROTZF6yobdI/CaePi-rxkGAJ

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM