persist

package
v0.0.0-...-4b5ade8 Latest Latest
Warning

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

Go to latest
Published: Apr 18, 2024 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DefaultJsonModels

func DefaultJsonModels() string

func ModelsForTables

func ModelsForTables(db *sqlx.DB, tablesString string) []*models.Model

func MysqlConnection

func MysqlConnection() *sqlx.DB

func PostgresConnection

func PostgresConnection(dbEnvVarName string) *sqlx.DB

func PostgresConnectionByUrl

func PostgresConnectionByUrl(url string) *sqlx.DB

func SaveSchema

func SaveSchema(asBytes []byte)

func ScanSchema

func ScanSchema(dbString string) []*models.Model

func ScanTable

func ScanTable(db *sqlx.DB, table string) []*models.Field

func SelectAll

func SelectAll(db *sqlx.DB, sql string) []map[string]any

Types

type CustomDB

type CustomDB struct {
	*sqlx.DB
}

func (*CustomDB) ExecWithLogging

func (db *CustomDB) ExecWithLogging(query string, args ...interface{}) (sql.Result, error)

Jump to

Keyboard shortcuts

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