names

package
v0.3.11 Latest Latest
Warning

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

Go to latest
Published: May 4, 2023 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func PgTableToGoModel

func PgTableToGoModel(tableName string) string

func PgToGoName

func PgToGoName(snakeName string) string

Convert a postgres name (assumed to be snake_case) to a PascalCaseName

func ValidateImportPath

func ValidateImportPath(path string) error

ValidateImportPath checks the given path for issues and returns an error if it finds any.

Types

type PgName

type PgName struct {
	// The name of the schema. Never blank (always 'public' if no schema is specified).
	// Not quoted.
	Schema string
	// The inner name. Never blank. Not quoted.
	Name string
}

PgName represents an identifier in postgres

func ParsePgName

func ParsePgName(input string) (PgName, error)

func (*PgName) String

func (p *PgName) String() string

String returns a quoted version of this identifier suitable for use in SQL

Jump to

Keyboard shortcuts

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