drizzle-postgis
Advanced tools
Comparing version 1.1.0 to 1.1.1
@@ -1,617 +0,8 @@ | ||
import * as drizzle_orm_pg_core from 'drizzle-orm/pg-core'; | ||
export { m as models } from './models-D1Fhi8Ss.js'; | ||
export { f as functions } from './functions-BoOq1rNT.js'; | ||
export { o as operators } from './operators-C_pDKrZ4.js'; | ||
import * as drizzle_orm from 'drizzle-orm'; | ||
import { SQLWrapper, SQL, BinaryOperator } from 'drizzle-orm'; | ||
export { B as BBox, b as Box2D, F as Feature, m as FeatureCollection, d as GeoJSON, G as GeoJsonGeometryTypes, c as GeoJsonObject, l as GeoJsonProperties, a as GeoJsonTypes, e as Geometry, k as GeometryCollection, f as GeometryObject, L as LineString, h as MultiLineString, M as MultiPoint, j as MultiPolygon, g as Point, i as Polygon, P as Position } from './geojsonTypes-CQTm8Syk.js'; | ||
import 'drizzle-orm/pg-core'; | ||
/** | ||
* The valid values for the "type" property of GeoJSON geometry objects. | ||
* https://tools.ietf.org/html/rfc7946#section-1.4 | ||
*/ | ||
type GeoJsonGeometryTypes = Geometry["type"]; | ||
/** | ||
* The value values for the "type" property of GeoJSON Objects. | ||
* https://tools.ietf.org/html/rfc7946#section-1.4 | ||
*/ | ||
type GeoJsonTypes = GeoJSON["type"]; | ||
/** | ||
* Bounding box | ||
* https://tools.ietf.org/html/rfc7946#section-5 | ||
*/ | ||
type BBox = [west: number, south: number, east: number, north: number] | [number, number, number, number, number, number]; | ||
/** | ||
* Alias for Bounding box | ||
* https://tools.ietf.org/html/rfc7946#section-5 | ||
*/ | ||
type Box2D = BBox; | ||
/** | ||
* A Position is an array of coordinates. | ||
* https://tools.ietf.org/html/rfc7946#section-3.1.1 | ||
* Array should contain between two and three elements. | ||
* The previous GeoJSON specification allowed more elements (e.g., which could be used to represent M values), | ||
* but the current specification only allows X, Y, and (optionally) Z to be defined. | ||
*/ | ||
type Position = number[]; | ||
/** | ||
* The base GeoJSON object. | ||
* https://tools.ietf.org/html/rfc7946#section-3 | ||
* The GeoJSON specification also allows foreign members | ||
* (https://tools.ietf.org/html/rfc7946#section-6.1) | ||
* Developers should use "&" type in TypeScript or extend the interface | ||
* to add these foreign members. | ||
*/ | ||
interface GeoJsonObject { | ||
/** | ||
* Specifies the type of GeoJSON object. | ||
*/ | ||
type: GeoJsonTypes; | ||
/** | ||
* Bounding box of the coordinate range of the object's Geometries, Features, or Feature Collections. | ||
* The value of the bbox member is an array of length 2*n where n is the number of dimensions | ||
* represented in the contained geometries, with all axes of the most southwesterly point | ||
* followed by all axes of the more northeasterly point. | ||
* The axes order of a bbox follows the axes order of geometries. | ||
* https://tools.ietf.org/html/rfc7946#section-5 | ||
*/ | ||
bbox?: BBox | undefined; | ||
} | ||
/** | ||
* Union of GeoJSON objects. | ||
*/ | ||
type GeoJSON = Geometry | Feature | FeatureCollection; | ||
/** | ||
* Geometry object. | ||
* https://tools.ietf.org/html/rfc7946#section-3 | ||
*/ | ||
type Geometry = Point | MultiPoint | LineString | MultiLineString | Polygon | MultiPolygon | GeometryCollection; | ||
type GeometryObject = Geometry; | ||
/** | ||
* Point geometry object. | ||
* https://tools.ietf.org/html/rfc7946#section-3.1.2 | ||
*/ | ||
interface Point extends GeoJsonObject { | ||
type: "Point"; | ||
coordinates: Position; | ||
} | ||
/** | ||
* MultiPoint geometry object. | ||
* https://tools.ietf.org/html/rfc7946#section-3.1.3 | ||
*/ | ||
interface MultiPoint extends GeoJsonObject { | ||
type: "MultiPoint"; | ||
coordinates: Position[]; | ||
} | ||
/** | ||
* LineString geometry object. | ||
* https://tools.ietf.org/html/rfc7946#section-3.1.4 | ||
*/ | ||
interface LineString extends GeoJsonObject { | ||
type: "LineString"; | ||
coordinates: Position[]; | ||
} | ||
/** | ||
* MultiLineString geometry object. | ||
* https://tools.ietf.org/html/rfc7946#section-3.1.5 | ||
*/ | ||
interface MultiLineString extends GeoJsonObject { | ||
type: "MultiLineString"; | ||
coordinates: Position[][]; | ||
} | ||
/** | ||
* Polygon geometry object. | ||
* https://tools.ietf.org/html/rfc7946#section-3.1.6 | ||
*/ | ||
interface Polygon extends GeoJsonObject { | ||
type: "Polygon"; | ||
coordinates: Position[][]; | ||
} | ||
/** | ||
* MultiPolygon geometry object. | ||
* https://tools.ietf.org/html/rfc7946#section-3.1.7 | ||
*/ | ||
interface MultiPolygon extends GeoJsonObject { | ||
type: "MultiPolygon"; | ||
coordinates: Position[][][]; | ||
} | ||
/** | ||
* Geometry Collection | ||
* https://tools.ietf.org/html/rfc7946#section-3.1.8 | ||
*/ | ||
interface GeometryCollection<G extends Geometry = Geometry> extends GeoJsonObject { | ||
type: "GeometryCollection"; | ||
geometries: G[]; | ||
} | ||
type GeoJsonProperties = { | ||
[name: string]: unknown; | ||
} | null; | ||
/** | ||
* A feature object which contains a geometry and associated properties. | ||
* https://tools.ietf.org/html/rfc7946#section-3.2 | ||
*/ | ||
interface Feature<G extends Geometry | null = Geometry, P = GeoJsonProperties> extends GeoJsonObject { | ||
type: "Feature"; | ||
/** | ||
* The feature's geometry | ||
*/ | ||
geometry: G; | ||
/** | ||
* A value that uniquely identifies this feature in a | ||
* https://tools.ietf.org/html/rfc7946#section-3.2. | ||
*/ | ||
id?: string | number | undefined; | ||
/** | ||
* Properties associated with this feature. | ||
*/ | ||
properties: P; | ||
} | ||
/** | ||
* A collection of feature objects. | ||
* https://tools.ietf.org/html/rfc7946#section-3.3 | ||
*/ | ||
interface FeatureCollection<G extends Geometry | null = Geometry, P = GeoJsonProperties> extends GeoJsonObject { | ||
type: "FeatureCollection"; | ||
features: Array<Feature<G, P>>; | ||
} | ||
type BaseGeometryType = "Point" | "MultiPoint" | "LineString" | "MultiLineString" | "Polygon" | "MultiPolygon" | "GeometryCollection"; | ||
type GeometryType = BaseGeometryType | `${BaseGeometryType}Z`; | ||
type GeometryOptions = { | ||
type?: GeometryType; | ||
srid?: never; | ||
is3D?: boolean; | ||
} | { | ||
type: GeometryType; | ||
srid: number; | ||
is3D?: boolean; | ||
}; | ||
type GeometrySubtypeOptions = { | ||
srid?: number; | ||
is3D?: boolean; | ||
}; | ||
/** Internal function used for mapping Drizzle results | ||
* @internal | ||
*/ | ||
declare function fromDriver<T extends Geometry>(value: string): T; | ||
/** Internal function used for mapping Drizzle results | ||
* @internal | ||
*/ | ||
declare function box2DfromDriver(value: string): BBox; | ||
/** box2d is a spatial data type used to represent the two-dimensional bounding box enclosing a geometry or collection of geometries. | ||
* | ||
* The representation contains the values xmin, ymin, xmax, ymax. These are the minimum and maximum values of the X and Y extents. | ||
* @example `POINT (1 2)` | ||
* | ||
* @link https://postgis.net/docs/box2d_type.html | ||
*/ | ||
declare const box2D: <TName extends string>(dbName: TName, fieldConfig?: unknown) => drizzle_orm_pg_core.PgCustomColumnBuilder<{ | ||
name: TName; | ||
dataType: "custom"; | ||
columnType: "PgCustomColumn"; | ||
data: BBox; | ||
driverParam: string; | ||
enumValues: undefined; | ||
}>; | ||
/** Geometry is a fundamental PostGIS spatial data type used to represent a feature in planar (Euclidean) coordinate systems. | ||
* | ||
* Geometry is an abstract type. Geometry values belong to one of its concrete subtypes which represent various kinds and dimensions of geometric shapes. | ||
* These include the atomic types Point, LineString, and Polygon, | ||
* and the collection types MultiPoint, MultiLineString, MultiPolygon and GeometryCollection. | ||
* | ||
* @link https://postgis.net/docs/geometry.html | ||
* @link https://postgis.net/docs/using_postgis_dbmanagement.html#OGC_Geometry | ||
*/ | ||
declare const geometry: <TName extends string>(dbName: TName, fieldConfig?: GeometryOptions | undefined) => drizzle_orm_pg_core.PgCustomColumnBuilder<{ | ||
name: TName; | ||
dataType: "custom"; | ||
columnType: "PgCustomColumn"; | ||
data: Geometry; | ||
driverParam: string; | ||
enumValues: undefined; | ||
}>; | ||
/** A Point is a 0-dimensional geometry that represents a single location in coordinate space. | ||
* | ||
* @example `POINT (1 2)` | ||
* | ||
* @link https://postgis.net/docs/using_postgis_dbmanagement.html#Point | ||
*/ | ||
declare const point: <TName extends string>(dbName: TName, fieldConfig?: GeometrySubtypeOptions | undefined) => drizzle_orm_pg_core.PgCustomColumnBuilder<{ | ||
name: TName; | ||
dataType: "custom"; | ||
columnType: "PgCustomColumn"; | ||
data: Point; | ||
driverParam: string; | ||
enumValues: undefined; | ||
}>; | ||
/** A MultiPoint is a collection of Points. | ||
* | ||
* @example `MULTIPOINT ( (0 0), (1 2) )` | ||
* | ||
* @link https://postgis.net/docs/using_postgis_dbmanagement.html#MultiPoint | ||
*/ | ||
declare const multiPoint: <TName extends string>(dbName: TName, fieldConfig?: GeometrySubtypeOptions | undefined) => drizzle_orm_pg_core.PgCustomColumnBuilder<{ | ||
name: TName; | ||
dataType: "custom"; | ||
columnType: "PgCustomColumn"; | ||
data: MultiPoint; | ||
driverParam: string; | ||
enumValues: undefined; | ||
}>; | ||
/** A LineString is a 1-dimensional line formed by a contiguous sequence of line segments. | ||
* | ||
* Each line segment is defined by two points, with the end point of one segment forming the start point of the next segment. | ||
* An OGC-valid LineString has either zero or two or more points, but PostGIS also allows single-point LineStrings. | ||
* LineStrings may cross themselves (self-intersect). A LineString is closed if the start and end points are the same. | ||
* A LineString is simple if it does not self-intersect. | ||
* | ||
* @example `LINESTRING (1 2, 3 4, 5 6)` | ||
* | ||
* @link https://postgis.net/docs/using_postgis_dbmanagement.html#LineString | ||
*/ | ||
declare const lineString: <TName extends string>(dbName: TName, fieldConfig?: GeometrySubtypeOptions | undefined) => drizzle_orm_pg_core.PgCustomColumnBuilder<{ | ||
name: TName; | ||
dataType: "custom"; | ||
columnType: "PgCustomColumn"; | ||
data: LineString; | ||
driverParam: string; | ||
enumValues: undefined; | ||
}>; | ||
/** A MultiLineString is a collection of LineStrings. | ||
* | ||
* A MultiLineString is closed if each of its elements is closed. | ||
* | ||
* @example `MULTILINESTRING ( (0 0,1 1,1 2), (2 3,3 2,5 4) )` | ||
* | ||
* @link https://postgis.net/docs/using_postgis_dbmanagement.html#MultiLineString | ||
*/ | ||
declare const multiLineString: <TName extends string>(dbName: TName, fieldConfig?: GeometrySubtypeOptions | undefined) => drizzle_orm_pg_core.PgCustomColumnBuilder<{ | ||
name: TName; | ||
dataType: "custom"; | ||
columnType: "PgCustomColumn"; | ||
data: MultiLineString; | ||
driverParam: string; | ||
enumValues: undefined; | ||
}>; | ||
/** A Polygon is a 2-dimensional planar region, delimited by an exterior boundary (the shell) and zero or more interior boundaries (holes). | ||
* | ||
* Each boundary is a LinearRing. A LinearRing is a LineString which is both closed and simple. | ||
* The first and last points must be equal, and the line must not self-intersect. | ||
* | ||
* @example `POLYGON ((0 0 0,4 0 0,4 4 0,0 4 0,0 0 0),(1 1 0,2 1 0,2 2 0,1 2 0,1 1 0))` | ||
* | ||
* @link https://postgis.net/docs/using_postgis_dbmanagement.html#Polygon | ||
*/ | ||
declare const polygon: <TName extends string>(dbName: TName, fieldConfig?: GeometrySubtypeOptions | undefined) => drizzle_orm_pg_core.PgCustomColumnBuilder<{ | ||
name: TName; | ||
dataType: "custom"; | ||
columnType: "PgCustomColumn"; | ||
data: Polygon; | ||
driverParam: string; | ||
enumValues: undefined; | ||
}>; | ||
/** | ||
* A MultiPolygon is a collection of non-overlapping, non-adjacent Polygons. | ||
* | ||
* Polygons in the collection may touch only at a finite number of points. | ||
* | ||
* @example `MULTIPOLYGON (((1 5, 5 5, 5 1, 1 1, 1 5)), ((6 5, 9 1, 6 1, 6 5)))` | ||
* | ||
* @link https://postgis.net/docs/using_postgis_dbmanagement.html#MultiPolygon | ||
*/ | ||
declare const multiPolygon: <TName extends string>(dbName: TName, fieldConfig?: GeometrySubtypeOptions | undefined) => drizzle_orm_pg_core.PgCustomColumnBuilder<{ | ||
name: TName; | ||
dataType: "custom"; | ||
columnType: "PgCustomColumn"; | ||
data: MultiPolygon; | ||
driverParam: string; | ||
enumValues: undefined; | ||
}>; | ||
/** A GeometryCollection is a heterogeneous (mixed) collection of geometries. | ||
* | ||
* @example `GEOMETRYCOLLECTION ( POINT(2 3), LINESTRING(2 3, 3 4))` | ||
* | ||
* @link https://postgis.net/docs/using_postgis_dbmanagement.html#GeometryCollection | ||
*/ | ||
declare const geometryCollection: <TName extends string>(dbName: TName, fieldConfig?: Omit<GeometrySubtypeOptions, "dimensions"> | undefined) => drizzle_orm_pg_core.PgCustomColumnBuilder<{ | ||
name: TName; | ||
dataType: "custom"; | ||
columnType: "PgCustomColumn"; | ||
data: GeometryCollection<Geometry>; | ||
driverParam: string; | ||
enumValues: undefined; | ||
}>; | ||
type models_BaseGeometryType = BaseGeometryType; | ||
type models_GeometryOptions = GeometryOptions; | ||
type models_GeometrySubtypeOptions = GeometrySubtypeOptions; | ||
type models_GeometryType = GeometryType; | ||
declare const models_box2D: typeof box2D; | ||
declare const models_box2DfromDriver: typeof box2DfromDriver; | ||
declare const models_fromDriver: typeof fromDriver; | ||
declare const models_geometry: typeof geometry; | ||
declare const models_geometryCollection: typeof geometryCollection; | ||
declare const models_lineString: typeof lineString; | ||
declare const models_multiLineString: typeof multiLineString; | ||
declare const models_multiPoint: typeof multiPoint; | ||
declare const models_multiPolygon: typeof multiPolygon; | ||
declare const models_point: typeof point; | ||
declare const models_polygon: typeof polygon; | ||
declare namespace models { | ||
export { type models_BaseGeometryType as BaseGeometryType, type models_GeometryOptions as GeometryOptions, type models_GeometrySubtypeOptions as GeometrySubtypeOptions, type models_GeometryType as GeometryType, models_box2D as box2D, models_box2DfromDriver as box2DfromDriver, models_fromDriver as fromDriver, models_geometry as geometry, models_geometryCollection as geometryCollection, models_lineString as lineString, models_multiLineString as multiLineString, models_multiPoint as multiPoint, models_multiPolygon as multiPolygon, models_point as point, models_polygon as polygon }; | ||
} | ||
/** | ||
* @packageDocumentation | ||
* | ||
* @groupDescription Measurement Functions | ||
* These functions compute measurements of distance, area and angles. | ||
* There are also functions to compute geometry values determined by measurements. | ||
* {@link https://postgis.net/docs/reference.html#Measurement_Functions} | ||
* | ||
* @groupDescription Geometry Inputs | ||
* These functions create geometry objects from various textual or binary formats. | ||
* {@link https://postgis.net/docs/reference.html#Geometry_Inputs} | ||
* | ||
* @groupDescription Geometry Outputs | ||
* These functions convert geometry objects into various textual or binary formats. | ||
* {@link https://postgis.net/docs/reference.html#Geometry_Inputs} | ||
* | ||
* @groupDescription Geometry Validation | ||
* These functions test whether geometries are valid according to the OGC SFS standard. | ||
* They also provide information about the nature and location of invalidity. | ||
* {@link https://postgis.net/docs/reference.html#Geometry_Validation} | ||
* | ||
* @groupDescription Geometry Accessors | ||
* These functions return information about properties of specific geometry objects. | ||
* {@link https://postgis.net/docs/reference.html#Geometry_Accessors} | ||
*/ | ||
/** Returns the area of a polygonal geometry. | ||
* | ||
* For geometry types a 2D Cartesian (planar) area is computed, with units specified by the SRID. | ||
* For geography types by default area is determined on a spheroid with units in square meters. | ||
* | ||
* @group Measurement Functions | ||
* @link https://postgis.net/docs/ST_Area.html | ||
*/ | ||
declare function area(expression: SQLWrapper): SQL<number>; | ||
/** Returns the 2-dimensional point on geom1 that is closest to geom2. | ||
* | ||
* This is the first point of the shortest line between the geometries (as computed by ST_ShortestLine). | ||
* | ||
* @group Measurement Functions | ||
* @link https://postgis.net/docs/ST_ClosestPoint.html | ||
*/ | ||
declare function closestPoint(geom1: SQLWrapper, geom2: SQLWrapper): SQL<Point>; | ||
/** Constructs a PostGIS ST_Geometry object from the OGC Well-Known text representation. | ||
* | ||
* Inverse of {@link asText} | ||
* | ||
* @group Geometry Inputs | ||
* @link https://postgis.net/docs/ST_GeomFromText.html | ||
*/ | ||
declare function geomFromText(expression: string | SQLWrapper): SQL<Geometry>; | ||
/** Returns the OGC Well-Known Text (WKT) representation of the geometry/geography. | ||
* | ||
* Inverse of {@link geomFromText} | ||
* | ||
* @group Geometry Outputs | ||
* @link https://postgis.net/docs/ST_AsText.html | ||
*/ | ||
declare function asText(expression: string | SQLWrapper): SQL<string>; | ||
/** Return the X coordinate of the point, or NULL if not available. Input must be a point. | ||
* | ||
* @group Geometry Accessors | ||
* @link https://postgis.net/docs/ST_X.html | ||
*/ | ||
declare function x(expression: SQLWrapper): SQL<number | null>; | ||
/** Return the Y coordinate of the point, or NULL if not available. Input must be a point. | ||
* | ||
* @group Geometry Accessors | ||
* @link https://postgis.net/docs/ST_Y.html | ||
*/ | ||
declare function y(expression: SQLWrapper): SQL<number | null>; | ||
/** Tests if an ST_Geometry value is well-formed and valid in 2D according to the OGC rules. | ||
* | ||
* @group Geometry Validation | ||
* @link https://postgis.net/docs/ST_IsValid.html | ||
*/ | ||
declare function isValid(geom1: SQLWrapper): SQL<boolean>; | ||
/** Returns text stating if a geometry is valid, or if invalid a reason why. | ||
* | ||
* @group Geometry Validation | ||
* @link https://postgis.net/docs/ST_IsValidReason.html | ||
*/ | ||
declare function isValidReason(geom1: SQLWrapper): SQL<string>; | ||
/** Constructs a PostGIS geometry object from the GeoJSON representation. | ||
* | ||
* ST_GeomFromGeoJSON works only for JSON Geometry fragments. It throws an error if you try to use it on a whole JSON document. | ||
* | ||
* @group Geometry Inputs | ||
* @link https://postgis.net/docs/ST_GeomFromGeoJSON.html | ||
*/ | ||
declare function geomFromGeoJSON(expression: Record<string, unknown>): SQL<Geometry>; | ||
/** Computes a GeoHash representation of a geometry. | ||
* | ||
* A GeoHash encodes a geographic Point into a text form that is sortable and searchable based on prefixing. | ||
* A shorter GeoHash is a less precise representation of a point. It can be thought of as a box that contains the point. | ||
* | ||
* @group Geometry Outputs | ||
* @link https://postgis.net/docs/ST_GeoHash.html | ||
*/ | ||
declare function geoHash(geom1: SQLWrapper, maxChars?: number): SQL<string>; | ||
/** Return a derived geometry with measure elements linearly interpolated between the start and end points. | ||
* | ||
* If the geometry has no measure dimension, one is added. | ||
* If the geometry has a measure dimension, it is over-written with new values. | ||
* Only LINESTRINGS and MULTILINESTRINGS are supported.. | ||
* | ||
* @group Linear Referencing | ||
* @link https://postgis.net/docs/manual-2.0/ST_AddMeasure.html | ||
*/ | ||
declare function addMeasure(geom1: SQLWrapper, measureStart: number, measureEnd: number): SQL<string>; | ||
declare const functions_addMeasure: typeof addMeasure; | ||
declare const functions_area: typeof area; | ||
declare const functions_asText: typeof asText; | ||
declare const functions_closestPoint: typeof closestPoint; | ||
declare const functions_geoHash: typeof geoHash; | ||
declare const functions_geomFromGeoJSON: typeof geomFromGeoJSON; | ||
declare const functions_geomFromText: typeof geomFromText; | ||
declare const functions_isValid: typeof isValid; | ||
declare const functions_isValidReason: typeof isValidReason; | ||
declare const functions_x: typeof x; | ||
declare const functions_y: typeof y; | ||
declare namespace functions { | ||
export { functions_addMeasure as addMeasure, functions_area as area, functions_asText as asText, functions_closestPoint as closestPoint, functions_geoHash as geoHash, functions_geomFromGeoJSON as geomFromGeoJSON, functions_geomFromText as geomFromText, functions_isValid as isValid, functions_isValidReason as isValidReason, functions_x as x, functions_y as y }; | ||
} | ||
/** | ||
* @packageDocumentation | ||
* Binary operators for use with GIS objects. | ||
* | ||
* @groupDescription Bounding Box Operators | ||
* These operators calculate values related to the bounding boxes of their arguments. | ||
* {@link https://postgis.net/docs/reference.html#operators-bbox} | ||
* | ||
* @groupDescription Distance Operators | ||
* These operators calculate distance between their arguments | ||
* {@link https://postgis.net/docs/reference.html#operators-distance} | ||
*/ | ||
/** && — Returns TRUE if A's 2D bounding box intersects B's 2D bounding box. | ||
* | ||
* @group Bounding Box Operators | ||
* @link https://postgis.net/docs/geometry_overlaps.html | ||
*/ | ||
declare const bboxOverlaps: BinaryOperator; | ||
/** && — Returns TRUE if A's n-D bounding box intersects B's n-D bounding box. | ||
* | ||
* @group Bounding Box Operators | ||
* @link https://postgis.net/docs/geometry_overlaps_nd.html | ||
*/ | ||
declare const bboxOverlapsND: BinaryOperator; | ||
/** &< — Returns TRUE if A's bounding box overlaps or is to the left of B's. | ||
* | ||
* @group Bounding Box Operators | ||
* @link https://postgis.net/docs/ST_Geometry_Overleft.html | ||
*/ | ||
declare const bboxOverlapsOrLeft: BinaryOperator; | ||
/** &<| — Returns TRUE if A's bounding box overlaps or is below B's. | ||
* | ||
* @group Bounding Box Operators | ||
* @link https://postgis.net/docs/ST_Geometry_Overbelow.html | ||
*/ | ||
declare const bboxOverlapsOrBelow: BinaryOperator; | ||
/** &> — Returns TRUE if A' bounding box overlaps or is to the right of B's. | ||
* | ||
* @group Bounding Box Operators | ||
* @link https://postgis.net/docs/ST_Geometry_Overright.html | ||
*/ | ||
declare const bboxOverlapsOrRight: BinaryOperator; | ||
/** << — Returns TRUE if A's bounding box is strictly to the left of B's. | ||
* | ||
* @group Bounding Box Operators | ||
* @link https://postgis.net/docs/ST_Geometry_Left.html | ||
*/ | ||
declare const bboxLeft: BinaryOperator; | ||
/** <<| — Returns TRUE if A's bounding box is strictly below B's. | ||
* | ||
* @group Bounding Box Operators | ||
* @link https://postgis.net/docs/ST_Geometry_Below.html | ||
*/ | ||
declare const bboxBelow: BinaryOperator; | ||
/** |&> — Returns TRUE if A's bounding box overlaps or is above B's. | ||
* | ||
* @group Bounding Box Operators | ||
* @link https://postgis.net/docs/ST_Geometry_Overabove.html | ||
*/ | ||
declare const bboxOverlapsOrAbove: BinaryOperator; | ||
/** |>> — Returns TRUE if A's bounding box is strictly above B's. | ||
* | ||
* @group Bounding Box Operators | ||
* @link https://postgis.net/docs/ST_Geometry_Above.html | ||
*/ | ||
declare const bboxAbove: BinaryOperator; | ||
/** >> — Returns TRUE if A's bounding box is strictly to the right of B's. | ||
* | ||
* @group Bounding Box Operators | ||
* @link https://postgis.net/docs/ST_Geometry_Right.html | ||
*/ | ||
declare const bboxRight: BinaryOperator; | ||
/** = — Returns TRUE if the coordinates and coordinate order geometry/geography A are the same as the coordinates and coordinate order of geometry/geography B. | ||
* | ||
* @group Other Operators | ||
* @link https://postgis.net/docs/ST_Geometry_EQ.html | ||
*/ | ||
declare const eq: BinaryOperator; | ||
/** ~= — Returns TRUE if A's bounding box is the same as B's. | ||
* | ||
* @group Bounding Box Operators | ||
* @link https://postgis.net/docs/ST_Geometry_Same.html | ||
*/ | ||
declare const bboxSame: BinaryOperator; | ||
/** @ — Returns TRUE if A's bounding box is contained by B's. | ||
* | ||
* @group Bounding Box Operators | ||
* @link https://postgis.net/docs/ST_Geometry_Contained.html | ||
*/ | ||
declare const bboxContained: BinaryOperator; | ||
/** ~ — Returns TRUE if A's bounding box contains B's. | ||
* | ||
* @group Bounding Box Operators | ||
* @link https://postgis.net/docs/ST_Geometry_Contain.html | ||
*/ | ||
declare const bboxContain: BinaryOperator; | ||
/** <-> — Returns the 2D distance between A and B. | ||
* | ||
* @group Distance Operators | ||
* @link https://postgis.net/docs/geometry_distance_knn.html | ||
*/ | ||
declare const distanceKNN: BinaryOperator; | ||
/** |=| — Returns the distance between A and B trajectories at their closest point of approach. | ||
* | ||
* @group Distance Operators | ||
* @link https://postgis.net/docs/geometry_distance_cpa.html | ||
*/ | ||
declare const distanceCPA: BinaryOperator; | ||
/** <#> — Returns the 2D distance between A and B bounding boxes. | ||
* | ||
* @group Distance Operators | ||
* @link https://postgis.net/docs/geometry_distance_box.html | ||
*/ | ||
declare const distanceBox: BinaryOperator; | ||
/** <<->> — Returns the n-D distance between the centroids of A and B bounding boxes. | ||
* | ||
* @group Distance Operators | ||
* @link https://postgis.net/docs/geometry_distance_centroid_nd.html | ||
*/ | ||
declare const distanceCentroidND: BinaryOperator; | ||
/** <<#>> — Returns the n-D distance between A and B bounding boxes. | ||
* | ||
* @group Distance Operators | ||
* @link https://postgis.net/docs/geometry_distance_box_nd.html | ||
*/ | ||
declare const distanceBoxND: BinaryOperator; | ||
declare const operators_bboxAbove: typeof bboxAbove; | ||
declare const operators_bboxBelow: typeof bboxBelow; | ||
declare const operators_bboxContain: typeof bboxContain; | ||
declare const operators_bboxContained: typeof bboxContained; | ||
declare const operators_bboxLeft: typeof bboxLeft; | ||
declare const operators_bboxOverlaps: typeof bboxOverlaps; | ||
declare const operators_bboxOverlapsND: typeof bboxOverlapsND; | ||
declare const operators_bboxOverlapsOrAbove: typeof bboxOverlapsOrAbove; | ||
declare const operators_bboxOverlapsOrBelow: typeof bboxOverlapsOrBelow; | ||
declare const operators_bboxOverlapsOrLeft: typeof bboxOverlapsOrLeft; | ||
declare const operators_bboxOverlapsOrRight: typeof bboxOverlapsOrRight; | ||
declare const operators_bboxRight: typeof bboxRight; | ||
declare const operators_bboxSame: typeof bboxSame; | ||
declare const operators_distanceBox: typeof distanceBox; | ||
declare const operators_distanceBoxND: typeof distanceBoxND; | ||
declare const operators_distanceCPA: typeof distanceCPA; | ||
declare const operators_distanceCentroidND: typeof distanceCentroidND; | ||
declare const operators_distanceKNN: typeof distanceKNN; | ||
declare const operators_eq: typeof eq; | ||
declare namespace operators { | ||
export { operators_bboxAbove as bboxAbove, operators_bboxBelow as bboxBelow, operators_bboxContain as bboxContain, operators_bboxContained as bboxContained, operators_bboxLeft as bboxLeft, operators_bboxOverlaps as bboxOverlaps, operators_bboxOverlapsND as bboxOverlapsND, operators_bboxOverlapsOrAbove as bboxOverlapsOrAbove, operators_bboxOverlapsOrBelow as bboxOverlapsOrBelow, operators_bboxOverlapsOrLeft as bboxOverlapsOrLeft, operators_bboxOverlapsOrRight as bboxOverlapsOrRight, operators_bboxRight as bboxRight, operators_bboxSame as bboxSame, operators_distanceBox as distanceBox, operators_distanceBoxND as distanceBoxND, operators_distanceCPA as distanceCPA, operators_distanceCentroidND as distanceCentroidND, operators_distanceKNN as distanceKNN, operators_eq as eq }; | ||
} | ||
/** Set this value to specify a namespace for accessing PostGIS | ||
@@ -639,2 +30,2 @@ * | ||
export { type BBox, type Box2D, type Feature, type FeatureCollection, type GeoJSON, type GeoJsonGeometryTypes, type GeoJsonObject, type GeoJsonProperties, type GeoJsonTypes, type Geometry, type GeometryCollection, type GeometryObject, type LineString, type MultiLineString, type MultiPoint, type MultiPolygon, type Point, type Polygon, type Position, config, functions, models, operators }; | ||
export { config }; |
{ | ||
"name": "drizzle-postgis", | ||
"version": "1.1.0", | ||
"version": "1.1.1", | ||
"description": "A Drizzle extension/plugin to help work with PostGIS and GeoJSON", | ||
@@ -21,2 +21,17 @@ "keywords": [ | ||
}, | ||
"./functions": { | ||
"import": "./dist/functions.mjs", | ||
"require": "./dist/functions.js", | ||
"types": "./dist/functions.d.ts" | ||
}, | ||
"./models": { | ||
"import": "./dist/models.mjs", | ||
"require": "./dist/models.js", | ||
"types": "./dist/models.d.ts" | ||
}, | ||
"./operators": { | ||
"import": "./dist/operators.mjs", | ||
"require": "./dist/operators.js", | ||
"types": "./dist/operators.d.ts" | ||
}, | ||
"./package.json": "./package.json" | ||
@@ -23,0 +38,0 @@ }, |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
Minified code
QualityThis package contains minified code. This may be harmless in some cases where minified code is included in packaged libraries, however packages on npm should not minify code.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Dynamic require
Supply chain riskDynamic require can indicate the package is performing dangerous or unsafe dynamic code execution.
Found 1 instance in 1 package
Minified code
QualityThis package contains minified code. This may be harmless in some cases where minified code is included in packaged libraries, however packages on npm should not minify code.
Found 1 instance in 1 package
769434
45
990
1
4
1