postgresql

package
v0.13.0-prerelease-test-2 Latest Latest
Warning

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

Go to latest
Published: Oct 11, 2024 License: Apache-2.0 Imports: 2 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(hostName, statement string, params ...any) (uint, error)

func Query

func Query[T any](hostName, statement string, params ...any) ([]T, uint, error)

func QueryScalar

func QueryScalar[T any](hostName, statement string, params ...any) (T, uint, error)

Types

type Location

type Location struct {
	Longitude float64 `json:"longitude"`
	Latitude  float64 `json:"latitude"`
}

func NewLocation

func NewLocation(longitude, latitude float64) *Location

func ParseLocation

func ParseLocation(s string) (*Location, error)

func (*Location) MarshalJSON

func (l *Location) MarshalJSON() ([]byte, error)

func (*Location) String

func (l *Location) String() string

func (*Location) UnmarshalJSON

func (l *Location) UnmarshalJSON(data []byte) error

type Point

type Point struct {
	X float64 `json:"x"`
	Y float64 `json:"y"`
}

func NewPoint

func NewPoint(x, y float64) *Point

func ParsePoint

func ParsePoint(s string) (*Point, error)

func (*Point) MarshalJSON

func (p *Point) MarshalJSON() ([]byte, error)

func (*Point) String

func (p *Point) String() string

func (*Point) UnmarshalJSON

func (p *Point) UnmarshalJSON(data []byte) error

Jump to

Keyboard shortcuts

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