lib

package
v0.0.0-...-d45c817 Latest Latest
Warning

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

Go to latest
Published: Apr 15, 2026 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DumpSchema

func DumpSchema(driver string, dsn string, outputFile string) error

func SnakeCase

func SnakeCase(text string) string

Types

type ConnectionParams

type ConnectionParams struct {
	DSN    string
	Driver string
}

type DB

type DB interface {
	Query(query string, args ...any) (*sql.Rows, error)
	Exec(query string, args ...any) (sql.Result, error)
	QueryRow(query string, args ...any) *sql.Row
	Close() error
}

func ConnectDB

func ConnectDB(p ConnectionParams) (DB, error)

type DB_Row

type DB_Row interface {
	Err() error
	Scan(dest ...any) error
}

type DB_Rows

type DB_Rows interface {
	Close() error
	ColumnTypes() ([]*sql.ColumnType, error)
	Columns() ([]string, error)
	Err() error
	Next() bool
	NextResultSet() bool
	Scan(dest ...any) error
}

type Disk

type Disk interface {
	Create(file_path string) error
	List(dir string) ([]string, error)
	Read(file_path string) (string, error)
	SearchFileInParentDirectories(file_name string) (string, error)
	Write(file_name string, content string) error
}

type DiskImpl

type DiskImpl struct{}

func (*DiskImpl) Create

func (d *DiskImpl) Create(file_path string) error

func (*DiskImpl) List

func (d *DiskImpl) List(dir string) ([]string, error)

func (*DiskImpl) Read

func (d *DiskImpl) Read(file_path string) (string, error)

func (*DiskImpl) SearchFileInParentDirectories

func (r *DiskImpl) SearchFileInParentDirectories(file_name string) (string, error)

func (*DiskImpl) Write

func (r *DiskImpl) Write(file_path string, content string) error

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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