From eb1124119693d7cc03e5e6a0ad4f92e1c94b268d Mon Sep 17 00:00:00 2001 From: Mauricio Giacomini Girardello <mauriciogiacomini4@gmail.com> Date: Mon, 17 Aug 2015 10:34:50 -0300 Subject: [PATCH] fixing country repository sintax --- app/repositories/orient_db/country_repository.rb | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) diff --git a/app/repositories/orient_db/country_repository.rb b/app/repositories/orient_db/country_repository.rb index f9434a069..7b11e80f1 100644 --- a/app/repositories/orient_db/country_repository.rb +++ b/app/repositories/orient_db/country_repository.rb @@ -1,20 +1,14 @@ module OrientDb class CountryRepository < Base - def register(attributes={}) - - end - def find_all - return @connection.query "SELECT * FROM Country LIMIT 100 OFFSET 20" + return @connection.query "SELECT * FROM Country LIMIT 100 OFFSET 20" end def find_by_id(rid) - res = @connection.query "SELECT title FROM Country WHERE @rid=##{rid}" - - res[0]["has"] = @connection.query "SELECT expand(in) from (SELECT expand(out_has) FROM Country WHERE @rid=##{rid} LIMIT 30)" - - return res[0]; + res = @connection.query "SELECT title FROM Country WHERE @rid=##{rid}" + res[0]["has"] = @connection.query "SELECT expand(in) from (SELECT expand(out_has) FROM Country WHERE @rid=##{rid} LIMIT 30)" + res[0] end end end -- GitLab