func (i *AutoIncrement) IsNullable() bool {
	return false
}
IsNullable implements the Expression interface.
package expression
import (
	"fmt"
	"gopkg.in/src-d/go-errors.v1"
	"github.com/dolthub/go-mysql-server/sql"
)
var (
	ErrAutoIncrementUnsupported = errors.NewKind("table %s does not support AUTO_INCREMENT columns")
	ErrNoAutoIncrementCols = errors.NewKind("table %s has no AUTO_INCREMENT columns")
)
type AutoIncrement struct {
	UnaryExpression
	autoTbl sql.AutoIncrementTable
	autoCol *sql.Column
}
func NewAutoIncrement(ctx *sql.Context, table sql.Table, given sql.Expression) (*AutoIncrement, error) {
	autoTbl, ok := table.(sql.AutoIncrementTable)
	if !ok {
		return nil, ErrAutoIncrementUnsupported.New(table.Name())
	}
	var autoCol *sql.Column
	for _, c := range autoTbl.Schema() {
		if c.AutoIncrement {
			autoCol = c
			break
		}
	}
	if autoCol == nil {
		return nil, ErrNoAutoIncrementCols.New(table.Name())
	}
	return &AutoIncrement{
		UnaryExpression{Child: given},
		autoTbl,
		autoCol,
	}, nil
}