use crate::sql_types::*;
use diesel::sql_types::*;
define_sql_function! {
#[sql_name="ST_3DIntersects"]
fn st_3d_intersects(left: Nullable<Geometry>, right: Nullable<Geometry>) -> Nullable<Bool>;
}
define_sql_function! {
#[sql_name="ST_Contains"]
fn st_contains(left: Nullable<Geometry>, right: Nullable<Geometry>) -> Nullable<Bool>;
}
define_sql_function! {
#[sql_name="ST_ContainsProperly"]
fn st_contains_properly(left: Nullable<Geometry>, right: Nullable<Geometry>) -> Nullable<Bool>;
}
define_sql_function! {
#[sql_name="ST_CoveredBy"]
fn st_covered_by<G: GeoType>(left: Nullable<G>, right: Nullable<G>) -> Nullable<Bool>;
}
define_sql_function! {
#[sql_name="ST_Covers"]
fn st_covers<G: GeoType>(left: Nullable<G>, right: Nullable<G>) -> Nullable<Bool>;
}
define_sql_function! {
#[sql_name="ST_Crosses"]
fn st_crosses(left: Nullable<Geometry>, right: Nullable<Geometry>) -> Nullable<Bool>;
}
define_sql_function! {
#[sql_name="ST_Disjoint"]
fn st_disjoint(left: Nullable<Geometry>, right: Nullable<Geometry>) -> Nullable<Bool>;
}
define_sql_function! {
#[sql_name="ST_Equals"]
fn st_equals(left: Nullable<Geometry>, right: Nullable<Geometry>) -> Nullable<Bool>;
}
define_sql_function! {
#[sql_name="ST_Intersects"]
fn st_intersects<G: GeoType>(left: Nullable<G>, right: Nullable<G>) -> Nullable<Bool>;
}
define_sql_function! {
#[sql_name="ST_LineCrossingDirection"]
fn st_line_crossing_direction(left: Nullable<Geometry>, right: Nullable<Geometry>) -> Nullable<Integer>;
}
define_sql_function! {
#[sql_name="ST_OrderingEquals"]
fn st_ordering_equals(left: Nullable<Geometry>, right: Nullable<Geometry>) -> Nullable<Bool>;
}
define_sql_function! {
#[sql_name="ST_Overlaps"]
fn st_overlaps(left: Nullable<Geometry>, right: Nullable<Geometry>) -> Nullable<Bool>;
}
define_sql_function! {
#[sql_name="ST_Relate"]
fn st_relate_check(left: Nullable<Geometry>, right: Nullable<Geometry>, intersection_matrix_mattern: Nullable<Text>) -> Nullable<Bool>;
}
define_sql_function! {
#[sql_name="ST_Relate"]
fn st_relate(left: Nullable<Geometry>, right: Nullable<Geometry>) -> Nullable<Text>;
}
define_sql_function! {
#[sql_name="ST_Relate"]
fn st_relate_bnr(left: Nullable<Geometry>, right: Nullable<Geometry>, boundary_node_rule: Nullable<Integer>) -> Nullable<Text>;
}
define_sql_function! {
#[sql_name="ST_RelateMatch"]
fn st_relate_match(intersection_matrix: Nullable<Text>, intersection_matrix_pattern: Nullable<Text>) -> Nullable<Bool>;
}
define_sql_function! {
#[sql_name="ST_Touches"]
fn st_touches(left: Nullable<Geometry>, right: Nullable<Geometry>) -> Nullable<Bool>;
}
define_sql_function! {
#[sql_name="ST_Within"]
fn st_within(left: Nullable<Geometry>, right: Nullable<Geometry>) -> Nullable<Bool>;
}
define_sql_function! {
#[sql_name="ST_DWithin"]
fn st_d_within<G: GeoType>(left: Nullable<G>, right: Nullable<G>, distance: Nullable<Double>) -> Nullable<Bool>;
}
define_sql_function! {
#[sql_name="ST_Buffer"]
fn st_buffer<G: GeoType>(geometry: Nullable<G>, radius_of_buffer: Nullable<Double>, buffer_style_parameters: Text) -> Nullable<G>;
}
define_sql_function! {
#[sql_name="ST_Segmentize"]
fn st_segmentize<G: GeoType>(geometry: Nullable<G>, max_segment_length: Double) -> Nullable<G>;
}
define_sql_function! {
#[sql_name="ST_Subdivide"]
fn st_subdivide<G: GeoType>(geometry: Nullable<G>, max_vertices: Integer, grid_size: Float8) -> Nullable<G>;
}