sql

package
v0.16.0 Latest Latest
Warning

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

Go to latest
Published: Dec 26, 2025 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Bool

type Bool bool

Bool is a simple wrapper around the built-in bool type that implements the database driver.Valuer interface. It converts Go boolean values to database-compatible integer values (1 for true, 0 for false). This is useful when you need to store boolean values in databases that don't have native boolean support.

func (Bool) Value

func (b Bool) Value() (driver.Value, error)

Value implements the driver.Valuer interface for database storage. It converts the boolean value to an int16: true becomes 1, false becomes 0. This ensures consistent boolean representation across different database systems.

Jump to

Keyboard shortcuts

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