types

package
v1.0.0-beta.2 Latest Latest
Warning

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

Go to latest
Published: Nov 15, 2021 License: BSD-2-Clause Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Regexp

type Regexp struct {
	*regexp.Regexp
}

Regexp is a compiled regular expression that can be stored to database as string value.

func (Regexp) GormDBDataType

func (r Regexp) GormDBDataType(*gorm.DB, *schema.Field) string

GormDBDataType returns the data type for GORM integration.

func (Regexp) GormDataType

func (r Regexp) GormDataType() string

GormDataType returns the data type for GORM integration.

func (*Regexp) Scan

func (r *Regexp) Scan(value interface{}) error

Scan assigns a value from a database driver. It expects a string value, which is compiled to a regexnilp.Regexp.

func (Regexp) Value

func (r Regexp) Value() (driver.Value, error)

Value returns a driver Value.

Jump to

Keyboard shortcuts

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