persist

package
v0.0.0-...-ce6b2e3 Latest Latest
Warning

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

Go to latest
Published: Sep 13, 2024 License: MIT Imports: 13 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

func SqliteConnection

func SqliteConnection(name string) *sqlx.DB

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