File tree Expand file tree Collapse file tree 1 file changed +9
-0
lines changed Expand file tree Collapse file tree 1 file changed +9
-0
lines changed Original file line number Diff line number Diff line change @@ -19,6 +19,7 @@ import (
1919 "strings"
2020
2121 "github.com/dolthub/vitess/go/vt/proto/query"
22+ "github.com/dolthub/vitess/go/vt/sqlparser"
2223 "github.com/shopspring/decimal"
2324
2425 "github.com/dolthub/go-mysql-server/sql"
@@ -35,6 +36,7 @@ type Literal struct {
3536var _ sql.Expression = & Literal {}
3637var _ sql.Expression2 = & Literal {}
3738var _ sql.CollationCoercible = & Literal {}
39+ var _ sqlparser.Injectable = & Literal {}
3840
3941// NewLiteral creates a new Literal expression.
4042func NewLiteral (value interface {}, fieldType sql.Type ) * Literal {
@@ -150,3 +152,10 @@ func (lit *Literal) Type2() sql.Type2 {
150152func (p * Literal ) Value () interface {} {
151153 return p .value
152154}
155+
156+ func (lit * Literal ) WithResolvedChildren (children []any ) (any , error ) {
157+ if len (children ) != 0 {
158+ return nil , sql .ErrInvalidChildrenNumber .New (lit , len (children ), 0 )
159+ }
160+ return lit , nil
161+ }
You can’t perform that action at this time.
0 commit comments