Electric.Replication.PostgresInterop.Casting (electric v1.1.0)
View SourceSummary
Functions
LIKE function from SQL. Case sensitive by default.
The Postgres AND operator, which has some specific behaviour when comparing NULLs with booleans.
The Postgres OR operator, which has some specific behaviour when comparing NULLs with booleans.
Functions
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
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
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