Documentation ¶
Index ¶
- Constants
- Variables
- func CastModelType(adapter ModelAdapter, node interface{}, name FQTypeNameAccessor) (interface{}, error)
- func ConvertUnitToBase(v1 DecimalAccessor, u1 QuantityUnitAccessor, exp1 int, v2 DecimalAccessor, ...) (DecimalAccessor, DecimalAccessor, QuantityUnitAccessor)
- func ConvertUnitToMostGranular(v1 DecimalAccessor, u1 QuantityUnitAccessor, exp1 int, v2 DecimalAccessor, ...) (DecimalAccessor, DecimalAccessor, QuantityUnitAccessor)
- func DecimalValueFloat64(node interface{}) interface{}
- func Equal(n1 AnyAccessor, n2 AnyAccessor) bool
- func Equivalent(n1 AnyAccessor, n2 AnyAccessor) bool
- func FQTypeNameEqual(t1 FQTypeNameAccessor, t2 FQTypeNameAccessor) bool
- func HasModelType(adapter ModelAdapter, node interface{}, name FQTypeNameAccessor) bool
- func IntegerValue(node interface{}) interface{}
- func IsCalendarDurationUnit(unit QuantityUnitAccessor) bool
- func IsCol(node interface{}) bool
- func ModelEqual(adapter ModelAdapter, node1 interface{}, node2 interface{}) bool
- func ModelEquivalent(adapter ModelAdapter, node1 interface{}, node2 interface{}) bool
- func NormalizedStringEqual(value1 string, value2 string) bool
- func SystemAnyEqual(node1 AnyAccessor, node2 interface{}) bool
- func SystemAnyTypeEqual(node1 AnyAccessor, node2 interface{}) bool
- func TemporalPrecisionEqual(t1 TemporalAccessor, t2 TemporalAccessor) bool
- func TypeEqual(n1 AnyAccessor, n2 AnyAccessor) bool
- type AnyAccessor
- type ArithmeticApplier
- type ArithmeticOps
- type BaseFunction
- type BooleanAccessor
- type ClassInfoAccessor
- type ClassInfoElementAccessor
- type ColAccessor
- type ColModifier
- type Comparator
- type ContextAccessor
- type DataTypes
- type DateAccessor
- func NewDate(value time.Time) DateAccessor
- func NewDateWithSource(value time.Time, source interface{}) DateAccessor
- func NewDateYMD(year int, month int, day int) DateAccessor
- func NewDateYMDWithPrecision(year, month, day int, precision DateTimePrecisions) DateAccessor
- func NewDateYMDWithPrecisionAndSource(year, month, day int, precision DateTimePrecisions, source interface{}) DateAccessor
- func NewDateYMDWithSource(year int, month int, day int, source interface{}) DateAccessor
- func ParseDate(value string) (DateAccessor, error)
- func ParseDateWithSource(value string, source interface{}) (DateAccessor, error)
- type DateTemporalAccessor
- type DateTimeAccessor
- func NewDateTime(value time.Time) DateTimeAccessor
- func NewDateTimeWithSource(value time.Time, source interface{}) DateTimeAccessor
- func NewDateTimeYMDHMSNWithPrecision(year, month, day, hour, minute, second, nanosecond int, loc *time.Location, ...) DateTimeAccessor
- func NewDateTimeYMDHMSNWithPrecisionAndSource(year, month, day, hour, minute, second, nanosecond int, loc *time.Location, ...) DateTimeAccessor
- func ParseDateTime(value string) (DateTimeAccessor, error)
- func ParseDateTimeWithSource(value string, source interface{}) (DateTimeAccessor, error)
- type DateTimePrecisions
- type DecimalAccessor
- func DecimalOfInt(value int32) DecimalAccessor
- func NewDecimal(value decimal.Decimal) DecimalAccessor
- func NewDecimalFloat64(value float64) DecimalAccessor
- func NewDecimalFloat64WithSource(value float64, source interface{}) DecimalAccessor
- func NewDecimalInt(value int32) DecimalAccessor
- func NewDecimalInt64(value int64) DecimalAccessor
- func NewDecimalInt64WithSource(value int64, source interface{}) DecimalAccessor
- func NewDecimalIntWithSource(value int32, source interface{}) DecimalAccessor
- func NewDecimalWithSource(value decimal.Decimal, source interface{}) DecimalAccessor
- func ParseDecimal(value string) (DecimalAccessor, error)
- func ParseDecimalWithSource(value string, source interface{}) (DecimalAccessor, error)
- type DecimalValueAccessor
- type Error
- type ErrorItem
- type Evaluator
- type FQTypeNameAccessor
- type FunctionExecutor
- type IntegerAccessor
- type ListTypeInfoAccessor
- type Looper
- type ModelAdapter
- type Negator
- type NumberAccessor
- type OperatorStatus
- type QuantityAccessor
- type QuantityUnitAccessor
- func NewQuantityUnit(singular, plural, ucum string, bases ...QuantityUnitBaseAccessor) QuantityUnitAccessor
- func NewQuantityUnitWithUCUM(ucum string) QuantityUnitAccessor
- func QuantityUnitByName(name string) QuantityUnitAccessor
- func QuantityUnitByNameString(name StringAccessor) QuantityUnitAccessor
- func QuantityUnitWithName(name string) (QuantityUnitAccessor, int)
- func QuantityUnitWithNameString(name StringAccessor) (QuantityUnitAccessor, int)
- type QuantityUnitBaseAccessor
- type SimpleTypeInfoAccessor
- type StringAccessor
- type Stringifier
- type TemporalAccessor
- type TimeAccessor
- func NewTime(value time.Time) TimeAccessor
- func NewTimeHMSN(hour int, minute int, second int, nanosecond int) TimeAccessor
- func NewTimeHMSNWithPrecision(hour, minute, second, nanosecond int, precision DateTimePrecisions) TimeAccessor
- func NewTimeHMSNWithPrecisionAndSource(hour, minute, second int, nanosecond int, precision DateTimePrecisions, ...) TimeAccessor
- func NewTimeHMSNWithSource(hour int, minute int, second int, nanosecond int, source interface{}) TimeAccessor
- func NewTimeWithSource(value time.Time, source interface{}) TimeAccessor
- func ParseTime(value string) (TimeAccessor, error)
- func ParseTimeWithSource(value string, source interface{}) (TimeAccessor, error)
- type Tracer
- type TupleTypeInfoAccessor
- type TupleTypeInfoElementAccessor
- type TypeInfoAccessor
- type TypeInfoElementAccessor
- type TypeSpecAccessor
- func CommonBaseType(ti1 TypeSpecAccessor, ti2 TypeSpecAccessor) TypeSpecAccessor
- func ModelTypeSpec(adapter ModelAdapter, node interface{}) TypeSpecAccessor
- func NewTypeSpec(fqName FQTypeNameAccessor) TypeSpecAccessor
- func NewTypeSpecWithBase(fqName FQTypeNameAccessor, base TypeSpecAccessor) TypeSpecAccessor
Constants ¶
View Source
const ( BooleanDataType = iota + LiteralDataType IntegerDataType DecimalDataType StringDataType DateDataType DateTimeDataType TimeDataType QuantityDataType )
View Source
const NamespaceName = "System"
Variables ¶
View Source
var ( True = NewBooleanWithSource(true, nil) False = NewBooleanWithSource(false, nil) )
View Source
var ( DecimalZero = NewDecimalInt(0) DecimalOne = NewDecimalInt(1) DecimalTwo = NewDecimalInt(2) DecimalThree = NewDecimalInt(3) DecimalDotFive = NewDecimalFloat64(.5) DecimalE = NewDecimalFloat64(math.E) )
View Source
var ( DefaultQuantityUnit = NewQuantityUnitWithUCUM("1") EmptyQuantityUnit = NewQuantityUnitWithUCUM("") SecondQuantityUnit = NewQuantityUnit("second", "seconds", "s") MinuteQuantityUnit = NewQuantityUnit("minute", "minutes", "", NewQuantityUnitBase(SecondQuantityUnit, true, 60)) HourQuantityUnit = NewQuantityUnit("hour", "hours", "", NewQuantityUnitBase(SecondQuantityUnit, true, 60*60)) DayQuantityUnit = NewQuantityUnit("day", "days", "", NewQuantityUnitBase(SecondQuantityUnit, true, 24*60*60)) WeekQuantityUnit = NewQuantityUnit("week", "weeks", "", NewQuantityUnitBase(SecondQuantityUnit, true, 7*24*60*60)) MonthQuantityUnit = NewQuantityUnit("month", "months", "", NewQuantityUnitBase(SecondQuantityUnit, true, 30*24*60*60)) YearQuantityUnit = NewQuantityUnit("year", "years", "", NewQuantityUnitBase(SecondQuantityUnit, true, 365*24*60*60), NewQuantityUnitBase(MonthQuantityUnit, true, 12)) MillisecondQuantityUnit = NewQuantityUnit("millisecond", "milliseconds", "ms", NewQuantityUnitBase(SecondQuantityUnit, true, .001)) NanosecondQuantityUnit = NewQuantityUnit("nanosecond", "nanoseconds", "ns", NewQuantityUnitBase(SecondQuantityUnit, true, .000000001)) UCUMMinuteQuantityUnit = NewQuantityUnit("", "", "min", NewQuantityUnitBase(SecondQuantityUnit, false, 60)) UCUMHourQuantityUnit = NewQuantityUnit("", "", "h", NewQuantityUnitBase(SecondQuantityUnit, false, 60*60)) UCUMDayQuantityUnit = NewQuantityUnit("", "", "d", NewQuantityUnitBase(SecondQuantityUnit, false, 24*60*60)) UCUMWeekQuantityUnit = NewQuantityUnit("", "", "wk", NewQuantityUnitBase(SecondQuantityUnit, false, 7*24*60*60)) UCUMMonthQuantityUnit = NewQuantityUnit("", "", "mo", NewQuantityUnitBase(SecondQuantityUnit, false, 30*24*60*60)) UCUMYearQuantityUnit = NewQuantityUnit("", "", "a", NewQuantityUnitBase(SecondQuantityUnit, false, 365*24*60*60)) )
View Source
var BooleanTypeSpec = newAnyTypeSpec("Boolean")
View Source
var DecimalTypeSpec = newAnyTypeSpec("Decimal")
View Source
var EmptyCol = NewEmptyCol()
View Source
var EmptyString = newString("", nil)
View Source
var IntegerTypeSpec = newAnyTypeSpec("Integer")
View Source
var QuantityTypeSpec = newAnyTypeSpec("Quantity")
View Source
var StringTypeSpec = newAnyTypeSpec("String")
View Source
var UCUMSystemURI = NewString("http://unitsofmeasure.org")
View Source
var UndefinedTypeSpec = NewTypeSpecWithBase(nil, nil)
Functions ¶
func CastModelType ¶
func CastModelType(adapter ModelAdapter, node interface{}, name FQTypeNameAccessor) (interface{}, error)
func ConvertUnitToBase ¶
func ConvertUnitToBase(v1 DecimalAccessor, u1 QuantityUnitAccessor, exp1 int, v2 DecimalAccessor, u2 QuantityUnitAccessor, exp2 int, equal bool) (DecimalAccessor, DecimalAccessor, QuantityUnitAccessor)
func ConvertUnitToMostGranular ¶
func ConvertUnitToMostGranular(v1 DecimalAccessor, u1 QuantityUnitAccessor, exp1 int, v2 DecimalAccessor, u2 QuantityUnitAccessor, exp2 int, equal bool) (DecimalAccessor, DecimalAccessor, QuantityUnitAccessor)
func DecimalValueFloat64 ¶
func DecimalValueFloat64(node interface{}) interface{}
func Equal ¶
func Equal(n1 AnyAccessor, n2 AnyAccessor) bool
func Equivalent ¶
func Equivalent(n1 AnyAccessor, n2 AnyAccessor) bool
func FQTypeNameEqual ¶
func FQTypeNameEqual(t1 FQTypeNameAccessor, t2 FQTypeNameAccessor) bool
func HasModelType ¶
func HasModelType(adapter ModelAdapter, node interface{}, name FQTypeNameAccessor) bool
func IntegerValue ¶
func IntegerValue(node interface{}) interface{}
func IsCalendarDurationUnit ¶
func IsCalendarDurationUnit(unit QuantityUnitAccessor) bool
func ModelEqual ¶
func ModelEqual(adapter ModelAdapter, node1 interface{}, node2 interface{}) bool
func ModelEquivalent ¶
func ModelEquivalent(adapter ModelAdapter, node1 interface{}, node2 interface{}) bool
func NormalizedStringEqual ¶
func SystemAnyEqual ¶
func SystemAnyEqual(node1 AnyAccessor, node2 interface{}) bool
func SystemAnyTypeEqual ¶
func SystemAnyTypeEqual(node1 AnyAccessor, node2 interface{}) bool
func TemporalPrecisionEqual ¶
func TemporalPrecisionEqual(t1 TemporalAccessor, t2 TemporalAccessor) bool
func TypeEqual ¶
func TypeEqual(n1 AnyAccessor, n2 AnyAccessor) bool
Types ¶
type AnyAccessor ¶
type AnyAccessor interface { DataType() DataTypes TypeSpec() TypeSpecAccessor TypeInfo() TypeInfoAccessor Source() interface{} Equal(node interface{}) bool Equivalent(node interface{}) bool }
type ArithmeticApplier ¶
type ArithmeticApplier interface { Calc(operand DecimalValueAccessor, op ArithmeticOps) (DecimalValueAccessor, error) Abs() DecimalValueAccessor }
type ArithmeticOps ¶
type ArithmeticOps byte
const ( AdditionOp ArithmeticOps = '+' SubtractionOp ArithmeticOps = '-' MultiplicationOp ArithmeticOps = '*' DivisionOp ArithmeticOps = '/' DivOp ArithmeticOps = 'D' ModOp ArithmeticOps = 'M' )
type BaseFunction ¶
type BaseFunction struct {
// contains filtered or unexported fields
}
func NewBaseFunction ¶
func NewBaseFunction(name string, evaluatorParam int, minParams int, maxParams int) BaseFunction
func (*BaseFunction) EvaluatorParam ¶
func (f *BaseFunction) EvaluatorParam() int
func (*BaseFunction) MaxParams ¶
func (f *BaseFunction) MaxParams() int
func (*BaseFunction) MinParams ¶
func (f *BaseFunction) MinParams() int
func (*BaseFunction) Name ¶
func (f *BaseFunction) Name() string
type BooleanAccessor ¶
type BooleanAccessor interface { AnyAccessor Comparator Stringifier Negator Bool() bool }
func BooleanOf ¶
func BooleanOf(value bool) BooleanAccessor
func NewBoolean ¶
func NewBoolean(value bool) BooleanAccessor
func NewBooleanWithSource ¶
func NewBooleanWithSource(value bool, source interface{}) BooleanAccessor
func ParseBoolean ¶
func ParseBoolean(value string) (BooleanAccessor, error)
type ClassInfoAccessor ¶
type ClassInfoAccessor interface { TypeInfoAccessor Name() StringAccessor BaseType() StringAccessor Element() ColAccessor }
func NewClassInfo ¶
func NewClassInfo(namespace StringAccessor, name StringAccessor, baseType StringAccessor, element ColAccessor) ClassInfoAccessor
type ClassInfoElementAccessor ¶
type ClassInfoElementAccessor interface { TypeInfoElementAccessor }
func NewClassInfoElement ¶
func NewClassInfoElement(name StringAccessor, typeName StringAccessor, oneBased BooleanAccessor) ClassInfoElementAccessor
type ColAccessor ¶
type ColAccessor interface { AnyAccessor ItemTypeSpec() TypeSpecAccessor Empty() bool Count() int Get(i int) interface{} Contains(item interface{}) bool }
func NewColDelegate ¶
func NewColDelegate(col ColAccessor) ColAccessor
func NewEmptyCol ¶
func NewEmptyCol() ColAccessor
func NewEmptyColWithSource ¶
func NewEmptyColWithSource(source interface{}) ColAccessor
func NewSysArrayCol ¶
func NewSysArrayCol(itemTypeSpec TypeSpecAccessor, items []interface{}) ColAccessor
type ColModifier ¶
type ColModifier interface { ColAccessor Add(item interface{}) AddUnique(item interface{}) bool AddAll(collection ColAccessor) int AddAllUnique(collection ColAccessor) int }
func NewCol ¶
func NewCol(adapter ModelAdapter) ColModifier
func NewColWithItem ¶
func NewColWithItem(adapter ModelAdapter, item interface{}) ColModifier
func NewColWithSource ¶
func NewColWithSource(adapter ModelAdapter, source interface{}) ColModifier
func NewColWithSpec ¶
func NewColWithSpec(adapter ModelAdapter, itemTypeSpec TypeSpecAccessor) ColModifier
type Comparator ¶
type Comparator interface { AnyAccessor Compare(comparator Comparator) (int, OperatorStatus) }
type ContextAccessor ¶
type ContextAccessor interface { EnvVar(name string) (interface{}, bool) ContextNode() interface{} ModelAdapter() ModelAdapter NewCol() ColModifier NewColWithItem(item interface{}) ColModifier Tracer() Tracer }
type DataTypes ¶
type DataTypes int
const ColDataType DataTypes = 0x0002
const LiteralDataType DataTypes = 0x0200
const UndefinedDataType DataTypes = 0x0001
type DateAccessor ¶
type DateAccessor interface { DateTemporalAccessor Year() int Month() int Day() int }
func NewDate ¶
func NewDate(value time.Time) DateAccessor
func NewDateWithSource ¶
func NewDateWithSource(value time.Time, source interface{}) DateAccessor
func NewDateYMD ¶
func NewDateYMD(year int, month int, day int) DateAccessor
func NewDateYMDWithPrecision ¶
func NewDateYMDWithPrecision(year, month, day int, precision DateTimePrecisions) DateAccessor
func NewDateYMDWithPrecisionAndSource ¶
func NewDateYMDWithPrecisionAndSource(year, month, day int, precision DateTimePrecisions, source interface{}) DateAccessor
func NewDateYMDWithSource ¶
func NewDateYMDWithSource(year int, month int, day int, source interface{}) DateAccessor
func ParseDate ¶
func ParseDate(value string) (DateAccessor, error)
func ParseDateWithSource ¶
func ParseDateWithSource(value string, source interface{}) (DateAccessor, error)
type DateTemporalAccessor ¶
type DateTemporalAccessor interface { TemporalAccessor Time() time.Time Year() int Month() int Day() int Date() DateAccessor DateTime() DateTimeAccessor }
type DateTimeAccessor ¶
type DateTimeAccessor interface { DateTemporalAccessor Hour() int Minute() int Second() int Nanosecond() int Location() *time.Location }
func NewDateTime ¶
func NewDateTime(value time.Time) DateTimeAccessor
func NewDateTimeWithSource ¶
func NewDateTimeWithSource(value time.Time, source interface{}) DateTimeAccessor
func NewDateTimeYMDHMSNWithPrecision ¶
func NewDateTimeYMDHMSNWithPrecision(year, month, day, hour, minute, second, nanosecond int, loc *time.Location, precision DateTimePrecisions) DateTimeAccessor
func NewDateTimeYMDHMSNWithPrecisionAndSource ¶
func NewDateTimeYMDHMSNWithPrecisionAndSource(year, month, day, hour, minute, second, nanosecond int, loc *time.Location, precision DateTimePrecisions, source interface{}) DateTimeAccessor
func ParseDateTime ¶
func ParseDateTime(value string) (DateTimeAccessor, error)
func ParseDateTimeWithSource ¶
func ParseDateTimeWithSource(value string, source interface{}) (DateTimeAccessor, error)
type DateTimePrecisions ¶
type DateTimePrecisions int
const ( YearDatePrecision DateTimePrecisions = iota MonthDatePrecision DayDatePrecision HourTimePrecision MinuteTimePrecision SecondTimePrecision NanoTimePrecision )
type DecimalAccessor ¶
type DecimalAccessor interface { NumberAccessor Primitive() decimal.Decimal }
func DecimalOfInt ¶
func DecimalOfInt(value int32) DecimalAccessor
func NewDecimal ¶
func NewDecimal(value decimal.Decimal) DecimalAccessor
func NewDecimalFloat64 ¶
func NewDecimalFloat64(value float64) DecimalAccessor
func NewDecimalFloat64WithSource ¶
func NewDecimalFloat64WithSource(value float64, source interface{}) DecimalAccessor
func NewDecimalInt ¶
func NewDecimalInt(value int32) DecimalAccessor
func NewDecimalInt64 ¶
func NewDecimalInt64(value int64) DecimalAccessor
func NewDecimalInt64WithSource ¶
func NewDecimalInt64WithSource(value int64, source interface{}) DecimalAccessor
func NewDecimalIntWithSource ¶
func NewDecimalIntWithSource(value int32, source interface{}) DecimalAccessor
func NewDecimalWithSource ¶
func NewDecimalWithSource(value decimal.Decimal, source interface{}) DecimalAccessor
func ParseDecimal ¶
func ParseDecimal(value string) (DecimalAccessor, error)
func ParseDecimalWithSource ¶
func ParseDecimalWithSource(value string, source interface{}) (DecimalAccessor, error)
type DecimalValueAccessor ¶
type DecimalValueAccessor interface { AnyAccessor Value() DecimalAccessor WithValue(node NumberAccessor) DecimalValueAccessor ArithmeticOpSupported(op ArithmeticOps) bool }
type Evaluator ¶
type Evaluator interface {
Evaluate(ctx ContextAccessor, node interface{}, loop Looper) (interface{}, error)
}
type FQTypeNameAccessor ¶
type FQTypeNameAccessor interface { Anonymous() bool HasNamespace() bool Namespace() string Name() string String() string Equal(name FQTypeNameAccessor) bool }
func NewFQTypeName ¶
func NewFQTypeName(name string, namespace string) FQTypeNameAccessor
func NewTypeName ¶
func NewTypeName(name string) FQTypeNameAccessor
func ParseFQTypeName ¶
func ParseFQTypeName(fqName string) (FQTypeNameAccessor, error)
type FunctionExecutor ¶
type IntegerAccessor ¶
type IntegerAccessor interface { NumberAccessor Primitive() int32 }
func NewInteger ¶
func NewInteger(value int32) IntegerAccessor
func NewIntegerWithSource ¶
func NewIntegerWithSource(value int32, source interface{}) IntegerAccessor
func ParseInteger ¶
func ParseInteger(value string) (IntegerAccessor, error)
type ListTypeInfoAccessor ¶
type ListTypeInfoAccessor interface { TypeInfoAccessor ElementType() StringAccessor }
func NewListTypeInfo ¶
func NewListTypeInfo(elementType StringAccessor) ListTypeInfoAccessor
type Looper ¶
type Looper interface { Evaluator() Evaluator This() interface{} Index() int IncIndex(this interface{}) int Total() interface{} SetTotal(total interface{}) }
func NewLoopWithIndex ¶
type ModelAdapter ¶
type ModelAdapter interface { AsType(node interface{}, name FQTypeNameAccessor) (interface{}, error) CastToSystem(node interface{}) (AnyAccessor, error) TypeSpec(node interface{}) TypeSpecAccessor Equal(node1 interface{}, node2 interface{}) bool Equivalent(node1 interface{}, node2 interface{}) bool Children(node interface{}) (ColAccessor, error) }
type Negator ¶
type Negator interface { AnyAccessor Negate() AnyAccessor }
type NumberAccessor ¶
type NumberAccessor interface { AnyAccessor Comparator Stringifier DecimalValueAccessor Negator ArithmeticApplier Ceiling() NumberAccessor Exp() NumberAccessor Floor() NumberAccessor Ln() (NumberAccessor, error) Log(base NumberAccessor) (NumberAccessor, error) Power(exponent NumberAccessor) (NumberAccessor, bool) Round(precision int32) (NumberAccessor, error) Sqrt() (NumberAccessor, bool) Truncate(precision int32) NumberAccessor Int() int32 Int64() int64 Float32() float32 Float64() float64 BigFloat() *big.Float Decimal() decimal.Decimal One() bool Positive() bool HasFraction() bool }
type OperatorStatus ¶
type OperatorStatus int
const ( Inconvertible OperatorStatus = iota Empty Evaluated )
type QuantityAccessor ¶
type QuantityAccessor interface { AnyAccessor Comparator Stringifier DecimalValueAccessor Negator ArithmeticApplier Unit() StringAccessor ToUnit(unit StringAccessor) QuantityAccessor }
func NewQuantity ¶
func NewQuantity(value DecimalAccessor, unit StringAccessor) QuantityAccessor
func NewQuantityWithSource ¶
func NewQuantityWithSource(value DecimalAccessor, unit StringAccessor, source interface{}) QuantityAccessor
type QuantityUnitAccessor ¶
type QuantityUnitAccessor interface { Singular() StringAccessor Plural() StringAccessor UCUM() StringAccessor Equal(unit QuantityUnitAccessor) bool Name(value DecimalAccessor) StringAccessor NameWithExp(value DecimalAccessor, exp int) StringAccessor RootBase() QuantityUnitBaseAccessor HasBase(unit QuantityUnitAccessor, equal bool) bool CommonBase(other QuantityUnitAccessor, equal bool) QuantityUnitAccessor Factor(other QuantityUnitAccessor, exp int) NumberAccessor }
func NewQuantityUnit ¶
func NewQuantityUnit(singular, plural, ucum string, bases ...QuantityUnitBaseAccessor) QuantityUnitAccessor
func NewQuantityUnitWithUCUM ¶
func NewQuantityUnitWithUCUM(ucum string) QuantityUnitAccessor
func QuantityUnitByName ¶
func QuantityUnitByName(name string) QuantityUnitAccessor
func QuantityUnitByNameString ¶
func QuantityUnitByNameString(name StringAccessor) QuantityUnitAccessor
func QuantityUnitWithName ¶
func QuantityUnitWithName(name string) (QuantityUnitAccessor, int)
func QuantityUnitWithNameString ¶
func QuantityUnitWithNameString(name StringAccessor) (QuantityUnitAccessor, int)
type QuantityUnitBaseAccessor ¶
type QuantityUnitBaseAccessor interface { Unit() QuantityUnitAccessor Equal() bool Factor() float64 DecimalFactor() DecimalAccessor }
func NewQuantityUnitBase ¶
func NewQuantityUnitBase(unit QuantityUnitAccessor, equal bool, factor float64) QuantityUnitBaseAccessor
type SimpleTypeInfoAccessor ¶
type SimpleTypeInfoAccessor interface { TypeInfoAccessor Name() StringAccessor BaseType() StringAccessor }
func NewSimpleTypeInfo ¶
func NewSimpleTypeInfo(namespace StringAccessor, name StringAccessor, baseType StringAccessor) SimpleTypeInfoAccessor
type StringAccessor ¶
type StringAccessor interface { AnyAccessor Comparator Stringifier Length() int }
func NewString ¶
func NewString(value string) StringAccessor
func NewStringWithSource ¶
func NewStringWithSource(value string, source interface{}) StringAccessor
func StringOf ¶
func StringOf(value string) StringAccessor
func StringOfNil ¶
func StringOfNil(value string) StringAccessor
type Stringifier ¶
type Stringifier interface { AnyAccessor String() string }
type TemporalAccessor ¶
type TemporalAccessor interface { AnyAccessor Comparator Stringifier Precision() DateTimePrecisions LowestPrecision() DateTimePrecisions Add(quantity QuantityAccessor) (TemporalAccessor, error) }
type TimeAccessor ¶
type TimeAccessor interface { TemporalAccessor Hour() int Minute() int Second() int Nanosecond() int }
func NewTime ¶
func NewTime(value time.Time) TimeAccessor
func NewTimeHMSN ¶
func NewTimeHMSN(hour int, minute int, second int, nanosecond int) TimeAccessor
func NewTimeHMSNWithPrecision ¶
func NewTimeHMSNWithPrecision(hour, minute, second, nanosecond int, precision DateTimePrecisions) TimeAccessor
func NewTimeHMSNWithPrecisionAndSource ¶
func NewTimeHMSNWithPrecisionAndSource(hour, minute, second int, nanosecond int, precision DateTimePrecisions, source interface{}) TimeAccessor
func NewTimeHMSNWithSource ¶
func NewTimeHMSNWithSource(hour int, minute int, second int, nanosecond int, source interface{}) TimeAccessor
func NewTimeWithSource ¶
func NewTimeWithSource(value time.Time, source interface{}) TimeAccessor
func ParseTime ¶
func ParseTime(value string) (TimeAccessor, error)
func ParseTimeWithSource ¶
func ParseTimeWithSource(value string, source interface{}) (TimeAccessor, error)
type Tracer ¶
type Tracer interface { Enabled(name string) bool Trace(name string, col ColAccessor) }
type TupleTypeInfoAccessor ¶
type TupleTypeInfoAccessor interface { TypeInfoAccessor Element() ColAccessor }
func NewTupleTypeInfo ¶
func NewTupleTypeInfo(namespace StringAccessor, element ColAccessor) TupleTypeInfoAccessor
type TupleTypeInfoElementAccessor ¶
type TupleTypeInfoElementAccessor interface { TypeInfoElementAccessor }
func NewTupleTypeInfoElement ¶
func NewTupleTypeInfoElement(name StringAccessor, typeName StringAccessor, oneBased BooleanAccessor) TupleTypeInfoElementAccessor
type TypeInfoAccessor ¶
type TypeInfoAccessor interface { AnyAccessor Namespace() StringAccessor }
type TypeInfoElementAccessor ¶
type TypeInfoElementAccessor interface { AnyAccessor Name() StringAccessor Type() StringAccessor OneBased() BooleanAccessor }
type TypeSpecAccessor ¶
type TypeSpecAccessor interface { Anonymous() bool Base() TypeSpecAccessor FQName() FQTypeNameAccessor FQBaseName() FQTypeNameAccessor String() string EqualType(other TypeSpecAccessor) bool ExtendsName(name FQTypeNameAccessor) bool }
func CommonBaseType ¶
func CommonBaseType(ti1 TypeSpecAccessor, ti2 TypeSpecAccessor) TypeSpecAccessor
func ModelTypeSpec ¶
func ModelTypeSpec(adapter ModelAdapter, node interface{}) TypeSpecAccessor
func NewTypeSpec ¶
func NewTypeSpec(fqName FQTypeNameAccessor) TypeSpecAccessor
func NewTypeSpecWithBase ¶
func NewTypeSpecWithBase(fqName FQTypeNameAccessor, base TypeSpecAccessor) TypeSpecAccessor
Click to show internal directories.
Click to hide internal directories.