Skip to content

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

@veeg

Description

@veeg

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions