inthefabric / Weaver

A fluent, strongly-typed Gremlin script generator (for .NET/C#).
www.inthefabric.com
Other
12 stars 0 forks source link

ToQueryAsVar Shortcut #7

Closed zachkinstner closed 11 years ago

zachkinstner commented 11 years ago

Currently, you have to do this to store a query result to a variable:

IWeaverVarAlias<User> u;

IWeaverQuery userQ = Weave.Inst.Graph
    .V.ExactIndex<User>(x => x.ArtifactId, pUserId)
    .ToQuery();

userQ = WeaverQuery.StoreResultAsVar("u", userQ, out u);

But this would be nicer, right?

IWeaverVarAlias<User> u;

IWeaverQuery userQ = Weave.Inst.Graph
    .V.ExactIndex<User>(x => x.ArtifactId, pUserId)
    .ToQueryAsVar("u", out u);