Versions in this module Expand all Collapse all v5 v5.6.0 Jan 31, 2024 Changes in this version type Constraint + RefTableSchema string + TableSchema string v5.5.0 Jan 30, 2024 v5.4.0 Jan 30, 2024 Changes in this version type Constraint + ColumnComment string + RefColumnComment string v5.3.0 Dec 16, 2023 v5.2.0 Dec 14, 2023 v5.1.0 Jul 31, 2023 v5.0.0 Jun 26, 2023 Changes in this version + func DriverDbSchema(ctx context.Context) (string, *sql.DB, string) + func Out(ctx context.Context) string + func Single(ctx context.Context) string + type Constraint struct + ColumnName string + Comment string + Name string + RefColumnName string + RefTableName string + TableName string + Type string + type ContextKey string + const ArrayModeKey + const DbKey + const DriverKey + const OutKey + const SchemaKey + const SingleKey + type Enum struct + EnumPkg string + Name string + Schema string + Values []Field + type Field struct + Comment string + ConstValue *int + Default string + Interpolate bool + IsDateOrTime bool + IsGenerated bool + IsIgnored bool + IsPrimary bool + IsSequence bool + Join bool + Name string + Type Type + type Flag struct + Aliases []string + ContextKey ContextKey + Default string + Desc string + Enums []string + Hidden bool + Short string + Type string + type FlagSet struct + Flag Flag + Name string + Type string + func (flag FlagSet) Add(cmd *cobra.Command, values map[ContextKey]*Value) error + type ForeignKey struct + Fields []Field + Func string + Name string + RefFields []Field + RefFunc string + RefTable string + type Index struct + Fields []Field + Func string + IndexDefinition string + IsPrimary bool + IsUnique bool + Name string + type Proc struct + Definition string + ID string + Name string + Params []Field + Returns []Field + Type string + Void bool + func (p Proc) MarshalYAML() (interface{}, error) + type Query struct + Comment string + Comments []string + Driver string + Exec bool + Fields []Field + Flat bool + Interpolate bool + ManualFields bool + Name string + One bool + Params []Field + Query []string + Type string + TypeComment string + func (q Query) MarshalYAML() (interface{}, error) + type Schema struct + Constraints []Constraint + Driver string + Enums []Enum + MatViews []Table + Name string + Procs []Proc + Tables []Table + Views []Table + func (s Schema) EnumByName(name string) *Enum + type Set struct + Queries []Query + Schemas []Schema + type Table struct + Columns []Field + Definition string + ForeignKeys []ForeignKey + Indexes []Index + Manual bool + Name string + PrimaryKeys []Field + Type string + func (t Table) MarshalYAML() (interface{}, error) + type Template struct + Data interface{} + Dest string + Partial string + SortName string + SortType string + Src string + type TemplateType struct + Flags []Flag + Funcs func(ctx context.Context, mode string) (template.FuncMap, error) + Modes []string + Name string + NewContext func(ctx context.Context, mode string) context.Context + Order func(ctx context.Context, mode string) []string + Post func(ctx context.Context, mode string, files map[string][]byte, ...) error + Pre func(ctx context.Context, mode string, set *Set, outFolder fs.FS, ...) error + Process func(ctx context.Context, mode string, set *Set, emit func(Template)) error + type Type struct + Enum *Enum + IsArray bool + Nullable bool + Prec int + Scale int + Type string + Unsigned bool + func ParseType(typ, driver string) (Type, error) + type Value struct + func NewValue(typ, def, desc string, enums ...string) *Value + func (v *Value) AsBool() bool + func (v *Value) AsGlob() []glob.Glob + func (v *Value) AsInt() int + func (v *Value) AsString() string + func (v *Value) AsStringSlice() []string + func (v *Value) Desc() string + func (v *Value) Interface() interface{} + func (v *Value) Set(s string) error + func (v *Value) String() string + func (v *Value) Type() string Other modules containing this package github.com/danicc097/xo github.com/danicc097/xo/v3