refactor error
This commit is contained in:
parent
851aa49505
commit
b5aa106145
2
error.go
2
error.go
|
@ -26,6 +26,8 @@ var (
|
|||
ErrNotImplemented = errors.New("Not implemented")
|
||||
// ErrConditionType condition type unsupported
|
||||
ErrConditionType = errors.New("Unsupported condition type")
|
||||
// ErrUnSupportedSQLType parameter of SQL is not supported
|
||||
ErrUnSupportedSQLType = errors.New("unsupported sql type")
|
||||
)
|
||||
|
||||
// ErrFieldIsNotExist columns does not exist
|
||||
|
|
|
@ -133,7 +133,7 @@ func (statement *Statement) SQL(query interface{}, args ...interface{}) *Stateme
|
|||
statement.RawSQL = query.(string)
|
||||
statement.RawParams = args
|
||||
default:
|
||||
statement.lastError = errors.New("unsupported sql type")
|
||||
statement.lastError = ErrUnSupportedSQLType
|
||||
}
|
||||
|
||||
return statement
|
||||
|
|
Loading…
Reference in New Issue