Reference for the SurrealQL value classes in version 2 of the PHP SDK, in the SurrealDB\SDK\Types namespace.
Version 2 represents SurrealQL types that PHP lacks with value classes in the SurrealDB\SDK\Types namespace. Every class extends the abstract Value and provides escape() (the inline SurrealQL form), jsonSerialize(), equals(), and __toString().
A Range is a bounded or open interval. A RecordIdRange is a range of record IDs in a table. Bounds are BoundIncluded, BoundExcluded, or null for an open end.
Futures were removed in SurrealDB 3.0. This type is retained for compatibility with older servers and parity with the JavaScript SDK, and is deprecated.
Geometry
Classes for each GeoJSON geometry type. They all extend the abstract Geometry, which provides toGeoJson(), is(), and the static Geometry::fromGeoJson().
Class
Constructor
GeometryPoint
new GeometryPoint(float $longitude, float $latitude)
GeometryLine
new GeometryLine(GeometryPoint $first, GeometryPoint ...$rest)
GeometryPolygon
new GeometryPolygon(GeometryLine $exterior, GeometryLine ...$interior)
GeometryMultiPoint
new GeometryMultiPoint(GeometryPoint $first, GeometryPoint ...$rest)
GeometryMultiLine
new GeometryMultiLine(GeometryLine $first, GeometryLine ...$rest)
GeometryMultiPolygon
new GeometryMultiPolygon(GeometryPolygon $first, GeometryPolygon ...$rest)
GeometryCollection
new GeometryCollection(Geometry $first, Geometry ...$rest)