aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--core/vm/sqlvm/ast/types.go20
1 files changed, 10 insertions, 10 deletions
diff --git a/core/vm/sqlvm/ast/types.go b/core/vm/sqlvm/ast/types.go
index 3909e7575..c37e6c012 100644
--- a/core/vm/sqlvm/ast/types.go
+++ b/core/vm/sqlvm/ast/types.go
@@ -68,6 +68,16 @@ func ComposeDataType(major DataTypeMajor, minor DataTypeMinor) DataType {
return (DataType(major) << 8) | DataType(minor)
}
+// IsFixedRange checks if major is in range of DataTypeMajorFixed.
+func (d DataTypeMajor) IsFixedRange() bool {
+ return d >= DataTypeMajorFixed && d-DataTypeMajorFixed <= 0x1f
+}
+
+// IsUfixedRange checks if major is in range of DataTypeMajorUfixed.
+func (d DataTypeMajor) IsUfixedRange() bool {
+ return d >= DataTypeMajorUfixed && d-DataTypeMajorUfixed <= 0x1f
+}
+
// Size return the bytes of the data type occupied.
func (dt DataType) Size() uint8 {
major, minor := DecomposeDataType(dt)
@@ -91,16 +101,6 @@ func (dt DataType) Size() uint8 {
}
}
-// IsFixedRange checks if major is in range of DataTypeMajorFixed.
-func (d DataTypeMajor) IsFixedRange() bool {
- return d >= DataTypeMajorFixed && d-DataTypeMajorFixed <= 0x1f
-}
-
-// IsUfixedRange checks if major is in range of DataTypeMajorUfixed.
-func (d DataTypeMajor) IsUfixedRange() bool {
- return d >= DataTypeMajorUfixed && d-DataTypeMajorUfixed <= 0x1f
-}
-
// DataTypeEncode encodes data type node into DataType.
func DataTypeEncode(n TypeNode) (DataType, error) {
if n == nil {