Skip to content

Instantly share code, notes, and snippets.

@FCO
Created August 19, 2019 00:23
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save FCO/a18bdd8a7595ab66814f2e63a864348c to your computer and use it in GitHub Desktop.
Save FCO/a18bdd8a7595ab66814f2e63a864348c to your computer and use it in GitHub Desktop.
Being $key-word = "ust"
.say for Post.^all.grep: { .title.contains($key-word) || .body.contains($key-word) }
SELECT
post.id , post.author_id as "author-id", post.title , post.body , post.created , post.updated , post.deleted
FROM
post
WHERE
post.body like '%ust%' OR post.title like '%ust%'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment