codium_shared

package
v1.1.5 Latest Latest
Warning

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

Go to latest
Published: Mar 2, 2020 License: MIT Imports: 5 Imported by: 1

README

codium_shared

This library is shared by the programs of this project.

Documentation

Overview

Package codium_shared is a library shared by the programs of the codium project.

Index

Constants

View Source
const (
	DateFormat             = "2006-01-02 MST"
	DateFormatNoTZ         = "2006-01-02"
	DateTimeFormat         = "2006-01-02T15:04:05 MST"
	DateTimeFormatNoTZAndS = "2006-01-02T15:04"
)

Variables

This section is empty.

Functions

func GetDataPath

func GetDataPath() (string, error)

Types

type FieldDefn

type FieldDefn struct {
	FieldName string
	FieldType string
	Required  bool
	Unique    bool
}

type FkeyDefn

type FkeyDefn struct {
	FieldName        string
	PointingTable    string
	OnDeleteEmpty    bool
	OnDeleteDelete   bool
	OnDeleteRestrict bool
}

type QueryData

type QueryData struct {
	Fields         []string
	TableName      string
	ExpandTable    bool
	Distinct       bool
	Limit          string
	StartIndex     string
	OrderBy        string
	OrderDirection string // one of "asc", "desc"
	WhereOpts      []WhereOptions
}

func ParseSearchStmt

func ParseSearchStmt(stmt string) (QueryData, error)

type TableDefn

type TableDefn struct {
	TableName    string
	Fields       []FieldDefn
	ForeignKeys  []FkeyDefn
	UniqueGroups [][]string
}

func ParseTableDefnStmt

func ParseTableDefnStmt(stmt string) (TableDefn, error)

type WhereOptions

type WhereOptions struct {
	Key           string
	Value         string
	Relation      string   // one of "eq", "neq", "gt", "gteq", "lt", "lteq", in
	Joiner        string   // one of "and", "or"
	InOrNinValues []string // set when the where relation is either in
}

Jump to

Keyboard shortcuts

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