bigint

package
v0.9.3 Latest Latest
Warning

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

Go to latest
Published: Apr 2, 2024 License: MIT Imports: 4 Imported by: 0

Documentation

Overview

Package unsigned provides a type maps an unsigned 64-bit integer to a signed 64-bit integer for use in SQL statements and scan operations.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ConvertUnsigned

func ConvertUnsigned[T ~uint64](target *T) interface {
	driver.Valuer
	sql.Scanner
}

ConvertUnsigned returns a type that can be used in SQL statements and scan operations that encodes an unsigned 64-bit integer as a signed 64-bit integer (which is PostgreSQL's largest integer type).

The encoding preserves order, such that sorting on the encoded values will produce the same order as sorting on the original unsigned values. This is the only guarantee provided by this type.

Types

This section is empty.

Jump to

Keyboard shortcuts

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