Skip to content

QueryBuilderJsonExtensions Class ​

Definition ​

PostgreSQL jsonb query extensions for containment, key existence, and path equality filters.

  • Namespace: JASE.Database.Postgres
  • Assembly: JASE.Database.Postgres.dll

Methods ​

NameDescription
QueryBuilder<T> WhereJsonContains(QueryBuilder<T> query, Expression<Func<T, TProp>> selector, JsonDocument json)Filters rows where the jsonb column contains the given JSON document (@&gt;).
QueryBuilder<T> WhereJsonContains(QueryBuilder<T> query, Expression<Func<T, TProp>> selector, JsonElement json)Filters rows where the jsonb column contains the given JSON document (@&gt;).
QueryBuilder<T> WhereJsonContains(QueryBuilder<T> query, Expression<Func<T, TProp>> selector, string json)Filters rows where the jsonb column contains the given JSON document (@&gt;).
QueryBuilder<T> WhereJsonHasKey(QueryBuilder<T> query, Expression<Func<T, TProp>> selector, string key)Filters rows where the jsonb column has the given top-level key (?).
QueryBuilder<T> WhereJsonPathEquals(QueryBuilder<T> query, Expression<Func<T, TProp>> selector, IReadOnlyList<string> path, string value)Filters rows where a jsonb path extracts to the given text value (-&gt;&gt; for one segment, #&gt;&gt; for nested paths).
QueryBuilder<T> WhereJsonPathEquals(QueryBuilder<T> query, Expression<Func<T, TProp>> selector, string key, string value)Filters rows where a jsonb path extracts to the given text value (-&gt;&gt; for one segment, #&gt;&gt; for nested paths).