error.go 2.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. // Copyright 2016 The Xorm Authors. All rights reserved.
  2. // Use of this source code is governed by a BSD-style
  3. // license that can be found in the LICENSE file.
  4. package builder
  5. import "errors"
  6. var (
  7. // ErrNotSupportType not supported SQL type error
  8. ErrNotSupportType = errors.New("Not supported SQL type")
  9. // ErrNoNotInConditions no NOT IN params error
  10. ErrNoNotInConditions = errors.New("No NOT IN conditions")
  11. // ErrNoInConditions no IN params error
  12. ErrNoInConditions = errors.New("No IN conditions")
  13. // ErrNeedMoreArguments need more arguments
  14. ErrNeedMoreArguments = errors.New("Need more sql arguments")
  15. // ErrNoTableName no table name
  16. ErrNoTableName = errors.New("No table indicated")
  17. // ErrNoColumnToUpdate no column to update
  18. ErrNoColumnToUpdate = errors.New("No column(s) to update")
  19. // ErrNoColumnToInsert no column to insert
  20. ErrNoColumnToInsert = errors.New("No column(s) to insert")
  21. // ErrNotSupportDialectType not supported dialect type error
  22. ErrNotSupportDialectType = errors.New("Not supported dialect type")
  23. // ErrNotUnexpectedUnionConditions using union in a wrong way
  24. ErrNotUnexpectedUnionConditions = errors.New("Unexpected conditional fields in UNION query")
  25. // ErrUnsupportedUnionMembers unexpected members in UNION query
  26. ErrUnsupportedUnionMembers = errors.New("Unexpected members in UNION query")
  27. // ErrUnexpectedSubQuery Unexpected sub-query in SELECT query
  28. ErrUnexpectedSubQuery = errors.New("Unexpected sub-query in SELECT query")
  29. // ErrDialectNotSetUp dialect is not setup yet
  30. ErrDialectNotSetUp = errors.New("Dialect is not setup yet, try to use `Dialect(dbType)` at first")
  31. // ErrInvalidLimitation offset or limit is not correct
  32. ErrInvalidLimitation = errors.New("Offset or limit is not correct")
  33. // ErrUnnamedDerivedTable Every derived table must have its own alias
  34. ErrUnnamedDerivedTable = errors.New("Every derived table must have its own alias")
  35. // ErrInconsistentDialect Inconsistent dialect in same builder
  36. ErrInconsistentDialect = errors.New("Inconsistent dialect in same builder")
  37. )