refactor error

This commit is contained in:
Lunny Xiao 2019-01-20 11:26:46 +08:00
parent 851aa49505
commit b5aa106145
No known key found for this signature in database
GPG Key ID: C3B7C91B632F738A
2 changed files with 3 additions and 1 deletions

View File

@ -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

View File

@ -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