Help us shape the future of Go! Take the 2026 Go Developer Survey

db

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: May 1, 2026 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddColumn

func AddColumn(db *sql.DB, plural string, col ColumnDef) error

func CreateResourceTable

func CreateResourceTable(db *sql.DB, plural string, parents []ParentRef, columns []ColumnDef) error

func DropResourceTable

func DropResourceTable(db *sql.DB, plural string) error

func Init

func Init(dbPath string) (*sql.DB, error)

func RemoveColumns

func RemoveColumns(db *sql.DB, plural string, parents []ParentRef, keepColumns []ColumnDef) error

func SanitizeTableName

func SanitizeTableName(name string) string

func SchemaTypeToSQLite

func SchemaTypeToSQLite(oasType, oasFormat string) string

Types

type ColumnDef

type ColumnDef struct {
	Name    string
	SQLType string
}

type ParentRef

type ParentRef struct {
	Singular string
}

Jump to

Keyboard shortcuts

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