python

package
v1.6.1-0...-733c50c Latest Latest
Warning

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

Go to latest
Published: Jul 7, 2021 License: MIT Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Generate

func Generate(r *compiler.Result, settings config.CombinedSettings) (map[string]string, error)

func HashComment

func HashComment(s string) string

func MethodName

func MethodName(name string) string

func ModelName

func ModelName(name string, settings config.CombinedSettings) string

Types

type Constant

type Constant struct {
	Name  string
	Type  string
	Value string
}

type Enum

type Enum struct {
	Name      string
	Comment   string
	Constants []Constant
}

type Field

type Field struct {
	Name    string
	Type    pyType
	Comment string
}

type Query

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

A struct used to generate methods and fields on the Queries struct

func (Query) ArgDict

func (q Query) ArgDict() string

func (Query) ArgPairs

func (q Query) ArgPairs() string

type QueryValue

type QueryValue struct {
	Emit   bool
	Name   string
	Struct *Struct
	Typ    pyType
}

func (QueryValue) EmitStruct

func (v QueryValue) EmitStruct() bool

func (QueryValue) IsStruct

func (v QueryValue) IsStruct() bool

func (QueryValue) Pair

func (v QueryValue) Pair() string

func (QueryValue) StructRowParser

func (v QueryValue) StructRowParser(rowVar string, indentCount int) string

func (QueryValue) Type

func (v QueryValue) Type() string

type Struct

type Struct struct {
	Table   core.FQN
	Name    string
	Fields  []Field
	Comment string
}

Jump to

Keyboard shortcuts

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