mysql

package
v0.17.3 Latest Latest
Warning

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

Go to latest
Published: Apr 10, 2025 License: Apache-2.0 Imports: 1 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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