bungen

package
v0.0.0-...-70569e3 Latest Latest
Warning

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

Go to latest
Published: Nov 29, 2022 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Sort

func Sort(tables []table) []table

Sort sorts table by schema and name (public tables always first)

Types

type Bungen

type Bungen struct {
	DB    *bun.DB
	Store *store

	Logger *log.Logger
	Name   string
	// contains filtered or unexported fields
}

Bungen is struct should be embedded to custom generator when bungen used as library

func New

func New(url string, logger *log.Logger) Bungen

New creates Bungen

func (*Bungen) Connect

func (g *Bungen) Connect() error

func (*Bungen) Read

func (g *Bungen) Read(selected []string, followFK, useSQLNulls bool, customTypes model.CustomTypeMapping) ([]model.Entity, error)

Read reads database and gets entities with columns and relations

Jump to

Keyboard shortcuts

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