Skip to content

Instantly share code, notes, and snippets.

@NikitaAvvakumov
Created September 27, 2017 09:11
Show Gist options
  • Save NikitaAvvakumov/63cb4cdf9f5ee51743574772b5bb783d to your computer and use it in GitHub Desktop.
Save NikitaAvvakumov/63cb4cdf9f5ee51743574772b5bb783d to your computer and use it in GitHub Desktop.
from h in Webhook, where: fragment("?->>? = ?", h.body, "title", ^"some title") # note `=` NOT `==`
from h in Webhook, where: fragment("?->>? = ?::text", h.body, "title", ^"some title") # can specify type if needed
from h in Webhook, where: fragment("?->>'title' ILIKE ?", h.body, ^"some title")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment