props

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Dec 12, 2023 License: GPL-3.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const KeyPropPrimary string = "primary"

Variables

Functions

func ParseRelationPropSafe

func ParseRelationPropSafe(relation string) (string, string, error)

func ParseVectorPropSafe

func ParseVectorPropSafe(value string) (types.FieldType, int, error)

func ValidatePropValue

func ValidatePropValue(name FieldProp, value string) (any, error)

Types

type FieldProp

type FieldProp string
const (
	FieldPropOptional FieldProp = "optional" // optional(true/false)
	FieldPropDefault  FieldProp = "default"
	FieldPropRelation FieldProp = "relation" // relation(table.field)
	FieldPropKey      FieldProp = "key"
	FieldPropUnique   FieldProp = "unique" // unique(true/false)
	FieldPropVector   FieldProp = "vector" // vector(type, level)
)

func (FieldProp) IsValid

func (p FieldProp) IsValid() bool

Jump to

Keyboard shortcuts

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