# `MnemosynePostgres.Queries.NodeQueries`
[🔗](https://github.com/edlontech/mnemosyne_postgres/blob/main/lib/mnemosyne_postgres/queries/node_queries.ex#L1)

Ecto query builders for the nodes table.

# `base`

```elixir
@spec base(map()) :: Ecto.Query.t()
```

Base query scoped to the current tenant.

# `by_ids`

```elixir
@spec by_ids(Ecto.Query.t(), [String.t()]) :: Ecto.Query.t()
```

Filters the query to only include nodes with the given IDs.

# `by_types`

```elixir
@spec by_types(Ecto.Query.t(), [atom()]) :: Ecto.Query.t()
```

Filters the query to only include nodes of the given types.

# `scoped`

```elixir
@spec scoped(map()) :: Ecto.Query.t()
```

Base query scoped to the current tenant and repo.

# `source`

```elixir
@spec source(map()) :: {String.t(), module()}
```

Returns the `{table_name, schema}` source tuple for the nodes table.

# `vector_search`

```elixir
@spec vector_search(map(), atom(), pgvector(), non_neg_integer()) :: Ecto.Query.t()
```

Returns nodes ordered by cosine distance to the query embedding.

---

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