function

package
v0.14.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 1, 2022 License: Apache-2.0 Imports: 48 Imported by: 1

Documentation

Index

Constants

View Source
const (
	// NumBytes counts the number of bytes in a string or binary content.
	NumBytes = CountType(false)
	// NumChars counts the number of characters in a string or binary content.
	NumChars = CountType(true)
)

Variables

View Source
var BuiltIns = []sql.Function{}/* 238 elements not displayed */

BuiltIns is the set of built-in functions any integrator can use

View Source
var ErrDivisionByZero = errors.NewKind("division by zero")
View Source
var ErrFunctionAlreadyRegistered = errors.NewKind("function '%s' is already registered")

ErrFunctionAlreadyRegistered is thrown when a function is already registered

View Source
var ErrIllegalLockNameArgType = errors.NewKind("Illegal parameter data type %s for operation '%s'")

ErrIllegalLockNameArgType is a kind of error that is thrown when the parameter passed as a lock name is not a string.

View Source
var ErrInvalidArgumentForLogarithm = errors.NewKind("invalid argument value for logarithm: %v")

ErrInvalidArgumentForLogarithm is returned when an invalid argument value is passed to a logarithm function

View Source
var ErrInvalidArgumentType = errors.NewKind("function '%s' received invalid argument types")

ErrInvalidArgumentType is thrown when a function receives invalid argument types

View Source
var ErrInvalidSRID = errors.NewKind("There's no spatial reference with SRID %d")
View Source
var ErrInvalidType = errors.NewKind("%s received non-point type")
View Source
var ErrLatitudeOutOfRange = errors.NewKind("latitude %v is out of range in function %s. it must be within [-90.0, 90.0]")
View Source
var ErrLongitudeOutOfRange = errors.NewKind("longitude %v is out of range in function %s. it must be within [-180.0, 180.0]")
View Source
var ErrNegativeRepeatCount = errors.NewKind("negative Repeat count: %v")
View Source
var ErrNonGeographic = errors.NewKind("function %s is only defined for geographic spatial reference systems, but one of its argument is in SRID %v, which is not geographic")
View Source
var ErrTimeUnexpectedlyNil = errors.NewKind("time in function '%s' unexpectedly nil")

ErrTimeUnexpectedlyNil is thrown when a function encounters and unexpectedly nil time

View Source
var ErrTooHighPrecision = errors.NewKind("Too-big precision %d for '%s'. Maximum is %d.")
View Source
var ErrUintOverflow = errors.NewKind(
	"Unsigned integer too big to fit on signed integer")
View Source
var ErrUnknownType = errors.NewKind("function '%s' encountered unknown type %T")

ErrUnknownType is thrown when a function encounters and unknown type

View Source
var ErrUnsupportedJSONFunction = errors.NewKind("unsupported JSON function: %s")

ErrUnsupportedJSONFunction is returned when a unsupported JSON function is called.

View Source
var ErrUnsupportedType = errors.NewKind("unsupported type for greatest/least argument: %T")

ErrUnsupportedType is returned when an argument to Greatest or Latest is not numeric or string

Functions

func CreateNewGetLock

func CreateNewGetLock(ls *sql.LockSubsystem) func(e1, e2 sql.Expression) sql.Expression

CreateNewGetLock returns a new GetLock object

func EvalGeomFromWKB added in v0.14.0

func EvalGeomFromWKB(ctx *sql.Context, row sql.Row, exprs []sql.Expression, expectedGeomType int) (interface{}, error)

EvalGeomFromWKB takes in arguments for the ST_FROMWKB functions, and parses them to their corresponding geometry type

func FindBBox added in v0.12.0

func FindBBox(v interface{}) [4]float64

func FindDimension added in v0.14.0

func FindDimension(g sql.GeometryValue) interface{}

func GeomCollToSlice added in v0.14.0

func GeomCollToSlice(g sql.GeomColl) interface{}

func GeomCollToWKT added in v0.14.0

func GeomCollToWKT(g sql.GeomColl, order bool) string

GeomCollToWKT converts a sql.Polygon to a string

func GetLockingFuncs

func GetLockingFuncs(ls *sql.LockSubsystem) []sql.Function

func IsFreeLockFunc

func IsFreeLockFunc(_ *sql.Context, ls *sql.LockSubsystem, lockName string) (interface{}, error)

IsFreeLockFunc is the function logic that is executed when the is_free_lock function is called.

func IsUsedLockFunc

func IsUsedLockFunc(ctx *sql.Context, ls *sql.LockSubsystem, lockName string) (interface{}, error)

IsUsedLockFunc is the function logic that is executed when the is_used_lock function is called.

func LineToSlice added in v0.12.0

func LineToSlice(l sql.LineString) [][2]float64

func LineToWKT added in v0.12.0

func LineToWKT(l sql.LineString, order bool) string

LineToWKT converts a sql.LineString to a string

func MLineToSlice added in v0.14.0

func MLineToSlice(p sql.MultiLineString) [][][2]float64

func MPointToSlice added in v0.14.0

func MPointToSlice(p sql.MultiPoint) [][2]float64

func MPolyToSlice added in v0.14.0

func MPolyToSlice(p sql.MultiPolygon) [][][][2]float64

func MultiLineStringToWKT added in v0.14.0

func MultiLineStringToWKT(l sql.MultiLineString, order bool) string

MultiLineStringToWKT converts a sql.Polygon to a string

func MultiPointToWKT added in v0.14.0

func MultiPointToWKT(p sql.MultiPoint, order bool) string

MultiPointToWKT converts a sql.MultiPoint to a string

func MultiPolygonToWKT added in v0.14.0

func MultiPolygonToWKT(p sql.MultiPolygon, order bool) string

MultiPolygonToWKT converts a sql.Polygon to a string

func NewAbsVal

func NewAbsVal(e sql.Expression) sql.Expression

NewAbsVal creates a new AbsVal expression.

func NewAcos

func NewAcos(arg sql.Expression) sql.Expression

NewAcos returns a new ACOS function expression

func NewArea added in v0.14.0

func NewArea(arg sql.Expression) sql.Expression

NewArea creates a new STX expression.

func NewAsGeoJSON added in v0.12.0

func NewAsGeoJSON(args ...sql.Expression) (sql.Expression, error)

NewAsGeoJSON creates a new point expression.

func NewAsWKB added in v0.12.0

func NewAsWKB(e sql.Expression) sql.Expression

NewAsWKB creates a new point expression.

func NewAsWKT added in v0.12.0

func NewAsWKT(e sql.Expression) sql.Expression

NewAsWKT creates a new point expression.

func NewAscii

func NewAscii(arg sql.Expression) sql.Expression

func NewAsin

func NewAsin(arg sql.Expression) sql.Expression

NewAsin returns a new ASIN function expression

func NewAtan

func NewAtan(arg sql.Expression) sql.Expression

NewAtan returns a new ATAN function expression

func NewBin

func NewBin(arg sql.Expression) sql.Expression

func NewBinToUUID added in v0.9.0

func NewBinToUUID(args ...sql.Expression) (sql.Expression, error)

func NewBitlength

func NewBitlength(arg sql.Expression) sql.Expression

func NewCeil

func NewCeil(num sql.Expression) sql.Expression

NewCeil creates a new Ceil expression.

func NewCharLength

func NewCharLength(e sql.Expression) sql.Expression

NewCharLength returns a new CHAR_LENGTH function.

func NewCoalesce

func NewCoalesce(args ...sql.Expression) (sql.Expression, error)

NewCoalesce creates a new Coalesce sql.Expression.

func NewConcat

func NewConcat(args ...sql.Expression) (sql.Expression, error)

NewConcat creates a new Concat UDF.

func NewConcatWithSeparator

func NewConcatWithSeparator(args ...sql.Expression) (sql.Expression, error)

NewConcatWithSeparator creates a new NewConcatWithSeparator UDF.

func NewConnectionID

func NewConnectionID() sql.Expression

func NewConv added in v0.14.0

func NewConv(n, from, to sql.Expression) sql.Expression

NewConv returns a new Conv expression.

func NewConvertTz added in v0.11.0

func NewConvertTz(dt, fromTz, toTz sql.Expression) sql.Expression

NewConvertTz returns an implementation of the CONVERT_TZ() function.

func NewCos

func NewCos(arg sql.Expression) sql.Expression

NewCos returns a new COS function expression

func NewCot

func NewCot(arg sql.Expression) sql.Expression

NewCot returns a new COT function expression

func NewCrc32

func NewCrc32(arg sql.Expression) sql.Expression

NewCrc32 returns a new CRC32 function expression

func NewCurrDate

func NewCurrDate() sql.Expression

func NewCurrTime

func NewCurrTime() sql.Expression

func NewCurrTimestamp

func NewCurrTimestamp(args ...sql.Expression) (sql.Expression, error)

func NewCurrentDate

func NewCurrentDate() sql.Expression

func NewCurrentTime

func NewCurrentTime() sql.Expression

func NewCurrentUser

func NewCurrentUser() sql.Expression

func NewDatabase

func NewDatabase() sql.Expression

NewDatabase returns a new Database function

func NewDate

func NewDate(date sql.Expression) sql.Expression

NewDate returns a new Date node.

func NewDateAdd

func NewDateAdd(args ...sql.Expression) (sql.Expression, error)

NewDateAdd creates a new date add function.

func NewDateDiff added in v0.12.0

func NewDateDiff(expr1, expr2 sql.Expression) sql.Expression

NewDateDiff creates a new DATEDIFF() function.

func NewDateFormat

func NewDateFormat(ex, value sql.Expression) sql.Expression

NewDateFormat returns a new DateFormat UDF

func NewDateSub

func NewDateSub(args ...sql.Expression) (sql.Expression, error)

NewDateSub creates a new date add function.

func NewDatetime

func NewDatetime(args ...sql.Expression) (sql.Expression, error)

NewDatetime returns a DatetimeConversion instance to handle the sql function "datetime". This is not a standard mysql function, but provides a shorthand for datetime conversions.

func NewDay

func NewDay(date sql.Expression) sql.Expression

NewDay creates a new Day UDF.

func NewDayName

func NewDayName(arg sql.Expression) sql.Expression

func NewDayOfWeek

func NewDayOfWeek(date sql.Expression) sql.Expression

NewDayOfWeek creates a new DayOfWeek UDF.

func NewDayOfYear

func NewDayOfYear(date sql.Expression) sql.Expression

NewDayOfYear creates a new DayOfYear UDF.

func NewDegrees

func NewDegrees(arg sql.Expression) sql.Expression

NewDegrees returns a new DEGREES function expression

func NewDimension added in v0.12.0

func NewDimension(e sql.Expression) sql.Expression

NewDimension creates a new point expression.

func NewFloor

func NewFloor(num sql.Expression) sql.Expression

NewFloor returns a new Floor expression.

func NewFormat added in v0.12.0

func NewFormat(args ...sql.Expression) (sql.Expression, error)

NewFormat returns a new Format expression.

func NewFoundRows added in v0.9.0

func NewFoundRows() sql.Expression

func NewFromBase64

func NewFromBase64(e sql.Expression) sql.Expression

NewFromBase64 creates a new FromBase64 expression.

func NewFromUnixtime added in v0.11.0

func NewFromUnixtime(arg sql.Expression) sql.Expression

func NewGeomColl added in v0.14.0

func NewGeomColl(args ...sql.Expression) (sql.Expression, error)

NewGeomColl creates a new geometrycollection expression.

func NewGeomCollFromText added in v0.14.0

func NewGeomCollFromText(args ...sql.Expression) (sql.Expression, error)

NewGeomCollFromText creates a new multilinestring expression.

func NewGeomCollFromWKB added in v0.14.0

func NewGeomCollFromWKB(args ...sql.Expression) (sql.Expression, error)

NewGeomCollFromWKB creates a new geometrycollection expression.

func NewGeomFromGeoJSON added in v0.12.0

func NewGeomFromGeoJSON(args ...sql.Expression) (sql.Expression, error)

NewGeomFromGeoJSON creates a new point expression.

func NewGeomFromText added in v0.14.0

func NewGeomFromText(args ...sql.Expression) (sql.Expression, error)

NewGeomFromText creates a new point expression.

func NewGeomFromWKB added in v0.12.0

func NewGeomFromWKB(args ...sql.Expression) (sql.Expression, error)

NewGeomFromWKB creates a new geometry expression.

func NewGreatest

func NewGreatest(args ...sql.Expression) (sql.Expression, error)

NewGreatest creates a new Greatest UDF

func NewHex

func NewHex(arg sql.Expression) sql.Expression

func NewHour

func NewHour(date sql.Expression) sql.Expression

NewHour creates a new Hour UDF.

func NewIf

func NewIf(expr, ifTrue, ifFalse sql.Expression) sql.Expression

NewIf returns a new IF UDF

func NewIfNull

func NewIfNull(ex, value sql.Expression) sql.Expression

NewIfNull returns a new IFNULL UDF

func NewInet6Aton added in v0.12.0

func NewInet6Aton(val sql.Expression) sql.Expression

func NewInet6Ntoa added in v0.12.0

func NewInet6Ntoa(val sql.Expression) sql.Expression

func NewInetAton added in v0.12.0

func NewInetAton(val sql.Expression) sql.Expression

func NewInetNtoa added in v0.12.0

func NewInetNtoa(val sql.Expression) sql.Expression

func NewInstr

func NewInstr(str, substr sql.Expression) sql.Expression

NewInstr creates a new instr UDF.

func NewIsBinary

func NewIsBinary(e sql.Expression) sql.Expression

NewIsBinary creates a new IsBinary expression.

func NewIsFreeLock

func NewIsFreeLock(ls *sql.LockSubsystem) sql.CreateFunc1Args

func NewIsIPv4 added in v0.12.0

func NewIsIPv4(val sql.Expression) sql.Expression

func NewIsIPv4Compat added in v0.12.0

func NewIsIPv4Compat(val sql.Expression) sql.Expression

func NewIsIPv4Mapped added in v0.12.0

func NewIsIPv4Mapped(val sql.Expression) sql.Expression

func NewIsIPv6 added in v0.12.0

func NewIsIPv6(val sql.Expression) sql.Expression

func NewIsNull added in v0.10.0

func NewIsNull(e sql.Expression) sql.Expression

NewIsNull creates a new IsNull expression.

func NewIsUUID added in v0.9.0

func NewIsUUID(arg sql.Expression) sql.Expression

func NewIsUsedLock

func NewIsUsedLock(ls *sql.LockSubsystem) sql.CreateFunc1Args

func NewJSONArray added in v0.9.0

func NewJSONArray(args ...sql.Expression) (sql.Expression, error)

NewJSONArray creates a new JSONArray function.

func NewJSONArrayAppend added in v0.9.0

func NewJSONArrayAppend(args ...sql.Expression) (sql.Expression, error)

NewJSONArrayAppend creates a new JSONArrayAppend function.

func NewJSONArrayInsert added in v0.9.0

func NewJSONArrayInsert(args ...sql.Expression) (sql.Expression, error)

NewJSONArrayInsert creates a new JSONArrayInsert function.

func NewJSONContains added in v0.9.0

func NewJSONContains(args ...sql.Expression) (sql.Expression, error)

NewJSONContains creates a new JSONContains function.

func NewJSONContainsPath added in v0.9.0

func NewJSONContainsPath(args ...sql.Expression) (sql.Expression, error)

NewJSONContainsPath creates a new JSONContainsPath function.

func NewJSONDepth added in v0.9.0

func NewJSONDepth(args ...sql.Expression) (sql.Expression, error)

NewJSONDepth creates a new JSONDepth function.

func NewJSONExtract

func NewJSONExtract(args ...sql.Expression) (sql.Expression, error)

NewJSONExtract creates a new JSONExtract UDF.

func NewJSONInsert added in v0.9.0

func NewJSONInsert(args ...sql.Expression) (sql.Expression, error)

NewJSONInsert creates a new JSONInsert function.

func NewJSONKeys added in v0.9.0

func NewJSONKeys(args ...sql.Expression) (sql.Expression, error)

NewJSONKeys creates a new JSONKeys function.

func NewJSONLength added in v0.9.0

func NewJSONLength(args ...sql.Expression) (sql.Expression, error)

NewJSONLength creates a new JSONLength function.

func NewJSONMergePatch added in v0.9.0

func NewJSONMergePatch(args ...sql.Expression) (sql.Expression, error)

NewJSONMergePatch creates a new JSONMergePatch function.

func NewJSONMergePreserve added in v0.9.0

func NewJSONMergePreserve(args ...sql.Expression) (sql.Expression, error)

NewJSONMergePreserve creates a new JSONMergePreserve function.

func NewJSONObject added in v0.9.0

func NewJSONObject(exprs ...sql.Expression) (sql.Expression, error)

NewJSONObject creates a new JSONObject function.

func NewJSONOverlaps added in v0.9.0

func NewJSONOverlaps(args ...sql.Expression) (sql.Expression, error)

NewJSONOverlaps creates a new JSONOverlaps function.

func NewJSONPretty added in v0.9.0

func NewJSONPretty(args ...sql.Expression) (sql.Expression, error)

NewJSONPretty creates a new JSONPretty function.

func NewJSONQuote added in v0.9.0

func NewJSONQuote(args ...sql.Expression) (sql.Expression, error)

NewJSONQuote creates a new JSONQuote function.

func NewJSONRemove added in v0.9.0

func NewJSONRemove(args ...sql.Expression) (sql.Expression, error)

NewJSONRemove creates a new JSONRemove function.

func NewJSONReplace added in v0.9.0

func NewJSONReplace(args ...sql.Expression) (sql.Expression, error)

NewJSONReplace creates a new JSONReplace function.

func NewJSONSchemaValid added in v0.9.0

func NewJSONSchemaValid(args ...sql.Expression) (sql.Expression, error)

NewJSONSchemaValid creates a new JSONSchemaValid function.

func NewJSONSchemaValidationReport added in v0.9.0

func NewJSONSchemaValidationReport(args ...sql.Expression) (sql.Expression, error)

NewJSONSchemaValidationReport creates a new JSONSchemaValidationReport function.

func NewJSONSearch added in v0.9.0

func NewJSONSearch(args ...sql.Expression) (sql.Expression, error)

NewJSONSearch creates a new NewJSONSearch function.

func NewJSONSet added in v0.9.0

func NewJSONSet(args ...sql.Expression) (sql.Expression, error)

NewJSONSet creates a new JSONSet function.

func NewJSONStorageFree added in v0.9.0

func NewJSONStorageFree(args ...sql.Expression) (sql.Expression, error)

NewJSONStorageFree creates a new JSONStorageFree function.

func NewJSONStorageSize added in v0.9.0

func NewJSONStorageSize(args ...sql.Expression) (sql.Expression, error)

NewJSONStorageSize creates a new JSONStorageSize function.

func NewJSONTable added in v0.9.0

func NewJSONTable(args ...sql.Expression) (sql.Expression, error)

NewJSONTable creates a new JSONTable function.

func NewJSONType added in v0.9.0

func NewJSONType(args ...sql.Expression) (sql.Expression, error)

NewJSONType creates a new JSONType function.

func NewJSONUnquote

func NewJSONUnquote(json sql.Expression) sql.Expression

NewJSONUnquote creates a new JSONUnquote UDF.

func NewJSONValid added in v0.9.0

func NewJSONValid(args ...sql.Expression) (sql.Expression, error)

NewJSONValid creates a new JSONValid function.

func NewJSONValue added in v0.9.0

func NewJSONValue(args ...sql.Expression) (sql.Expression, error)

NewJSONValue creates a new JSONValue function.

func NewLastInsertId added in v0.9.0

func NewLastInsertId(children ...sql.Expression) (sql.Expression, error)

func NewLatitude added in v0.12.0

func NewLatitude(args ...sql.Expression) (sql.Expression, error)

NewLatitude creates a new ST_LATITUDE expression.

func NewLeast

func NewLeast(args ...sql.Expression) (sql.Expression, error)

NewLeast creates a new Least UDF

func NewLeft

func NewLeft(str, len sql.Expression) sql.Expression

NewLeft creates a new LEFT function.

func NewLeftPad added in v0.11.0

func NewLeftPad(e ...sql.Expression) (sql.Expression, error)

func NewLeftTrim added in v0.11.0

func NewLeftTrim(str sql.Expression) sql.Expression

func NewLength

func NewLength(e sql.Expression) sql.Expression

NewLength returns a new LENGTH function.

func NewLineFromText added in v0.14.0

func NewLineFromText(args ...sql.Expression) (sql.Expression, error)

NewLineFromText creates a new point expression.

func NewLineFromWKB added in v0.12.0

func NewLineFromWKB(args ...sql.Expression) (sql.Expression, error)

NewLineFromWKB creates a new point expression.

func NewLineString added in v0.12.0

func NewLineString(args ...sql.Expression) (sql.Expression, error)

NewLineString creates a new LineString.

func NewLoadFile added in v0.11.0

func NewLoadFile(fileName sql.Expression) sql.Expression

NewLoadFile returns a LoadFile object for the LOAD_FILE() function.

func NewLocate added in v0.12.0

func NewLocate(exprs ...sql.Expression) (sql.Expression, error)

NewLocate returns a new Locate function.

func NewLog

func NewLog(args ...sql.Expression) (sql.Expression, error)

NewLog creates a new Log expression.

func NewLogBase

func NewLogBase(base float64, e sql.Expression) sql.Expression

NewLogBase creates a new LogBase expression.

func NewLogBaseFunc

func NewLogBaseFunc(base float64) func(e sql.Expression) sql.Expression

NewLogBaseFunc returns LogBase creator function with a specific base.

func NewLongitude added in v0.12.0

func NewLongitude(args ...sql.Expression) (sql.Expression, error)

NewLongitude creates a new ST_LONGITUDE expression.

func NewLower

func NewLower(e sql.Expression) sql.Expression

NewLower creates a new Lower expression.

func NewMD5

func NewMD5(arg sql.Expression) sql.Expression

NewMD5 returns a new MD5 function expression

func NewMLineFromText added in v0.14.0

func NewMLineFromText(args ...sql.Expression) (sql.Expression, error)

NewMLineFromText creates a new multilinestring expression.

func NewMLineFromWKB added in v0.14.0

func NewMLineFromWKB(args ...sql.Expression) (sql.Expression, error)

NewMLineFromWKB creates a new point expression.

func NewMPointFromText added in v0.14.0

func NewMPointFromText(args ...sql.Expression) (sql.Expression, error)

NewMPointFromText creates a new MultiPoint expression.

func NewMPointFromWKB added in v0.14.0

func NewMPointFromWKB(args ...sql.Expression) (sql.Expression, error)

NewMPointFromWKB creates a new point expression.

func NewMPolyFromText added in v0.14.0

func NewMPolyFromText(args ...sql.Expression) (sql.Expression, error)

NewMPolyFromText creates a new multilinestring expression.

func NewMPolyFromWKB added in v0.14.0

func NewMPolyFromWKB(args ...sql.Expression) (sql.Expression, error)

NewMPolyFromWKB creates a new multipolygon expression.

func NewMicrosecond

func NewMicrosecond(arg sql.Expression) sql.Expression

func NewMinute

func NewMinute(date sql.Expression) sql.Expression

NewMinute creates a new Minute UDF.

func NewMod added in v0.12.0

func NewMod(args ...sql.Expression) (sql.Expression, error)

NewMod returns a new MOD function expression

func NewMonth

func NewMonth(date sql.Expression) sql.Expression

NewMonth creates a new Month UDF.

func NewMonthName

func NewMonthName(arg sql.Expression) sql.Expression

func NewMultiLineString added in v0.14.0

func NewMultiLineString(args ...sql.Expression) (sql.Expression, error)

NewMultiLineString creates a new multilinestring expression.

func NewMultiPoint added in v0.14.0

func NewMultiPoint(args ...sql.Expression) (sql.Expression, error)

NewMultiPoint creates a new MultiPoint.

func NewMultiPolygon added in v0.14.0

func NewMultiPolygon(args ...sql.Expression) (sql.Expression, error)

NewMultiPolygon creates a new multipolygon expression.

func NewNow

func NewNow(args ...sql.Expression) (sql.Expression, error)

NewNow returns a new Now node.

func NewNullIf

func NewNullIf(ex1, ex2 sql.Expression) sql.Expression

NewNullIf returns a new NULLIF UDF

func NewPad

func NewPad(pType padType, args ...sql.Expression) (sql.Expression, error)

NewPad creates a new Pad expression.

func NewPerimeter added in v0.14.0

func NewPerimeter(args ...sql.Expression) (sql.Expression, error)

NewSTLength creates a new STX expression.

func NewPoint added in v0.12.0

func NewPoint(e1, e2 sql.Expression) sql.Expression

NewPoint creates a new point expression.

func NewPointFromText added in v0.14.0

func NewPointFromText(args ...sql.Expression) (sql.Expression, error)

NewPointFromText creates a new point expression.

func NewPointFromWKB added in v0.12.0

func NewPointFromWKB(args ...sql.Expression) (sql.Expression, error)

NewPointFromWKB creates a new point expression.

func NewPolyFromText added in v0.14.0

func NewPolyFromText(args ...sql.Expression) (sql.Expression, error)

NewPolyFromText creates a new polygon expression.

func NewPolyFromWKB added in v0.12.0

func NewPolyFromWKB(args ...sql.Expression) (sql.Expression, error)

NewPolyFromWKB creates a new point expression.

func NewPolygon added in v0.12.0

func NewPolygon(args ...sql.Expression) (sql.Expression, error)

NewPolygon creates a new polygon expression.

func NewPower

func NewPower(e1, e2 sql.Expression) sql.Expression

NewPower creates a new Power expression.

func NewRadians

func NewRadians(arg sql.Expression) sql.Expression

NewRadians returns a new RADIANS function expression

func NewRand

func NewRand(exprs ...sql.Expression) (sql.Expression, error)

NewRand creates a new Rand expression.

func NewRegexpLike added in v0.10.0

func NewRegexpLike(args ...sql.Expression) (sql.Expression, error)

NewRegexpLike creates a new RegexpLike expression.

func NewRegexpReplace added in v0.12.0

func NewRegexpReplace(args ...sql.Expression) (sql.Expression, error)

NewRegexpReplace creates a new RegexpReplace expression.

func NewReleaseAllLocks

func NewReleaseAllLocks(ls *sql.LockSubsystem) func() sql.Expression

func NewReleaseLock

func NewReleaseLock(ls *sql.LockSubsystem) sql.CreateFunc1Args

func NewRepeat

func NewRepeat(str sql.Expression, count sql.Expression) sql.Expression

NewRepeat creates a new Repeat expression.

func NewReplace

func NewReplace(str sql.Expression, fromStr sql.Expression, toStr sql.Expression) sql.Expression

NewReplace creates a new Replace expression.

func NewReverse

func NewReverse(e sql.Expression) sql.Expression

NewReverse creates a new Reverse expression.

func NewRight added in v0.12.0

func NewRight(str, len sql.Expression) sql.Expression

NewRight creates a new RIGHT function.

func NewRightPad added in v0.11.0

func NewRightPad(e ...sql.Expression) (sql.Expression, error)

func NewRightTrim added in v0.11.0

func NewRightTrim(str sql.Expression) sql.Expression

func NewRound

func NewRound(args ...sql.Expression) (sql.Expression, error)

NewRound returns a new Round expression.

func NewRowCount added in v0.9.0

func NewRowCount() sql.Expression

func NewSHA1

func NewSHA1(arg sql.Expression) sql.Expression

NewSHA1 returns a new SHA1 function expression

func NewSHA2

func NewSHA2(arg, count sql.Expression) sql.Expression

NewSHA2 returns a new SHA2 function expression

func NewSRID added in v0.12.0

func NewSRID(args ...sql.Expression) (sql.Expression, error)

NewSRID creates a new STX expression.

func NewSTLength added in v0.14.0

func NewSTLength(args ...sql.Expression) (sql.Expression, error)

NewSTLength creates a new STLength expression.

func NewSTX added in v0.12.0

func NewSTX(args ...sql.Expression) (sql.Expression, error)

NewSTX creates a new STX expression.

func NewSTY added in v0.12.0

func NewSTY(args ...sql.Expression) (sql.Expression, error)

NewSTY creates a new STY expression.

func NewSecond

func NewSecond(date sql.Expression) sql.Expression

NewSecond creates a new Second UDF.

func NewSign

func NewSign(arg sql.Expression) sql.Expression

NewSign returns a new SIGN function expression

func NewSin

func NewSin(arg sql.Expression) sql.Expression

NewSin returns a new SIN function expression

func NewSleep

func NewSleep(e sql.Expression) sql.Expression

NewSleep creates a new Sleep expression.

func NewSoundex

func NewSoundex(e sql.Expression) sql.Expression

NewSoundex creates a new Soundex expression.

func NewSqrt

func NewSqrt(e sql.Expression) sql.Expression

NewSqrt creates a new Sqrt expression.

func NewStrToDate added in v0.11.0

func NewStrToDate(args ...sql.Expression) (sql.Expression, error)

NewStrToDate constructs a new function expression from the given child expressions.

func NewSubstring

func NewSubstring(args ...sql.Expression) (sql.Expression, error)

NewSubstring creates a new substring UDF.

func NewSubstringIndex

func NewSubstringIndex(str, delim, count sql.Expression) sql.Expression

NewSubstringIndex creates a new SubstringIndex UDF.

func NewSwapXY added in v0.12.0

func NewSwapXY(e sql.Expression) sql.Expression

NewSwapXY creates a new point expression.

func NewTan

func NewTan(arg sql.Expression) sql.Expression

NewTan returns a new TAN function expression

func NewTimeDiff

func NewTimeDiff(e1, e2 sql.Expression) sql.Expression

NewTimeDiff creates a new NewTimeDiff expression.

func NewTimeFormat added in v0.12.0

func NewTimeFormat(ex, value sql.Expression) sql.Expression

NewTimeFormat returns a new TimeFormat UDF

func NewTimeToSec

func NewTimeToSec(arg sql.Expression) sql.Expression

func NewTimestamp

func NewTimestamp(args ...sql.Expression) (sql.Expression, error)

func NewTimestampDiff added in v0.12.0

func NewTimestampDiff(u, e1, e2 sql.Expression) sql.Expression

NewTimestampDiff creates a new TIMESTAMPDIFF() function.

func NewToBase64

func NewToBase64(e sql.Expression) sql.Expression

NewToBase64 creates a new ToBase64 expression.

func NewTrim

func NewTrim(str sql.Expression, pat sql.Expression, dir string) sql.Expression

func NewUTCTimestamp

func NewUTCTimestamp(args ...sql.Expression) (sql.Expression, error)

NewUTCTimestamp returns a new UTCTimestamp node.

func NewUUIDFunc added in v0.9.0

func NewUUIDFunc() sql.Expression

func NewUUIDToBin added in v0.9.0

func NewUUIDToBin(args ...sql.Expression) (sql.Expression, error)

func NewUnhex

func NewUnhex(arg sql.Expression) sql.Expression

func NewUnixTimestamp

func NewUnixTimestamp(args ...sql.Expression) (sql.Expression, error)

func NewUpper

func NewUpper(e sql.Expression) sql.Expression

NewUpper creates a new Lower expression.

func NewUser

func NewUser() sql.Expression

func NewValues

func NewValues(col sql.Expression) sql.Expression

NewValues creates a new Values function.

func NewVersion

func NewVersion(versionPostfix string) func(...sql.Expression) (sql.Expression, error)

NewVersion creates a new Version UDF.

func NewWeek

func NewWeek(args ...sql.Expression) (sql.Expression, error)

NewWeek creates a new Week UDF

func NewWeekOfYear

func NewWeekOfYear(arg sql.Expression) sql.Expression

func NewWeekday

func NewWeekday(date sql.Expression) sql.Expression

NewWeekday creates a new Weekday UDF.

func NewYear

func NewYear(date sql.Expression) sql.Expression

NewYear creates a new Year UDF.

func NewYearWeek

func NewYearWeek(args ...sql.Expression) (sql.Expression, error)

NewYearWeek creates a new YearWeek UDF

func NoArgFuncWithChildren

func NoArgFuncWithChildren(fn sql.Expression, children []sql.Expression) (sql.Expression, error)

WithChildren implements the Expression interface.

func ParseAxisOrder added in v0.12.0

func ParseAxisOrder(s string) (bool, error)

ParseAxisOrder takes in a key, value string and determines the order of the xy coords

func ParseWKTHeader added in v0.12.0

func ParseWKTHeader(s string) (string, string, int, error)

ParseWKTHeader should extract the type and data from the geometry string `end` is used to detect extra characters after a valid geometry

func PointToSlice added in v0.12.0

func PointToSlice(p sql.Point) [2]float64

func PointToWKT added in v0.12.0

func PointToWKT(p sql.Point, order bool) string

PointToWKT converts a sql.Point to a string

func PolyToSlice added in v0.12.0

func PolyToSlice(p sql.Polygon) [][][2]float64

func PolygonToWKT added in v0.12.0

func PolygonToWKT(p sql.Polygon, order bool) string

PolygonToWKT converts a sql.Polygon to a string

func ReleaseLockFunc

func ReleaseLockFunc(ctx *sql.Context, ls *sql.LockSubsystem, lockName string) (interface{}, error)

ReleaseLockFunc is the function logic that is executed when the release_lock function is called.

func RoundFloatSlices added in v0.12.0

func RoundFloatSlices(v interface{}, p float64) interface{}

func SliceToGeomColl added in v0.14.0

func SliceToGeomColl(geometries interface{}) (interface{}, error)

func SliceToLine added in v0.12.0

func SliceToLine(coords interface{}) (interface{}, error)

func SliceToMLine added in v0.14.0

func SliceToMLine(coords interface{}) (interface{}, error)

func SliceToMPoint added in v0.14.0

func SliceToMPoint(coords interface{}) (interface{}, error)

func SliceToMPoly added in v0.14.0

func SliceToMPoly(coords interface{}) (interface{}, error)

func SliceToPoint added in v0.12.0

func SliceToPoint(coords interface{}) (interface{}, error)

func SliceToPoly added in v0.12.0

func SliceToPoly(coords interface{}) (interface{}, error)

func TrimWKTData added in v0.14.0

func TrimWKTData(s string) (string, int, error)

func ValidateSRID added in v0.12.0

func ValidateSRID(srid uint32) error

func WKTToGeom added in v0.14.0

func WKTToGeom(ctx *sql.Context, row sql.Row, exprs []sql.Expression, expectedGeomType string) (sql.GeometryValue, error)

WKTToGeom expects a string in WKT format, and converts it to a geometry type

func WKTToGeomColl added in v0.14.0

func WKTToGeomColl(s string, srid uint32, order bool) (sql.GeomColl, error)

WKTToGeomColl Expects a string like "((1 2, 3 4), (5 6, 7 8), ...), ..."

func WKTToLine added in v0.12.0

func WKTToLine(s string, srid uint32, order bool) (sql.LineString, error)

WKTToLine expects a string like "1.2 3.4, 5.6 7.8, ..."

func WKTToMLine added in v0.14.0

func WKTToMLine(s string, srid uint32, order bool) (sql.MultiLineString, error)

WKTToMLine Expects a string like "(1 2, 3 4), (5 6, 7 8), ..."

func WKTToMPoint added in v0.14.0

func WKTToMPoint(s string, srid uint32, order bool) (sql.MultiPoint, error)

WKTToMPoint expects a string like "1.2 3.4, 5.6 7.8, ..."

func WKTToMPoly added in v0.14.0

func WKTToMPoly(s string, srid uint32, order bool) (sql.MultiPolygon, error)

WKTToMPoly Expects a string like "((1 2, 3 4), (5 6, 7 8), ...), ..."

func WKTToPoint added in v0.12.0

func WKTToPoint(s string, srid uint32, order bool) (sql.Point, error)

WKTToPoint expects a string like this "1.2 3.4"

func WKTToPoly added in v0.12.0

func WKTToPoly(s string, srid uint32, order bool) (sql.Polygon, error)

WKTToPoly Expects a string like "(1 2, 3 4), (5 6, 7 8), ..."

Types

type AbsVal

type AbsVal struct {
	expression.UnaryExpression
}

AbsVal is a function that takes the absolute value of a number

func (*AbsVal) Description added in v0.12.0

func (t *AbsVal) Description() string

Description implements sql.FunctionExpression

func (*AbsVal) Eval

func (t *AbsVal) Eval(ctx *sql.Context, row sql.Row) (interface{}, error)

Eval implements the Expression interface.

func (*AbsVal) FunctionName

func (t *AbsVal) FunctionName() string

FunctionName implements sql.FunctionExpression

func (*AbsVal) IsNullable

func (t *AbsVal) IsNullable() bool

IsNullable implements the Expression interface.

func (*AbsVal) String

func (t *AbsVal) String() string

String implements the fmt.Stringer interface.

func (*AbsVal) Type

func (t *AbsVal) Type() sql.Type

Type implements the Expression interface.

func (*AbsVal) WithChildren

func (t *AbsVal) WithChildren(children ...sql.Expression) (sql.Expression, error)

WithChildren implements the Expression interface.

type Acos

type Acos struct {
	*UnaryFunc
}

func (*Acos) Description added in v0.12.0

func (a *Acos) Description() string

Description implements sql.FunctionExpression

func (*Acos) Eval

func (a *Acos) Eval(ctx *sql.Context, row sql.Row) (interface{}, error)

Eval implements sql.Expression

func (*Acos) WithChildren

func (a *Acos) WithChildren(children ...sql.Expression) (sql.Expression, error)

WithChildren implements sql.Expression

type AppendFuncWrapper

type AppendFuncWrapper struct {
	// contains filtered or unexported fields
}

func (AppendFuncWrapper) Append

func (af AppendFuncWrapper) Append(bytes []byte, t time.Time) []byte

type Area added in v0.14.0

type Area struct {
	expression.UnaryExpression
}

Area is a function that returns the Area of a Polygon

func (*Area) Description added in v0.14.0

func (a *Area) Description() string

Description implements sql.FunctionExpression

func (*Area) Eval added in v0.14.0

func (a *Area) Eval(ctx *sql.Context, row sql.Row) (interface{}, error)

Eval implements the sql.Expression interface.

func (*Area) FunctionName added in v0.14.0

func (a *Area) FunctionName() string

FunctionName implements sql.FunctionExpression

func (*Area) String added in v0.14.0

func (a *Area) String() string

func (*Area) Type added in v0.14.0

func (a *Area) Type() sql.Type

Type implements the sql.Expression interface.

func (*Area) WithChildren added in v0.14.0

func (a *Area) WithChildren(children ...sql.Expression) (sql.Expression, error)

WithChildren implements the Expression interface.

type AsGeoJSON added in v0.12.0

type AsGeoJSON struct {
	expression.NaryExpression
}

AsGeoJSON is a function that returns a point type from a WKT string

func (*AsGeoJSON) Description added in v0.12.0

func (g *AsGeoJSON) Description() string

Description implements sql.FunctionExpression

func (*AsGeoJSON) Eval added in v0.12.0

func (g *AsGeoJSON) Eval(ctx *sql.Context, row sql.Row) (interface{}, error)

Eval implements the sql.Expression interface.

func (*AsGeoJSON) FunctionName added in v0.12.0

func (g *AsGeoJSON) FunctionName() string

FunctionName implements sql.FunctionExpression

func (*AsGeoJSON) String added in v0.12.0

func (g *AsGeoJSON) String() string

func (*AsGeoJSON) Type added in v0.12.0

func (g *AsGeoJSON) Type() sql.Type

Type implements the sql.Expression interface.

func (*AsGeoJSON) WithChildren added in v0.12.0

func (g *AsGeoJSON) WithChildren(children ...sql.Expression) (sql.Expression, error)

WithChildren implements the Expression interface.

type AsWKB added in v0.12.0

type AsWKB struct {
	expression.UnaryExpression
}

AsWKB is a function that converts a spatial type into WKB format (alias for AsBinary)

func (*AsWKB) Description added in v0.12.0

func (a *AsWKB) Description() string

Description implements sql.FunctionExpression

func (*AsWKB) Eval added in v0.12.0

func (a *AsWKB) Eval(ctx *sql.Context, row sql.Row) (interface{}, error)

Eval implements the sql.Expression interface.

func (*AsWKB) FunctionName added in v0.12.0

func (a *AsWKB) FunctionName() string

FunctionName implements sql.FunctionExpression

func (*AsWKB) IsNullable added in v0.12.0

func (a *AsWKB) IsNullable() bool

IsNullable implements the sql.Expression interface.

func (*AsWKB) String added in v0.12.0

func (a *AsWKB) String() string

func (*AsWKB) Type added in v0.12.0

func (a *AsWKB) Type() sql.Type

Type implements the sql.Expression interface.

func (*AsWKB) WithChildren added in v0.12.0

func (a *AsWKB) WithChildren(children ...sql.Expression) (sql.Expression, error)

WithChildren implements the Expression interface.

type AsWKT added in v0.12.0

type AsWKT struct {
	expression.UnaryExpression
}

AsWKT is a function that converts a spatial type into WKT format (alias for AsText)

func (*AsWKT) Description added in v0.12.0

func (p *AsWKT) Description() string

Description implements sql.FunctionExpression

func (*AsWKT) Eval added in v0.12.0

func (p *AsWKT) Eval(ctx *sql.Context, row sql.Row) (interface{}, error)

Eval implements the sql.Expression interface.

func (*AsWKT) FunctionName added in v0.12.0

func (p *AsWKT) FunctionName() string

FunctionName implements sql.FunctionExpression

func (*AsWKT) IsNullable added in v0.12.0

func (p *AsWKT) IsNullable() bool

IsNullable implements the sql.Expression interface.

func (*AsWKT) String added in v0.12.0

func (p *AsWKT) String() string

func (*AsWKT) Type added in v0.12.0

func (p *AsWKT) Type() sql.Type

Type implements the sql.Expression interface.

func (*AsWKT) WithChildren added in v0.12.0

func (p *AsWKT) WithChildren(children ...sql.Expression) (sql.Expression, error)

WithChildren implements the Expression interface.

type Ascii

type Ascii struct {
	*UnaryFunc
}

Ascii implements the sql function "ascii" which returns the numeric value of the leftmost character

func (*Ascii) Description added in v0.12.0

func (a *Ascii) Description() string

Description implements sql.FunctionExpression

func (*Ascii) Eval

func (a *Ascii) Eval(ctx *sql.Context, row sql.Row) (interface{}, error)

Eval implements the sql.Expression interface

func (*Ascii) WithChildren

func (a *Ascii) WithChildren(children ...sql.Expression) (sql.Expression, error)

WithChildren implements the sql.Expression interface

type Asin

type Asin struct {
	*UnaryFunc
}

func (*Asin) Description added in v0.12.0

func (a *Asin) Description() string

Description implements sql.FunctionExpression

func (*Asin) Eval

func (a *Asin) Eval(ctx *sql.Context, row sql.Row) (interface{}, error)

Eval implements sql.Expression

func (*Asin) WithChildren

func (a *Asin) WithChildren(children ...sql.Expression) (sql.Expression, error)

WithChildren implements sql.Expression

type Atan

type Atan struct {
	*UnaryFunc
}

func (*Atan) Description added in v0.12.0

func (a *Atan) Description() string

Description implements sql.FunctionExpression

func (*Atan) Eval

func (a *Atan) Eval(ctx *sql.Context, row sql.Row) (interface{}, error)

Eval implements sql.Expression

func (*Atan) WithChildren

func (a *Atan) WithChildren(children ...sql.Expression) (sql.Expression, error)

WithChildren implements sql.Expression

type Bin

type Bin struct {
	*UnaryFunc
}

Bin implements the sql function "bin" which returns the binary representation of a number

func (*Bin) Description added in v0.12.0

func (b *Bin) Description() string

Description implements sql.FunctionExpression

func (*Bin) Eval

func (h *Bin) Eval(ctx *sql.Context, row sql.Row) (interface{}, error)

Eval implements the sql.Expression interface

func (*Bin) FunctionName added in v0.12.0

func (b *Bin) FunctionName() string

FunctionName implements sql.FunctionExpression

func (*Bin) WithChildren

func (h *Bin) WithChildren(children ...sql.Expression) (sql.Expression, error)

WithChildren implements the sql.Expression interface

type BinToUUID added in v0.9.0

type BinToUUID struct {
	// contains filtered or unexported fields
}

func (BinToUUID) Children added in v0.9.0

func (bu BinToUUID) Children() []sql.Expression

Children returns the children expressions of this expression.

func (BinToUUID) Description added in v0.12.0

func (bu BinToUUID) Description() string

Description implements sql.FunctionExpression

func (BinToUUID) Eval added in v0.9.0

func (bu BinToUUID) Eval(ctx *sql.Context, row sql.Row) (interface{}, error)

func (BinToUUID) FunctionName added in v0.9.0

func (bu BinToUUID) FunctionName() string

FunctionName implements sql.FunctionExpression

func (BinToUUID) IsNullable added in v0.9.0

func (bu BinToUUID) IsNullable() bool

IsNullable returns whether the expression can be null.

func (BinToUUID) Resolved added in v0.9.0

func (bu BinToUUID) Resolved() bool

func (BinToUUID) String added in v0.9.0

func (bu BinToUUID) String() string

func (BinToUUID) Type added in v0.9.0

func (bu BinToUUID) Type() sql.Type

func (BinToUUID) WithChildren added in v0.9.0

func (bu BinToUUID) WithChildren(children ...sql.Expression) (sql.Expression, error)

type Bitlength

type Bitlength struct {
	*UnaryFunc
}

Bitlength implements the sql function "bit_length" which returns the data length of the argument in bits

func (*Bitlength) Description added in v0.12.0

func (b *Bitlength) Description() string

Description implements sql.FunctionExpression

func (*Bitlength) Eval

func (h *Bitlength) Eval(ctx *sql.Context, row sql.Row) (interface{}, error)

Eval implements the sql.Expression interface

func (*Bitlength) FunctionName added in v0.12.0

func (b *Bitlength) FunctionName() string

FunctionName implements sql.FunctionExpression

func (*Bitlength) WithChildren

func (h *Bitlength) WithChildren(children ...sql.Expression) (sql.Expression, error)

WithChildren implements the sql.Expression interface

type Ceil

type Ceil struct {
	expression.UnaryExpression
}

Ceil returns the smallest integer value not less than X.

func (*Ceil) Description added in v0.12.0

func (c *Ceil) Description() string

Description implements sql.FunctionExpression

func (*Ceil) Eval

func (c *Ceil) Eval(ctx *sql.Context, row sql.Row) (interface{}, error)

Eval implements the Expression interface.

func (*Ceil) FunctionName

func (c *Ceil) FunctionName() string

FunctionName implements sql.FunctionExpression

func (*Ceil) String

func (c *Ceil) String() string

func (*Ceil) Type

func (c *Ceil) Type() sql.Type

Type implements the Expression interface.

func (*Ceil) WithChildren

func (c *Ceil) WithChildren(children ...sql.Expression) (sql.Expression, error)

WithChildren implements the Expression interface.

type Coalesce

type Coalesce struct {
	// contains filtered or unexported fields
}

Coalesce returns the first non-NULL value in the list, or NULL if there are no non-NULL values.

func (*Coalesce) Children

func (c *Coalesce) Children() []sql.Expression

Children implements the sql.Expression interface.

func (*Coalesce) Description added in v0.12.0

func (c *Coalesce) Description() string

Description implements sql.FunctionExpression

func (*Coalesce) Eval

func (c *Coalesce) Eval(ctx *sql.Context, row sql.Row) (interface{}, error)

Eval implements the sql.Expression interface. The function evaluates the first non-nil argument. If the value is nil, then we keep going, otherwise we return the first non-nil value.

func (*Coalesce) FunctionName

func (c *Coalesce) FunctionName() string

FunctionName implements sql.FunctionExpression

func (*Coalesce) IsNullable

func (c *Coalesce) IsNullable() bool

IsNullable implements the sql.Expression interface. Returns true if all arguments are nil or of the first non-nil argument is nullable, otherwise false.

func (*Coalesce) Resolved

func (c *Coalesce) Resolved() bool

Resolved implements the sql.Expression interface. The function checks if first non-nil argument is resolved.

func (*Coalesce) String

func (c *Coalesce) String() string

func (*Coalesce) Type

func (c *Coalesce) Type() sql.Type

Type implements the sql.Expression interface. The return type of Type() is the aggregated type of the argument types.

func (*Coalesce) WithChildren

func (*Coalesce) WithChildren(children ...sql.Expression) (sql.Expression, error)

WithChildren implements the Expression interface.

type Concat

type Concat struct {
	// contains filtered or unexported fields
}

Concat joins several strings together.

func (*Concat) Children

func (c *Concat) Children() []sql.Expression

Children implements the Expression interface.

func (*Concat) Description added in v0.12.0

func (c *Concat) Description() string

Description implements sql.FunctionExpression

func (*Concat) Eval

func (c *Concat) Eval(ctx *sql.Context, row sql.Row) (interface{}, error)

Eval implements the Expression interface.

func (*Concat) FunctionName

func (c *Concat) FunctionName() string

FunctionName implements sql.FunctionExpression

func (*Concat) IsNullable

func (c *Concat) IsNullable() bool

IsNullable implements the Expression interface.

func (*Concat) Resolved

func (c *Concat) Resolved() bool

Resolved implements the Expression interface.

func (*Concat) String

func (c *Concat) String() string

func (*Concat) Type

func (c *Concat) Type() sql.Type

Type implements the Expression interface.

func (*Concat) WithChildren

func (*Concat) WithChildren(children ...sql.Expression) (sql.Expression, error)

WithChildren implements the Expression interface.

type ConcatWithSeparator

type ConcatWithSeparator struct {
	// contains filtered or unexported fields
}

ConcatWithSeparator joins several strings together. The first argument is the separator for the rest of the arguments. The separator is added between the strings to be concatenated. The separator can be a string, as can the rest of the arguments. If the separator is NULL, the result is NULL.

func (*ConcatWithSeparator) Children

func (f *ConcatWithSeparator) Children() []sql.Expression

Children implements the Expression interface.

func (*ConcatWithSeparator) Description added in v0.12.0

func (f *ConcatWithSeparator) Description() string

Description implements sql.FunctionExpression

func (*ConcatWithSeparator) Eval

func (f *ConcatWithSeparator) Eval(ctx *sql.Context, row sql.Row) (interface{}, error)

Eval implements the Expression interface.

func (*ConcatWithSeparator) FunctionName

func (f *ConcatWithSeparator) FunctionName() string

FunctionName implements sql.FunctionExpression

func (*ConcatWithSeparator) IsNullable

func (f *ConcatWithSeparator) IsNullable() bool

IsNullable implements the Expression interface.

func (*ConcatWithSeparator) Resolved

func (f *ConcatWithSeparator) Resolved() bool

Resolved implements the Expression interface.

func (*ConcatWithSeparator) String

func (f *ConcatWithSeparator) String() string

func (*ConcatWithSeparator) Type

func (f *ConcatWithSeparator) Type() sql.Type

Type implements the Expression interface.

func (*ConcatWithSeparator) WithChildren

func (*ConcatWithSeparator) WithChildren(children ...sql.Expression) (sql.Expression, error)

WithChildren implements the Expression interface.

type ConnectionID

type ConnectionID struct {
	NoArgFunc
}

func (ConnectionID) Description added in v0.12.0

func (c ConnectionID) Description() string

Description implements sql.FunctionExpression

func (ConnectionID) Eval

func (c ConnectionID) Eval(ctx *sql.Context, row sql.Row) (interface{}, error)

Eval implements sql.Expression

func (ConnectionID) FunctionName added in v0.12.0

func (c ConnectionID) FunctionName() string

FunctionName implements sql.FunctionExpression

func (ConnectionID) IsNonDeterministic added in v0.12.0

func (c ConnectionID) IsNonDeterministic() bool

func (ConnectionID) WithChildren

func (c ConnectionID) WithChildren(children ...sql.Expression) (sql.Expression, error)

WithChildren implements sql.Expression

type Conv added in v0.14.0

type Conv struct {
	// contains filtered or unexported fields
}

Conv function converts numbers between different number bases. Returns a string representation of the number N, converted from base from_base to base to_base.

func (*Conv) Children added in v0.14.0

func (c *Conv) Children() []sql.Expression

Children implements the Expression interface.

func (*Conv) Description added in v0.14.0

func (c *Conv) Description() string

Description implements sql.FunctionExpression

func (*Conv) Eval added in v0.14.0

func (c *Conv) Eval(ctx *sql.Context, row sql.Row) (interface{}, error)

Eval implements the Expression interface.

func (*Conv) FunctionName added in v0.14.0

func (c *Conv) FunctionName() string

FunctionName implements sql.FunctionExpression

func (*Conv) IsNullable added in v0.14.0

func (c *Conv) IsNullable() bool

IsNullable implements the Expression interface.

func (*Conv) Resolved added in v0.14.0

func (c *Conv) Resolved() bool

Resolved implements the Expression interface.

func (*Conv) String added in v0.14.0

func (c *Conv) String() string

func (*Conv) Type added in v0.14.0

func (c *Conv) Type() sql.Type

Type implements the Expression interface.

func (*Conv) WithChildren added in v0.14.0

func (c *Conv) WithChildren(children ...sql.Expression) (sql.Expression, error)

WithChildren implements the Expression interface.

type ConvertTz added in v0.11.0

type ConvertTz struct {
	// contains filtered or unexported fields
}

func (*ConvertTz) Children added in v0.11.0

func (c *ConvertTz) Children() []sql.Expression

Children implements the sql.Expression interface.

func (*ConvertTz) Description added in v0.12.0

func (c *ConvertTz) Description() string

Description implements the sql.FunctionExpression interface.

func (*ConvertTz) Eval added in v0.11.0

func (c *ConvertTz) Eval(ctx *sql.Context, row sql.Row) (interface{}, error)

Eval implements the sql.Expression interface.

func (*ConvertTz) FunctionName added in v0.11.0

func (c *ConvertTz) FunctionName() string

FunctionName implements sql.FunctionExpression

func (*ConvertTz) IsNullable added in v0.11.0

func (c *ConvertTz) IsNullable() bool

IsNullable implements the sql.Expression interface.

func (*ConvertTz) Resolved added in v0.11.0

func (c *ConvertTz) Resolved() bool

Resolved implements the sql.Expression interface.

func (*ConvertTz) String added in v0.11.0

func (c *ConvertTz) String() string

String implements the sql.Expression interface.

func (*ConvertTz) Type added in v0.11.0

func (c *ConvertTz) Type() sql.Type

Type implements the sql.Expression interface.

func (*ConvertTz) WithChildren added in v0.11.0

func (c *ConvertTz) WithChildren(children ...sql.Expression) (sql.Expression, error)

WithChildren implements the sql.Expression interface.

type Cos

type Cos struct {
	*UnaryFunc
}

func (*Cos) Description added in v0.12.0

func (s *Cos) Description() string

Description implements sql.FunctionExpression

func (*Cos) Eval

func (s *Cos) Eval(ctx *sql.Context, row sql.Row) (interface{}, error)

Eval implements sql.Expression

func (*Cos) WithChildren

func (c *Cos) WithChildren(children ...sql.Expression) (sql.Expression, error)

WithChildren implements sql.Expression

type Cot

type Cot struct {
	*UnaryFunc
}

func (*Cot) Description added in v0.12.0

func (c *Cot) Description() string

Description implements sql.FunctionExpression

func (*Cot) Eval

func (c *Cot) Eval(ctx *sql.Context, row sql.Row) (interface{}, error)

Eval implements sql.Expression

func (*Cot) WithChildren

func (c *Cot) WithChildren(children ...sql.Expression) (sql.Expression, error)

WithChildren implements sql.Expression

type CountType

type CountType bool

CountType is the kind of length count.

type Crc32

type Crc32 struct {
	*UnaryFunc
}

func (*Crc32) Description added in v0.12.0

func (c *Crc32) Description() string

Description implements sql.FunctionExpression

func (*Crc32) Eval

func (c *Crc32) Eval(ctx *sql.Context, row sql.Row) (interface{}, error)

Eval implements sql.Expression

func (*Crc32) WithChildren

func (c *Crc32) WithChildren(children ...sql.Expression) (sql.Expression, error)

WithChildren implements sql.Expression

type CurrDate

type CurrDate struct {
	NoArgFunc
}

func (CurrDate) Description added in v0.12.0

func (c CurrDate) Description() string

Description implements sql.FunctionExpression

func (CurrDate) Eval

func (c CurrDate) Eval(ctx *sql.Context, row sql.Row) (interface{}, error)

Eval implements sql.Expression

func (CurrDate) IsNonDeterministic added in v0.12.0

func (c CurrDate) IsNonDeterministic() bool

func (CurrDate) WithChildren

func (c CurrDate) WithChildren(children ...sql.Expression) (sql.Expression, error)

WithChildren implements sql.Expression

type CurrTime

type CurrTime struct {
	NoArgFunc
}

func (CurrTime) Description added in v0.12.0

func (c CurrTime) Description() string

Description implements sql.FunctionExpression

func (CurrTime) Eval

func (c CurrTime) Eval(ctx *sql.Context, row sql.Row) (interface{}, error)

Eval implements sql.Expression

func (CurrTime) IsNonDeterministic added in v0.12.0

func (c CurrTime) IsNonDeterministic() bool

func (CurrTime) WithChildren

func (c CurrTime) WithChildren(children ...sql.Expression) (sql.Expression, error)

WithChildren implements sql.Expression

type CurrTimestamp

type CurrTimestamp struct {
	// contains filtered or unexported fields
}

func (*CurrTimestamp) Children added in v0.12.0

func (c *CurrTimestamp) Children() []sql.Expression

func (*CurrTimestamp) Description added in v0.12.0

func (c *CurrTimestamp) Description() string

Description implements sql.FunctionExpression

func (*CurrTimestamp) Eval

func (c *CurrTimestamp) Eval(ctx *sql.Context, row sql.Row) (interface{}, error)

func (*CurrTimestamp) FunctionName added in v0.12.0

func (c *CurrTimestamp) FunctionName() string

FunctionName implements sql.FunctionExpression

func (*CurrTimestamp) IsNonDeterministic added in v0.12.0

func (c *CurrTimestamp) IsNonDeterministic() bool

func (*CurrTimestamp) IsNullable added in v0.12.0

func (c *CurrTimestamp) IsNullable() bool

func (*CurrTimestamp) Resolved added in v0.12.0

func (c *CurrTimestamp) Resolved() bool

func (*CurrTimestamp) String added in v0.12.0

func (c *CurrTimestamp) String() string

func (*CurrTimestamp) Type added in v0.12.0

func (c *CurrTimestamp) Type() sql.Type

func (*CurrTimestamp) WithChildren

func (c *CurrTimestamp) WithChildren(children ...sql.Expression) (sql.Expression, error)

type Database

type Database struct{}

Database implements the DATABASE() function

func (*Database) Children

func (db *Database) Children() []sql.Expression

Children implements the sql.Expression interface.

func (*Database) Description added in v0.12.0

func (db *Database) Description() string

Description implements sql.FunctionExpression

func (*Database) Eval

func (db *Database) Eval(ctx *sql.Context, row sql.Row) (interface{}, error)

Eval implements the sql.Expression interface.

func (*Database) FunctionName

func (db *Database) FunctionName() string

FunctionName implements sql.FunctionExpression

func (*Database) IsNonDeterministic added in v0.12.0

func (db *Database) IsNonDeterministic() bool

func (*Database) IsNullable

func (db *Database) IsNullable() bool

IsNullable implements the sql.Expression interface. The function returns always true

func (*Database) Resolved

func (db *Database) Resolved() bool

Resolved implements the sql.Expression interface.

func (*Database) String

func (*Database) String() string

func (*Database) Type

func (db *Database) Type() sql.Type

Type implements the sql.Expression (sql.LongText)

func (*Database) WithChildren

func (db *Database) WithChildren(children ...sql.Expression) (sql.Expression, error)

WithChildren implements the Expression interface.

type Date

type Date struct {
	expression.UnaryExpression
}

Date a function takes the DATE part out from a datetime expression.

func (*Date) Description added in v0.12.0

func (d *Date) Description() string

Description implements sql.FunctionExpression

func (*Date) Eval

func (d *Date) Eval(ctx *sql.Context, row sql.Row) (interface{}, error)

Eval implements the Expression interface.

func (*Date) FunctionName

func (d *Date) FunctionName() string

FunctionName implements sql.FunctionExpression

func (*Date) String

func (d *Date) String() string

func (*Date) Type

func (d *Date) Type() sql.Type

Type implements the Expression interface.

func (*Date) WithChildren

func (d *Date) WithChildren(children ...sql.Expression) (sql.Expression, error)

WithChildren implements the Expression interface.

type DateAdd

type DateAdd struct {
	Date     sql.Expression
	Interval *expression.Interval
}

DateAdd adds an interval to a date.

func (*DateAdd) Children

func (d *DateAdd) Children() []sql.Expression

Children implements the sql.Expression interface.

func (*DateAdd) Description added in v0.12.0

func (d *DateAdd) Description() string

Description implements sql.FunctionExpression

func (*DateAdd) Eval

func (d *DateAdd) Eval(ctx *sql.Context, row sql.Row) (interface{}, error)

Eval implements the sql.Expression interface.

func (*DateAdd) FunctionName

func (d *DateAdd) FunctionName() string

FunctionName implements sql.FunctionExpression

func (*DateAdd) IsNullable

func (d *DateAdd) IsNullable() bool

IsNullable implements the sql.Expression interface.

func (*DateAdd) Resolved

func (d *DateAdd) Resolved() bool

Resolved implements the sql.Expression interface.

func (*DateAdd) String

func (d *DateAdd) String() string

func (*DateAdd) Type

func (d *DateAdd) Type() sql.Type

Type implements the sql.Expression interface.

func (*DateAdd) WithChildren

func (d *DateAdd) WithChildren(children ...sql.Expression) (sql.Expression, error)

WithChildren implements the Expression interface.

type DateDiff added in v0.12.0

type DateDiff struct {
	expression.BinaryExpression
}

DateDiff returns expr1 − expr2 expressed as a value in days from one date to the other.

func (*DateDiff) Children added in v0.12.0

func (d *DateDiff) Children() []sql.Expression

Children implements the sql.Expression interface.

func (*DateDiff) Description added in v0.12.0

func (d *DateDiff) Description() string

Description implements sql.FunctionExpression

func (*DateDiff) Eval added in v0.12.0

func (d *DateDiff) Eval(ctx *sql.Context, row sql.Row) (interface{}, error)

Eval implements the sql.Expression interface.

func (*DateDiff) FunctionName added in v0.12.0

func (d *DateDiff) FunctionName() string

FunctionName implements sql.FunctionExpression

func (*DateDiff) IsNullable added in v0.12.0

func (d *DateDiff) IsNullable() bool

IsNullable implements the sql.Expression interface.

func (*DateDiff) Resolved added in v0.12.0

func (d *DateDiff) Resolved() bool

Resolved implements the sql.Expression interface.

func (*DateDiff) String added in v0.12.0

func (d *DateDiff) String() string

func (*DateDiff) Type added in v0.12.0

func (d *DateDiff) Type() sql.Type

Type implements the sql.Expression interface.

func (*DateDiff) WithChildren added in v0.12.0

func (d *DateDiff) WithChildren(children ...sql.Expression) (sql.Expression, error)

WithChildren implements the Expression interface.

type DateFormat

type DateFormat struct {
	expression.BinaryExpression
}

DateFormat function returns a string representation of the date specified in the format specified

func (*DateFormat) Description added in v0.12.0

func (f *DateFormat) Description() string

Description implements sql.FunctionExpression

func (*DateFormat) Eval

func (f *DateFormat) Eval(ctx *sql.Context, row sql.Row) (interface{}, error)

Eval implements the Expression interface.

func (*DateFormat) FunctionName

func (f *DateFormat) FunctionName() string

FunctionName implements sql.FunctionExpression

func (*DateFormat) IsNullable

func (f *DateFormat) IsNullable() bool

IsNullable implements the Expression interface.

func (*DateFormat) String

func (f *DateFormat) String() string

func (*DateFormat) Type

func (f *DateFormat) Type() sql.Type

Type implements the Expression interface.

func (*DateFormat) WithChildren

func (f *DateFormat) WithChildren(children ...sql.Expression) (sql.Expression, error)

WithChildren implements the Expression interface.

type DateSub

type DateSub struct {
	Date     sql.Expression
	Interval *expression.Interval
}

DateSub subtracts an interval from a date.

func (*DateSub) Children

func (d *DateSub) Children() []sql.Expression

Children implements the sql.Expression interface.

func (*DateSub) Description added in v0.12.0

func (d *DateSub) Description() string

Description implements sql.FunctionExpression

func (*DateSub) Eval

func (d *DateSub) Eval(ctx *sql.Context, row sql.Row) (interface{}, error)

Eval implements the sql.Expression interface.

func (*DateSub) FunctionName

func (d *DateSub) FunctionName() string

FunctionName implements sql.FunctionExpression

func (*DateSub) IsNullable

func (d *DateSub) IsNullable() bool

IsNullable implements the sql.Expression interface.

func (*DateSub) Resolved

func (d *DateSub) Resolved() bool

Resolved implements the sql.Expression interface.

func (*DateSub) String

func (d *DateSub) String() string

func (*DateSub) Type

func (d *DateSub) Type() sql.Type

Type implements the sql.Expression interface.

func (*DateSub) WithChildren

func (d *DateSub) WithChildren(children ...sql.Expression) (sql.Expression, error)

WithChildren implements the Expression interface.

type DatetimeConversion

type DatetimeConversion struct {
	Date sql.Expression
}

DatetimeConversion is a shorthand function for CONVERT(expr, DATETIME)

func (*DatetimeConversion) Children

func (t *DatetimeConversion) Children() []sql.Expression

func (*DatetimeConversion) Description added in v0.12.0

func (t *DatetimeConversion) Description() string

Description implements sql.FunctionExpression

func (*DatetimeConversion) Eval

func (t *DatetimeConversion) Eval(ctx *sql.Context, r sql.Row) (interface{}, error)

func (*DatetimeConversion) FunctionName

func (t *DatetimeConversion) FunctionName() string

FunctionName implements sql.FunctionExpression

func (*DatetimeConversion) IsNullable

func (t *DatetimeConversion) IsNullable() bool

func (*DatetimeConversion) Resolved

func (t *DatetimeConversion) Resolved() bool

func (*DatetimeConversion) String

func (t *DatetimeConversion) String() string

func (*DatetimeConversion) Type

func (t *DatetimeConversion) Type() sql.Type

func (*DatetimeConversion) WithChildren

func (t *DatetimeConversion) WithChildren(children ...sql.Expression) (sql.Expression, error)

type Day

type Day struct {
	expression.UnaryExpression
}

Day is a function that returns the day of a date.

func (*Day) Description added in v0.12.0

func (d *Day) Description() string

Description implements sql.FunctionExpression

func (*Day) Eval

func (d *Day) Eval(ctx *sql.Context, row sql.Row) (interface{}, error)

Eval implements the Expression interface.

func (*Day) FunctionName

func (d *Day) FunctionName() string

FunctionName implements sql.FunctionExpression

func (*Day) String

func (d *Day) String() string

func (*Day) Type

func (d *Day) Type() sql.Type

Type implements the Expression interface.

func (*Day) WithChildren

func (d *Day) WithChildren(children ...sql.Expression) (sql.Expression, error)

WithChildren implements the Expression interface.

type DayName

type DayName struct {
	*UnaryDatetimeFunc
}

DayName implements the DAYNAME function

func (*DayName) Description added in v0.12.0

func (d *DayName) Description() string

Description implements sql.FunctionExpression

func (*DayName) Eval

func (d *DayName) Eval(ctx *sql.Context, row sql.Row) (interface{}, error)

func (*DayName) FunctionName added in v0.12.0

func (d *DayName) FunctionName() string

FunctionName implements sql.FunctionExpression

func (*DayName) WithChildren

func (d *DayName) WithChildren(children ...sql.Expression) (sql.Expression, error)

type DayOfWeek

type DayOfWeek struct {
	expression.UnaryExpression
}

DayOfWeek is a function that returns the day of the week from a date where 1 = Sunday, ..., 7 = Saturday.

func (*DayOfWeek) Description added in v0.12.0

func (d *DayOfWeek) Description() string

Description implements sql.FunctionExpression

func (*DayOfWeek) Eval

func (d *DayOfWeek) Eval(ctx *sql.Context, row sql.Row) (interface{}, error)

Eval implements the Expression interface.

func (*DayOfWeek) FunctionName

func (d *DayOfWeek) FunctionName() string

FunctionName implements sql.FunctionExpression

func (*DayOfWeek) String

func (d *DayOfWeek) String() string

func (*DayOfWeek) Type

func (d *DayOfWeek) Type() sql.Type

Type implements the Expression interface.

func (*DayOfWeek) WithChildren

func (d *DayOfWeek) WithChildren(children ...sql.Expression) (sql.Expression, error)

WithChildren implements the Expression interface.

type DayOfYear

type DayOfYear struct {
	expression.UnaryExpression
}

DayOfYear is a function that returns the day of the year from a date.

func (*DayOfYear) Description added in v0.12.0

func (d *DayOfYear) Description() string

Description implements sql.FunctionExpression

func (*DayOfYear) Eval

func (d *DayOfYear) Eval(ctx *sql.Context, row sql.Row) (interface{}, error)

Eval implements the Expression interface.

func (*DayOfYear) FunctionName

func (d *DayOfYear) FunctionName() string

FunctionName implements sql.FunctionExpression

func (*DayOfYear) String

func (d *DayOfYear) String() string

func (*DayOfYear) Type

func (d *DayOfYear) Type() sql.Type

Type implements the Expression interface.

func (*DayOfYear) WithChildren

func (d *DayOfYear) WithChildren(children ...sql.Expression) (sql.Expression, error)

WithChildren implements the Expression interface.

type Degrees

type Degrees struct {
	*UnaryFunc
}

func (*Degrees) Description added in v0.12.0

func (d *Degrees) Description() string

Description implements sql.FunctionExpression

func (*Degrees) Eval

func (d *Degrees) Eval(ctx *sql.Context, row sql.Row) (interface{}, error)

Eval implements sql.Expression

func (*Degrees) FunctionName added in v0.12.0

func (d *Degrees) FunctionName() string

FunctionName implements sql.FunctionExpression

func (*Degrees) WithChildren

func (d *Degrees) WithChildren(children ...sql.Expression) (sql.Expression, error)

WithChildren implements sql.Expression

type Dimension added in v0.12.0

type Dimension struct {
	expression.UnaryExpression
}

Dimension is a function that converts a spatial type into WKT format (alias for AsText)

func (*Dimension) Description added in v0.12.0

func (p *Dimension) Description() string

Description implements sql.FunctionExpression

func (*Dimension) Eval added in v0.12.0

func (p *Dimension) Eval(ctx *sql.Context, row sql.Row) (interface{}, error)

Eval implements the sql.Expression interface.

func (*Dimension) FunctionName added in v0.12.0

func (p *Dimension) FunctionName() string

FunctionName implements sql.FunctionExpression

func (*Dimension) IsNullable added in v0.12.0

func (p *Dimension) IsNullable() bool

IsNullable implements the sql.Expression interface.

func (*Dimension) String added in v0.12.0

func (p *Dimension) String() string

func (*Dimension) Type added in v0.12.0

func (p *Dimension) Type() sql.Type

Type implements the sql.Expression interface.

func (*Dimension) WithChildren added in v0.12.0

func (p *Dimension) WithChildren(children ...sql.Expression) (sql.Expression, error)

WithChildren implements the Expression interface.

type Floor

type Floor struct {
	expression.UnaryExpression
}

Floor returns the biggest integer value not less than X.

func (*Floor) Description added in v0.12.0

func (f *Floor) Description() string

Description implements sql.FunctionExpression

func (*Floor) Eval

func (f *Floor) Eval(ctx *sql.Context, row sql.Row) (interface{}, error)

Eval implements the Expression interface.

func (*Floor) FunctionName

func (f *Floor) FunctionName() string

FunctionName implements sql.FunctionExpression

func (*Floor) String

func (f *Floor) String() string

func (*Floor) Type

func (f *Floor) Type() sql.Type

Type implements the Expression interface.

func (*Floor) WithChildren

func (f *Floor) WithChildren(children ...sql.Expression) (sql.Expression, error)

WithChildren implements the Expression interface.

type Format added in v0.12.0

type Format struct {
	NumValue         sql.Expression
	NumDecimalPlaces sql.Expression
	Locale           sql.Expression
}

Format function returns a result of NumValue rounded to NumDecimalPlaces as a string.

func (*Format) Children added in v0.12.0

func (f *Format) Children() []sql.Expression

Children implements the Expression interface.

func (*Format) Description added in v0.12.0

func (f *Format) Description() string

Description implements sql.FunctionExpression

func (*Format) Eval added in v0.12.0

func (f *Format) Eval(ctx *sql.Context, row sql.Row) (interface{}, error)

Eval implements the Expression interface.

func (*Format) FunctionName added in v0.12.0

func (f *Format) FunctionName() string

FunctionName implements sql.FunctionExpression

func (*Format) IsNullable added in v0.12.0

func (f *Format) IsNullable() bool

IsNullable implements the Expression interface.

func (*Format) Resolved added in v0.12.0

func (f *Format) Resolved() bool

Resolved implements the Expression interface.

func (*Format) String added in v0.12.0

func (f *Format) String() string

func (*Format) Type added in v0.12.0

func (f *Format) Type() sql.Type

Type implements the Expression interface.

func (*Format) WithChildren added in v0.12.0

func (f *Format) WithChildren(children ...sql.Expression) (sql.Expression, error)

WithChildren implements the Expression interface.

type FoundRows added in v0.9.0

type FoundRows struct{}

FoundRows implements the FOUND_ROWS() function

func (FoundRows) Children added in v0.9.0

func (r FoundRows) Children() []sql.Expression

Children implements sql.Expression

func (FoundRows) Description added in v0.12.0

func (r FoundRows) Description() string

Description implements sql.Expression

func (FoundRows) Eval added in v0.9.0

func (r FoundRows) Eval(ctx *sql.Context, row sql.Row) (interface{}, error)

Eval implements sql.Expression

func (FoundRows) FunctionName added in v0.9.0

func (r FoundRows) FunctionName() string

FunctionName implements sql.FunctionExpression

func (FoundRows) IsNonDeterministic added in v0.12.0

func (r FoundRows) IsNonDeterministic() bool

func (FoundRows) IsNullable added in v0.9.0

func (r FoundRows) IsNullable() bool

IsNullable implements sql.Expression

func (FoundRows) Resolved added in v0.9.0

func (r FoundRows) Resolved() bool

Resolved implements sql.Expression

func (FoundRows) String added in v0.9.0

func (r FoundRows) String() string

String implements sql.Expression

func (FoundRows) Type added in v0.9.0

func (r FoundRows) Type() sql.Type

Type implements sql.Expression

func (FoundRows) WithChildren added in v0.9.0

func (r FoundRows) WithChildren(children ...sql.Expression) (sql.Expression, error)

WithChildren implements sql.Expression

type FromBase64

type FromBase64 struct {
	expression.UnaryExpression
}

FromBase64 is a function to decode a Base64-formatted string using the same dialect that MySQL's FROM_BASE64 uses

func (*FromBase64) Description added in v0.12.0

func (t *FromBase64) Description() string

Description implements sql.FunctionExpression

func (*FromBase64) Eval

func (t *FromBase64) Eval(ctx *sql.Context, row sql.Row) (interface{}, error)

Eval implements the Expression interface.

func (*FromBase64) FunctionName

func (t *FromBase64) FunctionName() string

FunctionName implements sql.FunctionExpression

func (*FromBase64) IsNullable

func (t *FromBase64) IsNullable() bool

IsNullable implements the Expression interface.

func (*FromBase64) String

func (t *FromBase64) String() string

String implements the fmt.Stringer interface.

func (*FromBase64) Type

func (t *FromBase64) Type() sql.Type

Type implements the Expression interface.

func (*FromBase64) WithChildren

func (t *FromBase64) WithChildren(children ...sql.Expression) (sql.Expression, error)

WithChildren implements the Expression interface.

type FromUnixtime added in v0.11.0

type FromUnixtime struct {
	*UnaryFunc
}

FromUnixtime converts the argument to a datetime.

func (*FromUnixtime) Description added in v0.12.0

func (r *FromUnixtime) Description() string

Description implements sql.FunctionExpression

func (*FromUnixtime) Eval added in v0.11.0

func (r *FromUnixtime) Eval(ctx *sql.Context, row sql.Row) (interface{}, error)

func (*FromUnixtime) WithChildren added in v0.11.0

func (r *FromUnixtime) WithChildren(children ...sql.Expression) (sql.Expression, error)

type GeomColl added in v0.14.0

type GeomColl struct {
	expression.NaryExpression
}

GeomColl is a function that returns a GeometryCollection.

func (*GeomColl) Description added in v0.14.0

func (g *GeomColl) Description() string

Description implements sql.FunctionExpression

func (*GeomColl) Eval added in v0.14.0

func (g *GeomColl) Eval(ctx *sql.Context, row sql.Row) (interface{}, error)

Eval implements the sql.Expression interface.

func (*GeomColl) FunctionName added in v0.14.0

func (g *GeomColl) FunctionName() string

FunctionName implements sql.FunctionExpression

func (*GeomColl) String added in v0.14.0

func (g *GeomColl) String() string

func (*GeomColl) Type added in v0.14.0

func (g *GeomColl) Type() sql.Type

Type implements the sql.Expression interface.

func (*GeomColl) WithChildren added in v0.14.0

func (g *GeomColl) WithChildren(children ...sql.Expression) (sql.Expression, error)

WithChildren implements the Expression interface.

type GeomCollFromText added in v0.14.0

type GeomCollFromText struct {
	expression.NaryExpression
}

GeomCollFromText is a function that returns a MultiPolygon type from a WKT string

func (*GeomCollFromText) Description added in v0.14.0

func (p *GeomCollFromText) Description() string

Description implements sql.FunctionExpression

func (*GeomCollFromText) Eval added in v0.14.0

func (p *GeomCollFromText) Eval(ctx *sql.Context, row sql.Row) (interface{}, error)

Eval implements the sql.Expression interface.

func (*GeomCollFromText) FunctionName added in v0.14.0

func (p *GeomCollFromText) FunctionName() string

FunctionName implements sql.FunctionExpression

func (*GeomCollFromText) String added in v0.14.0

func (p *GeomCollFromText) String() string

func (*GeomCollFromText) Type added in v0.14.0

func (p *GeomCollFromText) Type() sql.Type

Type implements the sql.Expression interface.

func (*GeomCollFromText) WithChildren added in v0.14.0

func (p *GeomCollFromText) WithChildren(children ...sql.Expression) (sql.Expression, error)

WithChildren implements the Expression interface.

type GeomCollFromWKB added in v0.14.0

type GeomCollFromWKB struct {
	expression.NaryExpression
}

GeomCollFromWKB is a function that returns a polygon type from a WKB byte array

func (*GeomCollFromWKB) Description added in v0.14.0

func (g *GeomCollFromWKB) Description() string

Description implements sql.FunctionExpression

func (*GeomCollFromWKB) Eval added in v0.14.0

func (g *GeomCollFromWKB) Eval(ctx *sql.Context, row sql.Row) (interface{}, error)

Eval implements the sql.Expression interface.

func (*GeomCollFromWKB) FunctionName added in v0.14.0

func (g *GeomCollFromWKB) FunctionName() string

FunctionName implements sql.FunctionExpression

func (*GeomCollFromWKB) String added in v0.14.0

func (g *GeomCollFromWKB) String() string

func (*GeomCollFromWKB) Type added in v0.14.0

func (g *GeomCollFromWKB) Type() sql.Type

Type implements the sql.Expression interface.

func (*GeomCollFromWKB) WithChildren added in v0.14.0

func (g *GeomCollFromWKB) WithChildren(children ...sql.Expression) (sql.Expression, error)

WithChildren implements the Expression interface.

type GeomFromGeoJSON added in v0.12.0

type GeomFromGeoJSON struct {
	expression.NaryExpression
}

GeomFromGeoJSON is a function returns a geometry based on a string

func (*GeomFromGeoJSON) Description added in v0.12.0

func (g *GeomFromGeoJSON) Description() string

Description implements sql.FunctionExpression

func (*GeomFromGeoJSON) Eval added in v0.12.0

func (g *GeomFromGeoJSON) Eval(ctx *sql.Context, row sql.Row) (interface{}, error)

Eval implements the sql.Expression interface.

func (*GeomFromGeoJSON) FunctionName added in v0.12.0

func (g *GeomFromGeoJSON) FunctionName() string

FunctionName implements sql.FunctionExpression

func (*GeomFromGeoJSON) String added in v0.12.0

func (g *GeomFromGeoJSON) String() string

func (*GeomFromGeoJSON) Type added in v0.12.0

func (g *GeomFromGeoJSON) Type() sql.Type

Type implements the sql.Expression interface.

func (*GeomFromGeoJSON) WithChildren added in v0.12.0

func (g *GeomFromGeoJSON) WithChildren(children ...sql.Expression) (sql.Expression, error)

WithChildren implements the Expression interface.

type GeomFromText added in v0.12.0

type GeomFromText struct {
	expression.NaryExpression
}

GeomFromText is a function that returns a point type from a WKT string

func (*GeomFromText) Description added in v0.12.0

func (g *GeomFromText) Description() string

Description implements sql.FunctionExpression

func (*GeomFromText) Eval added in v0.12.0

func (g *GeomFromText) Eval(ctx *sql.Context, row sql.Row) (interface{}, error)

Eval implements the sql.Expression interface.

func (*GeomFromText) FunctionName added in v0.12.0

func (g *GeomFromText) FunctionName() string

FunctionName implements sql.FunctionExpression

func (*GeomFromText) String added in v0.12.0

func (g *GeomFromText) String() string

func (*GeomFromText) Type added in v0.12.0

func (g *GeomFromText) Type() sql.Type

Type implements the sql.Expression interface.

func (*GeomFromText) WithChildren added in v0.12.0

func (g *GeomFromText) WithChildren(children ...sql.Expression) (sql.Expression, error)

WithChildren implements the Expression interface.

type GeomFromWKB added in v0.12.0

type GeomFromWKB struct {
	expression.NaryExpression
}

GeomFromWKB is a function that returns a geometry type from a WKB byte array

func (*GeomFromWKB) Description added in v0.12.0

func (g *GeomFromWKB) Description() string

Description implements sql.FunctionExpression

func (*GeomFromWKB) Eval added in v0.12.0

func (g *GeomFromWKB) Eval(ctx *sql.Context, row sql.Row) (interface{}, error)

Eval implements the sql.Expression interface.

func (*GeomFromWKB) FunctionName added in v0.12.0

func (g *GeomFromWKB) FunctionName() string

FunctionName implements sql.FunctionExpression

func (*GeomFromWKB) String added in v0.12.0

func (g *GeomFromWKB) String() string

func (*GeomFromWKB) Type added in v0.12.0

func (g *GeomFromWKB) Type() sql.Type

Type implements the sql.Expression interface.

func (*GeomFromWKB) WithChildren added in v0.12.0

func (g *GeomFromWKB) WithChildren(children ...sql.Expression) (sql.Expression, error)

WithChildren implements the Expression interface.

type GetLock

type GetLock struct {
	expression.BinaryExpression
	// contains filtered or unexported fields
}

GetLock is a SQL function implementing get_lock

func (*GetLock) Description added in v0.12.0

func (gl *GetLock) Description() string

Description implements sql.FunctionExpression

func (*GetLock) Eval

func (gl *GetLock) Eval(ctx *sql.Context, row sql.Row) (interface{}, error)

Eval implements the Expression interface.

func (*GetLock) FunctionName

func (gl *GetLock) FunctionName() string

FunctionName implements sql.FunctionExpression

func (*GetLock) IsNullable

func (gl *GetLock) IsNullable() bool

IsNullable implements the Expression interface.

func (*GetLock) String

func (gl *GetLock) String() string

String implements the fmt.Stringer interface.

func (*GetLock) Type

func (gl *GetLock) Type() sql.Type

Type implements the Expression interface.

func (*GetLock) WithChildren

func (gl *GetLock) WithChildren(children ...sql.Expression) (sql.Expression, error)

WithChildren implements the Expression interface.

type Greatest

type Greatest struct {
	Args []sql.Expression
	// contains filtered or unexported fields
}

Greatest returns the argument with the greatest numerical or string value. It allows for numeric (ints and floats) and string arguments and will return the used type when all arguments are of the same type or floats if there are numerically convertible strings or integers mixed with floats. When ints or floats are mixed with non numerically convertible strings, those are ignored.

func (*Greatest) Children

func (f *Greatest) Children() []sql.Expression

Children implements the Expression interface.

func (*Greatest) Description added in v0.12.0

func (f *Greatest) Description() string

Description implements sql.FunctionExpression

func (*Greatest) Eval

func (f *Greatest) Eval(ctx *sql.Context, row sql.Row) (interface{}, error)

Eval implements the Expression interface.

func (*Greatest) FunctionName

func (f *Greatest) FunctionName() string

FunctionName implements sql.FunctionExpression

func (*Greatest) IsNullable

func (f *Greatest) IsNullable() bool

IsNullable implements the Expression interface.

func (*Greatest) Resolved

func (f *Greatest) Resolved() bool

Resolved implements the Expression interface.

func (*Greatest) String

func (f *Greatest) String() string

func (*Greatest) Type

func (f *Greatest) Type() sql.Type

Type implements the Expression interface.

func (*Greatest) WithChildren

func (f *Greatest) WithChildren(children ...sql.Expression) (sql.Expression, error)

WithChildren implements the Expression interface.

type Hex

type Hex struct {
	*UnaryFunc
}

Hex implements the sql function "hex" which returns the hexadecimal representation of the string or numeric value

func (*Hex) Description added in v0.12.0

func (h *Hex) Description() string

Description implements sql.FunctionExpression

func (*Hex) Eval

func (h *Hex) Eval(ctx *sql.Context, row sql.Row) (interface{}, error)

Eval implements the sql.Expression interface

func (*Hex) WithChildren

func (h *Hex) WithChildren(children ...sql.Expression) (sql.Expression, error)

WithChildren implements the sql.Expression interface

type Hour

type Hour struct {
	expression.UnaryExpression
}

Hour is a function that returns the hour of a date.

func (*Hour) Description added in v0.12.0

func (h *Hour) Description() string

Description implements sql.FunctionExpression

func (*Hour) Eval

func (h *Hour) Eval(ctx *sql.Context, row sql.Row) (interface{}, error)

Eval implements the Expression interface.

func (*Hour) FunctionName

func (h *Hour) FunctionName() string

FunctionName implements sql.FunctionExpression

func (*Hour) String

func (h *Hour) String() string

func (*Hour) Type

func (h *Hour) Type() sql.Type

Type implements the Expression interface.

func (*Hour) WithChildren

func (h *Hour) WithChildren(children ...sql.Expression) (sql.Expression, error)

WithChildren implements the Expression interface.

type If

type If struct {
	// contains filtered or unexported fields
}

If function returns the second value if the first is true, the third value otherwise.

func (*If) Children

func (f *If) Children() []sql.Expression

func (*If) Description added in v0.12.0

func (f *If) Description() string

Description implements sql.FunctionExpression

func (*If) Eval

func (f *If) Eval(ctx *sql.Context, row sql.Row) (interface{}, error)

Eval implements the Expression interface.

func (*If) FunctionName

func (f *If) FunctionName() string

FunctionName implements sql.FunctionExpression

func (*If) IsNullable

func (f *If) IsNullable() bool

IsNullable implements the Expression interface.

func (*If) Resolved

func (f *If) Resolved() bool

func (*If) String

func (f *If) String() string

func (*If) Type

func (f *If) Type() sql.Type

Type implements the Expression interface.

func (*If) WithChildren

func (f *If) WithChildren(children ...sql.Expression) (sql.Expression, error)

WithChildren implements the Expression interface.

type IfNull

type IfNull struct {
	expression.BinaryExpression
}

IfNull function returns the specified value IF the expression is NULL, otherwise return the expression.

func (*IfNull) Description added in v0.12.0

func (f *IfNull) Description() string

Description implements sql.FunctionExpression

func (*IfNull) Eval

func (f *IfNull) Eval(ctx *sql.Context, row sql.Row) (interface{}, error)

Eval implements the Expression interface.

func (*IfNull) FunctionName

func (f *IfNull) FunctionName() string

FunctionName implements sql.FunctionExpression

func (*IfNull) IsNullable

func (f *IfNull) IsNullable() bool

IsNullable implements the Expression interface.

func (*IfNull) String

func (f *IfNull) String() string

func (*IfNull) Type

func (f *IfNull) Type() sql.Type

Type implements the Expression interface.

func (*IfNull) WithChildren

func (f *IfNull) WithChildren(children ...sql.Expression) (sql.Expression, error)

WithChildren implements the Expression interface.

type Inet6Aton added in v0.12.0

type Inet6Aton struct {
	expression.UnaryExpression
}

func (*Inet6Aton) Description added in v0.12.0

func (i *Inet6Aton) Description() string

Description implements sql.FunctionExpression

func (*Inet6Aton) Eval added in v0.12.0

func (i *Inet6Aton) Eval(ctx *sql.Context, row sql.Row) (interface{}, error)

func (*Inet6Aton) FunctionName added in v0.12.0

func (i *Inet6Aton) FunctionName() string

FunctionName implements sql.FunctionExpression

func (*Inet6Aton) String added in v0.12.0

func (i *Inet6Aton) String() string

func (*Inet6Aton) Type added in v0.12.0

func (i *Inet6Aton) Type() sql.Type

func (*Inet6Aton) WithChildren added in v0.12.0

func (i *Inet6Aton) WithChildren(children ...sql.Expression) (sql.Expression, error)

type Inet6Ntoa added in v0.12.0

type Inet6Ntoa struct {
	expression.UnaryExpression
}

func (*Inet6Ntoa) Description added in v0.12.0

func (i *Inet6Ntoa) Description() string

Description implements sql.FunctionExpression

func (*Inet6Ntoa) Eval added in v0.12.0

func (i *Inet6Ntoa) Eval(ctx *sql.Context, row sql.Row) (interface{}, error)

func (*Inet6Ntoa) FunctionName added in v0.12.0

func (i *Inet6Ntoa) FunctionName() string

FunctionName implements sql.FunctionExpression

func (*Inet6Ntoa) String added in v0.12.0

func (i *Inet6Ntoa) String() string

func (*Inet6Ntoa) Type added in v0.12.0

func (i *Inet6Ntoa) Type() sql.Type

func (*Inet6Ntoa) WithChildren added in v0.12.0

func (i *Inet6Ntoa) WithChildren(children ...sql.Expression) (sql.Expression, error)

type InetAton added in v0.12.0

type InetAton struct {
	expression.UnaryExpression
}

func (*InetAton) Description added in v0.12.0

func (i *InetAton) Description() string

Description implements sql.FunctionExpression

func (*InetAton) Eval added in v0.12.0

func (i *InetAton) Eval(ctx *sql.Context, row sql.Row) (interface{}, error)

func (*InetAton) FunctionName added in v0.12.0

func (i *InetAton) FunctionName() string

FunctionName implements sql.FunctionExpression

func (*InetAton) String added in v0.12.0

func (i *InetAton) String() string

func (*InetAton) Type added in v0.12.0

func (i *InetAton) Type() sql.Type

func (*InetAton) WithChildren added in v0.12.0

func (i *InetAton) WithChildren(children ...sql.Expression) (sql.Expression, error)

type InetNtoa added in v0.12.0

type InetNtoa struct {
	expression.UnaryExpression
}

func (*InetNtoa) Description added in v0.12.0

func (i *InetNtoa) Description() string

Description implements sql.FunctionExpression

func (*InetNtoa) Eval added in v0.12.0

func (i *InetNtoa) Eval(ctx *sql.Context, row sql.Row) (interface{}, error)

func (*InetNtoa) FunctionName added in v0.12.0

func (i *InetNtoa) FunctionName() string

FunctionName implements sql.FunctionExpression

func (*InetNtoa) String added in v0.12.0

func (i *InetNtoa) String() string

func (*InetNtoa) Type added in v0.12.0

func (i *InetNtoa) Type() sql.Type

func (*InetNtoa) WithChildren added in v0.12.0

func (i *InetNtoa) WithChildren(children ...sql.Expression) (sql.Expression, error)

type Instr

type Instr struct {
	// contains filtered or unexported fields
}

func (Instr) Children

func (i Instr) Children() []sql.Expression

Children implements the Expression interface.

func (Instr) Description added in v0.12.0

func (i Instr) Description() string

Description implements sql.FunctionExpression

func (Instr) Eval

func (i Instr) Eval(ctx *sql.Context, row sql.Row) (interface{}, error)

Eval implements the Expression interface.

func (Instr) FunctionName

func (i Instr) FunctionName() string

FunctionName implements sql.FunctionExpression

func (Instr) IsNullable

func (i Instr) IsNullable() bool

IsNullable implements the Expression interface.

func (Instr) Resolved

func (i Instr) Resolved() bool

Resolved implements the Expression interface.

func (Instr) String

func (i Instr) String() string

func (Instr) Type

func (Instr) Type() sql.Type

Type implements the Expression interface.

func (Instr) WithChildren

func (i Instr) WithChildren(children ...sql.Expression) (sql.Expression, error)

WithChildren implements the Expression interface.

type IsBinary

type IsBinary struct {
	expression.UnaryExpression
}

IsBinary is a function that returns whether a blob is binary or not.

func (*IsBinary) Description added in v0.12.0

func (ib *IsBinary) Description() string

Description implements sql.FunctionExpression

func (*IsBinary) Eval

func (ib *IsBinary) Eval(
	ctx *sql.Context,
	row sql.Row,
) (interface{}, error)

Eval implements the Expression interface.

func (*IsBinary) FunctionName

func (ib *IsBinary) FunctionName() string

FunctionName implements sql.FunctionExpression

func (*IsBinary) String

func (ib *IsBinary) String() string

func (*IsBinary) Type

func (ib *IsBinary) Type() sql.Type

Type implements the Expression interface.

func (*IsBinary) WithChildren

func (ib *IsBinary) WithChildren(children ...sql.Expression) (sql.Expression, error)

WithChildren implements the Expression interface.

type IsFreeLock

type IsFreeLock struct {
	NamedLockFunction
}

func (*IsFreeLock) Description added in v0.12.0

func (i *IsFreeLock) Description() string

Description implements sql.FunctionExpression

func (*IsFreeLock) Eval

func (i *IsFreeLock) Eval(ctx *sql.Context, row sql.Row) (interface{}, error)

func (*IsFreeLock) WithChildren

func (i *IsFreeLock) WithChildren(children ...sql.Expression) (sql.Expression, error)

type IsIPv4 added in v0.12.0

type IsIPv4 struct {
	expression.UnaryExpression
}

func (*IsIPv4) Description added in v0.12.0

func (i *IsIPv4) Description() string

Description implements sql.FunctionExpression

func (*IsIPv4) Eval added in v0.12.0

func (i *IsIPv4) Eval(ctx *sql.Context, row sql.Row) (interface{}, error)

Eval implements the Expression interface

func (*IsIPv4) FunctionName added in v0.12.0

func (i *IsIPv4) FunctionName() string

FunctionName implements sql.FunctionExpression

func (*IsIPv4) String added in v0.12.0

func (i *IsIPv4) String() string

func (*IsIPv4) Type added in v0.12.0

func (i *IsIPv4) Type() sql.Type

func (*IsIPv4) WithChildren added in v0.12.0

func (i *IsIPv4) WithChildren(children ...sql.Expression) (sql.Expression, error)

type IsIPv4Compat added in v0.12.0

type IsIPv4Compat struct {
	expression.UnaryExpression
}

func (*IsIPv4Compat) Description added in v0.12.0

func (i *IsIPv4Compat) Description() string

Description implements sql.FunctionExpression

func (*IsIPv4Compat) Eval added in v0.12.0

func (i *IsIPv4Compat) Eval(ctx *sql.Context, row sql.Row) (interface{}, error)

Eval implements the Expression interface

func (*IsIPv4Compat) FunctionName added in v0.12.0

func (i *IsIPv4Compat) FunctionName() string

FunctionName implements sql.FunctionExpression

func (*IsIPv4Compat) String added in v0.12.0

func (i *IsIPv4Compat) String() string

func (*IsIPv4Compat) Type added in v0.12.0

func (i *IsIPv4Compat) Type() sql.Type

func (*IsIPv4Compat) WithChildren added in v0.12.0

func (i *IsIPv4Compat) WithChildren(children ...sql.Expression) (sql.Expression, error)

type IsIPv4Mapped added in v0.12.0

type IsIPv4Mapped struct {
	expression.UnaryExpression
}

func (*IsIPv4Mapped) Description added in v0.12.0

func (i *IsIPv4Mapped) Description() string

Description implements sql.FunctionExpression

func (*IsIPv4Mapped) Eval added in v0.12.0

func (i *IsIPv4Mapped) Eval(ctx *sql.Context, row sql.Row) (interface{}, error)

Eval implements the Expression interface

func (*IsIPv4Mapped) FunctionName added in v0.12.0

func (i *IsIPv4Mapped) FunctionName() string

FunctionName implements sql.FunctionExpression

func (*IsIPv4Mapped) String added in v0.12.0

func (i *IsIPv4Mapped) String() string

func (*IsIPv4Mapped) Type added in v0.12.0

func (i *IsIPv4Mapped) Type() sql.Type

func (*IsIPv4Mapped) WithChildren added in v0.12.0

func (i *IsIPv4Mapped) WithChildren(children ...sql.Expression) (sql.Expression, error)

type IsIPv6 added in v0.12.0

type IsIPv6 struct {
	expression.UnaryExpression
}

func (*IsIPv6) Description added in v0.12.0

func (i *IsIPv6) Description() string

Description implements sql.FunctionExpression

func (*IsIPv6) Eval added in v0.12.0

func (i *IsIPv6) Eval(ctx *sql.Context, row sql.Row) (interface{}, error)

Eval implements the Expression interface

func (*IsIPv6) FunctionName added in v0.12.0

func (i *IsIPv6) FunctionName() string

FunctionName implements sql.FunctionExpression

func (*IsIPv6) String added in v0.12.0

func (i *IsIPv6) String() string

func (*IsIPv6) Type added in v0.12.0

func (i *IsIPv6) Type() sql.Type

func (*IsIPv6) WithChildren added in v0.12.0

func (i *IsIPv6) WithChildren(children ...sql.Expression) (sql.Expression, error)

type IsNull added in v0.10.0

type IsNull struct {
	expression.UnaryExpression
}

IsNull is a function that returns whether a value is null or not.

func (*IsNull) Description added in v0.12.0

func (ib *IsNull) Description() string

Description implements sql.FunctionExpression

func (*IsNull) Eval added in v0.10.0

func (ib *IsNull) Eval(ctx *sql.Context, row sql.Row) (interface{}, error)

Eval implements the Expression interface.

func (*IsNull) FunctionName added in v0.10.0

func (ib *IsNull) FunctionName() string

FunctionName implements sql.FunctionExpression

func (*IsNull) String added in v0.10.0

func (ib *IsNull) String() string

func (*IsNull) Type added in v0.10.0

func (ib *IsNull) Type() sql.Type

Type implements the Expression interface.

func (*IsNull) WithChildren added in v0.10.0

func (ib *IsNull) WithChildren(children ...sql.Expression) (sql.Expression, error)

WithChildren implements the Expression interface.

type IsUUID added in v0.9.0

type IsUUID struct {
	// contains filtered or unexported fields
}

func (IsUUID) Children added in v0.9.0

func (u IsUUID) Children() []sql.Expression

Children returns the children expressions of this expression.

func (IsUUID) Description added in v0.12.0

func (u IsUUID) Description() string

Description implements sql.FunctionExpression

func (IsUUID) Eval added in v0.9.0

func (u IsUUID) Eval(ctx *sql.Context, row sql.Row) (interface{}, error)

func (IsUUID) FunctionName added in v0.9.0

func (u IsUUID) FunctionName() string

FunctionName implements sql.FunctionExpression

func (IsUUID) IsNullable added in v0.9.0

func (u IsUUID) IsNullable() bool

IsNullable returns whether the expression can be null.

func (IsUUID) Resolved added in v0.9.0

func (u IsUUID) Resolved() bool

func (IsUUID) String added in v0.9.0

func (u IsUUID) String() string

func (IsUUID) Type added in v0.9.0

func (u IsUUID) Type() sql.Type

func (IsUUID) WithChildren added in v0.9.0

func (u IsUUID) WithChildren(children ...sql.Expression) (sql.Expression, error)

type IsUsedLock

type IsUsedLock struct {
	NamedLockFunction
}

func (*IsUsedLock) Description added in v0.12.0

func (i *IsUsedLock) Description() string

Description implements sql.FunctionExpression

func (*IsUsedLock) Eval

func (i *IsUsedLock) Eval(ctx *sql.Context, row sql.Row) (interface{}, error)

func (*IsUsedLock) WithChildren

func (i *IsUsedLock) WithChildren(children ...sql.Expression) (sql.Expression, error)

type JSONArray added in v0.9.0

type JSONArray struct {
	// contains filtered or unexported fields
}

func (*JSONArray) Children added in v0.12.0

func (j *JSONArray) Children() []sql.Expression

Children implements the Expression interface.

func (JSONArray) Description added in v0.12.0

func (j JSONArray) Description() string

Description implements sql.FunctionExpression

func (*JSONArray) Eval added in v0.12.0

func (j *JSONArray) Eval(ctx *sql.Context, row sql.Row) (interface{}, error)

Eval implements the Expression interface.

func (JSONArray) FunctionName added in v0.9.0

func (j JSONArray) FunctionName() string

FunctionName implements sql.FunctionExpression

func (*JSONArray) IsNullable added in v0.12.0

func (j *JSONArray) IsNullable() bool

IsNullable implements the Expression interface.

func (JSONArray) IsUnsupported added in v0.12.0

func (j JSONArray) IsUnsupported() bool

IsUnsupported implements sql.UnsupportedFunctionStub

func (*JSONArray) Resolved added in v0.12.0

func (j *JSONArray) Resolved() bool

Resolved implements the Expression interface.

func (*JSONArray) String added in v0.12.0

func (j *JSONArray) String() string

String implements the Expression interface.

func (*JSONArray) Type added in v0.12.0

func (j *JSONArray) Type() sql.Type

Type implements the Expression interface.

func (*JSONArray) WithChildren added in v0.12.0

func (j *JSONArray) WithChildren(children ...sql.Expression) (sql.Expression, error)

WithChildren implements the Expression interface.

type JSONArrayAppend added in v0.9.0

type JSONArrayAppend struct {
	sql.Expression
}

JSON_ARRAY_APPEND(json_doc, path, val[, path, val] ...)

JSONArrayAppend Appends values to the end of the indicated arrays within a JSON document and returns the result. Returns NULL if any argument is NULL. An error occurs if the json_doc argument is not a valid JSON document or any path argument is not a valid path expression or contains a * or ** wildcard. The path-value pairs are evaluated left to right. The document produced by evaluating one pair becomes the new value against which the next pair is evaluated. If a path selects a scalar or object value, that value is autowrapped within an array and the new value is added to that array. Pairs for which the path does not identify any value in the JSON document are ignored.

https://dev.mysql.com/doc/refman/8.0/en/json-modification-functions.html#function_json-array-append

func (JSONArrayAppend) Description added in v0.12.0

func (j JSONArrayAppend) Description() string

Description implements sql.FunctionExpression

func (JSONArrayAppend) FunctionName added in v0.9.0

func (j JSONArrayAppend) FunctionName() string

FunctionName implements sql.FunctionExpression

func (JSONArrayAppend) IsUnsupported added in v0.12.0

func (j JSONArrayAppend) IsUnsupported() bool

IsUnsupported implements sql.UnsupportedFunctionStub

type JSONArrayInsert added in v0.9.0

type JSONArrayInsert struct {
	sql.Expression
}

JSON_ARRAY_INSERT(json_doc, path, val[, path, val] ...)

JSONArrayInsert Updates a JSON document, inserting into an array within the document and returning the modified document. Returns NULL if any argument is NULL. An error occurs if the json_doc argument is not a valid JSON document or any path argument is not a valid path expression or contains a * or ** wildcard or does not end with an array element identifier. The path-value pairs are evaluated left to right. The document produced by evaluating one pair becomes the new value against which the next pair is evaluated. Pairs for which the path does not identify any array in the JSON document are ignored. If a path identifies an array element, the corresponding value is inserted at that element position, shifting any following values to the right. If a path identifies an array position past the end of an array, the value is inserted at the end of the array.

https://dev.mysql.com/doc/refman/8.0/en/json-modification-functions.html#function_json-array-insert

func (JSONArrayInsert) Description added in v0.12.0

func (j JSONArrayInsert) Description() string

Description implements sql.FunctionExpression

func (JSONArrayInsert) FunctionName added in v0.9.0

func (j JSONArrayInsert) FunctionName() string

FunctionName implements sql.FunctionExpression

func (JSONArrayInsert) IsUnsupported added in v0.12.0

func (j JSONArrayInsert) IsUnsupported() bool

IsUnsupported implements sql.UnsupportedFunctionStub

type JSONContains added in v0.9.0

type JSONContains struct {
	JSONTarget    sql.Expression
	JSONCandidate sql.Expression
	Path          sql.Expression
}

JSON_CONTAINS(target, candidate[, path])

JSONContains indicates by returning 1 or 0 whether a given candidate JSON document is contained within a target JSON document, or, if a path argument was supplied, whether the candidate is found at a specific path within the target. Returns NULL if any argument is NULL, or if the path argument does not identify a section of the target document. An error occurs if target or candidate is not a valid JSON document, or if the path argument is not a valid path expression or contains a * or ** wildcard. To check only whether any data exists at the path, use JSON_CONTAINS_PATH() instead.

The following rules define containment:

  • A candidate scalar is contained in a target scalar if and only if they are comparable and are equal. Two scalar values are comparable if they have the same JSON_TYPE() types, with the exception that values of types INTEGER and DECIMAL are also comparable to each other.
  • A candidate array is contained in a target array if and only if every element in the candidate is contained in some element of the target.
  • A candidate non-array is contained in a target array if and only if the candidate is contained in some element of the target.
  • A candidate object is contained in a target object if and only if for each key in the candidate there is a key with the same name in the target and the value associated with the candidate key is contained in the value associated with the target key.

Otherwise, the candidate value is not contained in the target document.

https://dev.mysql.com/doc/refman/8.0/en/json-search-functions.html#function_json-contains TODO: Add multi index optimization -> https://dev.mysql.com/doc/refman/8.0/en/create-index.html#create-index-multi-valued

func (*JSONContains) Children added in v0.10.0

func (j *JSONContains) Children() []sql.Expression

func (*JSONContains) Description added in v0.12.0

func (j *JSONContains) Description() string

Description implements sql.FunctionExpression

func (*JSONContains) Eval added in v0.10.0

func (j *JSONContains) Eval(ctx *sql.Context, row sql.Row) (interface{}, error)

func (*JSONContains) FunctionName added in v0.9.0

func (j *JSONContains) FunctionName() string

FunctionName implements sql.FunctionExpression

func (*JSONContains) IsNullable added in v0.10.0

func (j *JSONContains) IsNullable() bool

func (JSONContains) IsUnsupported added in v0.12.0

func (j JSONContains) IsUnsupported() bool

IsUnsupported implements sql.UnsupportedFunctionStub

func (*JSONContains) Resolved added in v0.10.0

func (j *JSONContains) Resolved() bool

func (*JSONContains) String added in v0.10.0

func (j *JSONContains) String() string

func (*JSONContains) Type added in v0.10.0

func (j *JSONContains) Type() sql.Type

func (*JSONContains) WithChildren added in v0.10.0

func (j *JSONContains) WithChildren(children ...sql.Expression) (sql.Expression, error)

type JSONContainsPath added in v0.9.0

type JSONContainsPath struct {
	sql.Expression
}

JSON_CONTAINS_PATH(json_doc, one_or_all, path[, path] ...)

JSONContainsPath Returns 0 or 1 to indicate whether a JSON document contains data at a given path or paths. Returns NULL if any argument is NULL. An error occurs if the json_doc argument is not a valid JSON document, any path argument is not a valid path expression, or one_or_all is not 'one' or 'all'. To check for a specific value at a path, use JSON_CONTAINS() instead.

The return value is 0 if no specified path exists within the document. Otherwise, the return value depends on the one_or_all argument:

  • 'one': 1 if at least one path exists within the document, 0 otherwise.
  • 'all': 1 if all paths exist within the document, 0 otherwise.

https://dev.mysql.com/doc/refman/8.0/en/json-search-functions.html#function_json-contains-path

func (JSONContainsPath) Description added in v0.12.0

func (j JSONContainsPath) Description() string

Description implements sql.FunctionExpression

func (JSONContainsPath) FunctionName added in v0.9.0

func (j JSONContainsPath) FunctionName() string

FunctionName implements sql.FunctionExpression

func (JSONContainsPath) IsUnsupported added in v0.12.0

func (j JSONContainsPath) IsUnsupported() bool

IsUnsupported implements sql.UnsupportedFunctionStub

type JSONDepth added in v0.9.0

type JSONDepth struct {
	sql.Expression
}

JSON_DEPTH(json_doc)

JSONDepth Returns the maximum depth of a JSON document. Returns NULL if the argument is NULL. An error occurs if the argument is not a valid JSON document. An empty array, empty object, or scalar value has depth 1. A nonempty array containing only elements of depth 1 or nonempty object containing only member values of depth 1 has depth 2. Otherwise, a JSON document has depth greater than 2.

https://dev.mysql.com/doc/refman/8.0/en/json-attribute-functions.html#function_json-depth

func (JSONDepth) Description added in v0.12.0

func (j JSONDepth) Description() string

Description implements sql.FunctionExpression

func (JSONDepth) FunctionName added in v0.9.0

func (j JSONDepth) FunctionName() string

FunctionName implements sql.FunctionExpression

func (JSONDepth) IsUnsupported added in v0.12.0

func (j JSONDepth) IsUnsupported() bool

IsUnsupported implements sql.UnsupportedFunctionStub

type JSONExtract

type JSONExtract struct {
	JSON  sql.Expression
	Paths []sql.Expression
}

JSON_EXTRACT(json_doc, path[, path] ...)

JSONExtract extracts data from a json document using json paths. https://dev.mysql.com/doc/refman/8.0/en/json-search-functions.html#function_json-extract

func (*JSONExtract) Children

func (j *JSONExtract) Children() []sql.Expression

Children implements the sql.Expression interface.

func (*JSONExtract) Description added in v0.12.0

func (j *JSONExtract) Description() string

Description implements sql.FunctionExpression

func (*JSONExtract) Eval

func (j *JSONExtract) Eval(ctx *sql.Context, row sql.Row) (interface{}, error)

Eval implements the sql.Expression interface.

func (*JSONExtract) FunctionName

func (j *JSONExtract) FunctionName() string

FunctionName implements sql.FunctionExpression

func (*JSONExtract) IsNullable

func (j *JSONExtract) IsNullable() bool

IsNullable implements the sql.Expression interface.

func (JSONExtract) IsUnsupported added in v0.12.0

func (j JSONExtract) IsUnsupported() bool

IsUnsupported implements sql.UnsupportedFunctionStub

func (*JSONExtract) Resolved

func (j *JSONExtract) Resolved() bool

Resolved implements the sql.Expression interface.

func (*JSONExtract) String

func (j *JSONExtract) String() string

func (*JSONExtract) Type

func (j *JSONExtract) Type() sql.Type

Type implements the sql.Expression interface.

func (*JSONExtract) WithChildren

func (j *JSONExtract) WithChildren(children ...sql.Expression) (sql.Expression, error)

WithChildren implements the Expression interface.

type JSONInsert added in v0.9.0

type JSONInsert struct {
	sql.Expression
}

JSON_INSERT(json_doc, path, val[, path, val] ...)

JSONInsert Inserts data into a JSON document and returns the result. Returns NULL if any argument is NULL. An error occurs if the json_doc argument is not a valid JSON document or any path argument is not a valid path expression or contains a * or ** wildcard. The path-value pairs are evaluated left to right. The document produced by evaluating one pair becomes the new value against which the next pair is evaluated. A path-value pair for an existing path in the document is ignored and does not overwrite the existing document value. A path-value pair for a nonexisting path in the document adds the value to the document if the path identifies one of these types of values:

  • A member not present in an existing object. The member is added to the object and associated with the new value.
  • A position past the end of an existing array. The array is extended with the new value. If the existing value is not an array, it is autowrapped as an array, then extended with the new value.

Otherwise, a path-value pair for a nonexisting path in the document is ignored and has no effect.

https://dev.mysql.com/doc/refman/8.0/en/json-modification-functions.html#function_json-insert

func (JSONInsert) Description added in v0.12.0

func (j JSONInsert) Description() string

Description implements sql.FunctionExpression

func (JSONInsert) FunctionName added in v0.9.0

func (j JSONInsert) FunctionName() string

FunctionName implements sql.FunctionExpression

func (JSONInsert) IsUnsupported added in v0.12.0

func (j JSONInsert) IsUnsupported() bool

IsUnsupported implements sql.UnsupportedFunctionStub

type JSONKeys added in v0.9.0

type JSONKeys struct {
	sql.Expression
}

JSON_KEYS(json_doc[, path])

JSONKeys Returns the keys from the top-level value of a JSON object as a JSON array, or, if a path argument is given, the top-level keys from the selected path. Returns NULL if any argument is NULL, the json_doc argument is not an object, or path, if given, does not locate an object. An error occurs if the json_doc argument is not a valid JSON document or the path argument is not a valid path expression or contains a * or ** wildcard. The result array is empty if the selected object is empty. If the top-level value has nested subobjects, the return value does not include keys from those subobjects.

https://dev.mysql.com/doc/refman/8.0/en/json-search-functions.html#function_json-keys

func (JSONKeys) Description added in v0.12.0

func (j JSONKeys) Description() string

Description implements sql.FunctionExpression

func (JSONKeys) FunctionName added in v0.9.0

func (j JSONKeys) FunctionName() string

FunctionName implements sql.FunctionExpression

func (JSONKeys) IsUnsupported added in v0.12.0

func (j JSONKeys) IsUnsupported() bool

IsUnsupported implements sql.UnsupportedFunctionStub

type JSONLength added in v0.9.0

type JSONLength struct {
	sql.Expression
}

JSON_LENGTH(json_doc[, path])

JSONLength Returns the length of a JSON document, or, if a path argument is given, the length of the value within the document identified by the path. Returns NULL if any argument is NULL or the path argument does not identify a value in the document. An error occurs if the json_doc argument is not a valid JSON document or the path argument is not a valid path expression or contains a * or ** wildcard. The length of a document is determined as follows:

  • The length of a scalar is 1.
  • The length of an array is the number of array elements.
  • The length of an object is the number of object members.
  • The length does not count the length of nested arrays or objects.

https://dev.mysql.com/doc/refman/8.0/en/json-attribute-functions.html#function_json-length

func (JSONLength) Description added in v0.12.0

func (j JSONLength) Description() string

Description implements sql.FunctionExpression

func (JSONLength) FunctionName added in v0.9.0

func (j JSONLength) FunctionName() string

FunctionName implements sql.FunctionExpression

func (JSONLength) IsUnsupported added in v0.12.0

func (j JSONLength) IsUnsupported() bool

IsUnsupported implements sql.UnsupportedFunctionStub

type JSONMerge added in v0.9.0

type JSONMerge struct {
	sql.Expression
}

JSON_MERGE(json_doc, json_doc[, json_doc] ...)

JSONMerge Merges two or more JSON documents. Synonym for JSONMergePreserve(); deprecated in MySQL 8.0.3 and subject to removal in a future release.

https://dev.mysql.com/doc/refman/8.0/en/json-modification-functions.html#function_json-merge

type JSONMergePatch added in v0.9.0

type JSONMergePatch struct {
	sql.Expression
}

JSON_MERGE_PATCH(json_doc, json_doc[, json_doc] ...)

JSONMergePatch Performs an RFC 7396 compliant merge of two or more JSON documents and returns the merged result, without preserving members having duplicate keys. Raises an error if at least one of the documents passed as arguments to this function is not valid. JSONMergePatch performs a merge as follows:

  • If the first argument is not an object, the result of the merge is the same as if an empty object had been merged with the second argument.
  • If the second argument is not an object, the result of the merge is the second argument.
  • If both arguments are objects, the result of the merge is an object with the following members:
  • All members of the first object which do not have a corresponding member with the same key in the second object.
  • All members of the second object which do not have a corresponding key in the first object, and whose value is not the JSON null literal.
  • All members with a key that exists in both the first and the second object, and whose value in the second object is not the JSON null literal. The values of these members are the results of recursively merging the value in the first object with the value in the second object.

The behavior of JSONMergePatch is the same as that of JSONMergePreserve, with the following two exceptions:

  • JSONMergePatch removes any member in the first object with a matching key in the second object, provided that the value associated with the key in the second object is not JSON null.
  • If the second object has a member with a key matching a member in the first object, JSONMergePatch replaces the value in the first object with the value in the second object, whereas JSONMergePreserve appends the second value to the first value.

https://dev.mysql.com/doc/refman/8.0/en/json-modification-functions.html#function_json-merge-patch

func (JSONMergePatch) Description added in v0.12.0

func (j JSONMergePatch) Description() string

Description implements sql.FunctionExpression

func (JSONMergePatch) FunctionName added in v0.9.0

func (j JSONMergePatch) FunctionName() string

FunctionName implements sql.FunctionExpression

func (JSONMergePatch) IsUnsupported added in v0.12.0

func (j JSONMergePatch) IsUnsupported() bool

IsUnsupported implements sql.UnsupportedFunctionStub

type JSONMergePreserve added in v0.9.0

type JSONMergePreserve struct {
	JSONDocs []sql.Expression
}

func (*JSONMergePreserve) Children added in v0.12.0

func (j *JSONMergePreserve) Children() []sql.Expression

Children implements the Expression interface.

func (*JSONMergePreserve) Description added in v0.12.0

func (j *JSONMergePreserve) Description() string

Description implements sql.FunctionExpression

func (*JSONMergePreserve) Eval added in v0.12.0

func (j *JSONMergePreserve) Eval(ctx *sql.Context, row sql.Row) (interface{}, error)

Eval implements the Expression interface.

func (*JSONMergePreserve) FunctionName added in v0.9.0

func (j *JSONMergePreserve) FunctionName() string

FunctionName implements sql.FunctionExpression

func (*JSONMergePreserve) IsNullable added in v0.12.0

func (j *JSONMergePreserve) IsNullable() bool

IsNullable implements the Expression interface.

func (JSONMergePreserve) IsUnsupported added in v0.12.0

func (j JSONMergePreserve) IsUnsupported() bool

IsUnsupported implements sql.UnsupportedFunctionStub

func (*JSONMergePreserve) Resolved added in v0.12.0

func (j *JSONMergePreserve) Resolved() bool

Resolved implements the Expression interface.

func (*JSONMergePreserve) String added in v0.12.0

func (j *JSONMergePreserve) String() string

String implements the Expression interface.

func (*JSONMergePreserve) Type added in v0.12.0

func (j *JSONMergePreserve) Type() sql.Type

Type implements the Expression interface.

func (*JSONMergePreserve) WithChildren added in v0.12.0

func (j *JSONMergePreserve) WithChildren(children ...sql.Expression) (sql.Expression, error)

WithChildren implements the Expression interface.

type JSONObject added in v0.9.0

type JSONObject struct {
	// contains filtered or unexported fields
}

JSON_OBJECT([key, val[, key, val] ...])

JSONObject Evaluates a (possibly empty) list of key-value pairs and returns a JSON object containing those pairs. An error occurs if any key name is NULL or the number of arguments is odd.

https://dev.mysql.com/doc/refman/8.0/en/json-creation-functions.html#function_json-object

func (JSONObject) Children added in v0.11.0

func (j JSONObject) Children() []sql.Expression

func (JSONObject) Description added in v0.12.0

func (j JSONObject) Description() string

Description implements sql.FunctionExpression

func (JSONObject) Eval added in v0.11.0

func (j JSONObject) Eval(ctx *sql.Context, row sql.Row) (interface{}, error)

func (JSONObject) FunctionName added in v0.9.0

func (j JSONObject) FunctionName() string

FunctionName implements sql.FunctionExpression

func (JSONObject) IsNullable added in v0.11.0

func (j JSONObject) IsNullable() bool

func (JSONObject) IsUnsupported added in v0.12.0

func (j JSONObject) IsUnsupported() bool

IsUnsupported implements sql.UnsupportedFunctionStub

func (JSONObject) Resolved added in v0.11.0

func (j JSONObject) Resolved() bool

func (JSONObject) String added in v0.11.0

func (j JSONObject) String() string

func (JSONObject) Type added in v0.11.0

func (j JSONObject) Type() sql.Type

func (JSONObject) WithChildren added in v0.11.0

func (j JSONObject) WithChildren(children ...sql.Expression) (sql.Expression, error)

type JSONOverlaps added in v0.9.0

type JSONOverlaps struct {
	sql.Expression
}

JSON_OVERLAPS(json_doc1, json_doc2)

JSONOverlaps Compares two JSON documents. Returns true (1) if the two document have any key-value pairs or array elements in common. If both arguments are scalars, the function performs a simple equality test.

This function serves as counterpart to JSON_CONTAINS(), which requires all elements of the array searched for to be present in the array searched in. Thus, JSON_CONTAINS() performs an AND operation on search keys, while JSON_OVERLAPS() performs an OR operation.

Queries on JSON columns of InnoDB tables using JSON_OVERLAPS() in the WHERE clause can be optimized using multi-valued indexes. Multi-Valued Indexes, provides detailed information and examples.

https://dev.mysql.com/doc/refman/8.0/en/json-search-functions.html#function_json-overlaps

func (JSONOverlaps) Description added in v0.12.0

func (j JSONOverlaps) Description() string

Description implements sql.FunctionExpression

func (JSONOverlaps) FunctionName added in v0.9.0

func (j JSONOverlaps) FunctionName() string

FunctionName implements sql.FunctionExpression

func (JSONOverlaps) IsUnsupported added in v0.12.0

func (j JSONOverlaps) IsUnsupported() bool

IsUnsupported implements sql.UnsupportedFunctionStub

type JSONPretty added in v0.9.0

type JSONPretty struct {
	sql.Expression
}

JSON_PRETTY(json_val)

JSONPretty Provides pretty-printing of JSON values similar to that implemented in PHP and by other languages and database systems. The value supplied must be a JSON value or a valid string representation of a JSON value. Extraneous whitespaces and newlines present in this value have no effect on the output. For a NULL value, the function returns NULL. If the value is not a JSON document, or if it cannot be parsed as one, the function fails with an error. Formatting of the output from this function adheres to the following rules:

  • Each array element or object member appears on a separate line, indented by one additional level as compared to its parent.
  • Each level of indentation adds two leading spaces.
  • A comma separating individual array elements or object members is printed before the newline that separates the two elements or members.
  • The key and the value of an object member are separated by a colon followed by a space (': ').
  • An empty object or array is printed on a single line. No space is printed between the opening and closing brace.
  • Special characters in string scalars and key names are escaped employing the same rules used by JSONQuote.

https://dev.mysql.com/doc/refman/8.0/en/json-utility-functions.html#function_json-pretty

func (JSONPretty) Description added in v0.12.0

func (j JSONPretty) Description() string

Description implements sql.FunctionExpression

func (JSONPretty) FunctionName added in v0.9.0

func (j JSONPretty) FunctionName() string

FunctionName implements sql.FunctionExpression

func (JSONPretty) IsUnsupported added in v0.12.0

func (j JSONPretty) IsUnsupported() bool

IsUnsupported implements sql.UnsupportedFunctionStub

type JSONQuote added in v0.9.0

type JSONQuote struct {
	sql.Expression
}

JSON_QUOTE(string)

JSONQuote Quotes a string as a JSON value by wrapping it with double quote characters and escaping interior quote and other characters, then returning the result as a utf8mb4 string. Returns NULL if the argument is NULL. This function is typically used to produce a valid JSON string literal for inclusion within a JSON document. Certain special characters are escaped with backslashes per the escape sequences shown in Table 12.23, “JSON_UNQUOTE() Special Character Escape Sequences”: https://dev.mysql.com/doc/refman/8.0/en/json-modification-functions.html#json-unquote-character-escape-sequences

https://dev.mysql.com/doc/refman/8.0/en/json-creation-functions.html#function_json-quote

func (JSONQuote) Description added in v0.12.0

func (j JSONQuote) Description() string

Description implements sql.FunctionExpression

func (JSONQuote) FunctionName added in v0.9.0

func (j JSONQuote) FunctionName() string

FunctionName implements sql.FunctionExpression

func (JSONQuote) IsUnsupported added in v0.12.0

func (j JSONQuote) IsUnsupported() bool

IsUnsupported implements sql.UnsupportedFunctionStub

type JSONRemove added in v0.9.0

type JSONRemove struct {
	sql.Expression
}

JSON_REMOVE(json_doc, path[, path] ...)

JSONRemove Removes data from a JSON document and returns the result. Returns NULL if any argument is NULL. An error occurs if the json_doc argument is not a valid JSON document or any path argument is not a valid path expression or is $ or contains a * or ** wildcard. The path arguments are evaluated left to right. The document produced by evaluating one path becomes the new value against which the next path is evaluated. It is not an error if the element to be removed does not exist in the document; in that case, the path does not affect the document.

https://dev.mysql.com/doc/refman/8.0/en/json-modification-functions.html#function_json-remove

func (JSONRemove) Description added in v0.12.0

func (j JSONRemove) Description() string

Description implements sql.FunctionExpression

func (JSONRemove) FunctionName added in v0.9.0

func (j JSONRemove) FunctionName() string

FunctionName implements sql.FunctionExpression

func (JSONRemove) IsUnsupported added in v0.12.0

func (j JSONRemove) IsUnsupported() bool

IsUnsupported implements sql.UnsupportedFunctionStub

type JSONReplace added in v0.9.0

type JSONReplace struct {
	sql.Expression
}

JSON_REPLACE(json_doc, path, val[, path, val] ...)

JSONReplace Replaces existing values in a JSON document and returns the result. Returns NULL if any argument is NULL. An error occurs if the json_doc argument is not a valid JSON document or any path argument is not a valid path expression or contains a * or ** wildcard. The path-value pairs are evaluated left to right. The document produced by evaluating one pair becomes the new value against which the next pair is evaluated. A path-value pair for an existing path in the document overwrites the existing document value with the new value. A path-value pair for a non-existing path in the document is ignored and has no effect.

https://dev.mysql.com/doc/refman/8.0/en/json-modification-functions.html#function_json-replace

func (JSONReplace) Description added in v0.12.0

func (j JSONReplace) Description() string

Description implements sql.FunctionExpression

func (JSONReplace) FunctionName added in v0.9.0

func (j JSONReplace) FunctionName() string

FunctionName implements sql.FunctionExpression

func (JSONReplace) IsUnsupported added in v0.12.0

func (j JSONReplace) IsUnsupported() bool

IsUnsupported implements sql.UnsupportedFunctionStub

type JSONSchemaValid added in v0.9.0

type JSONSchemaValid struct {
	sql.Expression
}

JSON_SCHEMA_VALID(schema,document)

JSONSchemaValid Validates a JSON document against a JSON schema. Both schema and document are required. The schema must be a valid JSON object; the document must be a valid JSON document. Provided that these conditions are met: If the document validates against the schema, the function returns true (1); otherwise, it returns false (0). https://dev.mysql.com/doc/refman/8.0/en/json-validation-functions.html#function_json-schema-valid

func (JSONSchemaValid) Description added in v0.12.0

func (j JSONSchemaValid) Description() string

Description implements sql.FunctionExpression

func (JSONSchemaValid) FunctionName added in v0.9.0

func (j JSONSchemaValid) FunctionName() string

FunctionName implements sql.FunctionExpression

func (JSONSchemaValid) IsUnsupported added in v0.12.0

func (j JSONSchemaValid) IsUnsupported() bool

IsUnsupported implements sql.UnsupportedFunctionStub

type JSONSchemaValidationReport added in v0.9.0

type JSONSchemaValidationReport struct {
	sql.Expression
}

JSON_SCHEMA_VALIDATION_REPORT(schema,document)

JSONSchemaValidationReport Validates a JSON document against a JSON schema. Both schema and document are required. As with JSONSchemaValid, the schema must be a valid JSON object, and the document must be a valid JSON document. Provided that these conditions are met, the function returns a report, as a JSON document, on the outcome of the validation. If the JSON document is considered valid according to the JSON Schema, the function returns a JSON object with one property valid having the value "true". If the JSON document fails validation, the function returns a JSON object which includes the properties listed here:

  • valid: Always "false" for a failed schema validation
  • reason: A human-readable string containing the reason for the failure
  • schema-location: A JSON pointer URI fragment identifier indicating where in the JSON schema the validation failed (see Note following this list)
  • document-location: A JSON pointer URI fragment identifier indicating where in the JSON document the validation failed (see Note following this list)
  • schema-failed-keyword: A string containing the name of the keyword or property in the JSON schema that was violated

https://dev.mysql.com/doc/refman/8.0/en/json-validation-functions.html#function_json-schema-validation-report

func (JSONSchemaValidationReport) Description added in v0.12.0

func (j JSONSchemaValidationReport) Description() string

Description implements sql.FunctionExpression

func (JSONSchemaValidationReport) FunctionName added in v0.9.0

func (j JSONSchemaValidationReport) FunctionName() string

FunctionName implements sql.FunctionExpression

func (JSONSchemaValidationReport) IsUnsupported added in v0.12.0

func (j JSONSchemaValidationReport) IsUnsupported() bool

IsUnsupported implements sql.UnsupportedFunctionStub

type JSONSearch added in v0.9.0

type JSONSearch struct {
	sql.Expression
}

JSON_SEARCH(json_doc, one_or_all, search_str[, escape_char[, path] ...])

JSONSearch Returns the path to the given string within a JSON document. Returns NULL if any of the json_doc, search_str, or path arguments are NULL; no path exists within the document; or search_str is not found. An error occurs if the json_doc argument is not a valid JSON document, any path argument is not a valid path expression, one_or_all is not 'one' or 'all', or escape_char is not a constant expression. The one_or_all argument affects the search as follows:

  • 'one': The search terminates after the first match and returns one path string. It is undefined which match is considered first.
  • 'all': The search returns all matching path strings such that no duplicate paths are included. If there are multiple strings, they are autowrapped as an array. The order of the array elements is undefined.

Within the search_str search string argument, the % and _ characters work as for the LIKE operator: % matches any number of characters (including zero characters), and _ matches exactly one character.

To specify a literal % or _ character in the search string, precede it by the escape character. The default is \ if the escape_char argument is missing or NULL. Otherwise, escape_char must be a constant that is empty or one character. For more information about matching and escape character behavior, see the description of LIKE in Section 12.8.1, “String Comparison Functions and Operators”: https://dev.mysql.com/doc/refman/8.0/en/string-comparison-functions.html For escape character handling, a difference from the LIKE behavior is that the escape character for JSON_SEARCH() must evaluate to a constant at compile time, not just at execution time. For example, if JSON_SEARCH() is used in a prepared statement and the escape_char argument is supplied using a ? parameter, the parameter value might be constant at execution time, but is not at compile time.

https://dev.mysql.com/doc/refman/8.0/en/json-search-functions.html#function_json-search

func (JSONSearch) Description added in v0.12.0

func (j JSONSearch) Description() string

Description implements sql.FunctionExpression

func (JSONSearch) FunctionName added in v0.9.0

func (j JSONSearch) FunctionName() string

FunctionName implements sql.FunctionExpression

func (JSONSearch) IsUnsupported added in v0.12.0

func (j JSONSearch) IsUnsupported() bool

IsUnsupported implements sql.UnsupportedFunctionStub

type JSONSet added in v0.9.0

type JSONSet struct {
	sql.Expression
}

JSON_SET(json_doc, path, val[, path, val] ...)

JSONSet Inserts or updates data in a JSON document and returns the result. Returns NULL if any argument is NULL or path, if given, does not locate an object. An error occurs if the json_doc argument is not a valid JSON document or any path argument is not a valid path expression or contains a * or ** wildcard. The path-value pairs are evaluated left to right. The document produced by evaluating one pair becomes the new value against which the next pair is evaluated. A path-value pair for an existing path in the document overwrites the existing document value with the new value. A path-value pair for a non-existing path in the document adds the value to the document if the path identifies one of these types of values:

  • A member not present in an existing object. The member is added to the object and associated with the new value.
  • A position past the end of an existing array. The array is extended with the new value. If the existing value is not an array, it is auto-wrapped as an array, then extended with the new value.

Otherwise, a path-value pair for a non-existing path in the document is ignored and has no effect.

https://dev.mysql.com/doc/refman/8.0/en/json-modification-functions.html#function_json-set

func (JSONSet) Description added in v0.12.0

func (j JSONSet) Description() string

Description implements sql.FunctionExpression

func (JSONSet) FunctionName added in v0.9.0

func (j JSONSet) FunctionName() string

FunctionName implements sql.FunctionExpression

func (JSONSet) IsUnsupported added in v0.12.0

func (j JSONSet) IsUnsupported() bool

IsUnsupported implements sql.UnsupportedFunctionStub

type JSONStorageFree added in v0.9.0

type JSONStorageFree struct {
	sql.Expression
}

JSON_STORAGE_FREE(json_val)

JSONStorageFree For a JSON column value, this function shows how much storage space was freed in its binary representation after it was updated in place using JSON_SET(), JSON_REPLACE(), or JSON_REMOVE(). The argument can also be a valid JSON document or a string which can be parsed as one—either as a literal value or as the value of a user variable—in which case the function returns 0. It returns a positive, nonzero value if the argument is a JSON column value which has been updated as described previously, such that its binary representation takes up less space than it did prior to the update. For a JSON column which has been updated such that its binary representation is the same as or larger than before, or if the update was not able to take advantage of a partial update, it returns 0; it returns NULL if the argument is NULL. If json_val is not NULL, and neither is a valid JSON document nor can be successfully parsed as one, an error results.

https://dev.mysql.com/doc/refman/8.0/en/json-utility-functions.html#function_json-storage-size

func (JSONStorageFree) Description added in v0.12.0

func (j JSONStorageFree) Description() string

Description implements sql.FunctionExpression

func (JSONStorageFree) FunctionName added in v0.9.0

func (j JSONStorageFree) FunctionName() string

FunctionName implements sql.FunctionExpression

func (JSONStorageFree) IsUnsupported added in v0.12.0

func (j JSONStorageFree) IsUnsupported() bool

IsUnsupported implements sql.UnsupportedFunctionStub

type JSONStorageSize added in v0.9.0

type JSONStorageSize struct {
	sql.Expression
}

JSON_STORAGE_SIZE(json_val)

JSONStorageSize This function returns the number of bytes used to store the binary representation of a JSON document. When the argument is a JSON column, this is the space used to store the JSON document as it was inserted into the column, prior to any partial updates that may have been performed on it afterwards. json_val must be a valid JSON document or a string which can be parsed as one. In the case where it is string, the function returns the amount of storage space in the JSON binary representation that is created by parsing the string as JSON and converting it to binary. It returns NULL if the argument is NULL. An error results when json_val is not NULL, and is not—or cannot be successfully parsed as—a JSON document.

https://dev.mysql.com/doc/refman/8.0/en/json-utility-functions.html#function_json-storage-size

func (JSONStorageSize) Description added in v0.12.0

func (j JSONStorageSize) Description() string

Description implements sql.FunctionExpression

func (JSONStorageSize) FunctionName added in v0.9.0

func (j JSONStorageSize) FunctionName() string

FunctionName implements sql.FunctionExpression

func (JSONStorageSize) IsUnsupported added in v0.12.0

func (j JSONStorageSize) IsUnsupported() bool

IsUnsupported implements sql.UnsupportedFunctionStub

type JSONTable added in v0.9.0

type JSONTable struct {
	sql.Expression
}

JSON_TABLE(expr, path COLUMNS (column_list) [AS] alias)

JSONTable Extracts data from a JSON document and returns it as a relational table having the specified columns. TODO(andy): this doc was heavily truncated

https://dev.mysql.com/doc/refman/8.0/en/json-table-functions.html#function_json-table

func (JSONTable) Description added in v0.12.0

func (j JSONTable) Description() string

Description implements sql.FunctionExpression

func (JSONTable) FunctionName added in v0.9.0

func (j JSONTable) FunctionName() string

FunctionName implements sql.FunctionExpression

func (JSONTable) IsUnsupported added in v0.12.0

func (j JSONTable) IsUnsupported() bool

IsUnsupported implements sql.UnsupportedFunctionStub

type JSONType added in v0.9.0

type JSONType struct {
	sql.Expression
}

JSON_TYPE(json_val)

Returns a utf8mb4 string indicating the type of a JSON value. This can be an object, an array, or a scalar type. JSONType returns NULL if the argument is NULL. An error occurs if the argument is not a valid JSON value

https://dev.mysql.com/doc/refman/8.0/en/json-attribute-functions.html#function_json-type

func (JSONType) Description added in v0.12.0

func (j JSONType) Description() string

Description implements sql.FunctionExpression

func (JSONType) FunctionName added in v0.9.0

func (j JSONType) FunctionName() string

FunctionName implements sql.FunctionExpression

func (JSONType) IsUnsupported added in v0.12.0

func (j JSONType) IsUnsupported() bool

IsUnsupported implements sql.UnsupportedFunctionStub

type JSONUnquote

type JSONUnquote struct {
	expression.UnaryExpression
}

JSONUnquote unquotes JSON value and returns the result as a utf8mb4 string. Returns NULL if the argument is NULL. An error occurs if the value starts and ends with double quotes but is not a valid JSON string literal.

func (*JSONUnquote) Description added in v0.12.0

func (js *JSONUnquote) Description() string

Description implements sql.FunctionExpression

func (*JSONUnquote) Eval

func (js *JSONUnquote) Eval(ctx *sql.Context, row sql.Row) (interface{}, error)

Eval implements the Expression interface.

func (*JSONUnquote) FunctionName

func (js *JSONUnquote) FunctionName() string

FunctionName implements sql.FunctionExpression

func (*JSONUnquote) IsUnsupported added in v0.12.0

func (js *JSONUnquote) IsUnsupported() bool

IsUnsupported implements sql.UnsupportedFunctionStub

func (*JSONUnquote) String

func (js *JSONUnquote) String() string

func (*JSONUnquote) Type

func (*JSONUnquote) Type() sql.Type

Type implements the Expression interface.

func (*JSONUnquote) WithChildren

func (js *JSONUnquote) WithChildren(children ...sql.Expression) (sql.Expression, error)

WithChildren implements the Expression interface.

type JSONValid added in v0.9.0

type JSONValid struct {
	sql.Expression
}

JSON_VALID(val)

Returns 0 or 1 to indicate whether a value is valid JSON. Returns NULL if the argument is NULL.

https://dev.mysql.com/doc/refman/8.0/en/json-attribute-functions.html#function_json-valid

func (JSONValid) Description added in v0.12.0

func (j JSONValid) Description() string

Description implements sql.FunctionExpression

func (JSONValid) FunctionName added in v0.9.0

func (j JSONValid) FunctionName() string

FunctionName implements sql.FunctionExpression

func (JSONValid) IsUnsupported added in v0.12.0

func (j JSONValid) IsUnsupported() bool

IsUnsupported implements sql.UnsupportedFunctionStub

type JSONValue added in v0.9.0

type JSONValue struct {
	sql.Expression
}

JSON_VALUE(json_doc, path)

JSONValue Extracts a value from a JSON document at the path given in the specified document, and returns the extracted value, optionally converting it to a desired type.

https://dev.mysql.com/doc/refman/8.0/en/json-search-functions.html#function_json-value

func (JSONValue) Description added in v0.12.0

func (j JSONValue) Description() string

Description implements sql.FunctionExpression

func (JSONValue) FunctionName added in v0.9.0

func (j JSONValue) FunctionName() string

FunctionName implements sql.FunctionExpression

func (JSONValue) IsUnsupported added in v0.12.0

func (j JSONValue) IsUnsupported() bool

IsUnsupported implements sql.UnsupportedFunctionStub

type LastInsertId added in v0.9.0

type LastInsertId struct {
	expression.UnaryExpression
}

LastInsertId implements the LAST_INSERT_ID() function

func (LastInsertId) Children added in v0.9.0

func (r LastInsertId) Children() []sql.Expression

Children implements sql.Expression

func (LastInsertId) Description added in v0.12.0

func (r LastInsertId) Description() string

Description implements sql.FunctionExpression

func (LastInsertId) Eval added in v0.9.0

func (r LastInsertId) Eval(ctx *sql.Context, row sql.Row) (interface{}, error)

Eval implements sql.Expression

func (LastInsertId) FunctionName added in v0.9.0

func (r LastInsertId) FunctionName() string

FunctionName implements sql.FunctionExpression

func (LastInsertId) IsNonDeterministic added in v0.12.0

func (r LastInsertId) IsNonDeterministic() bool

func (LastInsertId) IsNullable added in v0.9.0

func (r LastInsertId) IsNullable() bool

IsNullable implements sql.Expression

func (LastInsertId) Resolved added in v0.9.0

func (r LastInsertId) Resolved() bool

Resolved implements sql.Expression

func (LastInsertId) String added in v0.9.0

func (r LastInsertId) String() string

String implements sql.Expression

func (LastInsertId) Type added in v0.9.0

func (r LastInsertId) Type() sql.Type

Type implements sql.Expression

func (LastInsertId) WithChildren added in v0.9.0

func (r LastInsertId) WithChildren(children ...sql.Expression) (sql.Expression, error)

WithChildren implements sql.Expression

type Latitude added in v0.12.0

type Latitude struct {
	expression.NaryExpression
}

Latitude is a function that returns the x value from a given point.

func (*Latitude) Description added in v0.12.0

func (l *Latitude) Description() string

Description implements sql.FunctionExpression

func (*Latitude) Eval added in v0.12.0

func (l *Latitude) Eval(ctx *sql.Context, row sql.Row) (interface{}, error)

Eval implements the sql.Expression interface.

func (*Latitude) FunctionName added in v0.12.0

func (l *Latitude) FunctionName() string

FunctionName implements sql.FunctionExpression

func (*Latitude) String added in v0.12.0

func (l *Latitude) String() string

func (*Latitude) Type added in v0.12.0

func (l *Latitude) Type() sql.Type

Type implements the sql.Expression interface.

func (*Latitude) WithChildren added in v0.12.0

func (l *Latitude) WithChildren(children ...sql.Expression) (sql.Expression, error)

WithChildren implements the Expression interface.

type Least

type Least struct {
	Args []sql.Expression
	// contains filtered or unexported fields
}

Least returns the argument with the least numerical or string value. It allows for numeric (ints anf floats) and string arguments and will return the used type when all arguments are of the same type or floats if there are numerically convertible strings or integers mixed with floats. When ints or floats are mixed with non numerically convertible strings, those are ignored.

func (*Least) Children

func (f *Least) Children() []sql.Expression

Children implements the Expression interface.

func (*Least) Description added in v0.12.0

func (f *Least) Description() string

Description implements sql.FunctionExpression

func (*Least) Eval

func (f *Least) Eval(ctx *sql.Context, row sql.Row) (interface{}, error)

Eval implements the Expression interface.

func (*Least) FunctionName

func (f *Least) FunctionName() string

FunctionName implements sql.FunctionExpression

func (*Least) IsNullable

func (f *Least) IsNullable() bool

IsNullable implements the Expression interface.

func (*Least) Resolved

func (f *Least) Resolved() bool

Resolved implements the Expression interface.

func (*Least) String

func (f *Least) String() string

func (*Least) Type

func (f *Least) Type() sql.Type

Type implements the Expression interface.

func (*Least) WithChildren

func (f *Least) WithChildren(children ...sql.Expression) (sql.Expression, error)

WithChildren implements the Expression interface.

type Left

type Left struct {
	// contains filtered or unexported fields
}

Left is a function that returns the first N characters of a string expression.

func (Left) Children

func (l Left) Children() []sql.Expression

Children implements the Expression interface.

func (Left) Description added in v0.12.0

func (l Left) Description() string

Description implements sql.FunctionExpression

func (Left) Eval

func (l Left) Eval(ctx *sql.Context, row sql.Row) (interface{}, error)

Eval implements the Expression interface.

func (Left) FunctionName

func (l Left) FunctionName() string

FunctionName implements sql.FunctionExpression

func (Left) IsNullable

func (l Left) IsNullable() bool

IsNullable implements the Expression interface.

func (Left) Resolved

func (l Left) Resolved() bool

Resolved implements the Expression interface.

func (Left) String

func (l Left) String() string

func (Left) Type

func (Left) Type() sql.Type

Type implements the Expression interface.

func (Left) WithChildren

func (l Left) WithChildren(children ...sql.Expression) (sql.Expression, error)

WithChildren implements the Expression interface.

type LeftTrim added in v0.12.0

type LeftTrim struct {
	expression.UnaryExpression
}

func (*LeftTrim) Description added in v0.12.0

func (t *LeftTrim) Description() string

Description implements sql.FunctionExpression

func (*LeftTrim) Eval added in v0.12.0

func (t *LeftTrim) Eval(ctx *sql.Context, row sql.Row) (interface{}, error)

func (*LeftTrim) FunctionName added in v0.12.0

func (t *LeftTrim) FunctionName() string

FunctionName implements sql.FunctionExpression

func (*LeftTrim) IsNullable added in v0.12.0

func (t *LeftTrim) IsNullable() bool

func (*LeftTrim) String added in v0.12.0

func (t *LeftTrim) String() string

func (*LeftTrim) Type added in v0.12.0

func (t *LeftTrim) Type() sql.Type

func (*LeftTrim) WithChildren added in v0.12.0

func (t *LeftTrim) WithChildren(children ...sql.Expression) (sql.Expression, error)

type Length

type Length struct {
	expression.UnaryExpression
	CountType CountType
}

Length returns the length of a string or binary content, either in bytes or characters.

func (*Length) DebugString added in v0.9.0

func (l *Length) DebugString() string

func (*Length) Description added in v0.12.0

func (l *Length) Description() string

Description implements sql.FunctionExpression

func (*Length) Eval

func (l *Length) Eval(ctx *sql.Context, row sql.Row) (interface{}, error)

Eval implements the sql.Expression interface.

func (*Length) FunctionName

func (l *Length) FunctionName() string

FunctionName implements sql.FunctionExpression

func (*Length) String

func (l *Length) String() string

func (*Length) Type

func (l *Length) Type() sql.Type

Type implements the sql.Expression interface.

func (*Length) WithChildren

func (l *Length) WithChildren(children ...sql.Expression) (sql.Expression, error)

WithChildren implements the Expression interface.

type LineFromText added in v0.14.0

type LineFromText struct {
	expression.NaryExpression
}

LineFromText is a function that returns a LineString type from a WKT string

func (*LineFromText) Description added in v0.14.0

func (l *LineFromText) Description() string

Description implements sql.FunctionExpression

func (*LineFromText) Eval added in v0.14.0

func (l *LineFromText) Eval(ctx *sql.Context, row sql.Row) (interface{}, error)

Eval implements the sql.Expression interface.

func (*LineFromText) FunctionName added in v0.14.0

func (l *LineFromText) FunctionName() string

FunctionName implements sql.FunctionExpression

func (*LineFromText) String added in v0.14.0

func (l *LineFromText) String() string

func (*LineFromText) Type added in v0.14.0

func (l *LineFromText) Type() sql.Type

Type implements the sql.Expression interface.

func (*LineFromText) WithChildren added in v0.14.0

func (l *LineFromText) WithChildren(children ...sql.Expression) (sql.Expression, error)

WithChildren implements the Expression interface.

type LineFromWKB added in v0.12.0

type LineFromWKB struct {
	expression.NaryExpression
}

LineFromWKB is a function that returns a linestring type from a WKB byte array

func (*LineFromWKB) Description added in v0.12.0

func (l *LineFromWKB) Description() string

Description implements sql.FunctionExpression

func (*LineFromWKB) Eval added in v0.12.0

func (l *LineFromWKB) Eval(ctx *sql.Context, row sql.Row) (interface{}, error)

Eval implements the sql.Expression interface.

func (*LineFromWKB) FunctionName added in v0.12.0

func (l *LineFromWKB) FunctionName() string

FunctionName implements sql.FunctionExpression

func (*LineFromWKB) String added in v0.12.0

func (l *LineFromWKB) String() string

func (*LineFromWKB) Type added in v0.12.0

func (l *LineFromWKB) Type() sql.Type

Type implements the sql.Expression interface.

func (*LineFromWKB) WithChildren added in v0.12.0

func (l *LineFromWKB) WithChildren(children ...sql.Expression) (sql.Expression, error)

WithChildren implements the Expression interface.

type LineString added in v0.12.0

type LineString struct {
	expression.NaryExpression
}

LineString is a function that returns a point type containing values Y and Y.

func (*LineString) Description added in v0.12.0

func (l *LineString) Description() string

Description implements sql.FunctionExpression

func (*LineString) Eval added in v0.12.0

func (l *LineString) Eval(ctx *sql.Context, row sql.Row) (interface{}, error)

Eval implements the sql.Expression interface.

func (*LineString) FunctionName added in v0.12.0

func (l *LineString) FunctionName() string

FunctionName implements sql.FunctionExpression

func (*LineString) String added in v0.12.0

func (l *LineString) String() string

func (*LineString) Type added in v0.12.0

func (l *LineString) Type() sql.Type

Type implements the sql.Expression interface.

func (*LineString) WithChildren added in v0.12.0

func (l *LineString) WithChildren(children ...sql.Expression) (sql.Expression, error)

WithChildren implements the Expression interface.

type LoadFile added in v0.11.0

type LoadFile struct {
	// contains filtered or unexported fields
}

func (*LoadFile) Children added in v0.11.0

func (l *LoadFile) Children() []sql.Expression

Children implements sql.Expression.

func (*LoadFile) Description added in v0.12.0

func (l *LoadFile) Description() string

Description implements sql.FunctionExpression

func (*LoadFile) Eval added in v0.11.0

func (l *LoadFile) Eval(ctx *sql.Context, row sql.Row) (interface{}, error)

TODO: Allow FILE privileges for GRANT Eval implements sql.Expression.

func (*LoadFile) FunctionName added in v0.11.0

func (l *LoadFile) FunctionName() string

FunctionName implements sql.FunctionExpression.

func (*LoadFile) IsNullable added in v0.11.0

func (l *LoadFile) IsNullable() bool

IsNullable implements sql.Expression.

func (*LoadFile) Resolved added in v0.11.0

func (l *LoadFile) Resolved() bool

Resolved implements sql.Expression.

func (*LoadFile) String added in v0.11.0

func (l *LoadFile) String() string

String implements sql.Expression.

func (*LoadFile) Type added in v0.11.0

func (l *LoadFile) Type() sql.Type

Type implements sql.Expression.

func (*LoadFile) WithChildren added in v0.11.0

func (l *LoadFile) WithChildren(children ...sql.Expression) (sql.Expression, error)

WithChildren implements sql.Expression.

type Locate added in v0.12.0

type Locate struct {
	expression.NaryExpression
}

Locate returns the position of the first occurrence of a substring in a string. If the substring is not found within the original string, this function returns 0. This function performs a case-insensitive search.

func (*Locate) DebugString added in v0.12.0

func (l *Locate) DebugString() string

func (*Locate) Description added in v0.12.0

func (l *Locate) Description() string

Description implements sql.FunctionExpression

func (*Locate) Eval added in v0.12.0

func (l *Locate) Eval(ctx *sql.Context, row sql.Row) (interface{}, error)

Eval implements the sql.Expression interface.

func (*Locate) FunctionName added in v0.12.0

func (l *Locate) FunctionName() string

FunctionName implements sql.FunctionExpression

func (*Locate) String added in v0.12.0

func (l *Locate) String() string

func (*Locate) Type added in v0.12.0

func (l *Locate) Type() sql.Type

Type implements the sql.Expression interface.

func (*Locate) WithChildren added in v0.12.0

func (l *Locate) WithChildren(children ...sql.Expression) (sql.Expression, error)

WithChildren implements the Expression interface.

type Log

type Log struct {
	expression.BinaryExpression
}

Log is a function that returns the natural logarithm of a value.

func (*Log) Children

func (l *Log) Children() []sql.Expression

Children implements the Expression interface.

func (*Log) Description added in v0.12.0

func (l *Log) Description() string

Description implements sql.FunctionExpression

func (*Log) Eval

func (l *Log) Eval(
	ctx *sql.Context,
	row sql.Row,
) (interface{}, error)

Eval implements the Expression interface.

func (*Log) FunctionName

func (l *Log) FunctionName() string

FunctionName implements sql.FunctionExpression

func (*Log) IsNullable

func (l *Log) IsNullable() bool

IsNullable implements the Expression interface.

func (*Log) String

func (l *Log) String() string

func (*Log) Type

func (l *Log) Type() sql.Type

Type returns the resultant type of the function.

func (*Log) WithChildren

func (l *Log) WithChildren(children ...sql.Expression) (sql.Expression, error)

WithChildren implements the Expression interface.

type LogBase

type LogBase struct {
	expression.UnaryExpression
	// contains filtered or unexported fields
}

LogBase is a function that returns the logarithm of a value with a specific base.

func (*LogBase) Description added in v0.12.0

func (l *LogBase) Description() string

Description implements sql.FunctionExpression

func (*LogBase) Eval

func (l *LogBase) Eval(
	ctx *sql.Context,
	row sql.Row,
) (interface{}, error)

Eval implements the Expression interface.

func (*LogBase) FunctionName

func (l *LogBase) FunctionName() string

FunctionName implements sql.FunctionExpression

func (*LogBase) IsNullable

func (l *LogBase) IsNullable() bool

IsNullable implements the sql.Expression interface.

func (*LogBase) String

func (l *LogBase) String() string

func (*LogBase) Type

func (l *LogBase) Type() sql.Type

Type returns the resultant type of the function.

func (*LogBase) WithChildren

func (l *LogBase) WithChildren(children ...sql.Expression) (sql.Expression, error)

WithChildren implements the Expression interface.

type Longitude added in v0.12.0

type Longitude struct {
	expression.NaryExpression
}

Longitude is a function that returns the x value from a given point.

func (*Longitude) Description added in v0.12.0

func (l *Longitude) Description() string

Description implements sql.FunctionExpression

func (*Longitude) Eval added in v0.12.0

func (l *Longitude) Eval(ctx *sql.Context, row sql.Row) (interface{}, error)

Eval implements the sql.Expression interface.

func (*Longitude) FunctionName added in v0.12.0

func (l *Longitude) FunctionName() string

FunctionName implements sql.FunctionExpression

func (*Longitude) String added in v0.12.0

func (l *Longitude) String() string

func (*Longitude) Type added in v0.12.0

func (l *Longitude) Type() sql.Type

Type implements the sql.Expression interface.

func (*Longitude) WithChildren added in v0.12.0

func (l *Longitude) WithChildren(children ...sql.Expression) (sql.Expression, error)

WithChildren implements the Expression interface.

type Lower

type Lower struct {
	expression.UnaryExpression
}

Lower is a function that returns the lowercase of the text provided.

func (*Lower) Description added in v0.12.0

func (l *Lower) Description() string

Description implements sql.FunctionExpression

func (*Lower) Eval

func (l *Lower) Eval(
	ctx *sql.Context,
	row sql.Row,
) (interface{}, error)

Eval implements the Expression interface.

func (*Lower) FunctionName

func (l *Lower) FunctionName() string

FunctionName implements sql.FunctionExpression

func (*Lower) String

func (l *Lower) String() string

func (*Lower) Type

func (l *Lower) Type() sql.Type

Type implements the Expression interface.

func (*Lower) WithChildren

func (l *Lower) WithChildren(children ...sql.Expression) (sql.Expression, error)

WithChildren implements the Expression interface.

type MD5

type MD5 struct {
	*UnaryFunc
}

MD5 function returns the MD5 hash of the input. https://dev.mysql.com/doc/refman/8.0/en/encryption-functions.html#function_md5

func (*MD5) Description added in v0.12.0

func (f *MD5) Description() string

Description implements sql.FunctionExpression

func (*MD5) Eval

func (f *MD5) Eval(ctx *sql.Context, row sql.Row) (interface{}, error)

Eval implements sql.Expression

func (*MD5) WithChildren

func (f *MD5) WithChildren(children ...sql.Expression) (sql.Expression, error)

WithChildren implements sql.Expression

type MLineFromText added in v0.14.0

type MLineFromText struct {
	expression.NaryExpression
}

MLineFromText is a function that returns a MultiLineString type from a WKT string

func (*MLineFromText) Description added in v0.14.0

func (l *MLineFromText) Description() string

Description implements sql.FunctionExpression

func (*MLineFromText) Eval added in v0.14.0

func (l *MLineFromText) Eval(ctx *sql.Context, row sql.Row) (interface{}, error)

Eval implements the sql.Expression interface.

func (*MLineFromText) FunctionName added in v0.14.0

func (l *MLineFromText) FunctionName() string

FunctionName implements sql.FunctionExpression

func (*MLineFromText) String added in v0.14.0

func (l *MLineFromText) String() string

func (*MLineFromText) Type added in v0.14.0

func (l *MLineFromText) Type() sql.Type

Type implements the sql.Expression interface.

func (*MLineFromText) WithChildren added in v0.14.0

func (l *MLineFromText) WithChildren(children ...sql.Expression) (sql.Expression, error)

WithChildren implements the Expression interface.

type MLineFromWKB added in v0.14.0

type MLineFromWKB struct {
	expression.NaryExpression
}

MLineFromWKB is a function that returns a polygon type from a WKB byte array

func (*MLineFromWKB) Description added in v0.14.0

func (l *MLineFromWKB) Description() string

Description implements sql.FunctionExpression

func (*MLineFromWKB) Eval added in v0.14.0

func (l *MLineFromWKB) Eval(ctx *sql.Context, row sql.Row) (interface{}, error)

Eval implements the sql.Expression interface.

func (*MLineFromWKB) FunctionName added in v0.14.0

func (l *MLineFromWKB) FunctionName() string

FunctionName implements sql.FunctionExpression

func (*MLineFromWKB) String added in v0.14.0

func (l *MLineFromWKB) String() string

func (*MLineFromWKB) Type added in v0.14.0

func (l *MLineFromWKB) Type() sql.Type

Type implements the sql.Expression interface.

func (*MLineFromWKB) WithChildren added in v0.14.0

func (l *MLineFromWKB) WithChildren(children ...sql.Expression) (sql.Expression, error)

WithChildren implements the Expression interface.

type MPointFromText added in v0.14.0

type MPointFromText struct {
	expression.NaryExpression
}

MultiPoint is a function that returns a MultiPoint type from a WKT string

func (*MPointFromText) Description added in v0.14.0

func (p *MPointFromText) Description() string

Description implements sql.FunctionExpression

func (*MPointFromText) Eval added in v0.14.0

func (p *MPointFromText) Eval(ctx *sql.Context, row sql.Row) (interface{}, error)

Eval implements the sql.Expression interface.

func (*MPointFromText) FunctionName added in v0.14.0

func (p *MPointFromText) FunctionName() string

FunctionName implements sql.FunctionExpression

func (*MPointFromText) String added in v0.14.0

func (p *MPointFromText) String() string

func (*MPointFromText) Type added in v0.14.0

func (p *MPointFromText) Type() sql.Type

Type implements the sql.Expression interface.

func (*MPointFromText) WithChildren added in v0.14.0

func (p *MPointFromText) WithChildren(children ...sql.Expression) (sql.Expression, error)

WithChildren implements the Expression interface.

type MPointFromWKB added in v0.14.0

type MPointFromWKB struct {
	expression.NaryExpression
}

MPointFromWKB is a function that returns a linestring type from a WKB byte array

func (*MPointFromWKB) Description added in v0.14.0

func (p *MPointFromWKB) Description() string

Description implements sql.FunctionExpression

func (*MPointFromWKB) Eval added in v0.14.0

func (p *MPointFromWKB) Eval(ctx *sql.Context, row sql.Row) (interface{}, error)

Eval implements the sql.Expression interface.

func (*MPointFromWKB) FunctionName added in v0.14.0

func (p *MPointFromWKB) FunctionName() string

FunctionName implements sql.FunctionExpression

func (*MPointFromWKB) String added in v0.14.0

func (p *MPointFromWKB) String() string

func (*MPointFromWKB) Type added in v0.14.0

func (p *MPointFromWKB) Type() sql.Type

Type implements the sql.Expression interface.

func (*MPointFromWKB) WithChildren added in v0.14.0

func (p *MPointFromWKB) WithChildren(children ...sql.Expression) (sql.Expression, error)

WithChildren implements the Expression interface.

type MPolyFromText added in v0.14.0

type MPolyFromText struct {
	expression.NaryExpression
}

MPolyFromText is a function that returns a MultiPolygon type from a WKT string

func (*MPolyFromText) Description added in v0.14.0

func (p *MPolyFromText) Description() string

Description implements sql.FunctionExpression

func (*MPolyFromText) Eval added in v0.14.0

func (p *MPolyFromText) Eval(ctx *sql.Context, row sql.Row) (interface{}, error)

Eval implements the sql.Expression interface.

func (*MPolyFromText) FunctionName added in v0.14.0

func (p *MPolyFromText) FunctionName() string

FunctionName implements sql.FunctionExpression

func (*MPolyFromText) String added in v0.14.0

func (p *MPolyFromText) String() string

func (*MPolyFromText) Type added in v0.14.0

func (p *MPolyFromText) Type() sql.Type

Type implements the sql.Expression interface.

func (*MPolyFromText) WithChildren added in v0.14.0

func (p *MPolyFromText) WithChildren(children ...sql.Expression) (sql.Expression, error)

WithChildren implements the Expression interface.

type MPolyFromWKB added in v0.14.0

type MPolyFromWKB struct {
	expression.NaryExpression
}

MPolyFromWKB is a function that returns a polygon type from a WKB byte array

func (*MPolyFromWKB) Description added in v0.14.0

func (p *MPolyFromWKB) Description() string

Description implements sql.FunctionExpression

func (*MPolyFromWKB) Eval added in v0.14.0

func (p *MPolyFromWKB) Eval(ctx *sql.Context, row sql.Row) (interface{}, error)

Eval implements the sql.Expression interface.

func (*MPolyFromWKB) FunctionName added in v0.14.0

func (p *MPolyFromWKB) FunctionName() string

FunctionName implements sql.FunctionExpression

func (*MPolyFromWKB) String added in v0.14.0

func (p *MPolyFromWKB) String() string

func (*MPolyFromWKB) Type added in v0.14.0

func (p *MPolyFromWKB) Type() sql.Type

Type implements the sql.Expression interface.

func (*MPolyFromWKB) WithChildren added in v0.14.0

func (p *MPolyFromWKB) WithChildren(children ...sql.Expression) (sql.Expression, error)

WithChildren implements the Expression interface.

type Microsecond

type Microsecond struct {
	*UnaryDatetimeFunc
}

Microsecond implements the MICROSECOND function

func (*Microsecond) Description added in v0.12.0

func (m *Microsecond) Description() string

Description implements sql.FunctionExpression

func (*Microsecond) Eval

func (m *Microsecond) Eval(ctx *sql.Context, row sql.Row) (interface{}, error)

func (*Microsecond) WithChildren

func (m *Microsecond) WithChildren(children ...sql.Expression) (sql.Expression, error)

type Minute

type Minute struct {
	expression.UnaryExpression
}

Minute is a function that returns the minute of a date.

func (*Minute) Description added in v0.12.0

func (m *Minute) Description() string

Description implements sql.FunctionExpression

func (*Minute) Eval

func (m *Minute) Eval(ctx *sql.Context, row sql.Row) (interface{}, error)

Eval implements the Expression interface.

func (*Minute) FunctionName

func (m *Minute) FunctionName() string

FunctionName implements sql.FunctionExpression

func (*Minute) String

func (m *Minute) String() string

func (*Minute) Type

func (m *Minute) Type() sql.Type

Type implements the Expression interface.

func (*Minute) WithChildren

func (m *Minute) WithChildren(children ...sql.Expression) (sql.Expression, error)

WithChildren implements the Expression interface.

type Month

type Month struct {
	expression.UnaryExpression
}

Month is a function that returns the month of a date.

func (*Month) Description added in v0.12.0

func (m *Month) Description() string

Description implements sql.FunctionExpression

func (*Month) Eval

func (m *Month) Eval(ctx *sql.Context, row sql.Row) (interface{}, error)

Eval implements the Expression interface.

func (*Month) FunctionName

func (m *Month) FunctionName() string

FunctionName implements sql.FunctionExpression

func (*Month) String

func (m *Month) String() string

func (*Month) Type

func (m *Month) Type() sql.Type

Type implements the Expression interface.

func (*Month) WithChildren

func (m *Month) WithChildren(children ...sql.Expression) (sql.Expression, error)

WithChildren implements the Expression interface.

type MonthName

type MonthName struct {
	*UnaryDatetimeFunc
}

MonthName implements the MONTHNAME function

func (*MonthName) Description added in v0.12.0

func (d *MonthName) Description() string

Description implements sql.FunctionExpression

func (*MonthName) Eval

func (d *MonthName) Eval(ctx *sql.Context, row sql.Row) (interface{}, error)

func (*MonthName) WithChildren

func (d *MonthName) WithChildren(children ...sql.Expression) (sql.Expression, error)

type MultiLineString added in v0.14.0

type MultiLineString struct {
	expression.NaryExpression
}

MultiLineString is a function that returns a MultiLineString.

func (*MultiLineString) Description added in v0.14.0

func (p *MultiLineString) Description() string

Description implements sql.FunctionExpression

func (*MultiLineString) Eval added in v0.14.0

func (p *MultiLineString) Eval(ctx *sql.Context, row sql.Row) (interface{}, error)

Eval implements the sql.Expression interface.

func (*MultiLineString) FunctionName added in v0.14.0

func (p *MultiLineString) FunctionName() string

FunctionName implements sql.FunctionExpression

func (*MultiLineString) String added in v0.14.0

func (p *MultiLineString) String() string

func (*MultiLineString) Type added in v0.14.0

func (p *MultiLineString) Type() sql.Type

Type implements the sql.Expression interface.

func (*MultiLineString) WithChildren added in v0.14.0

func (p *MultiLineString) WithChildren(children ...sql.Expression) (sql.Expression, error)

WithChildren implements the Expression interface.

type MultiPoint added in v0.14.0

type MultiPoint struct {
	expression.NaryExpression
}

MultiPoint is a function that returns a set of Points.

func (*MultiPoint) Description added in v0.14.0

func (l *MultiPoint) Description() string

Description implements sql.FunctionExpression

func (*MultiPoint) Eval added in v0.14.0

func (l *MultiPoint) Eval(ctx *sql.Context, row sql.Row) (interface{}, error)

Eval implements the sql.Expression interface.

func (*MultiPoint) FunctionName added in v0.14.0

func (l *MultiPoint) FunctionName() string

FunctionName implements sql.FunctionExpression

func (*MultiPoint) String added in v0.14.0

func (l *MultiPoint) String() string

func (*MultiPoint) Type added in v0.14.0

func (l *MultiPoint) Type() sql.Type

Type implements the sql.Expression interface.

func (*MultiPoint) WithChildren added in v0.14.0

func (l *MultiPoint) WithChildren(children ...sql.Expression) (sql.Expression, error)

WithChildren implements the Expression interface.

type MultiPolygon added in v0.14.0

type MultiPolygon struct {
	expression.NaryExpression
}

MultiPolygon is a function that returns a MultiPolygon.

func (*MultiPolygon) Description added in v0.14.0

func (p *MultiPolygon) Description() string

Description implements sql.FunctionExpression

func (*MultiPolygon) Eval added in v0.14.0

func (p *MultiPolygon) Eval(ctx *sql.Context, row sql.Row) (interface{}, error)

Eval implements the sql.Expression interface.

func (*MultiPolygon) FunctionName added in v0.14.0

func (p *MultiPolygon) FunctionName() string

FunctionName implements sql.FunctionExpression

func (*MultiPolygon) String added in v0.14.0

func (p *MultiPolygon) String() string

func (*MultiPolygon) Type added in v0.14.0

func (p *MultiPolygon) Type() sql.Type

Type implements the sql.Expression interface.

func (*MultiPolygon) WithChildren added in v0.14.0

func (p *MultiPolygon) WithChildren(children ...sql.Expression) (sql.Expression, error)

WithChildren implements the Expression interface.

type NamedLockFunction

type NamedLockFunction struct {
	expression.UnaryExpression
	// contains filtered or unexported fields
}

NamedLockFunction is a sql function that takes just the name of a lock as an argument

func (*NamedLockFunction) FunctionName

func (nl *NamedLockFunction) FunctionName() string

FunctionName implements sql.FunctionExpression

func (*NamedLockFunction) GetLockName

func (nl *NamedLockFunction) GetLockName(ctx *sql.Context, row sql.Row) (*string, error)

Eval implements the Expression interface.

func (*NamedLockFunction) IsNullable

func (nl *NamedLockFunction) IsNullable() bool

IsNullable implements the Expression interface.

func (*NamedLockFunction) String

func (nl *NamedLockFunction) String() string

String implements the fmt.Stringer interface.

func (*NamedLockFunction) Type

func (nl *NamedLockFunction) Type() sql.Type

Type implements the Expression interface.

type NoArgFunc

type NoArgFunc struct {
	Name    string
	SQLType sql.Type
}

NoArgFunc is a helper type to reduce boilerplate in functions that take no arguments. Implements most of sql.FunctionExpression.

func (NoArgFunc) Children

func (fn NoArgFunc) Children() []sql.Expression

Children implements the Expression interface.

func (NoArgFunc) FunctionName

func (fn NoArgFunc) FunctionName() string

FunctionName implements sql.FunctionExpression

func (NoArgFunc) IsNullable

func (fn NoArgFunc) IsNullable() bool

IsNullable implements the Expression interface.

func (NoArgFunc) Resolved

func (fn NoArgFunc) Resolved() bool

Resolved implements the Expression interface.

func (NoArgFunc) String

func (fn NoArgFunc) String() string

func (NoArgFunc) Type

func (fn NoArgFunc) Type() sql.Type

Type implements the Expression interface.

type Now

type Now struct {
	// contains filtered or unexported fields
}

Now is a function that returns the current time.

func (*Now) Children

func (n *Now) Children() []sql.Expression

Children implements the sql.Expression interface.

func (*Now) Description added in v0.12.0

func (n *Now) Description() string

Description implements sql.FunctionExpression

func (*Now) Eval

func (n *Now) Eval(ctx *sql.Context, _ sql.Row) (interface{}, error)

Eval implements the sql.Expression interface.

func (*Now) FunctionName

func (n *Now) FunctionName() string

FunctionName implements sql.FunctionExpression

func (*Now) IsNonDeterministic added in v0.12.0

func (n *Now) IsNonDeterministic() bool

func (*Now) IsNullable

func (n *Now) IsNullable() bool

IsNullable implements the sql.Expression interface.

func (*Now) Resolved

func (n *Now) Resolved() bool

Resolved implements the sql.Expression interface.

func (*Now) String

func (n *Now) String() string

func (*Now) Type

func (n *Now) Type() sql.Type

Type implements the sql.Expression interface.

func (*Now) WithChildren

func (n *Now) WithChildren(children ...sql.Expression) (sql.Expression, error)

WithChildren implements the Expression interface.

type NullIf

type NullIf struct {
	expression.BinaryExpression
}

NullIf function compares two expressions and returns NULL if they are equal. Otherwise, the first expression is returned.

func (*NullIf) Description added in v0.12.0

func (f *NullIf) Description() string

Description implements sql.FunctionExpression

func (*NullIf) Eval

func (f *NullIf) Eval(ctx *sql.Context, row sql.Row) (interface{}, error)

Eval implements the Expression interface.

func (*NullIf) FunctionName

func (f *NullIf) FunctionName() string

FunctionName implements sql.FunctionExpression

func (*NullIf) IsNullable

func (f *NullIf) IsNullable() bool

IsNullable implements the Expression interface.

func (*NullIf) String

func (f *NullIf) String() string

func (*NullIf) Type

func (f *NullIf) Type() sql.Type

Type implements the Expression interface.

func (*NullIf) WithChildren

func (f *NullIf) WithChildren(children ...sql.Expression) (sql.Expression, error)

WithChildren implements the Expression interface.

type Pad

type Pad struct {
	// contains filtered or unexported fields
}

Pad is a function that pads a string with another string.

func (*Pad) Children

func (p *Pad) Children() []sql.Expression

Children implements the Expression interface.

func (*Pad) Description added in v0.12.0

func (p *Pad) Description() string

Description implements sql.FunctionExpression

func (*Pad) Eval

func (p *Pad) Eval(
	ctx *sql.Context,
	row sql.Row,
) (interface{}, error)

Eval implements the Expression interface.

func (*Pad) FunctionName

func (p *Pad) FunctionName() string

FunctionName implements sql.FunctionExpression

func (*Pad) IsNullable

func (p *Pad) IsNullable() bool

IsNullable implements the Expression interface.

func (*Pad) Resolved

func (p *Pad) Resolved() bool

Resolved implements the Expression interface.

func (*Pad) String

func (p *Pad) String() string

func (*Pad) Type

func (p *Pad) Type() sql.Type

Type implements the Expression interface.

func (*Pad) WithChildren

func (p *Pad) WithChildren(children ...sql.Expression) (sql.Expression, error)

WithChildren implements the Expression interface.

type Perimeter added in v0.14.0

type Perimeter struct {
	expression.NaryExpression
}

Perimeter is a function that returns the Perimeter of a Polygon Not in MySQL, basing off: https://postgis.net/docs/ST_Perimeter.html

func (*Perimeter) Description added in v0.14.0

func (p *Perimeter) Description() string

Description implements sql.FunctionExpression

func (*Perimeter) Eval added in v0.14.0

func (p *Perimeter) Eval(ctx *sql.Context, row sql.Row) (interface{}, error)

Eval implements the sql.Expression interface.

func (*Perimeter) FunctionName added in v0.14.0

func (p *Perimeter) FunctionName() string

FunctionName implements sql.FunctionExpression

func (*Perimeter) String added in v0.14.0

func (p *Perimeter) String() string

func (*Perimeter) Type added in v0.14.0

func (p *Perimeter) Type() sql.Type

Type implements the sql.Expression interface.

func (*Perimeter) WithChildren added in v0.14.0

func (p *Perimeter) WithChildren(children ...sql.Expression) (sql.Expression, error)

WithChildren implements the Expression interface.

type Point added in v0.12.0

type Point struct {
	X sql.Expression
	Y sql.Expression
}

Point is a function that returns a point type containing values Y and Y.

func (*Point) Children added in v0.12.0

func (p *Point) Children() []sql.Expression

Children implements the sql.Expression interface.

func (*Point) Description added in v0.12.0

func (p *Point) Description() string

Description implements sql.FunctionExpression

func (*Point) Eval added in v0.12.0

func (p *Point) Eval(ctx *sql.Context, row sql.Row) (interface{}, error)

Eval implements the sql.Expression interface.

func (*Point) FunctionName added in v0.12.0

func (p *Point) FunctionName() string

FunctionName implements sql.FunctionExpression

func (*Point) IsNullable added in v0.12.0

func (p *Point) IsNullable() bool

IsNullable implements the sql.Expression interface.

func (*Point) Resolved added in v0.12.0

func (p *Point) Resolved() bool

Resolved implements the sql.Expression interface.

func (*Point) String added in v0.12.0

func (p *Point) String() string

func (*Point) Type added in v0.12.0

func (p *Point) Type() sql.Type

Type implements the sql.Expression interface.

func (*Point) WithChildren added in v0.12.0

func (p *Point) WithChildren(children ...sql.Expression) (sql.Expression, error)

WithChildren implements the Expression interface.

type PointFromText added in v0.14.0

type PointFromText struct {
	expression.NaryExpression
}

PointFromText is a function that returns a Point type from a WKT string

func (*PointFromText) Description added in v0.14.0

func (p *PointFromText) Description() string

Description implements sql.FunctionExpression

func (*PointFromText) Eval added in v0.14.0

func (p *PointFromText) Eval(ctx *sql.Context, row sql.Row) (interface{}, error)

Eval implements the sql.Expression interface.

func (*PointFromText) FunctionName added in v0.14.0

func (p *PointFromText) FunctionName() string

FunctionName implements sql.FunctionExpression

func (*PointFromText) String added in v0.14.0

func (p *PointFromText) String() string

func (*PointFromText) Type added in v0.14.0

func (p *PointFromText) Type() sql.Type

Type implements the sql.Expression interface.

func (*PointFromText) WithChildren added in v0.14.0

func (p *PointFromText) WithChildren(children ...sql.Expression) (sql.Expression, error)

WithChildren implements the Expression interface.

type PointFromWKB added in v0.12.0

type PointFromWKB struct {
	expression.NaryExpression
}

PointFromWKB is a function that returns a point type from a WKB byte array

func (*PointFromWKB) Description added in v0.12.0

func (p *PointFromWKB) Description() string

Description implements sql.FunctionExpression

func (*PointFromWKB) Eval added in v0.12.0

func (p *PointFromWKB) Eval(ctx *sql.Context, row sql.Row) (interface{}, error)

Eval implements the sql.Expression interface.

func (*PointFromWKB) FunctionName added in v0.12.0

func (p *PointFromWKB) FunctionName() string

FunctionName implements sql.FunctionExpression

func (*PointFromWKB) String added in v0.12.0

func (p *PointFromWKB) String() string

func (*PointFromWKB) Type added in v0.12.0

func (p *PointFromWKB) Type() sql.Type

Type implements the sql.Expression interface.

func (*PointFromWKB) WithChildren added in v0.12.0

func (p *PointFromWKB) WithChildren(children ...sql.Expression) (sql.Expression, error)

WithChildren implements the Expression interface.

type PolyFromText added in v0.14.0

type PolyFromText struct {
	expression.NaryExpression
}

PolyFromText is a function that returns a Polygon type from a WKT string

func (*PolyFromText) Description added in v0.14.0

func (p *PolyFromText) Description() string

Description implements sql.FunctionExpression

func (*PolyFromText) Eval added in v0.14.0

func (p *PolyFromText) Eval(ctx *sql.Context, row sql.Row) (interface{}, error)

Eval implements the sql.Expression interface.

func (*PolyFromText) FunctionName added in v0.14.0

func (p *PolyFromText) FunctionName() string

FunctionName implements sql.FunctionExpression

func (*PolyFromText) String added in v0.14.0

func (p *PolyFromText) String() string

func (*PolyFromText) Type added in v0.14.0

func (p *PolyFromText) Type() sql.Type

Type implements the sql.Expression interface.

func (*PolyFromText) WithChildren added in v0.14.0

func (p *PolyFromText) WithChildren(children ...sql.Expression) (sql.Expression, error)

WithChildren implements the Expression interface.

type PolyFromWKB added in v0.12.0

type PolyFromWKB struct {
	expression.NaryExpression
}

PolyFromWKB is a function that returns a polygon type from a WKB byte array

func (*PolyFromWKB) Description added in v0.12.0

func (p *PolyFromWKB) Description() string

Description implements sql.FunctionExpression

func (*PolyFromWKB) Eval added in v0.12.0

func (p *PolyFromWKB) Eval(ctx *sql.Context, row sql.Row) (interface{}, error)

Eval implements the sql.Expression interface.

func (*PolyFromWKB) FunctionName added in v0.12.0

func (p *PolyFromWKB) FunctionName() string

FunctionName implements sql.FunctionExpression

func (*PolyFromWKB) String added in v0.12.0

func (p *PolyFromWKB) String() string

func (*PolyFromWKB) Type added in v0.12.0

func (p *PolyFromWKB) Type() sql.Type

Type implements the sql.Expression interface.

func (*PolyFromWKB) WithChildren added in v0.12.0

func (p *PolyFromWKB) WithChildren(children ...sql.Expression) (sql.Expression, error)

WithChildren implements the Expression interface.

type Polygon added in v0.12.0

type Polygon struct {
	expression.NaryExpression
}

Polygon is a function that returns a Polygon.

func (*Polygon) Description added in v0.12.0

func (p *Polygon) Description() string

Description implements sql.FunctionExpression

func (*Polygon) Eval added in v0.12.0

func (p *Polygon) Eval(ctx *sql.Context, row sql.Row) (interface{}, error)

Eval implements the sql.Expression interface.

func (*Polygon) FunctionName added in v0.12.0

func (p *Polygon) FunctionName() string

FunctionName implements sql.FunctionExpression

func (*Polygon) String added in v0.12.0

func (p *Polygon) String() string

func (*Polygon) Type added in v0.12.0

func (p *Polygon) Type() sql.Type

Type implements the sql.Expression interface.

func (*Polygon) WithChildren added in v0.12.0

func (p *Polygon) WithChildren(children ...sql.Expression) (sql.Expression, error)

WithChildren implements the Expression interface.

type Power

type Power struct {
	expression.BinaryExpression
}

Power is a function that returns value of X raised to the power of Y.

func (*Power) Description added in v0.12.0

func (p *Power) Description() string

Description implements sql.FunctionExpression

func (*Power) Eval

func (p *Power) Eval(ctx *sql.Context, row sql.Row) (interface{}, error)

Eval implements the Expression interface.

func (*Power) FunctionName

func (p *Power) FunctionName() string

FunctionName implements sql.FunctionExpression

func (*Power) IsNullable

func (p *Power) IsNullable() bool

IsNullable implements the Expression interface.

func (*Power) String

func (p *Power) String() string

func (*Power) Type

func (p *Power) Type() sql.Type

Type implements the Expression interface.

func (*Power) WithChildren

func (p *Power) WithChildren(children ...sql.Expression) (sql.Expression, error)

WithChildren implements the Expression interface.

type Radians

type Radians struct {
	*UnaryFunc
}

func (*Radians) Description added in v0.12.0

func (r *Radians) Description() string

Description implements sql.FunctionExpression

func (*Radians) Eval

func (r *Radians) Eval(ctx *sql.Context, row sql.Row) (interface{}, error)

Eval implements sql.Expression

func (*Radians) WithChildren

func (r *Radians) WithChildren(children ...sql.Expression) (sql.Expression, error)

WithChildren implements sql.Expression

type Rand

type Rand struct {
	Child sql.Expression
}

Rand returns a random float 0 <= x < 1. If it has an argument, that argument will be used to seed the random number generator, effectively turning it into a hash on that value.

func (*Rand) Children

func (r *Rand) Children() []sql.Expression

Children implements sql.Expression

func (*Rand) Description added in v0.12.0

func (r *Rand) Description() string

Description implements sql.FunctionExpression

func (*Rand) Eval

func (r *Rand) Eval(ctx *sql.Context, row sql.Row) (interface{}, error)

Eval implements sql.Expression.

func (*Rand) FunctionName

func (r *Rand) FunctionName() string

FunctionName implements sql.FunctionExpression

func (*Rand) IsNonDeterministic

func (r *Rand) IsNonDeterministic() bool

IsNonDeterministic implements sql.NonDeterministicExpression

func (*Rand) IsNullable

func (r *Rand) IsNullable() bool

IsNullable implements sql.Expression

func (*Rand) Resolved

func (r *Rand) Resolved() bool

Resolved implements sql.Expression

func (*Rand) String

func (r *Rand) String() string

func (*Rand) Type

func (r *Rand) Type() sql.Type

Type implements sql.Expression.

func (*Rand) WithChildren

func (r *Rand) WithChildren(children ...sql.Expression) (sql.Expression, error)

WithChildren implements sql.Expression.

type RegexpLike added in v0.10.0

type RegexpLike struct {
	Text    sql.Expression
	Pattern sql.Expression
	Flags   sql.Expression
	// contains filtered or unexported fields
}

RegexpLike implements the REGEXP_LIKE function. https://dev.mysql.com/doc/refman/8.0/en/regexp.html#function_regexp-like

func (*RegexpLike) Children added in v0.10.0

func (r *RegexpLike) Children() []sql.Expression

Children implements the sql.Expression interface.

func (*RegexpLike) Description added in v0.12.0

func (r *RegexpLike) Description() string

Description implements sql.FunctionExpression

func (*RegexpLike) Eval added in v0.10.0

func (r *RegexpLike) Eval(ctx *sql.Context, row sql.Row) (interface{}, error)

Eval implements the sql.Expression interface.

func (*RegexpLike) FunctionName added in v0.10.0

func (r *RegexpLike) FunctionName() string

FunctionName implements sql.FunctionExpression

func (*RegexpLike) IsNullable added in v0.10.0

func (r *RegexpLike) IsNullable() bool

IsNullable implements the sql.Expression interface.

func (*RegexpLike) Resolved added in v0.10.0

func (r *RegexpLike) Resolved() bool

Resolved implements the sql.Expression interface.

func (*RegexpLike) String added in v0.10.0

func (r *RegexpLike) String() string

func (*RegexpLike) Type added in v0.10.0

func (r *RegexpLike) Type() sql.Type

Type implements the sql.Expression interface.

func (*RegexpLike) WithChildren added in v0.10.0

func (r *RegexpLike) WithChildren(children ...sql.Expression) (sql.Expression, error)

WithChildren implements the sql.Expression interface.

type RegexpReplace added in v0.12.0

type RegexpReplace struct {
	// contains filtered or unexported fields
}

RegexpReplace implements the REGEXP_REPLACE function. https://dev.mysql.com/doc/refman/8.0/en/regexp.html#function_regexp-replace

func (*RegexpReplace) Children added in v0.12.0

func (r *RegexpReplace) Children() []sql.Expression

Children implements the sql.Expression interface.

func (*RegexpReplace) Description added in v0.12.0

func (r *RegexpReplace) Description() string

Description implements sql.FunctionExpression

func (*RegexpReplace) Eval added in v0.12.0

func (r *RegexpReplace) Eval(ctx *sql.Context, row sql.Row) (interface{}, error)

Eval implements the sql.Expression interface.

func (*RegexpReplace) FunctionName added in v0.12.0

func (r *RegexpReplace) FunctionName() string

FunctionName implements sql.FunctionExpression

func (*RegexpReplace) IsNullable added in v0.12.0

func (r *RegexpReplace) IsNullable() bool

IsNullable implements the sql.Expression interface.

func (*RegexpReplace) Resolved added in v0.12.0

func (r *RegexpReplace) Resolved() bool

Resolved implements the sql.Expression interface.

func (*RegexpReplace) String added in v0.12.0

func (r *RegexpReplace) String() string

func (*RegexpReplace) Type added in v0.12.0

func (r *RegexpReplace) Type() sql.Type

Type implements the sql.Expression interface.

func (*RegexpReplace) WithChildren added in v0.12.0

func (r *RegexpReplace) WithChildren(children ...sql.Expression) (sql.Expression, error)

WithChildren implements the sql.Expression interface.

type Registry added in v0.11.0

type Registry map[string]sql.Function

Registry is used to register functions

func NewRegistry added in v0.11.0

func NewRegistry() Registry

NewRegistry creates a new Registry.

func (Registry) Function added in v0.11.0

func (r Registry) Function(ctx *sql.Context, name string) (sql.Function, error)

Function implements sql.FunctionProvider

func (Registry) Register added in v0.11.0

func (r Registry) Register(fn ...sql.Function) error

Register registers functions, returning an error if it's already registered

type ReleaseAllLocks

type ReleaseAllLocks struct {
	NoArgFunc
	// contains filtered or unexported fields
}

func (ReleaseAllLocks) Description added in v0.12.0

func (r ReleaseAllLocks) Description() string

Description implements sql.FunctionExpression

func (ReleaseAllLocks) Eval

func (r ReleaseAllLocks) Eval(ctx *sql.Context, row sql.Row) (interface{}, error)

func (ReleaseAllLocks) WithChildren

func (r ReleaseAllLocks) WithChildren(children ...sql.Expression) (sql.Expression, error)

type ReleaseLock

type ReleaseLock struct {
	NamedLockFunction
}

func (*ReleaseLock) Description added in v0.12.0

func (i *ReleaseLock) Description() string

Description implements sql.FunctionExpression

func (*ReleaseLock) Eval

func (i *ReleaseLock) Eval(ctx *sql.Context, row sql.Row) (interface{}, error)

func (*ReleaseLock) WithChildren

func (i *ReleaseLock) WithChildren(children ...sql.Expression) (sql.Expression, error)

type Repeat

type Repeat struct {
	expression.BinaryExpression
}

Repeat is a function that returns the string repeated n times.

func (*Repeat) Description added in v0.12.0

func (r *Repeat) Description() string

Description implements sql.FunctionExpression

func (*Repeat) Eval

func (r *Repeat) Eval(
	ctx *sql.Context,
	row sql.Row,
) (interface{}, error)

Eval implements the Expression interface.

func (*Repeat) FunctionName

func (r *Repeat) FunctionName() string

FunctionName implements sql.FunctionExpression

func (*Repeat) String

func (r *Repeat) String() string

func (*Repeat) Type

func (r *Repeat) Type() sql.Type

Type implements the Expression interface.

func (*Repeat) WithChildren

func (r *Repeat) WithChildren(children ...sql.Expression) (sql.Expression, error)

WithChildren implements the Expression interface.

type Replace

type Replace struct {
	// contains filtered or unexported fields
}

Replace is a function that returns a string with all occurrences of fromStr replaced by the string toStr

func (*Replace) Children

func (r *Replace) Children() []sql.Expression

Children implements the Expression interface.

func (*Replace) Description added in v0.12.0

func (r *Replace) Description() string

Description implements sql.FunctionExpression

func (*Replace) Eval

func (r *Replace) Eval(
	ctx *sql.Context,
	row sql.Row,
) (interface{}, error)

Eval implements the Expression interface.

func (*Replace) FunctionName

func (r *Replace) FunctionName() string

FunctionName implements sql.FunctionExpression

func (*Replace) IsNullable

func (r *Replace) IsNullable() bool

IsNullable implements the Expression interface.

func (*Replace) Resolved

func (r *Replace) Resolved() bool

Resolved implements the Expression interface.

func (*Replace) String

func (r *Replace) String() string

func (*Replace) Type

func (r *Replace) Type() sql.Type

Type implements the Expression interface.

func (*Replace) WithChildren

func (r *Replace) WithChildren(children ...sql.Expression) (sql.Expression, error)

WithChildren implements the Expression interface.

type Reverse

type Reverse struct {
	expression.UnaryExpression
}

Reverse is a function that returns the reverse of the text provided.

func (*Reverse) Description added in v0.12.0

func (r *Reverse) Description() string

Description implements sql.FunctionExpression

func (*Reverse) Eval

func (r *Reverse) Eval(
	ctx *sql.Context,
	row sql.Row,
) (interface{}, error)

Eval implements the Expression interface.

func (*Reverse) FunctionName

func (r *Reverse) FunctionName() string

FunctionName implements sql.FunctionExpression

func (*Reverse) String

func (r *Reverse) String() string

func (*Reverse) Type

func (r *Reverse) Type() sql.Type

Type implements the Expression interface.

func (*Reverse) WithChildren

func (r *Reverse) WithChildren(children ...sql.Expression) (sql.Expression, error)

WithChildren implements the Expression interface.

type Right struct {
	// contains filtered or unexported fields
}

Right is a function that returns the last N characters of a string expression.

func (Right) Children added in v0.12.0

func (r Right) Children() []sql.Expression

Children implements the Expression interface.

func (Right) Description added in v0.12.0

func (r Right) Description() string

Description implements sql.FunctionExpression

func (Right) Eval added in v0.12.0

func (r Right) Eval(ctx *sql.Context, row sql.Row) (interface{}, error)

Eval implements the Expression interface.

func (Right) FunctionName added in v0.12.0

func (r Right) FunctionName() string

FunctionName implements sql.FunctionExpression

func (Right) IsNullable added in v0.12.0

func (r Right) IsNullable() bool

IsNullable implements the Expression interface.

func (Right) Resolved added in v0.12.0

func (r Right) Resolved() bool

Resolved implements the Expression interface.

func (Right) String added in v0.12.0

func (r Right) String() string

func (Right) Type added in v0.12.0

func (Right) Type() sql.Type

Type implements the Expression interface.

func (Right) WithChildren added in v0.12.0

func (r Right) WithChildren(children ...sql.Expression) (sql.Expression, error)

WithChildren implements the Expression interface.

type RightTrim added in v0.12.0

type RightTrim struct {
	expression.UnaryExpression
}

func (*RightTrim) Description added in v0.12.0

func (t *RightTrim) Description() string

Description implements sql.FunctionExpression

func (*RightTrim) Eval added in v0.12.0

func (t *RightTrim) Eval(ctx *sql.Context, row sql.Row) (interface{}, error)

func (*RightTrim) FunctionName added in v0.12.0

func (t *RightTrim) FunctionName() string

FunctionName implements sql.FunctionExpression

func (*RightTrim) IsNullable added in v0.12.0

func (t *RightTrim) IsNullable() bool

func (*RightTrim) String added in v0.12.0

func (t *RightTrim) String() string

func (*RightTrim) Type added in v0.12.0

func (t *RightTrim) Type() sql.Type

func (*RightTrim) WithChildren added in v0.12.0

func (t *RightTrim) WithChildren(children ...sql.Expression) (sql.Expression, error)

type Round

type Round struct {
	expression.BinaryExpression
}

Round returns the number (x) with (d) requested decimal places. If d is negative, the number is returned with the (abs(d)) least significant digits of it's integer part set to 0. If d is not specified or nil/null it defaults to 0.

func (*Round) Children

func (r *Round) Children() []sql.Expression

Children implements the Expression interface.

func (*Round) Description added in v0.12.0

func (r *Round) Description() string

Description implements sql.FunctionExpression

func (*Round) Eval

func (r *Round) Eval(ctx *sql.Context, row sql.Row) (interface{}, error)

Eval implements the Expression interface.

func (*Round) FunctionName

func (r *Round) FunctionName() string

FunctionName implements sql.FunctionExpression

func (*Round) IsNullable

func (r *Round) IsNullable() bool

IsNullable implements the Expression interface.

func (*Round) Resolved

func (r *Round) Resolved() bool

Resolved implements the Expression interface.

func (*Round) String

func (r *Round) String() string

func (*Round) Type

func (r *Round) Type() sql.Type

Type implements the Expression interface.

func (*Round) WithChildren

func (r *Round) WithChildren(children ...sql.Expression) (sql.Expression, error)

WithChildren implements the Expression interface.

type RowCount added in v0.9.0

type RowCount struct{}

RowCount implements the ROW_COUNT() function

func (RowCount) Children added in v0.9.0

func (r RowCount) Children() []sql.Expression

Children implements sql.Expression

func (RowCount) Description added in v0.12.0

func (r RowCount) Description() string

Description implements sql.FunctionExpression

func (RowCount) Eval added in v0.9.0

func (r RowCount) Eval(ctx *sql.Context, row sql.Row) (interface{}, error)

Eval implements sql.Expression

func (RowCount) FunctionName added in v0.9.0

func (r RowCount) FunctionName() string

FunctionName implements sql.FunctionExpression

func (RowCount) IsNonDeterministic added in v0.12.0

func (r RowCount) IsNonDeterministic() bool

func (RowCount) IsNullable added in v0.9.0

func (r RowCount) IsNullable() bool

IsNullable implements sql.Expression

func (RowCount) Resolved added in v0.9.0

func (r RowCount) Resolved() bool

Resolved implements sql.Expression

func (RowCount) String added in v0.9.0

func (r RowCount) String() string

String implements sql.Expression

func (RowCount) Type added in v0.9.0

func (r RowCount) Type() sql.Type

Type implements sql.Expression

func (RowCount) WithChildren added in v0.9.0

func (r RowCount) WithChildren(children ...sql.Expression) (sql.Expression, error)

WithChildren implements sql.Expression

type SHA1

type SHA1 struct {
	*UnaryFunc
}

SHA1 function returns the SHA1 hash of the input. https://dev.mysql.com/doc/refman/8.0/en/encryption-functions.html#function_sha1

func (*SHA1) Description added in v0.12.0

func (f *SHA1) Description() string

Description implements sql.FunctionExpression

func (*SHA1) Eval

func (f *SHA1) Eval(ctx *sql.Context, row sql.Row) (interface{}, error)

Eval implements sql.Expression

func (*SHA1) WithChildren

func (f *SHA1) WithChildren(children ...sql.Expression) (sql.Expression, error)

WithChildren implements sql.Expression

type SHA2

type SHA2 struct {
	expression.BinaryExpression
}

SHA2 function returns the SHA-224/256/384/512 hash of the input. https://dev.mysql.com/doc/refman/8.0/en/encryption-functions.html#function_sha2

func (*SHA2) Description added in v0.12.0

func (f *SHA2) Description() string

Description implements sql.FunctionExpression

func (*SHA2) Eval

func (f *SHA2) Eval(ctx *sql.Context, row sql.Row) (interface{}, error)

Eval implements sql.Expression

func (*SHA2) FunctionName

func (f *SHA2) FunctionName() string

FunctionName implements sql.FunctionExpression

func (*SHA2) String

func (f *SHA2) String() string

String implements sql.Expression

func (*SHA2) Type

func (f *SHA2) Type() sql.Type

Type implements sql.Expression

func (*SHA2) WithChildren

func (f *SHA2) WithChildren(children ...sql.Expression) (sql.Expression, error)

WithChildren implements sql.Expression

type SRID added in v0.12.0

type SRID struct {
	expression.NaryExpression
}

SRID is a function that returns SRID of Geometry object or returns a new object with altered SRID.

func (*SRID) Description added in v0.12.0

func (s *SRID) Description() string

Description implements sql.FunctionExpression

func (*SRID) Eval added in v0.12.0

func (s *SRID) Eval(ctx *sql.Context, row sql.Row) (interface{}, error)

Eval implements the sql.Expression interface.

func (*SRID) FunctionName added in v0.12.0

func (s *SRID) FunctionName() string

FunctionName implements sql.FunctionExpression

func (*SRID) String added in v0.12.0

func (s *SRID) String() string

func (*SRID) Type added in v0.12.0

func (s *SRID) Type() sql.Type

Type implements the sql.Expression interface.

func (*SRID) WithChildren added in v0.12.0

func (s *SRID) WithChildren(children ...sql.Expression) (sql.Expression, error)

WithChildren implements the Expression interface.

type STLength added in v0.14.0

type STLength struct {
	expression.NaryExpression
}

STLength is a function that returns the STLength of a LineString

func (*STLength) Description added in v0.14.0

func (s *STLength) Description() string

Description implements sql.FunctionExpression

func (*STLength) Eval added in v0.14.0

func (s *STLength) Eval(ctx *sql.Context, row sql.Row) (interface{}, error)

Eval implements the sql.Expression interface.

func (*STLength) FunctionName added in v0.14.0

func (s *STLength) FunctionName() string

FunctionName implements sql.FunctionExpression

func (*STLength) String added in v0.14.0

func (s *STLength) String() string

func (*STLength) Type added in v0.14.0

func (s *STLength) Type() sql.Type

Type implements the sql.Expression interface.

func (*STLength) WithChildren added in v0.14.0

func (s *STLength) WithChildren(children ...sql.Expression) (sql.Expression, error)

WithChildren implements the Expression interface.

type STX added in v0.12.0

type STX struct {
	expression.NaryExpression
}

STX is a function that returns the x value from a given point.

func (*STX) Description added in v0.12.0

func (s *STX) Description() string

Description implements sql.FunctionExpression

func (*STX) Eval added in v0.12.0

func (s *STX) Eval(ctx *sql.Context, row sql.Row) (interface{}, error)

Eval implements the sql.Expression interface.

func (*STX) FunctionName added in v0.12.0

func (s *STX) FunctionName() string

FunctionName implements sql.FunctionExpression

func (*STX) String added in v0.12.0

func (s *STX) String() string

func (*STX) Type added in v0.12.0

func (s *STX) Type() sql.Type

Type implements the sql.Expression interface.

func (*STX) WithChildren added in v0.12.0

func (s *STX) WithChildren(children ...sql.Expression) (sql.Expression, error)

WithChildren implements the Expression interface.

type STY added in v0.12.0

type STY struct {
	expression.NaryExpression
}

STY is a function that returns the y value from a given point.

func (*STY) Description added in v0.12.0

func (s *STY) Description() string

Description implements sql.FunctionExpression

func (*STY) Eval added in v0.12.0

func (s *STY) Eval(ctx *sql.Context, row sql.Row) (interface{}, error)

Eval implements the sql.Expression interface.

func (*STY) FunctionName added in v0.12.0

func (s *STY) FunctionName() string

FunctionName implements sql.FunctionExpression

func (*STY) String added in v0.12.0

func (s *STY) String() string

func (*STY) Type added in v0.12.0

func (s *STY) Type() sql.Type

Type implements the sql.Expression interface.

func (*STY) WithChildren added in v0.12.0

func (s *STY) WithChildren(children ...sql.Expression) (sql.Expression, error)

WithChildren implements the Expression interface.

type Second

type Second struct {
	expression.UnaryExpression
}

Second is a function that returns the second of a date.

func (*Second) Description added in v0.12.0

func (s *Second) Description() string

Description implements sql.FunctionExpression

func (*Second) Eval

func (s *Second) Eval(ctx *sql.Context, row sql.Row) (interface{}, error)

Eval implements the Expression interface.

func (*Second) FunctionName

func (s *Second) FunctionName() string

FunctionName implements sql.FunctionExpression

func (*Second) String

func (s *Second) String() string

func (*Second) Type

func (s *Second) Type() sql.Type

Type implements the Expression interface.

func (*Second) WithChildren

func (s *Second) WithChildren(children ...sql.Expression) (sql.Expression, error)

WithChildren implements the Expression interface.

type Sign

type Sign struct {
	*UnaryFunc
}

func (*Sign) Description added in v0.12.0

func (s *Sign) Description() string

Description implements sql.FunctionExpression

func (*Sign) Eval

func (s *Sign) Eval(ctx *sql.Context, row sql.Row) (interface{}, error)

Eval implements sql.Expression

func (*Sign) WithChildren

func (s *Sign) WithChildren(children ...sql.Expression) (sql.Expression, error)

WithChildren implements sql.Expression

type Sin

type Sin struct {
	*UnaryFunc
}

Sin is the SIN function

func (*Sin) Description added in v0.12.0

func (s *Sin) Description() string

Description implements sql.FunctionExpression

func (*Sin) Eval

func (s *Sin) Eval(ctx *sql.Context, row sql.Row) (interface{}, error)

Eval implements sql.Expression

func (*Sin) WithChildren

func (s *Sin) WithChildren(children ...sql.Expression) (sql.Expression, error)

WithChildren implements sql.Expression

type Sleep

type Sleep struct {
	expression.UnaryExpression
}

Sleep is a function that just waits for the specified number of seconds and returns 0. It can be useful to test timeouts or long queries.

func (*Sleep) Description added in v0.12.0

func (s *Sleep) Description() string

Description implements sql.FunctionExpression

func (*Sleep) Eval

func (s *Sleep) Eval(ctx *sql.Context, row sql.Row) (interface{}, error)

Eval implements the Expression interface.

func (*Sleep) FunctionName

func (s *Sleep) FunctionName() string

FunctionName implements sql.FunctionExpression

func (*Sleep) IsNullable

func (s *Sleep) IsNullable() bool

IsNullable implements the Expression interface.

func (*Sleep) String

func (s *Sleep) String() string

String implements the fmt.Stringer interface.

func (*Sleep) Type

func (s *Sleep) Type() sql.Type

Type implements the Expression interface.

func (*Sleep) WithChildren

func (s *Sleep) WithChildren(children ...sql.Expression) (sql.Expression, error)

WithChildren implements the Expression interface.

type Soundex

type Soundex struct {
	expression.UnaryExpression
}

Soundex is a function that returns the soundex of a string. Two strings that sound almost the same should have identical soundex strings. A standard soundex string is four characters long, but the SOUNDEX() function returns an arbitrarily long string.

func (*Soundex) Description added in v0.12.0

func (s *Soundex) Description() string

Description implements sql.FunctionExpression

func (*Soundex) Eval

func (s *Soundex) Eval(ctx *sql.Context, row sql.Row) (interface{}, error)

Eval implements the Expression interface.

func (*Soundex) FunctionName

func (s *Soundex) FunctionName() string

FunctionName implements sql.FunctionExpression

func (*Soundex) String

func (s *Soundex) String() string

func (*Soundex) Type

func (s *Soundex) Type() sql.Type

Type implements the Expression interface.

func (*Soundex) WithChildren

func (s *Soundex) WithChildren(children ...sql.Expression) (sql.Expression, error)

WithChildren implements the Expression interface.

type Sqrt

type Sqrt struct {
	expression.UnaryExpression
}

Sqrt is a function that returns the square value of the number provided.

func (*Sqrt) Description added in v0.12.0

func (s *Sqrt) Description() string

Description implements sql.FunctionExpression

func (*Sqrt) Eval

func (s *Sqrt) Eval(ctx *sql.Context, row sql.Row) (interface{}, error)

Eval implements the Expression interface.

func (*Sqrt) FunctionName

func (s *Sqrt) FunctionName() string

FunctionName implements sql.FunctionExpression

func (*Sqrt) IsNullable

func (s *Sqrt) IsNullable() bool

IsNullable implements the Expression interface.

func (*Sqrt) String

func (s *Sqrt) String() string

func (*Sqrt) Type

func (s *Sqrt) Type() sql.Type

Type implements the Expression interface.

func (*Sqrt) WithChildren

func (s *Sqrt) WithChildren(children ...sql.Expression) (sql.Expression, error)

WithChildren implements the Expression interface.

type StrToDate added in v0.14.0

type StrToDate struct {
	Date   sql.Expression
	Format sql.Expression
}

StrToDate defines the built-in function STR_TO_DATE(str, format)

func (StrToDate) Children added in v0.14.0

func (s StrToDate) Children() []sql.Expression

Children returns the children expressions of this expression.

func (StrToDate) Description added in v0.14.0

func (s StrToDate) Description() string

Description implements sql.FunctionExpression

func (StrToDate) Eval added in v0.14.0

func (s StrToDate) Eval(ctx *sql.Context, row sql.Row) (interface{}, error)

Eval evaluates the given row and returns a result.

func (StrToDate) FunctionName added in v0.14.0

func (s StrToDate) FunctionName() string

func (StrToDate) IsNullable added in v0.14.0

func (s StrToDate) IsNullable() bool

IsNullable returns whether the expression can be null.

func (StrToDate) Resolved added in v0.14.0

func (s StrToDate) Resolved() bool

Resolved returns whether the node is resolved.

func (StrToDate) String added in v0.14.0

func (s StrToDate) String() string

func (StrToDate) Type added in v0.14.0

func (s StrToDate) Type() sql.Type

Type returns the expression type.

func (StrToDate) WithChildren added in v0.14.0

func (s StrToDate) WithChildren(children ...sql.Expression) (sql.Expression, error)

type Substring

type Substring struct {
	// contains filtered or unexported fields
}

Substring is a function to return a part of a string. This function behaves as the homonym MySQL function. Since Go strings are UTF8, this function does not return a direct sub string str[start:start+length], instead returns the substring of rune s. That is, "á"[0:1] does not return a partial unicode glyph, but "á" itself.

func (*Substring) Children

func (s *Substring) Children() []sql.Expression

Children implements the Expression interface.

func (*Substring) Description added in v0.12.0

func (s *Substring) Description() string

Description implements sql.FunctionExpression

func (*Substring) Eval

func (s *Substring) Eval(
	ctx *sql.Context,
	row sql.Row,
) (interface{}, error)

Eval implements the Expression interface.

func (*Substring) FunctionName

func (s *Substring) FunctionName() string

FunctionName implements sql.FunctionExpression

func (*Substring) IsNullable

func (s *Substring) IsNullable() bool

IsNullable implements the Expression interface.

func (*Substring) Resolved

func (s *Substring) Resolved() bool

Resolved implements the Expression interface.

func (*Substring) String

func (s *Substring) String() string

func (*Substring) Type

func (s *Substring) Type() sql.Type

Type implements the Expression interface.

func (*Substring) WithChildren

func (*Substring) WithChildren(children ...sql.Expression) (sql.Expression, error)

WithChildren implements the Expression interface.

type SubstringIndex

type SubstringIndex struct {
	// contains filtered or unexported fields
}

SubstringIndex returns the substring from string str before count occurrences of the delimiter delim. If count is positive, everything to the left of the final delimiter (counting from the left) is returned. If count is negative, everything to the right of the final delimiter (counting from the right) is returned. SUBSTRING_INDEX() performs a case-sensitive match when searching for delim.

func (*SubstringIndex) Children

func (s *SubstringIndex) Children() []sql.Expression

Children implements the Expression interface.

func (*SubstringIndex) Description added in v0.12.0

func (s *SubstringIndex) Description() string

Description implements sql.FunctionExpression

func (*SubstringIndex) Eval

func (s *SubstringIndex) Eval(ctx *sql.Context, row sql.Row) (interface{}, error)

Eval implements the Expression interface.

func (*SubstringIndex) FunctionName

func (s *SubstringIndex) FunctionName() string

FunctionName implements sql.FunctionExpression

func (*SubstringIndex) IsNullable

func (s *SubstringIndex) IsNullable() bool

IsNullable implements the Expression interface.

func (*SubstringIndex) Resolved

func (s *SubstringIndex) Resolved() bool

Resolved implements the Expression interface.

func (*SubstringIndex) String

func (s *SubstringIndex) String() string

func (*SubstringIndex) Type

func (*SubstringIndex) Type() sql.Type

Type implements the Expression interface.

func (*SubstringIndex) WithChildren

func (s *SubstringIndex) WithChildren(children ...sql.Expression) (sql.Expression, error)

WithChildren implements the Expression interface.

type SwapXY added in v0.12.0

type SwapXY struct {
	expression.UnaryExpression
}

SwapXY is a function that returns a spatial type with their X and Y values swapped

func (*SwapXY) Description added in v0.12.0

func (s *SwapXY) Description() string

Description implements sql.FunctionExpression

func (*SwapXY) Eval added in v0.12.0

func (s *SwapXY) Eval(ctx *sql.Context, row sql.Row) (interface{}, error)

Eval implements the sql.Expression interface.

func (*SwapXY) FunctionName added in v0.12.0

func (s *SwapXY) FunctionName() string

FunctionName implements sql.FunctionExpression

func (*SwapXY) IsNullable added in v0.12.0

func (s *SwapXY) IsNullable() bool

IsNullable implements the sql.Expression interface.

func (*SwapXY) String added in v0.12.0

func (s *SwapXY) String() string

func (*SwapXY) Type added in v0.12.0

func (s *SwapXY) Type() sql.Type

Type implements the sql.Expression interface.

func (*SwapXY) WithChildren added in v0.12.0

func (s *SwapXY) WithChildren(children ...sql.Expression) (sql.Expression, error)

WithChildren implements the Expression interface.

type Tan

type Tan struct {
	*UnaryFunc
}

func (*Tan) Description added in v0.12.0

func (t *Tan) Description() string

Description implements sql.FunctionExpression

func (*Tan) Eval

func (t *Tan) Eval(ctx *sql.Context, row sql.Row) (interface{}, error)

Eval implements sql.Expression

func (*Tan) WithChildren

func (t *Tan) WithChildren(children ...sql.Expression) (sql.Expression, error)

WithChildren implements sql.Expression

type TimeDiff

type TimeDiff struct {
	expression.BinaryExpression
}

TimeDiff subtracts the second argument from the first expressed as a time value.

func (*TimeDiff) Description added in v0.12.0

func (td *TimeDiff) Description() string

Description implements sql.FunctionExpression

func (*TimeDiff) Eval

func (td *TimeDiff) Eval(ctx *sql.Context, row sql.Row) (interface{}, error)

Eval implements the Expression interface.

func (*TimeDiff) FunctionName

func (td *TimeDiff) FunctionName() string

FunctionName implements sql.FunctionExpression

func (*TimeDiff) IsNullable

func (td *TimeDiff) IsNullable() bool

IsNullable implements the Expression interface.

func (*TimeDiff) String

func (td *TimeDiff) String() string

func (*TimeDiff) Type

func (td *TimeDiff) Type() sql.Type

Type implements the Expression interface.

func (*TimeDiff) WithChildren

func (td *TimeDiff) WithChildren(children ...sql.Expression) (sql.Expression, error)

WithChildren implements the Expression interface.

type TimeFormat added in v0.12.0

type TimeFormat struct {
	expression.BinaryExpression
}

TimeFormat function returns a string representation of the date specified in the format specified

func (*TimeFormat) Description added in v0.12.0

func (f *TimeFormat) Description() string

Description implements sql.FunctionExpression

func (*TimeFormat) Eval added in v0.12.0

func (f *TimeFormat) Eval(ctx *sql.Context, row sql.Row) (interface{}, error)

Eval implements the Expression interface.

func (*TimeFormat) FunctionName added in v0.12.0

func (f *TimeFormat) FunctionName() string

FunctionName implements sql.FunctionExpression

func (*TimeFormat) IsNullable added in v0.12.0

func (f *TimeFormat) IsNullable() bool

IsNullable implements the Expression interface.

func (*TimeFormat) String added in v0.12.0

func (f *TimeFormat) String() string

func (*TimeFormat) Type added in v0.12.0

func (f *TimeFormat) Type() sql.Type

Type implements the Expression interface.

func (*TimeFormat) WithChildren added in v0.12.0

func (f *TimeFormat) WithChildren(children ...sql.Expression) (sql.Expression, error)

WithChildren implements the Expression interface.

type TimeToSec

type TimeToSec struct {
	*UnaryDatetimeFunc
}

TimeToSec implements the time_to_sec function

func (*TimeToSec) Description added in v0.12.0

func (m *TimeToSec) Description() string

Description implements sql.FunctionExpression

func (*TimeToSec) Eval

func (m *TimeToSec) Eval(ctx *sql.Context, row sql.Row) (interface{}, error)

func (*TimeToSec) WithChildren

func (m *TimeToSec) WithChildren(children ...sql.Expression) (sql.Expression, error)

type TimestampConversion

type TimestampConversion struct {
	Date sql.Expression
}

TimestampConversion is a shorthand function for CONVERT(expr, TIMESTAMP)

func (*TimestampConversion) Children

func (t *TimestampConversion) Children() []sql.Expression

func (*TimestampConversion) Description added in v0.12.0

func (t *TimestampConversion) Description() string

Description implements sql.FunctionExpression

func (*TimestampConversion) Eval

func (t *TimestampConversion) Eval(ctx *sql.Context, r sql.Row) (interface{}, error)

func (*TimestampConversion) FunctionName

func (t *TimestampConversion) FunctionName() string

FunctionName implements sql.FunctionExpression

func (*TimestampConversion) IsNullable

func (t *TimestampConversion) IsNullable() bool

func (*TimestampConversion) Resolved

func (t *TimestampConversion) Resolved() bool

func (*TimestampConversion) String

func (t *TimestampConversion) String() string

func (*TimestampConversion) Type

func (t *TimestampConversion) Type() sql.Type

func (*TimestampConversion) WithChildren

func (t *TimestampConversion) WithChildren(children ...sql.Expression) (sql.Expression, error)

type TimestampDiff added in v0.12.0

type TimestampDiff struct {
	// contains filtered or unexported fields
}

TimestampDiff returns expr1 − expr2 expressed as a value in unit specified.

func (*TimestampDiff) Children added in v0.12.0

func (t *TimestampDiff) Children() []sql.Expression

Children implements the sql.Expression interface.

func (*TimestampDiff) Description added in v0.12.0

func (t *TimestampDiff) Description() string

Description implements sql.FunctionExpression

func (*TimestampDiff) Eval added in v0.12.0

func (t *TimestampDiff) Eval(ctx *sql.Context, row sql.Row) (interface{}, error)

Eval implements the sql.Expression interface.

func (*TimestampDiff) FunctionName added in v0.12.0

func (t *TimestampDiff) FunctionName() string

FunctionName implements sql.FunctionExpression

func (*TimestampDiff) IsNullable added in v0.12.0

func (t *TimestampDiff) IsNullable() bool

IsNullable implements the sql.Expression interface.

func (*TimestampDiff) Resolved added in v0.12.0

func (t *TimestampDiff) Resolved() bool

Resolved implements the sql.Expression interface.

func (*TimestampDiff) String added in v0.12.0

func (t *TimestampDiff) String() string

func (*TimestampDiff) Type added in v0.12.0

func (t *TimestampDiff) Type() sql.Type

Type implements the sql.Expression interface.

func (*TimestampDiff) WithChildren added in v0.12.0

func (t *TimestampDiff) WithChildren(children ...sql.Expression) (sql.Expression, error)

WithChildren implements the Expression interface.

type ToBase64

type ToBase64 struct {
	expression.UnaryExpression
}

ToBase64 is a function to encode a string to the Base64 format using the same dialect that MySQL's TO_BASE64 uses

func (*ToBase64) Description added in v0.12.0

func (t *ToBase64) Description() string

Description implements sql.FunctionExpression

func (*ToBase64) Eval

func (t *ToBase64) Eval(ctx *sql.Context, row sql.Row) (interface{}, error)

Eval implements the Expression interface.

func (*ToBase64) FunctionName

func (t *ToBase64) FunctionName() string

FunctionName implements sql.FunctionExpression

func (*ToBase64) IsNullable

func (t *ToBase64) IsNullable() bool

IsNullable implements the Expression interface.

func (*ToBase64) String

func (t *ToBase64) String() string

String implements the fmt.Stringer interface.

func (*ToBase64) Type

func (t *ToBase64) Type() sql.Type

Type implements the Expression interface.

func (*ToBase64) WithChildren

func (t *ToBase64) WithChildren(children ...sql.Expression) (sql.Expression, error)

WithChildren implements the Expression interface.

type Trim

type Trim struct {
	// contains filtered or unexported fields
}

func (*Trim) Children added in v0.12.0

func (t *Trim) Children() []sql.Expression

Children implements the Expression interface.

func (*Trim) Description added in v0.12.0

func (t *Trim) Description() string

Description implements sql.FunctionExpression

func (*Trim) Eval

func (t *Trim) Eval(ctx *sql.Context, row sql.Row) (interface{}, error)

Eval implements the Expression interface.

func (*Trim) FunctionName

func (t *Trim) FunctionName() string

FunctionName implements sql.FunctionExpression

func (Trim) IsNullable

func (t Trim) IsNullable() bool

IsNullable implements the Expression interface.

func (Trim) Resolved added in v0.12.0

func (t Trim) Resolved() bool

func (Trim) String

func (t Trim) String() string

func (Trim) Type

func (t Trim) Type() sql.Type

func (Trim) WithChildren

func (t Trim) WithChildren(children ...sql.Expression) (sql.Expression, error)

type UTCTimestamp

type UTCTimestamp struct {
	// contains filtered or unexported fields
}

UTCTimestamp is a function that returns the current time.

func (*UTCTimestamp) Children

func (ut *UTCTimestamp) Children() []sql.Expression

Children implements the sql.Expression interface.

func (*UTCTimestamp) Description added in v0.12.0

func (ut *UTCTimestamp) Description() string

Description implements sql.FunctionExpression

func (*UTCTimestamp) Eval

func (ut *UTCTimestamp) Eval(ctx *sql.Context, _ sql.Row) (interface{}, error)

Eval implements the sql.Expression interface.

func (*UTCTimestamp) FunctionName

func (ut *UTCTimestamp) FunctionName() string

FunctionName implements sql.FunctionExpression

func (*UTCTimestamp) IsNullable

func (ut *UTCTimestamp) IsNullable() bool

IsNullable implements the sql.Expression interface.

func (*UTCTimestamp) Resolved

func (ut *UTCTimestamp) Resolved() bool

Resolved implements the sql.Expression interface.

func (*UTCTimestamp) String

func (ut *UTCTimestamp) String() string

func (*UTCTimestamp) Type

func (ut *UTCTimestamp) Type() sql.Type

Type implements the sql.Expression interface.

func (*UTCTimestamp) WithChildren

func (ut *UTCTimestamp) WithChildren(children ...sql.Expression) (sql.Expression, error)

WithChildren implements the Expression interface.

type UUIDFunc added in v0.9.0

type UUIDFunc struct{}

func (UUIDFunc) Children added in v0.9.0

func (u UUIDFunc) Children() []sql.Expression

Children returns the children expressions of this expression.

func (UUIDFunc) Description added in v0.12.0

func (u UUIDFunc) Description() string

Description implements sql.FunctionExpression

func (UUIDFunc) Eval added in v0.9.0

func (u UUIDFunc) Eval(ctx *sql.Context, row sql.Row) (interface{}, error)

func (UUIDFunc) FunctionName added in v0.9.0

func (u UUIDFunc) FunctionName() string

func (UUIDFunc) IsNonDeterministic added in v0.12.0

func (u UUIDFunc) IsNonDeterministic() bool

func (UUIDFunc) IsNullable added in v0.9.0

func (u UUIDFunc) IsNullable() bool

IsNullable returns whether the expression can be null.

func (UUIDFunc) Resolved added in v0.9.0

func (u UUIDFunc) Resolved() bool

func (UUIDFunc) String added in v0.9.0

func (u UUIDFunc) String() string

func (UUIDFunc) Type added in v0.9.0

func (u UUIDFunc) Type() sql.Type

func (UUIDFunc) WithChildren added in v0.9.0

func (u UUIDFunc) WithChildren(children ...sql.Expression) (sql.Expression, error)

type UUIDToBin added in v0.9.0

type UUIDToBin struct {
	// contains filtered or unexported fields
}

func (UUIDToBin) Children added in v0.9.0

func (ub UUIDToBin) Children() []sql.Expression

Children returns the children expressions of this expression.

func (UUIDToBin) Description added in v0.12.0

func (ub UUIDToBin) Description() string

Description implements sql.FunctionExpression

func (UUIDToBin) Eval added in v0.9.0

func (ub UUIDToBin) Eval(ctx *sql.Context, row sql.Row) (interface{}, error)

func (UUIDToBin) FunctionName added in v0.9.0

func (ub UUIDToBin) FunctionName() string

func (UUIDToBin) IsNullable added in v0.9.0

func (ub UUIDToBin) IsNullable() bool

IsNullable returns whether the expression can be null.

func (UUIDToBin) Resolved added in v0.9.0

func (ub UUIDToBin) Resolved() bool

func (UUIDToBin) String added in v0.9.0

func (ub UUIDToBin) String() string

func (UUIDToBin) Type added in v0.9.0

func (ub UUIDToBin) Type() sql.Type

func (UUIDToBin) WithChildren added in v0.9.0

func (ub UUIDToBin) WithChildren(children ...sql.Expression) (sql.Expression, error)

type UnaryDatetimeFunc

type UnaryDatetimeFunc struct {
	expression.UnaryExpression
	// Name is the name of the function
	Name string
	// SQLType is the return type of the function
	SQLType sql.Type
}

UnaryDatetimeFunc is a sql.Function which takes a single datetime argument

func NewUnaryDatetimeFunc

func NewUnaryDatetimeFunc(arg sql.Expression, name string, sqlType sql.Type) *UnaryDatetimeFunc

func (*UnaryDatetimeFunc) EvalChild

func (dtf *UnaryDatetimeFunc) EvalChild(ctx *sql.Context, row sql.Row) (interface{}, error)

func (*UnaryDatetimeFunc) FunctionName

func (dtf *UnaryDatetimeFunc) FunctionName() string

FunctionName implements sql.FunctionExpression

func (*UnaryDatetimeFunc) String

func (dtf *UnaryDatetimeFunc) String() string

String implements the fmt.Stringer interface.

func (*UnaryDatetimeFunc) Type

func (dtf *UnaryDatetimeFunc) Type() sql.Type

Type implements the Expression interface.

type UnaryFunc

type UnaryFunc struct {
	expression.UnaryExpression
	// Name is the name of the function
	Name string
	// The type returned by the function
	RetType sql.Type
}

func NewUnaryFunc

func NewUnaryFunc(arg sql.Expression, name string, returnType sql.Type) *UnaryFunc

func (*UnaryFunc) EvalChild

func (uf *UnaryFunc) EvalChild(ctx *sql.Context, row sql.Row) (interface{}, error)

EvalChild is a convenience function for safely evaluating a child expression

func (*UnaryFunc) FunctionName

func (uf *UnaryFunc) FunctionName() string

FunctionName implements sql.FunctionExpression

func (*UnaryFunc) String

func (uf *UnaryFunc) String() string

String implements the fmt.Stringer interface.

func (*UnaryFunc) Type

func (uf *UnaryFunc) Type() sql.Type

Type implements the Expression interface.

type Unhex

type Unhex struct {
	*UnaryFunc
}

Unhex implements the sql function "unhex" which returns the integer representation of a hexadecimal string

func (*Unhex) Description added in v0.12.0

func (h *Unhex) Description() string

Description implements sql.FunctionExpression

func (*Unhex) Eval

func (h *Unhex) Eval(ctx *sql.Context, row sql.Row) (interface{}, error)

Eval implements the sql.Expression interface

func (*Unhex) WithChildren

func (h *Unhex) WithChildren(children ...sql.Expression) (sql.Expression, error)

WithChildren implements the sql.Expression interface

type UnixTimestamp

type UnixTimestamp struct {
	Date sql.Expression
}

UnixTimestamp converts the argument to the number of seconds since 1970-01-01 00:00:00 UTC. With no argument, returns number of seconds since unix epoch for the current time.

func (*UnixTimestamp) Children

func (ut *UnixTimestamp) Children() []sql.Expression

func (*UnixTimestamp) Description added in v0.12.0

func (ut *UnixTimestamp) Description() string

Description implements sql.FunctionExpression

func (*UnixTimestamp) Eval

func (ut *UnixTimestamp) Eval(ctx *sql.Context, row sql.Row) (interface{}, error)

func (*UnixTimestamp) FunctionName

func (ut *UnixTimestamp) FunctionName() string

FunctionName implements sql.FunctionExpression

func (*UnixTimestamp) IsNullable

func (ut *UnixTimestamp) IsNullable() bool

func (*UnixTimestamp) Resolved

func (ut *UnixTimestamp) Resolved() bool

func (*UnixTimestamp) String

func (ut *UnixTimestamp) String() string

func (*UnixTimestamp) Type

func (ut *UnixTimestamp) Type() sql.Type

func (*UnixTimestamp) WithChildren

func (ut *UnixTimestamp) WithChildren(children ...sql.Expression) (sql.Expression, error)

type Upper

type Upper struct {
	expression.UnaryExpression
}

Upper is a function that returns the UPPERCASE of the text provided.

func (*Upper) Description added in v0.12.0

func (u *Upper) Description() string

Description implements sql.FunctionExpression

func (*Upper) Eval

func (u *Upper) Eval(
	ctx *sql.Context,
	row sql.Row,
) (interface{}, error)

Eval implements the Expression interface.

func (*Upper) FunctionName

func (u *Upper) FunctionName() string

FunctionName implements sql.FunctionExpression

func (*Upper) String

func (u *Upper) String() string

func (*Upper) Type

func (u *Upper) Type() sql.Type

Type implements the Expression interface.

func (*Upper) WithChildren

func (u *Upper) WithChildren(children ...sql.Expression) (sql.Expression, error)

WithChildren implements the Expression interface.

type User

type User struct {
	NoArgFunc
}

func (User) Description added in v0.12.0

func (c User) Description() string

Description implements sql.FunctionExpression

func (User) Eval

func (c User) Eval(ctx *sql.Context, row sql.Row) (interface{}, error)

Eval implements sql.Expression

func (User) IsNonDeterministic added in v0.12.0

func (c User) IsNonDeterministic() bool

func (User) WithChildren

func (c User) WithChildren(children ...sql.Expression) (sql.Expression, error)

WithChildren implements sql.Expression

type Values

type Values struct {
	expression.UnaryExpression
	Value interface{}
}

Values is used in an ON DUPLICATE KEY UPDATE statement to return the value stated in the to-be-inserted column. For example, given the following statement: INSERT INTO table (pk, v1, v2) VALUES (1, 3, 5), (2, 4, 6) ON DUPLICATE KEY UPDATE v2 = values(v1) * 10; the values inserted into v2 would be 30 and 40.

func (*Values) Description added in v0.12.0

func (v *Values) Description() string

Description implements sql.FunctionExpression.

func (*Values) Eval

func (v *Values) Eval(ctx *sql.Context, row sql.Row) (interface{}, error)

Eval implements sql.FunctionExpression.

func (*Values) FunctionName

func (v *Values) FunctionName() string

FunctionName implements sql.FunctionExpression.

func (*Values) String

func (v *Values) String() string

String implements sql.FunctionExpression.

func (*Values) Type

func (v *Values) Type() sql.Type

Type implements sql.FunctionExpression.

func (*Values) WithChildren

func (v *Values) WithChildren(children ...sql.Expression) (sql.Expression, error)

WithChildren implements sql.FunctionExpression.

type Version

type Version string

Version is a function that returns server version.

func (Version) Children

func (f Version) Children() []sql.Expression

Children implements the Expression interface.

func (Version) Description added in v0.12.0

func (f Version) Description() string

Description implements sql.FunctionExpression

func (Version) Eval

func (f Version) Eval(ctx *sql.Context, row sql.Row) (interface{}, error)

Eval implements the Expression interface.

func (Version) FunctionName

func (f Version) FunctionName() string

FunctionName implements sql.FunctionExpression

func (Version) IsNonDeterministic added in v0.12.0

func (f Version) IsNonDeterministic() bool

func (Version) IsNullable

func (f Version) IsNullable() bool

IsNullable implements the Expression interface.

func (Version) Resolved

func (f Version) Resolved() bool

Resolved implements the Expression interface.

func (Version) String

func (f Version) String() string

func (Version) Type

func (f Version) Type() sql.Type

Type implements the Expression interface.

func (Version) WithChildren

func (f Version) WithChildren(children ...sql.Expression) (sql.Expression, error)

WithChildren implements the Expression interface.

type Week

type Week struct {
	// contains filtered or unexported fields
}

Week is a function that returns year and week for a date. The year in the result may be different from the year in the date argument for the first and the last week of the year. Details: https://dev.mysql.com/doc/refman/5.5/en/date-and-time-functions.html#function_yearweek

func (*Week) Children

func (d *Week) Children() []sql.Expression

Children implements the Expression interface.

func (*Week) Description added in v0.12.0

func (d *Week) Description() string

Description implements sql.FunctionExpression

func (*Week) Eval

func (d *Week) Eval(ctx *sql.Context, row sql.Row) (interface{}, error)

Eval implements the Expression interface.

func (*Week) FunctionName

func (d *Week) FunctionName() string

FunctionName implements sql.FunctionExpression

func (*Week) IsNullable

func (d *Week) IsNullable() bool

IsNullable implements the Expression interface.

func (*Week) Resolved

func (d *Week) Resolved() bool

Resolved implements the Expression interface.

func (*Week) String

func (d *Week) String() string

func (*Week) Type

func (d *Week) Type() sql.Type

Type implements the Expression interface.

func (*Week) WithChildren

func (*Week) WithChildren(children ...sql.Expression) (sql.Expression, error)

WithChildren implements the Expression interface.

type WeekOfYear

type WeekOfYear struct {
	*UnaryDatetimeFunc
}

WeekOfYear implements the weekofyear function

func (*WeekOfYear) Description added in v0.12.0

func (m *WeekOfYear) Description() string

Description implements sql.FunctionExpression

func (*WeekOfYear) Eval

func (m *WeekOfYear) Eval(ctx *sql.Context, row sql.Row) (interface{}, error)

func (*WeekOfYear) WithChildren

func (m *WeekOfYear) WithChildren(children ...sql.Expression) (sql.Expression, error)

type Weekday

type Weekday struct {
	expression.UnaryExpression
}

Weekday is a function that returns the weekday of a date where 0 = Monday, ..., 6 = Sunday.

func (*Weekday) Description added in v0.12.0

func (d *Weekday) Description() string

Description implements sql.FunctionExpression

func (*Weekday) Eval

func (d *Weekday) Eval(ctx *sql.Context, row sql.Row) (interface{}, error)

Eval implements the Expression interface.

func (*Weekday) FunctionName

func (d *Weekday) FunctionName() string

FunctionName implements sql.FunctionExpression

func (*Weekday) String

func (d *Weekday) String() string

func (*Weekday) Type

func (d *Weekday) Type() sql.Type

Type implements the Expression interface.

func (*Weekday) WithChildren

func (d *Weekday) WithChildren(children ...sql.Expression) (sql.Expression, error)

WithChildren implements the Expression interface.

type Year

type Year struct {
	expression.UnaryExpression
}

Year is a function that returns the year of a date.

func (*Year) Description added in v0.12.0

func (y *Year) Description() string

Description implements sql.FunctionExpression

func (*Year) Eval

func (y *Year) Eval(ctx *sql.Context, row sql.Row) (interface{}, error)

Eval implements the Expression interface.

func (*Year) FunctionName

func (y *Year) FunctionName() string

FunctionName implements sql.FunctionExpression

func (*Year) String

func (y *Year) String() string

func (*Year) Type

func (y *Year) Type() sql.Type

Type implements the Expression interface.

func (*Year) WithChildren

func (y *Year) WithChildren(children ...sql.Expression) (sql.Expression, error)

WithChildren implements the Expression interface.

type YearWeek

type YearWeek struct {
	// contains filtered or unexported fields
}

YearWeek is a function that returns year and week for a date. The year in the result may be different from the year in the date argument for the first and the last week of the year. Details: https://dev.mysql.com/doc/refman/5.5/en/date-and-time-functions.html#function_yearweek

func (*YearWeek) Children

func (d *YearWeek) Children() []sql.Expression

Children implements the Expression interface.

func (*YearWeek) Description added in v0.12.0

func (d *YearWeek) Description() string

Description implements sql.FunctionExpression

func (*YearWeek) Eval

func (d *YearWeek) Eval(ctx *sql.Context, row sql.Row) (interface{}, error)

Eval implements the Expression interface.

func (*YearWeek) FunctionName

func (d *YearWeek) FunctionName() string

FunctionName implements sql.FunctionExpression

func (*YearWeek) IsNullable

func (d *YearWeek) IsNullable() bool

IsNullable implements the Expression interface.

func (*YearWeek) Resolved

func (d *YearWeek) Resolved() bool

Resolved implements the Expression interface.

func (*YearWeek) String

func (d *YearWeek) String() string

func (*YearWeek) Type

func (d *YearWeek) Type() sql.Type

Type implements the Expression interface.

func (*YearWeek) WithChildren

func (*YearWeek) WithChildren(children ...sql.Expression) (sql.Expression, error)

WithChildren implements the Expression interface.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL