zig

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Jan 30, 2025 License: MIT Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

Types

type Backend

type Backend string
const (
	PGZigBackend Backend = "pg.zig"
)

func (Backend) ImportName

func (b Backend) ImportName() string

func (Backend) IsValid

func (b Backend) IsValid() bool

type Config

type Config struct {
	Out                         string   `json:"out"`
	Backend                     Backend  `json:"backend"`
	EmitExactTableNames         bool     `json:"emit_exact_table_names"`
	InflectionExcludeTableNames []string `json:"inflection_exclude_table_names"`
	QueryParameterLimit         int      `json:"query_parameter_limit"`
	PublicQueryStings           bool     `json:"public_query_strings"`
}

func (*Config) Default

func (c *Config) Default()

func (*Config) Validate

func (c *Config) Validate() error

type Enum

type Enum struct {
	Name    string
	ZigName string
	Comment string
	Values  []string
}

type Field

type Field struct {
	Name     string
	Comment  string
	ZigType  string
	Nullable bool
	Array    bool
}

type Identifier

type Identifier struct {
	Schema string
	Name   string
}

type Query

type Query struct {
	Cmd          string
	Comments     []string
	MethodName   string
	FieldName    string
	ConstantName string
	SQL          string
	SourceName   string
	Ret          *QueryValue
	Args         []QueryValue
}

type QueryValue

type QueryValue struct {
	Emit    bool
	Name    string
	Struct  *Struct
	ZigType string
}

type Struct

type Struct struct {
	ID         Identifier
	TableName  string
	StructName string
	Comment    string
	Fields     []Field
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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