Skip to content
Snippets Groups Projects
Commit eb112411 authored by Mauricio Giacomini Girardello's avatar Mauricio Giacomini Girardello
Browse files

fixing country repository sintax

parent a070cc0c
No related branches found
No related tags found
No related merge requests found
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
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment