// Copyright 2015 The Xorm Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.

package xorm

import (
	"errors"

	"code.forgejo.org/xorm/xorm/dialects"
)

var (
	// ErrPtrSliceType represents a type error
	ErrPtrSliceType = errors.New("A point to a slice is needed")
	// ErrParamsType params error
	ErrParamsType = errors.New("Params type error")
	// ErrTableNotFound table not found error
	ErrTableNotFound = errors.New("Table not found")
	// ErrUnSupportedType unsupported error
	ErrUnSupportedType = errors.New("Unsupported type error")
	// ErrNotExist record does not exist error
	ErrNotExist = errors.New("Record does not exist")
	// ErrCacheFailed cache failed error
	ErrCacheFailed = errors.New("Cache failed")
	// ErrConditionType condition type unsupported
	ErrConditionType = errors.New("Unsupported condition type")
	// ErrForeignKeyViolation occurs when a modification is attempted that violates the DB's foreign keys
	ErrForeignKeyViolation = dialects.ErrForeignKeyViolation
	// ErrUniqueConstraintViolation occurs when a modification attempts to add a duplicate value to a table that
	// violates a unique constraint, including a primary key
	ErrUniqueConstraintViolation = dialects.ErrUniqueConstraintViolation
	// ErrDeadlock occurs when a deadlock in the database occurs.
	ErrDeadlock = dialects.ErrDeadlock
)
