postgresql

package
v0.18.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 24, 2025 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Execute

func Execute(connection, statement string, params ...any) (*db.Response, error)

Executes a database query that does not return rows.

func Query

func Query[T any](connection, statement string, params ...any) (*db.QueryResponse[T], error)

Executes a database query that returns rows. The structure of the rows is determined by the type parameter.

func QueryScalar

func QueryScalar[T any](connection, statement string, params ...any) (*db.ScalarResponse[T], error)

Executes a database query that returns a single scalar value. The type parameter determines the type of the scalar value.

Types

type Location

type Location = db.Location

Represents a location on Earth, having longitude and latitude coordinates. Correctly serializes to and from a SQL point type, in (longitude, latitude) order.

Note that this struct is identical to the Point struct, but uses different field names.

func NewLocation

func NewLocation(longitude, latitude float64) *Location

Creates a new Location with the specified longitude and latitude coordinates.

type Point

type Point = db.Point

Represents a point in 2D space, having X and Y coordinates. Correctly serializes to and from a SQL point type, in (X, Y) order.

Note that this struct is identical to the Location struct, but uses different field names.

func NewPoint

func NewPoint(x, y float64) *Point

Creates a new Point with the specified X and Y coordinates.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL