diff --git a/app/repositories/orient_db/country_repository.rb b/app/repositories/orient_db/country_repository.rb index f9434a0691138e8f519312d858fdcab8795bfd98..7b11e80f1a761287d3fd10ab698c415f408062ee 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