Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/blastrain/vitess-sqlparser
/ functions
Functions
1,509 in github.com/blastrain/vitess-sqlparser
⨍
Functions
1,509
◇
Types & classes
344
↓ 2 callers
Method
CompareDatum
CompareDatum compares datum to another datum. TODO: return error properly.
tidbparser/dependency/types/datum.go:408
↓ 2 callers
Method
Convert
Convert converts t with type tp.
tidbparser/dependency/types/time.go:267
↓ 2 callers
Function
ConvertJSONToInt
ConvertJSONToInt casts JSON into int64.
tidbparser/dependency/types/convert.go:325
↓ 2 callers
Method
ConvertToTime
ConvertToTime converts duration to Time. Tp is TypeDatetime, TypeTimestamp and TypeDate.
tidbparser/dependency/types/time.go:841
↓ 2 callers
Function
ConvertUintToUint
ConvertUintToUint converts an uint value to another uint value of different precision.
tidbparser/dependency/types/convert.go:118
↓ 2 callers
Function
DecodeBytes
DecodeBytes decodes bytes which is encoded by EncodeBytes before, returns the leftover bytes and decoded value if no error.
tidbparser/dependency/util/codec/bytes.go:119
↓ 2 callers
Function
DecodeCmpUintToInt
DecodeCmpUintToInt decodes the u that encoded by EncodeIntToCmpUint
tidbparser/dependency/util/codec/number.go:31
↓ 2 callers
Function
DecodeCompactBytes
DecodeCompactBytes decodes bytes which is encoded by EncodeCompactBytes before.
tidbparser/dependency/util/codec/bytes.go:148
↓ 2 callers
Function
DecodeDecimal
DecodeDecimal decodes bytes to decimal.
tidbparser/dependency/util/codec/decimal.go:38
↓ 2 callers
Function
DecodeFloat
DecodeFloat decodes a float from a byte slice generated with EncodeFloat before.
tidbparser/dependency/util/codec/float.go:49
↓ 2 callers
Function
DecodeUvarint
DecodeUvarint decodes value encoded by EncodeUvarint before. It returns the leftover un-decoded slice, decoded value if no error.
tidbparser/dependency/util/codec/number.go:151
↓ 2 callers
Function
DefaultTypeForValue
DefaultTypeForValue returns the default FieldType for the value.
tidbparser/dependency/types/field_type.go:339
↓ 2 callers
Function
EncodeBytes
EncodeBytes guarantees the encoded value is in ascending order for comparison, encoding with the following rule: [group1][marker1]...[groupN][markerN]
tidbparser/dependency/util/codec/bytes.go:46
↓ 2 callers
Function
EncodeDecimal
EncodeDecimal encodes a decimal into a byte slice which can be sorted lexicographically later.
tidbparser/dependency/util/codec/decimal.go:24
↓ 2 callers
Function
EncodeIntToCmpUint
EncodeIntToCmpUint make int v to comparable uint type
tidbparser/dependency/util/codec/number.go:26
↓ 2 callers
Function
EncodeVarint
EncodeVarint appends the encoded value to slice b and returns the appended slice. Note that the encoded result is not memcomparable.
tidbparser/dependency/util/codec/number.go:122
↓ 2 callers
Method
Equal
Equal checks if err is equal to e.
tidbparser/dependency/terror/terror.go:246
↓ 2 callers
Function
ErrorEqual
ErrorEqual returns a boolean indicating whether err1 is equal to err2.
tidbparser/dependency/terror/terror.go:297
↓ 2 callers
Method
Errors
()
tidbparser/parser/parser.go:5828
↓ 2 callers
Method
FormatAsCastType
FormatAsCastType is used for write AST back to string.
tidbparser/dependency/types/field_type.go:279
↓ 2 callers
Method
GetBytes
GetBytes returns the bytes value with the colIdx.
tidbparser/dependency/util/chunk/chunk.go:503
↓ 2 callers
Method
GetEnum
GetEnum returns the Enum value with the colIdx.
tidbparser/dependency/types/row.go:48
↓ 2 callers
Method
GetProjectionOffset
GetProjectionOffset returns ValueExpr.projectionOffset.
tidbparser/ast/expressions.go:118
↓ 2 callers
Method
GetSet
GetSet returns the Set value with the colIdx.
tidbparser/dependency/types/row.go:51
↓ 2 callers
Method
GetString
GetString gets the string value.
tidbparser/dependency/types/json/binary.go:164
↓ 2 callers
Method
GetUint64
GetUint64 gets the uint64 value.
tidbparser/dependency/types/json/binary.go:154
↓ 2 callers
Method
HandleOverflow
HandleOverflow treats ErrOverflow as warnings or returns the error based on the StmtCtx.OverflowAsWarning state.
tidbparser/dependency/sessionctx/stmtctx/stmtctx.go:158
↓ 2 callers
Function
HasBinaryFlag
HasBinaryFlag checks if BinaryFlag is set.
tidbparser/dependency/mysql/type.go:112
↓ 2 callers
Function
HasPriKeyFlag
HasPriKeyFlag checks if PriKeyFlag is set.
tidbparser/dependency/mysql/type.go:117
↓ 2 callers
Function
IsFloat
IsFloat returns true is querypb.Type is a floating point.
sqltypes/type.go:64
↓ 2 callers
Function
IsQuoted
IsQuoted returns true if querypb.Type is a quoted text or binary.
sqltypes/type.go:69
↓ 2 callers
Function
IsTypeUnspecified
IsTypeUnspecified returns a boolean indicating whether the tp is the Unspecified type.
tidbparser/dependency/types/etc.go:54
↓ 2 callers
Method
Len
Len implements the Iterator interface
tidbparser/dependency/util/chunk/iterator.go:151
↓ 2 callers
Method
Lex
(lval *yySymType)
sqlparser/sql.go:1189
↓ 2 callers
Function
MaxMySQLTime
MaxMySQLTime returns Time with maximum mysql time type.
tidbparser/dependency/types/time.go:176
↓ 2 callers
Function
NewBinaryLiteralFromUint
NewBinaryLiteralFromUint creates a new BinaryLiteral instance by the given uint value in BitEndian. byteSize will be used as the length of the new Bin
tidbparser/dependency/types/binary_literal.go:56
↓ 2 callers
Function
NewScanner
NewScanner returns a new scanner object.
tidbparser/parser/lexer.go:193
↓ 2 callers
Function
NewStringTokenizer
NewStringTokenizer creates a new Tokenizer for the sql string.
sqlparser/token.go:47
↓ 2 callers
Function
NewValArg
NewValArg builds a new ValArg.
sqlparser/ast.go:1680
↓ 2 callers
Function
ParseDateFormat
ParseDateFormat parses a formatted date string and returns separated components.
tidbparser/dependency/types/time.go:531
↓ 2 callers
Function
ParseFrac
ParseFrac parses the input string according to fsp, returns the microsecond, and also a bool value to indice overflow. eg: "999" fsp=2 will overflow.
tidbparser/dependency/types/fsp.go:50
↓ 2 callers
Method
ParsedQuery
ParsedQuery returns a ParsedQuery that contains bind locations for easy substitution.
sqlparser/tracked_buffer.go:122
↓ 2 callers
Method
SecurityString
SecurityString formats the UserSpec without password information.
tidbparser/ast/misc.go:446
↓ 2 callers
Function
SetFlag
SetFlag sets flag for expression.
tidbparser/ast/flag.go:22
↓ 2 callers
Method
SetMysqlEnum
SetMysqlEnum sets Enum value
tidbparser/dependency/types/datum.go:270
↓ 2 callers
Method
SetMysqlSet
SetMysqlSet sets Set value
tidbparser/dependency/types/datum.go:283
↓ 2 callers
Method
SetProjectionOffset
SetProjectionOffset sets ValueExpr.projectionOffset for logical plan builder.
tidbparser/ast/expressions.go:113
↓ 2 callers
Method
String
String implements Stringer interface.
tidbparser/parser/opcode/opcode.go:93
↓ 2 callers
Method
String
String implements Stringer interface.
tidbparser/ast/expressions.go:421
↓ 2 callers
Method
String
String implements fmt.Stringer interface.
tidbparser/dependency/types/json/binary.go:109
↓ 2 callers
Method
ToNative
ToNative converts Value to a native go type. This does not work for sqltypes.Tuple. The function panics if there are inconsistencies.
sqltypes/value.go:105
↓ 2 callers
Method
ToPackedUint
ToPackedUint encodes Time to a packed uint64 value. 1 bit 0 17 bits year*13+month (year 0-9999, month 0-12) 5 bits day (0-31) 5 bits h
tidbparser/dependency/types/time.go:405
↓ 2 callers
Method
Type
Type returns type of BinaryJSON as string.
tidbparser/dependency/types/json/binary_functions.go:30
↓ 2 callers
Function
appendBinaryValElem
(buf []byte, docOff, valEntryOff int, val interface{})
tidbparser/dependency/types/json/binary.go:558
↓ 2 callers
Function
appendIntToChunk
(val int64, chk *chunk.Chunk, colIdx int, ft *types.FieldType)
tidbparser/dependency/util/codec/codec.go:575
↓ 2 callers
Method
appendNameValue
(name string, val uint64)
tidbparser/dependency/util/chunk/chunk.go:441
↓ 2 callers
Function
appendUint32
(buf []byte, v uint32)
tidbparser/dependency/types/json/binary.go:485
↓ 2 callers
Function
appendUintToChunk
(val uint64, chk *chunk.Chunk, colIdx int, ft *types.FieldType, loc *time.Location)
tidbparser/dependency/util/codec/codec.go:585
↓ 2 callers
Function
buildBinaryElements
(buf []byte, entryStart int, elems []BinaryJSON)
tidbparser/dependency/types/json/binary_functions.go:240
↓ 2 callers
Method
bytesToString
(numBytes int64)
tidbparser/dependency/util/memory/tracker.go:153
↓ 2 callers
Function
calcTimeFromSec
(to *MysqlTime, seconds, microseconds int)
tidbparser/dependency/types/mytime.go:125
↓ 2 callers
Function
calcWeek
calcWeek calculates week and year for the time.
tidbparser/dependency/types/mytime.go:244
↓ 2 callers
Function
checkDateType
(t MysqlTime, allowZeroInDate bool)
tidbparser/dependency/types/time.go:1295
↓ 2 callers
Method
compareString
(sc *stmtctx.StatementContext, s string)
tidbparser/dependency/types/datum.go:531
↓ 2 callers
Function
compliantName
(in string)
sqlparser/ast.go:2635
↓ 2 callers
Method
containsAnyAsterisk
containsAnyAsterisk returns true if pef contains any asterisk.
tidbparser/dependency/types/json/path_expr.go:83
↓ 2 callers
Method
convergeType
(hasUint, hasDecimal, hasFloat *bool)
tidbparser/dependency/types/datum.go:1537
↓ 2 callers
Method
convertToInt
(sc *stmtctx.StatementContext, target *FieldType)
tidbparser/dependency/types/datum.go:833
↓ 2 callers
Function
datetimeToUint64
datetimeToUint64 converts time value to integer in YYYYMMDDHHMMSS format.
tidbparser/dependency/types/mytime.go:161
↓ 2 callers
Function
decimalBinSize
decimalBinSize returns the size of array to hold a binary representation of a decimal.
tidbparser/dependency/types/mydecimal.go:1314
↓ 2 callers
Function
decodeBytes
(b []byte, reverse bool)
tidbparser/dependency/util/codec/bytes.go:71
↓ 2 callers
Function
decodeCmpUintToFloat
(u uint64)
tidbparser/dependency/util/codec/float.go:32
↓ 2 callers
Function
doAdd
(from1, from2, to *MyDecimal)
tidbparser/dependency/types/mydecimal.go:1560
↓ 2 callers
Function
doDivMod
(from1, from2, to, mod *MyDecimal, fracIncr int)
tidbparser/dependency/types/mydecimal.go:1876
↓ 2 callers
Method
doInsert
doInsert inserts the newBj to its parent, and builds the new parent.
tidbparser/dependency/types/json/binary_functions.go:360
↓ 2 callers
Function
encodeBytes
(b []byte, v []byte, comparable bool)
tidbparser/dependency/util/codec/codec.go:130
↓ 2 callers
Function
encodeFloatToCmpUint64
(f float64)
tidbparser/dependency/util/codec/float.go:22
↓ 2 callers
Function
extractHourMicrosecond
extractHourMicrosecond extracts hour and microsecond from a string and its format is `HH:MM:SS.FFFFFF`.
tidbparser/dependency/types/time.go:1550
↓ 2 callers
Function
extractHourMinute
extractHourMinute extracts hour and minute from a string and its format is `HH:MM`.
tidbparser/dependency/types/time.go:1600
↓ 2 callers
Function
extractHourSecond
extractHourSecond extracts hour and second from a string and its format is `HH:MM:SS`.
tidbparser/dependency/types/time.go:1575
↓ 2 callers
Method
format
(flat bool, format string, args ...interface{})
tidbparser/dependency/util/format/format.go:77
↓ 2 callers
Method
formatFrac
(frac int)
tidbparser/dependency/types/time.go:807
↓ 2 callers
Function
formatID
(buf *TrackedBuffer, original, lowered string)
sqlparser/ast.go:2610
↓ 2 callers
Function
getFieldTypeIndex
(tp byte)
tidbparser/dependency/types/field_type.go:475
↓ 2 callers
Function
getValidFloatPrefix
getValidFloatPrefix gets prefix of string which can be successfully parsed as float.
tidbparser/dependency/types/convert.go:380
↓ 2 callers
Function
getValidIntPrefix
getValidIntPrefix gets prefix of the string which can be successfully parsed as int.
tidbparser/dependency/types/convert.go:234
↓ 2 callers
Function
i64AsFloat64
(i64 int64, typeCode TypeCode)
tidbparser/dependency/types/json/binary_functions.go:575
↓ 2 callers
Function
isBlank
(c rune)
tidbparser/dependency/types/json/path_expr.go:204
↓ 2 callers
Function
isDigit
(ch rune)
tidbparser/parser/misc.go:27
↓ 2 callers
Function
isDigit
(c byte)
tidbparser/dependency/types/helper.go:99
↓ 2 callers
Function
isIdentChar
(ch rune)
tidbparser/parser/misc.go:31
↓ 2 callers
Function
isIdentExtend
(ch rune)
tidbparser/parser/misc.go:35
↓ 2 callers
Function
isLetter
(ch rune)
tidbparser/parser/misc.go:23
↓ 2 callers
Function
marshalLiteralTo
(b []byte, litType byte)
tidbparser/dependency/types/json/binary.go:366
↓ 2 callers
Function
marshalStringTo
(buf, s []byte)
tidbparser/dependency/types/json/binary.go:277
↓ 2 callers
Function
myMinInt8
(a, b int8)
tidbparser/dependency/types/helper.go:124
↓ 2 callers
Function
parseDateTimeFromNum
parseDateTimeFromNum parses date time from num. See number_to_datetime function. https://github.com/mysql/mysql-server/blob/5.7/sql-common/my_time.c
tidbparser/dependency/types/time.go:1108
↓ 2 callers
Function
parseTime
(sc *stmtctx.StatementContext, str string, tp byte, fsp int, isFloat bool)
tidbparser/dependency/types/time.go:1206
↓ 2 callers
Function
peek
peek peeks the first encoded value from b and returns its length.
tidbparser/dependency/util/codec/codec.go:394
↓ 2 callers
Method
popOneLastLeg
popOneLastLeg returns the a parent PathExpression and the last pathLeg
tidbparser/dependency/types/json/path_expr.go:113
← previous
next →
301–400 of 1,509, ranked by callers