Documentation ¶
Index ¶
Constants ¶
View Source
const ( ByteType = `Byte` BoolType = `Bool` Int16Type = `Int16` Int32Type = `Int32` Int64Type = `Int64` FixedDecimalType = `FixedDecimal` FloatType = `Float` DoubleType = `Double` StringType = `String` WStringType = `WString` V_StringType = `V_String` V_WStringType = `V_WString` DateType = `Date` DateTimeType = `DateTime` )
View Source
const ( Null = 0 Number = 1 String = 2 Date = 3 Bool = 4 )
Variables ¶
This section is empty.
Functions ¶
func Calculate ¶
func Calculate(formula string, info RecordInfo) (interface{}, []error)
func NotifyError ¶
func NotifyError(notifier ErrorNotifier, msg string)
Types ¶
type Calculator ¶
type Calculator interface {
Calculate() (interface{}, []error)
}
func NewCalculator ¶
func NewCalculator(formula string, info RecordInfo) (Calculator, []error)
type ErrorNotifier ¶
type ErrorNotifier interface { GetParser() antlr.Parser antlr.ParserRuleContext }
type HasLeftRightTypes ¶
type HasLeftRightTypes interface { GetLeft() parser.IExprContext GetRight() parser.IExprContext }
type RecordInfo ¶
type RecordInfo interface { GetCurrentBool(fieldName string) (bool, bool, error) GetCurrentInt(fieldName string) (int, bool, error) GetCurrentFloat(fieldName string) (float64, bool, error) GetCurrentString(fieldName string) (string, bool, error) GetCurrentDate(fieldName string) (time.Time, bool, error) GetFieldTypeByName(fieldName string) (string, error) }
Source Files ¶
Click to show internal directories.
Click to hide internal directories.