# `Electric.Replication.PostgresInterop.Casting`
[🔗](https://github.com/electric-sql/electric/tree/%40core/sync-service%401.6.2/packages/sync-service/lib/electric/replication/postgres_interop/casting.ex#L1)

# `ilike?`

# `is_pg_int2`
*macro* 

# `is_pg_int4`
*macro* 

# `is_pg_int8`
*macro* 

# `like?`

LIKE function from SQL. Case sensitive by default.

## Examples

    iex> like?("hello", "hell_")
    true

    iex> like?("helloo", "hell_")
    false

    iex> like?("helloo", "%o_")
    true

    iex> like?("HELLO", "hello")
    false

    iex> like?("HELLO", "hello", true)
    true

# `parse_bool`

# `parse_date`

# `parse_float8`

# `parse_int2`

# `parse_int4`

# `parse_int8`

# `parse_time`

# `parse_timestamp`

# `parse_timestamptz`

# `parse_uuid`

# `pg_and`

```elixir
@spec pg_and(boolean() | nil, boolean() | nil) :: boolean() | nil
```

The Postgres AND operator, which has some specific behaviour when
comparing NULLs with booleans.

## Examples

    iex> pg_and(true, true)
    true

    iex> pg_and(true, false)
    false

    iex> pg_and(false, false)
    false

    iex> pg_and(nil, true)
    nil

    iex> pg_and(nil, false)
    false

    iex> pg_and(nil, nil)
    nil

# `pg_or`

```elixir
@spec pg_or(boolean() | nil, boolean() | nil) :: boolean() | nil
```

The Postgres OR operator, which has some specific behaviour when
comparing NULLs with booleans.

## Examples

    iex> pg_or(true, false)
    true

    iex> pg_or(false, false)
    false

    iex> pg_or(nil, true)
    true

    iex> pg_or(nil, false)
    nil

    iex> pg_or(nil, nil)
    nil

# `values_distinct?`

# `values_not_distinct?`

---

*Consult [api-reference.md](api-reference.md) for complete listing*
