use super::expression_methods::InetOrCidr;
use crate::expression::functions::sql_function;
use crate::sql_types::*;
sql_function! {
#[cfg(feature = "postgres_backend")]
fn abbrev<T: InetOrCidr + SingleValue>(addr: T) -> Text;
}
sql_function! {
#[cfg(feature = "postgres_backend")]
fn broadcast<T: InetOrCidr + SingleValue>(addr: T) -> Inet;
}
sql_function! {
#[cfg(feature = "postgres_backend")]
fn family<T: InetOrCidr + SingleValue>(addr: T) -> Integer;
}
sql_function! {
#[cfg(feature = "postgres_backend")]
fn host<T: InetOrCidr + SingleValue>(addr: T) -> Text;
}
sql_function! {
#[cfg(feature = "postgres_backend")]
fn hostmask<T: InetOrCidr + SingleValue>(addr: T) -> Inet;
}
sql_function! {
#[cfg(feature = "postgres_backend")]
fn inet_merge<T: InetOrCidr + SingleValue, U: InetOrCidr + SingleValue>(a: T, b: U) -> Cidr;
}
sql_function! {
#[cfg(feature = "postgres_backend")]
fn inet_same_family<T: InetOrCidr + SingleValue, U: InetOrCidr + SingleValue>(a: T, b: U) -> Bool;
}
sql_function! {
#[cfg(feature = "postgres_backend")]
fn masklen<T: InetOrCidr + SingleValue>(addr: T) -> Integer;
}
sql_function! {
#[cfg(feature = "postgres_backend")]
fn netmask<T: InetOrCidr + SingleValue>(addr: T) -> Inet;
}
sql_function! {
#[cfg(feature = "postgres_backend")]
fn network<T: InetOrCidr + SingleValue>(addr: T) -> Cidr;
}
sql_function! {
#[cfg(feature = "postgres_backend")]
fn set_masklen<T: InetOrCidr + SingleValue>(addr: T, len: Integer) -> T;
}