dmltype

package
v0.0.0-...-202847b Latest Latest
Warning

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

Go to latest
Published: Jan 1, 2023 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Overview

Package dmltype provides additional types for database values.

Index

Constants

View Source
const CSVComma = ","

Variables

This section is empty.

Functions

This section is empty.

Types

type CSN

type CSN[K numbers] []K

CSN are Comma Separated Numbers, it represents an unmerged slice of numbers. It also implements Text Marshalers for usage in dml.ColumnMap.Text. Strings will be merged and split by comma, hence CSN.

func (CSN[K]) Bytes

func (l CSN[K]) Bytes() ([]byte, error)

func (CSN[K]) MarshalText

func (l CSN[K]) MarshalText() (text []byte, err error)

func (*CSN[K]) Scan

func (l *CSN[K]) Scan(src any) error

Scan satisfies the sql.Scanner interface for CSN. If a string starts with a supported split-character, this function will take that character to split the string.

func (*CSN[K]) UnmarshalText

func (l *CSN[K]) UnmarshalText(text []byte) error

func (CSN[K]) Value

func (l CSN[K]) Value() (driver.Value, error)

Value satisfies the driver.Valuer interface for CSN.

type CSV

type CSV []string

CSV represents an unmerged slice of strings. You can use package slices.String for further modifications of this slice type. It also implements Text Marshalers for usage in dml.ColumnMap.Text. Strings will be merged and split by comma, hence CSV.

func (CSV) Bytes

func (l CSV) Bytes() ([]byte, error)

func (CSV) MarshalText

func (l CSV) MarshalText() (text []byte, err error)

func (*CSV) Scan

func (l *CSV) Scan(src any) error

Scan satisfies the sql.Scanner interface for CSV. If a string starts with a supported split-character, this function will take that character to split the string.

func (*CSV) UnmarshalText

func (l *CSV) UnmarshalText(text []byte) error

func (CSV) Value

func (l CSV) Value() (driver.Value, error)

Value satisfies the driver.Valuer interface for CSV.

Jump to

Keyboard shortcuts

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