Documentation
¶
Index ¶
- func WriteDeleteFunc(w io.Writer, view View)
- func WriteExecFunc(w io.Writer, view View)
- func WriteGetRow(w io.Writer, view View)
- func WriteImports(w io.Writer, table *schema.TableDescription, setters schema.FieldList, ...)
- func WriteInsertFunc(w io.Writer, view View)
- func WritePackage(w io.Writer, name string)
- func WriteQueryFuncs(w io.Writer, view View)
- func WriteRowsFunc(w io.Writer, view View)
- func WriteSchema(w io.Writer, view View)
- func WriteSelectRowsFuncs(w io.Writer, view View)
- func WriteSetters(w io.Writer, view View, fields schema.FieldList)
- func WriteSliceColumn(w io.Writer, view View)
- func WriteSliceFunc(w io.Writer, view View, withoutPk bool)
- func WriteType(w io.Writer, view View)
- func WriteUpdateFunc(w io.Writer, view View)
- type ConstView
- type SetterView
- type StringSet
- func (set StringSet) Add(i ...string) StringSet
- func (set StringSet) Append(more ...string) StringSet
- func (set *StringSet) Clear()
- func (set StringSet) Clone() StringSet
- func (set StringSet) Contains(i string) bool
- func (set StringSet) ContainsAll(i ...string) bool
- func (set StringSet) Difference(other StringSet) StringSet
- func (set StringSet) Equals(other StringSet) bool
- func (set StringSet) Intersect(other StringSet) StringSet
- func (set StringSet) IsEmpty() bool
- func (set StringSet) IsSubset(other StringSet) bool
- func (set StringSet) IsSuperset(other StringSet) bool
- func (set StringSet) MarshalJSON() ([]byte, error)
- func (set StringSet) MkString(sep string) string
- func (set StringSet) MkString3(pfx, mid, sfx string) string
- func (set StringSet) NonEmpty() bool
- func (set StringSet) Remove(i string)
- func (set StringSet) Size() int
- func (set StringSet) String() string
- func (set StringSet) StringList() []string
- func (set StringSet) StringMap() map[string]bool
- func (set StringSet) SymmetricDifference(other StringSet) StringSet
- func (set StringSet) ToInterfaceSlice() []interface{}
- func (set StringSet) ToSlice() []string
- func (set StringSet) Union(other StringSet) StringSet
- type View
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func WriteDeleteFunc ¶
func WriteExecFunc ¶
func WriteGetRow ¶
func WriteImports ¶
func WriteInsertFunc ¶
func WritePackage ¶
WritePackage writes the Go package header to writer w with the given package name.
func WriteQueryFuncs ¶
func WriteRowsFunc ¶
func WriteSchema ¶
writeSchema writes SQL statements to CREATE, INSERT, UPDATE and DELETE values from Table t.
func WriteSelectRowsFuncs ¶ added in v0.8.0
func WriteSetters ¶ added in v0.8.0
func WriteSliceColumn ¶ added in v0.8.0
func WriteUpdateFunc ¶
Types ¶
type SetterView ¶ added in v0.8.0
type StringSet ¶
type StringSet map[string]struct{}
StringSet is the primary type that represents a set
func ConvertStringSet ¶
ConvertStringSet constructs a new set containing the supplied values, if any. The returned boolean will be false if any of the values could not be converted correctly.
func NewStringSet ¶
NewStringSet creates and returns a reference to an empty set.
func (*StringSet) Clear ¶
func (set *StringSet) Clear()
Clear clears the entire set to be the empty set.
func (StringSet) Clone ¶
Clone returns a shallow copy of the map. It does not clone the underlying elements.
func (StringSet) ContainsAll ¶
ContainsAll determines if the given items are all in the set
func (StringSet) Difference ¶
Difference returns a new set with items in the current set but not in the other set
func (StringSet) Equals ¶
Equals determines if two sets are equal to each other. If they both are the same size and have the same items they are considered equal. Order of items is not relevent for sets to be equal.
func (StringSet) IsSuperset ¶
IsSuperset determines if every item of this set is in the other set.
func (StringSet) MarshalJSON ¶
implements encoding.Marshaler interface {
func (StringSet) MkString ¶
MkString concatenates the values as a string using a supplied separator. No enclosing marks are added.
func (StringSet) MkString3 ¶
MkString3 concatenates the values as a string, using the prefix, separator and suffix supplied.
func (StringSet) Size ¶
Size returns how many items are currently in the set. This is a synonym for Cardinality.
func (StringSet) StringList ¶
func (StringSet) StringMap ¶
StringMap renders the set as a map of strings. The value of each item in the set becomes stringified as a key in the resulting map.
func (StringSet) SymmetricDifference ¶
SymmetricDifference returns a new set with items in the current set or the other set but not in both.
func (StringSet) ToInterfaceSlice ¶
func (set StringSet) ToInterfaceSlice() []interface{}
ToInterfaceSlice returns the elements of the current set as a slice of arbitrary type.