diff options
author | Jhih-Ming Huang <jm.huang@cobinhood.com> | 2019-03-15 17:31:52 +0800 |
---|---|---|
committer | Jhih-Ming Huang <jm.huang@cobinhood.com> | 2019-05-06 10:44:04 +0800 |
commit | 9e8e6408e3c1aafab1b09e5eaed6bf3e7d02e6a7 (patch) | |
tree | 91a1417ad5307d23abd4a58a1414512a8e1f343a /core/vm/sqlvm/errors | |
parent | 8fd1dfb4027b6550133e7f3d7a152fbae54f56f8 (diff) | |
download | dexon-9e8e6408e3c1aafab1b09e5eaed6bf3e7d02e6a7.tar dexon-9e8e6408e3c1aafab1b09e5eaed6bf3e7d02e6a7.tar.gz dexon-9e8e6408e3c1aafab1b09e5eaed6bf3e7d02e6a7.tar.bz2 dexon-9e8e6408e3c1aafab1b09e5eaed6bf3e7d02e6a7.tar.lz dexon-9e8e6408e3c1aafab1b09e5eaed6bf3e7d02e6a7.tar.xz dexon-9e8e6408e3c1aafab1b09e5eaed6bf3e7d02e6a7.tar.zst dexon-9e8e6408e3c1aafab1b09e5eaed6bf3e7d02e6a7.zip |
core: vm: sqlvm: ast: add size func and move error code to errors.go
Move error code to errors.go, and implement Size method for column field.
Diffstat (limited to 'core/vm/sqlvm/errors')
-rw-r--r-- | core/vm/sqlvm/errors/errors.go | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/core/vm/sqlvm/errors/errors.go b/core/vm/sqlvm/errors/errors.go index e276245e5..ae3c3b8a5 100644 --- a/core/vm/sqlvm/errors/errors.go +++ b/core/vm/sqlvm/errors/errors.go @@ -108,6 +108,12 @@ const ( ErrorCodeInvalidUfixedSize ErrorCodeInvalidFixedFractionalDigits ErrorCodeInvalidUfixedFractionalDigits + ErrorCodeDataTypeEncode + ErrorCodeDataTypeDecode + ErrorCodeDecimalEncode + ErrorCodeDecimalDecode + ErrorCodeGetMinMax + // Runtime Error ErrorCodeInvalidDataType ErrorCodeOverflow @@ -135,6 +141,11 @@ var errorCodeMap = [...]string{ ErrorCodeInvalidUfixedSize: "invalid ufixed size", ErrorCodeInvalidFixedFractionalDigits: "invalid fixed fractional digits", ErrorCodeInvalidUfixedFractionalDigits: "invalid ufixed fractional digits", + ErrorCodeDataTypeEncode: "data type encode failed", + ErrorCodeDataTypeDecode: "data type decode failed", + ErrorCodeDecimalEncode: "decimal encode failed", + ErrorCodeDecimalDecode: "decimal decode failed", + ErrorCodeGetMinMax: "get (min, max) failed", // Runtime Error ErrorCodeInvalidDataType: "invalid data type", ErrorCodeOverflow: "overflow", |