cache

package
v1.8.94 Latest Latest
Warning

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

Go to latest
Published: Sep 11, 2022 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrCouldNotWriteTableCacheToFile = errors.New("could not write table cache to file")
	ErrCouldNotSerializeTableCache   = errors.New("cannot serialize table cache")
	ErrCannotReadTableCacheFromDisk  = errors.New("cannot read table cache from disk")
)

Functions

func HashTable

func HashTable(table *schema.Table) (string, error)

HashTable generates an md5 hash of a marshalled table

func SaveTableCache

func SaveTableCache(tablesCache *TablesCache) error

SaveTableCache writes a table cache to the table cache file

Types

type TablesCache

type TablesCache struct {
	Dals   map[string]string
	Models map[string]string
}

TablesCache stores an md5 hash of the JSON representation of a table in the schema.json file These hashes are used to skip unchanged models for DAL and Model generation

func LoadTableCache

func LoadTableCache() (*TablesCache, error)

LoadTableCache loads the table cache

func NewTablesCache

func NewTablesCache() *TablesCache

NewTablesCache is a factory method for TablesCache

Jump to

Keyboard shortcuts

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