internal

package
v0.0.0-...-bc73854 Latest Latest
Warning

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

Go to latest
Published: May 23, 2024 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Options struct {
	Package        string
	Output         string
	Driver         string
	DataSourceName string
	Schema         string
}

Functions

func Run

func Run() error

Types

type Column

type Column struct {
	TableName     string `dbx:"column:table_name" `
	ColumnName    string `dbx:"column:column_name" `
	ColumnComment string `dbx:"column:column_comment" `
	DataType      string `dbx:"column:data_type"`
	Nullable      string `dbx:"column:is_nullable"`
	ColumnKey     string `dbx:"column:column_key"`
	ColumnType    string `dbx:"column:column_type"`
	Extra         string `dbx:"column:extra"`
}

func (Column) Name

func (c Column) Name() string

func (Column) Tag

func (c Column) Tag() string

func (Column) Type

func (c Column) Type() string

type Context

type Context struct {
	Tables  map[string]*Table
	Package string
}

func (Context) Imports

func (c Context) Imports() []string

type SQLite3Column

type SQLite3Column struct {
	ColumnID     int            `dbx:"column:cid" `
	ColumnName   string         `dbx:"column:name" `
	DataType     string         `dbx:"column:type" `
	NotNull      int            `dbx:"column:notnull"`
	DefaultValue sql.NullString `dbx:"column:dflt_value"`
	ColumnKey    int            `dbx:"column:pk"`
}

type Table

type Table struct {
	StructName string
	TableName  string
	Columns    []Column
}

func (Table) ColumnString

func (t Table) ColumnString() string

func (Table) RecordName

func (t Table) RecordName() string

Directories

Path Synopsis
Code generated by dbx-generator.
Code generated by dbx-generator.

Jump to

Keyboard shortcuts

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