Skip to content

Commit

Permalink
select of type
Browse files Browse the repository at this point in the history
  • Loading branch information
Quin Lynch committed Apr 26, 2024
1 parent b34429c commit 27ef99c
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/EdgeDB.Net.QueryBuilder/Interfaces/IQueryBuilder.cs
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,15 @@ public interface IQueryBuilder<TType, TContext> :
/// </returns>
ISelectQuery<TType, TContext> Select();

/// <summary>
/// Adds a <c>SELECT</c> statement selecting <typeparamref name="TResult"/> with an
/// autogenerated shape.
/// </summary>
/// <returns>
/// A <see cref="ISelectQuery{TResult, TContext}"/>.
/// </returns>
ISelectQuery<TResult, TContext> Select<TResult>();

/// <summary>
/// Adds a <c>SELECT</c> statement selecting the provided expression.
/// </summary>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,13 @@ public ISelectQuery<TType, TContext> Select()
return this;
}

/// <inheritdoc/>
public ISelectQuery<TResult, TContext> Select<TResult>()
{
AddNode<SelectNode>(new SelectContext(typeof(TResult)));
return EnterNewType<TResult>();
}

/// <inheritdoc/>
public ISelectQuery<TResult, TContext> Select<TResult>(Action<ShapeBuilder<TResult>> shape)
{
Expand Down

0 comments on commit 27ef99c

Please sign in to comment.