sqllite

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

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

Go to latest
Published: Jan 21, 2021 License: MIT Imports: 8 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CType

type CType int
const (
	Unknown CType = iota
	Integer
	Text
	Numeric
	VarChar
)

func CTypeFromString

func CTypeFromString(typestring string) CType

type Column

type Column struct {
	PTableName   string
	Name         string
	CType        CType
	NotNull      int
	Default      string
	PrimaryKey   int
	DefaultValue []byte
}

func (*Column) SetTypeFromCType

func (col *Column) SetTypeFromCType(prop *pangu.Property)

func (*Column) ToProperty

func (col *Column) ToProperty(table *Table) *pangu.Property

type Database

type Database struct {
	Name            string
	Filename        string
	FilenameTrimmed string
}

func ParseDBRows

func ParseDBRows(daa *DatabaseAnalyser, rows *sql.Rows) *Database

type DatabaseAnalyser

type DatabaseAnalyser struct {
	Filename string
	sl.AppLogger
	// contains filtered or unexported fields
}

func (*DatabaseAnalyser) Create

func (daa *DatabaseAnalyser) Create()

func (*DatabaseAnalyser) GetColumns

func (daa *DatabaseAnalyser) GetColumns(tablename string) ([]*Column, *Column)

func (*DatabaseAnalyser) GetDatabase

func (daa *DatabaseAnalyser) GetDatabase() *Database

func (*DatabaseAnalyser) GetDatabaseStructure

func (daa *DatabaseAnalyser) GetDatabaseStructure() *DatabaseStructure

type DatabaseStructure

type DatabaseStructure struct {
	Tables   []*Table
	Views    []*View
	Database *Database
}

func ParseStructureRows

func ParseStructureRows(rows *sql.Rows) *DatabaseStructure

type Table

type Table struct {
	Name      string
	TableName string
	Sql       string
	Columns   []*Column
	HasPK     bool
	PKColumn  *Column
}

func (*Table) CreateConstant

func (table *Table) CreateConstant(col *Column) *pangu.Constant

func (*Table) CreateConstants

func (table *Table) CreateConstants() ([]*pangu.Constant, *pangu.Constant)

func (*Table) CreateStructDetails

func (table *Table) CreateStructDetails() *pangu.StructDetails

type View

type View struct {
	Name      string
	TableName string
	Sql       string
}

Jump to

Keyboard shortcuts

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