database

package
v0.0.0-...-68b431c Latest Latest
Warning

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

Go to latest
Published: Mar 2, 2023 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DsnTemplate = "postgresql://%s:%s@%s:%d/%s?TimeZone=%s"

	TableInfoSQL = "SELECT tableName FROM pg_tables WHERE tableName NOT LIKE 'pg%' AND tableName NOT LIKE 'sql_%' ORDER BY tableName"

	ColumnInfoSQL = `` /* 1185-byte string literal not displayed */

)
View Source
const (
	TimeZone = "Asia%2FShanghai"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Database

type Database struct {
	Name   string `json:"name"`
	Tables []*Table
}

func ReverseEngineering

func ReverseEngineering() (*Database, error)

type Field

type Field struct {
	TableComment string `json:"tableComment"`
	Name         string `json:"name"`
	Type         string `json:"type"`
	Comment      string `json:"comment"`
	TypLen       int    `json:"typLen"`
	TypLength    string `json:"typLength"`
	NotNull      bool   `json:"notNull"`
	PrimaryKey   bool   `json:"primarykey"`
}

type Table

type Table struct {
	Name    string `json:"tableName"`
	Comment string `json:"comment"`
	Fields  []*Field
}

Jump to

Keyboard shortcuts

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