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

select collections from context

parent d780dda1
No related branches found
No related tags found
No related merge requests found
......@@ -45,8 +45,11 @@ module OrientDb
destroy_edge "BelongsTo", object.id, object.owner.rid
end
def all(user)
query = sprintf("select * from (select expand(in('BelongsTo')) from %s) where name<>'Bookmarks'", user.rid)
##
# Select all collections in context
def all(context = Collections::PublicContext.new)
#query = sprintf("select * from (select expand(in('BelongsTo')) from %s) where name<>'Bookmarks' and privacy = '%s'", user.rid)
query = sprintf("select * from %s where name<>'Bookmarks' and privacy = '%s'", context.from, context.privacy)
build_objects connection.query(query)
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