@@ -26,42 +26,42 @@ type ErrCode struct {
26
26
}
27
27
28
28
var (
29
- FACTORY_INITED = New ("10002" , "Factory have been initialized" )
30
- PARSE_MODEL_TABLEINFO_FAILED = New ("11001" , "Parse Model's table info failed" )
31
- MODEL_NOT_REGISTER = New ("11002" , "Register model not found" )
32
- OBJECT_NOT_SUPPORT = New ("11101" , "Object not support" )
33
- PARSE_OBJECT_NOT_STRUCT = New ("11102" , "Parse interface's info but not a struct" )
34
- PARSE_OBJECT_NOT_SLICE = New ("11103" , "Parse interface's info but not a slice" )
35
- PARSE_OBJECT_NOT_MAP = New ("11104" , "Parse interface's info but not a map" )
36
- PARSE_OBJECT_NOT_SIMPLETYPE = New ("11105" , "Parse interface's info but not a simple type" )
37
- SLICE_SLICE_NOT_SUPPORT = New ("11106" , "Parse interface's info: [][]slice not support" )
38
- GET_OBJECTINFO_FAILED = New ("11121" , "Parse interface's info failed" )
39
- SQL_ID_DUPLICATES = New ("11205" , "Sql id is duplicates" )
40
- DESERIALIZE_FAILED = New ("11206" , "Deserialize value failed" )
41
- PARSE_SQL_VAR_ERROR = New ("12001" , "SQL PARSE ERROR" )
42
- PARSE_SQL_PARAM_ERROR = New ("12002" , "SQL PARSE parameter error" )
43
- PARSE_SQL_PARAM_VAR_NUMBER_ERROR = New ("12003" , "SQL PARSE parameter var number error" )
44
- PARSE_PARSER_NIL_ERROR = New ("12004" , "Dynamic sql parser is nil error" )
45
- PARSE_DYNAMIC_SQL_ERROR = New ("12010" , "Parse dynamic sql error" )
46
- PARSE_TEMPLATE_NIL_ERROR = New ("12101" , "Parse template is nil" )
47
- EXECUTOR_COMMIT_ERROR = New ("21001" , "executor was closed when transaction commit" )
48
- EXECUTOR_BEGIN_ERROR = New ("21002" , "executor was closed when transaction begin" )
49
- EXECUTOR_QUERY_ERROR = New ("21003" , "executor was closed when exec sql" )
50
- EXECUTOR_GET_CONNECTION_ERROR = New ("21003" , "executor get connection error" )
51
- TRANSACTION_WITHOUT_BEGIN = New ("22001" , "Transaction without begin" )
52
- TRANSACTION_COMMIT_ERROR = New ("22002" , "Transaction commit error" )
53
- TRANSACTION_BUSINESS_ERROR = New ("22003" , "Business error in transaction" )
54
- CONNECTION_PREPARE_ERROR = New ("23001" , "Connection prepare error" )
55
- STATEMENT_QUERY_ERROR = New ("24001" , "statement query error" )
56
- STATEMENT_EXEC_ERROR = New ("24002" , "statement exec error" )
57
- QUERY_TYPE_ERROR = New ("25001" , "select data convert error" )
58
- RESULT_POINTER_IS_NIL = New ("31000" , "result type is a nil pointer" )
59
- RESULT_ISNOT_POINTER = New ("31001" , "result type is not pointer" )
60
- RESULT_PTR_VALUE_IS_POINTER = New ("31002" , "result type is pointer of pointer" )
61
- RUNNER_NOT_READY = New ("31003" , "Runner not ready, may sql or param have some error" )
62
- RESULT_NAME_NOT_FOUND = New ("31004" , "result name not found" )
63
- RESULT_SELECT_EMPTY_VALUE = New ("31005" , "select return empty value" )
64
- RESULT_SET_VALUE_FAILED = New ("31006" , "result set value failed" )
29
+ FactoryInited = New ("10002" , "Factory have been initialized" )
30
+ ParseModelTableinfoFailed = New ("11001" , "Parse Model's table info failed" )
31
+ ModelNotRegister = New ("11002" , "Register model not found" )
32
+ ObjectNotSupport = New ("11101" , "Object not support" )
33
+ ParseObjectNotStruct = New ("11102" , "Parse interface's info but not a struct" )
34
+ ParseObjectNotSlice = New ("11103" , "Parse interface's info but not a slice" )
35
+ ParseObjectNotMap = New ("11104" , "Parse interface's info but not a map" )
36
+ ParseObjectNotSimpletype = New ("11105" , "Parse interface's info but not a simple type" )
37
+ SliceSliceNotSupport = New ("11106" , "Parse interface's info: [][]slice not support" )
38
+ GetObjectinfoFailed = New ("11121" , "Parse interface's info failed" )
39
+ SqlIdDuplicates = New ("11205" , "Sql id is duplicates" )
40
+ DeserializeFailed = New ("11206" , "Deserialize value failed" )
41
+ ParseSqlVarError = New ("12001" , "SQL PARSE ERROR" )
42
+ ParseSqlParamError = New ("12002" , "SQL PARSE parameter error" )
43
+ ParseSqlParamVarNumberError = New ("12003" , "SQL PARSE parameter var number error" )
44
+ ParseParserNilError = New ("12004" , "Dynamic sql parser is nil error" )
45
+ ParseDynamicSqlError = New ("12010" , "Parse dynamic sql error" )
46
+ ParseTemplateNilError = New ("12101" , "Parse template is nil" )
47
+ ExecutorCommitError = New ("21001" , "executor was closed when transaction commit" )
48
+ ExecutorBeginError = New ("21002" , "executor was closed when transaction begin" )
49
+ ExecutorQueryError = New ("21003" , "executor was closed when exec sql" )
50
+ ExecutorGetConnectionError = New ("21003" , "executor get connection error" )
51
+ TransactionWithoutBegin = New ("22001" , "Transaction without begin" )
52
+ TransactionCommitError = New ("22002" , "Transaction commit error" )
53
+ TransactionBusinessError = New ("22003" , "Business error in transaction" )
54
+ ConnectionPrepareError = New ("23001" , "Connection prepare error" )
55
+ StatementQueryError = New ("24001" , "statement query error" )
56
+ StatementExecError = New ("24002" , "statement exec error" )
57
+ QueryTypeError = New ("25001" , "select data convert error" )
58
+ ResultPointerIsNil = New ("31000" , "result type is a nil pointer" )
59
+ ResultIsnotPointer = New ("31001" , "result type is not pointer" )
60
+ ResultPtrValueIsPointer = New ("31002" , "result type is pointer of pointer" )
61
+ RunnerNotReady = New ("31003" , "Runner not ready, may sql or param have some error" )
62
+ ResultNameNotFound = New ("31004" , "result name not found" )
63
+ ResultSelectEmptyValue = New ("31005" , "select return empty value" )
64
+ ResultSetValueFailed = New ("31006" , "result set value failed" )
65
65
)
66
66
67
67
func New (code , message string ) * ErrCode {
0 commit comments