Ecto.Query.API.like

You're seeing just the function like, go back to Ecto.Query.API module for more information.

Searches for search in string.

from p in Post, where: like(p.body, "Chapter%")

Translates to the underlying SQL LIKE query, therefore its behaviour is dependent on the database. In particular, PostgreSQL will do a case-sensitive operation, while the majority of other databases will be case-insensitive. For performing a case-insensitive like in PostgreSQL, see ilike/2.

You should be very careful when allowing user sent data to be used as part of LIKE query, since they allow to perform LIKE-injections.