base

package
v0.0.29-test Latest Latest
Warning

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

Go to latest
Published: Oct 28, 2021 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetCamelName

func GetCamelName(s string) string

func GetFKeyName

func GetFKeyName(tableName string, dbColNames ...string) string

generate a name for the foreignkey of the sort contacts_user_id_fkey. It takes the table name, the name of the column that references a foreign column in a foreign table and the fkey keyword to generate this only applies for single column fkeys

func GetNameFromParts

func GetNameFromParts(nameParts []string) string

func GetPrimaryKeyName

func GetPrimaryKeyName(tableName string, dbColNames ...string) string

func GetSnakeCaseName

func GetSnakeCaseName(s string) string

returns name such as tableName or file name

func GetUniqueKeyName

func GetUniqueKeyName(tableName string, dbColNames ...string) string

Types

type FieldEdgeInfo

type FieldEdgeInfo struct {
	Schema      string
	EdgeName    string
	Name        string
	Polymorphic *PolymorphicOptions
}

common things needed across edges/fields etc only allowed to import input

func NewFieldEdgeInfo

func NewFieldEdgeInfo(fieldName string, polymorphic *input.PolymorphicOptions, unique bool) (*FieldEdgeInfo, error)

type Language

type Language string
const GoLang Language = "Golang"

GoLang indicates we're generating for golang

const TypeScript Language = "TypeScript"

TypeScript indicates we're generating for TypeScript

type PolymorphicOptions

type PolymorphicOptions struct {
	*input.PolymorphicOptions
	NodeTypeField string
	Unique        bool // is this a unique field vs say an indexed field
}

Jump to

Keyboard shortcuts

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