# `PgRest.Parser.Select`
[🔗](https://github.com/agoodway/pgrest/blob/v0.1.0/lib/pg_rest/parser/select.ex#L1)

Parses PostgREST select parameter into an AST.

Supports field selection, embed preloading with `!inner` modifier,
embed aliasing via `alias:name(...)`, nested embeds, and empty
embeds for anti-joins.

## Examples

    iex> PgRest.Parser.Select.parse("id,name,email")
    {:ok, [%{type: :field, name: "id"}, %{type: :field, name: "name"}, %{type: :field, name: "email"}]}

    iex> PgRest.Parser.Select.parse("id,posts(id,title)")
    {:ok, [%{type: :field, name: "id"}, %{type: :embed, name: "posts", fields: ["id", "title"], inner: false}]}

# `parse`

```elixir
@spec parse(String.t()) :: {:ok, [map()]}
```

Parses a select parameter string into a list of field and embed AST nodes.

---

*Consult [api-reference.md](api-reference.md) for complete listing*
