entities

package
v0.0.0-...-0b8bd43 Latest Latest
Warning

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

Go to latest
Published: Oct 23, 2021 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DatabaseObject

type DatabaseObject struct {
	Name         string   `json:"name"`
	Schema       string   `json:"schema"`
	SourceFile   string   `json:"sourceFile"`
	Hash         string   `json:"hash"`
	Dependencies []string `json:"dependencies"`
	// contains filtered or unexported fields
}

func NewDatabaseObject

func NewDatabaseObject(sourceFile string, provider Provider) (*DatabaseObject, error)

func (DatabaseObject) Content

func (obj DatabaseObject) Content() []byte

func (DatabaseObject) FullName

func (obj DatabaseObject) FullName() string

type Provider

type Provider interface {
	GenerateMigration(name string) (string, error)
	GeneratePostDeploy(name string) (string, error)
	GeneratePreDeploy(name string) (string, error)
	GenerateProcedure(schema, name string) (string, error)
	GenerateScalarFunction(schema, name string) (string, error)
	GenerateTableFunction(schema, name string) (string, error)
	GenerateView(schema, name string) (string, error)
	GetObjectSchemaAndName(content []byte) (string, string)
	IsDependency(content []byte, schema, name string) (bool, error)
	ResolveSchema(schema string) (string, error)
}

Jump to

Keyboard shortcuts

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