Skip to content

Instantly share code, notes, and snippets.

@shahidhk
Last active April 26, 2022 03:29
Show Gist options
  • Select an option

  • Save shahidhk/5d02ff8ed039e68179bd0d9600495ddc to your computer and use it in GitHub Desktop.

Select an option

Save shahidhk/5d02ff8ed039e68179bd0d9600495ddc to your computer and use it in GitHub Desktop.

Revisions

  1. shahidhk revised this gist Oct 10, 2018. 1 changed file with 7 additions and 7 deletions.
    14 changes: 7 additions & 7 deletions hge_jsonb_boolean_operators.md
    Original file line number Diff line number Diff line change
    @@ -1,7 +1,7 @@
    | Operator | Postgres equivalent |
    -----------|----------------------
    | `_contains` | `@>` |
    | `_contained_in` | `<@` |
    | `_has_key` | `?` |
    | `_has_keys_any` | `?\|` |
    | `_has_keys_all` | `?&` |
    | Operator | Postgres equivalent | Description |
    -----------|---------------------|-------------|
    | `_contains` | `@>` | Does the column value contains these key-value pairs at top-level? |
    | `_contained_in` | `<@` | Is the column value contained in this JSON object at top-level? |
    | `_has_key` | `?` | Does the string exist as a top-level key within the JSON value? |
    | `_has_keys_any` | `?\|` | Do any of these array strings exist as top-level keys? |
    | `_has_keys_all` | `?&` | Do all of these array strings exist as top-level keys? |
  2. shahidhk revised this gist Oct 10, 2018. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion hge_jsonb_boolean_operators.md
    Original file line number Diff line number Diff line change
    @@ -3,5 +3,5 @@
    | `_contains` | `@>` |
    | `_contained_in` | `<@` |
    | `_has_key` | `?` |
    | `_has_keys_any` | `?|` |
    | `_has_keys_any` | `?\|` |
    | `_has_keys_all` | `?&` |
  3. shahidhk revised this gist Oct 10, 2018. 1 changed file with 2 additions and 2 deletions.
    4 changes: 2 additions & 2 deletions hge_jsonb_boolean_operators.md
    Original file line number Diff line number Diff line change
    @@ -1,7 +1,7 @@
    | Operator | Postgres equivalent |
    ----------------------------------
    -----------|----------------------
    | `_contains` | `@>` |
    | `_contained_in` | `<@` |
    | `_has_key` | `?` |
    | `_has_keys_any` | `?` |
    | `_has_keys_any` | `?|` |
    | `_has_keys_all` | `?&` |
  4. shahidhk created this gist Oct 10, 2018.
    7 changes: 7 additions & 0 deletions hge_jsonb_boolean_operators.md
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,7 @@
    | Operator | Postgres equivalent |
    ----------------------------------
    | `_contains` | `@>` |
    | `_contained_in` | `<@` |
    | `_has_key` | `?` |
    | `_has_keys_any` | `?` |
    | `_has_keys_all` | `?&` |