Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Question: Detail the relationship with Project/Select and SchemaBound By #53

Open
veeg opened this issue Mar 28, 2019 · 0 comments
Open

Comments

@veeg
Copy link
Contributor

veeg commented Mar 28, 2019

Currently, the Project and Select traversals do not have a SchemaBound equivalent.

public static GraphTraversal<object, IDictionary<string, E2>> Project<E2>(this ITraversal traversal, string projectKey, params string[] otherProjectKeys)
{
return traversal.AsGraphTraversal<object, E2>().Project<E2>(projectKey, otherProjectKeys);
}

While the By steps, which really go hand-in-hand with the Project/Select, have SchemaBound equivalents:

public static ISchemaBoundTraversal<S, E> By<S, E>(this ISchemaBoundTraversal<S, E> traversal, IComparator comparator)
{
return traversal.AsGraphTraversal().By(comparator).AsSchemaBound();
}
/// <summary>
/// Adds the by step to this <see cref="GraphTraversal{SType, EType}"/>.
/// </summary>
public static ISchemaBoundTraversal<S, E> By<S, E>(this ISchemaBoundTraversal<S, E> traversal, IFunction function, IComparator comparator)
{
return traversal.AsGraphTraversal().By(function, comparator).AsSchemaBound();
}

Can anyone describe why we cannot have a SchemaBound Project traversal? Or is it simply an oversight/NYI?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant