quaint icon indicating copy to clipboard operation
quaint copied to clipboard

add multiple functions & remove begins_with/ends_into

Open Weakky opened this issue 1 year ago • 1 comments

Overview

Needed for https://github.com/prisma/prisma-engines/pull/3088

BREAKING:

  • Removed begins_with, not_begins_with
  • Removed ends_into, not_ends_into
  • .like and .not_like now only renders <left> LIKE <right>. The consequence is:
    • .like should now be expressed as .like(format!("%{}%", Value::text(...))
    • .begins_with should now be expressed as .like(format!("{}%", Value::text(...))
    • .ends_into should now be expressed as .like(format!("%{}", Value::text(...))
    • .like and .not_like can now reference other columns.

New functions:

  • concat()
  • json_unquote() (Postgres & MySQL ONLY)

New comparable:

  • .json_type_not_equals() (Postgres & MySQL ONLY)
  • .all() (Postgres ONLY)
  • .any() (Postgres ONLY)

General improvements:

  • Added JsonType::ColumnRef to enable expressing json_type(col) = json_type(col)
  • Fixed JSON equality on MariaDB (used to not work properly when one side of the equality was a function returning json)

Weakky avatar Aug 01 '22 17:08 Weakky

Nice work. Don't merge this to main until we are ready to merge the matching QE work.

garrensmith avatar Aug 22 '22 05:08 garrensmith