xtype

package
v0.0.0-...-8c11e3d Latest Latest
Warning

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

Go to latest
Published: Jun 25, 2020 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Hashes

type Hashes []uint64

Hashes is hash slice

func (Hashes) Has

func (t Hashes) Has(s uint64) bool

Has a item or not

func (Hashes) MarshalJSON

func (t Hashes) MarshalJSON() ([]byte, error)

MarshalJSON 转换为json类型

func (*Hashes) Scan

func (t *Hashes) Scan(src interface{}) error

Scan implements the Scanner interface.

func (Hashes) String

func (t Hashes) String() string

func (*Hashes) UnmarshalJSON

func (t *Hashes) UnmarshalJSON(data []byte) error

UnmarshalJSON 不做处理

func (Hashes) Value

func (t Hashes) Value() (driver.Value, error)

Value implements the driver Valuer interface.

type Set

type Set []string

Set is a string set, can be varchar,text or json array in mysql column

func NewSet

func NewSet(items ...string) Set

NewSet init a set from items

func (Set) Add

func (t Set) Add(s string) Set

Add an item to set t and return the new set

func (Set) Has

func (t Set) Has(s string) bool

Has a item or not

func (Set) IsDisjoint

func (t Set) IsDisjoint(s Set) bool

IsDisjoint returns whether two sets have a intersection(false) or not(true)

func (Set) IsSubSet

func (t Set) IsSubSet(s Set) bool

IsSubSet of s or not

func (Set) IsSuperSet

func (t Set) IsSuperSet(s Set) bool

IsSuperSet of s or not

func (Set) Remove

func (t Set) Remove(s string) Set

Remove the specified item and return the new set

func (*Set) Scan

func (t *Set) Scan(src interface{}) error

Scan implements the Scanner interface.

func (Set) String

func (t Set) String() string

String print strings as json format: ["a","b"], use this method in printing only

func (Set) Sub

func (t Set) Sub(s Set) Set

Sub s from t and return the new strings

func (Set) Union

func (t Set) Union(s Set) Set

Union two strings

func (Set) Value

func (t Set) Value() (driver.Value, error)

Value implements the driver Valuer interface.

type StringMap

type StringMap map[string]string

StringMap is name of map[string]string for custom db driver

func (*StringMap) Scan

func (m *StringMap) Scan(src interface{}) error

Scan implements the Scanner interface.

func (StringMap) String

func (m StringMap) String() string

String print strings as json format: {"a":"b"}, use this method in printing only

func (StringMap) Value

func (m StringMap) Value() (driver.Value, error)

Value implements the driver Valuer interface.

Jump to

Keyboard shortcuts

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