Documentation ¶
Index ¶
- func AnyCompare(left any, operator string, right any) (bool, error)
- func Compare(left FCT, operator string, right FCT) (bool, error)
- func UnsecureAnyCompare(left any, operator string, right any) bool
- func UnsecureCompare(left FCT, operator string, right FCT) bool
- type FCT
- func Calc2(v1 FCT, operator1 string, v2 FCT) (FCT, error)
- func Calc3(v1 FCT, operator1 string, v2 FCT, operator2 string, v3 FCT) (FCT, error)
- func Calc4(v1 FCT, operator1 string, v2 FCT, operator2 string, v3 FCT, operator3 string, ...) (FCT, error)
- func Calc5(v1 FCT, operator1 string, v2 FCT, operator2 string, v3 FCT, operator3 string, ...) (FCT, error)
- func Calc6(v1 FCT, operator1 string, v2 FCT, operator2 string, v3 FCT, operator3 string, ...) (FCT, error)
- func New(val any, dval ...FCT) (*FCT, error)
- func UnsafeNew(val any, dval ...FCT) FCT
- func UnsafePtrNew(val any, dval ...FCT) *FCT
- func (slf *FCT) Ceil(places int, dval ...FCT) (FCT, error)
- func (slf *FCT) Float64(dval ...FCT) (float64, error)
- func (slf *FCT) Floor(places int, dval ...FCT) (FCT, error)
- func (slf *FCT) Get(dval FCT) FCT
- func (slf FCT) MarshalJSON() ([]byte, error)
- func (slf *FCT) Pow(val any, dval ...FCT) (FCT, error)
- func (slf *FCT) PtrCeil(places int, dval ...FCT) (*FCT, error)
- func (slf *FCT) PtrFloat64(dval ...FCT) (*float64, error)
- func (slf *FCT) PtrFloor(places int, dval ...FCT) (*FCT, error)
- func (slf *FCT) PtrPow(val any, dval ...FCT) (*FCT, error)
- func (slf *FCT) PtrRound(places int, dval ...FCT) (*FCT, error)
- func (slf *FCT) PtrTruncate(places int, dval ...FCT) (*FCT, error)
- func (slf *FCT) Round(places int, dval ...FCT) (FCT, error)
- func (slf *FCT) Scan(value any) error
- func (slf *FCT) ToString() (string, error)
- func (slf *FCT) Truncate(places int, dval ...FCT) (FCT, error)
- func (slf *FCT) UnmarshalJSON(decimalBytes []byte) error
- func (slf *FCT) UnsafeCeil(places int, dval ...FCT) FCT
- func (slf *FCT) UnsafeFloat64(dval ...FCT) float64
- func (slf *FCT) UnsafeFloor(places int, dval ...FCT) FCT
- func (slf *FCT) UnsafePow(val any, dval ...FCT) FCT
- func (slf *FCT) UnsafePtrCeil(places int, dval ...FCT) *FCT
- func (slf *FCT) UnsafePtrFloat64(dval ...FCT) *float64
- func (slf *FCT) UnsafePtrFloor(places int, dval ...FCT) *FCT
- func (slf *FCT) UnsafePtrPow(val any, dval ...FCT) *FCT
- func (slf *FCT) UnsafePtrRound(places int, dval ...FCT) *FCT
- func (slf *FCT) UnsafePtrTruncate(places int, dval ...FCT) *FCT
- func (slf *FCT) UnsafeRound(places int, dval ...FCT) FCT
- func (slf *FCT) UnsafeToString() string
- func (slf *FCT) UnsafeTruncate(places int, dval ...FCT) FCT
- func (slf FCT) Value() (driver.Value, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AnyCompare ¶
supported operator: ==, !=, <, <=, >, >=
func UnsecureAnyCompare ¶
supported operator: ==, !=, <, <=, >, >=
Types ¶
type FCT ¶
type FCT struct {
// contains filtered or unexported fields
}
var (
Zero FCT
)
func Calc4 ¶
func Calc4(v1 FCT, operator1 string, v2 FCT, operator2 string, v3 FCT, operator3 string, v4 FCT) (FCT, error)
supported operator: +, -, *, /, %
func Calc5 ¶
func Calc5(v1 FCT, operator1 string, v2 FCT, operator2 string, v3 FCT, operator3 string, v4 FCT, operator4 string, v5 FCT) (FCT, error)
supported operator: +, -, *, /, %
func Calc6 ¶
func Calc6(v1 FCT, operator1 string, v2 FCT, operator2 string, v3 FCT, operator3 string, v4 FCT, operator4 string, v5 FCT, operator5 string, v6 FCT) (FCT, error)
supported operator: +, -, *, /, %
func UnsafePtrNew ¶
be careful, unsafe perform panic if theres an error
func (FCT) MarshalJSON ¶
MarshalJSON implements the json.Marshaler interface.
func (*FCT) UnmarshalJSON ¶
UnmarshalJSON implements the json.Unmarshaler interface.
func (*FCT) UnsafeCeil ¶
be careful, unsafe perform panic if theres an error
func (*FCT) UnsafeFloat64 ¶
be careful, unsafe perform panic if theres an error
func (*FCT) UnsafeFloor ¶
be careful, unsafe perform panic if theres an error
func (*FCT) UnsafePtrCeil ¶
be careful, unsafe perform panic if theres an error
func (*FCT) UnsafePtrFloat64 ¶
be careful, unsafe perform panic if theres an error
func (*FCT) UnsafePtrFloor ¶
be careful, unsafe perform panic if theres an error
func (*FCT) UnsafePtrPow ¶
be careful, unsafe perform panic if theres an error
func (*FCT) UnsafePtrRound ¶
be careful, unsafe perform panic if theres an error
func (*FCT) UnsafePtrTruncate ¶
be careful, unsafe perform panic if theres an error
func (*FCT) UnsafeRound ¶
be careful, unsafe perform panic if theres an error
func (*FCT) UnsafeToString ¶
be careful, unsafe perform panic if theres an error
func (*FCT) UnsafeTruncate ¶
be careful, unsafe perform panic if theres an error