Skip to content
Snippets Groups Projects
Commit 292decd2 authored by Bruno Nocera Zanette's avatar Bruno Nocera Zanette
Browse files

Use global connection variable, instead of local

parent e2326e7f
No related branches found
No related tags found
Loading
......@@ -23,15 +23,15 @@ module OrientDb
private
def find_by_id(rid)
connection.query "SELECT FROM User WHERE @rid=#{rid}"
@connection.query "SELECT FROM User WHERE @rid=#{rid}"
end
def author_of(rid)
connection.query "SELECT expand(in) FROM (SELECT expand(out_author_of) FROM User WHERE @rid=#{rid})"
@connection.query "SELECT expand(in) FROM (SELECT expand(out_author_of) FROM User WHERE @rid=#{rid})"
end
def has(rid)
connection.query "SELECT expand(in) FROM (SELECT expand(out_has) FROM User WHERE @rid=#{rid})"
@connection.query "SELECT expand(in) FROM (SELECT expand(out_has) FROM User WHERE @rid=#{rid})"
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