mysql

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Dec 8, 2024 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

View Source
const ACTION = 57570
View Source
const ACTIVE = 57817
View Source
const ADD = 57550
View Source
const ADMIN = 57818
View Source
const AFTER = 57619
View Source
const AGAINST = 57783
View Source
const ALGORITHM = 57423
View Source
const ALL = 57365
View Source
const ALTER = 57546
View Source
const ALWAYS = 57383
View Source
const ANALYZE = 57549
View Source
const AND = 57477
View Source
const APPROXNUM = 57684
View Source
const ARRAY = 57792
View Source
const AS = 57367
View Source
const ASC = 57369
View Source
const ASCII = 57680
View Source
const AT_AT_ID = 57430
View Source
const AT_ID = 57429
View Source
const AUTOEXTEND_SIZE = 57819
View Source
const AUTO_INCREMENT = 57683
View Source
const AVG_ROW_LENGTH = 57896
View Source
const BEGIN = 57629
View Source
const BETWEEN = 57479
View Source
const BIGINT = 57643
View Source
const BINARY = 57499
View Source
const BIT = 57637
View Source
const BIT_LITERAL = 57442
View Source
const BLOB = 57664
View Source
const BOOL = 57656
View Source
const BOOLEAN = 57784
View Source
const BOTH = 57466
View Source
const BUCKETS = 57820
View Source
const BY = 57361
View Source
const BYTE = 57793
View Source
const CALL = 57379
View Source
const CANCEL = 57621
View Source
const CASCADE = 57571
View Source
const CASCADED = 57607
View Source
const CASE = 57480
View Source
const CAST = 57754
View Source
const CHANGE = 57552
View Source
const CHANNEL = 57893
View Source
const CHAR = 57654
View Source
const CHARACTER = 57657
View Source
const CHARSET = 57471
View Source
const CHECK = 57568
View Source
const CHECKSUM = 57898
View Source
const CLEANUP = 57624
View Source
const CLONE = 57821
View Source
const COALESCE = 57585
View Source
const CODE = 57688
View Source
const COLLATE = 57498
View Source
const COLLATION = 57689
View Source
const COLUMN = 57564
View Source
const COLUMNS = 57690
View Source
const COLUMN_FORMAT = 57822
View Source
const COMMENT = 57440
View Source
const COMMENT_KEYWORD = 57441
View Source
const COMMIT = 57632
View Source
const COMMITTED = 57719
View Source
const COMPACT = 57911
View Source
const COMPLETE = 57623
View Source
const COMPONENT = 57823
View Source
const COMPRESSED = 57909
View Source
const COMPRESSION = 57443
View Source
const CONNECTION = 57897
View Source
const CONSTRAINT = 57572
View Source
const CONVERT = 57753
View Source
const COPY = 57421
View Source
const CREATE = 57545
View Source
const CROSS = 57414
View Source
const CSV = 57393
View Source
const CUME_DIST = 57794
View Source
const CURRENT_DATE = 57724
View Source
const CURRENT_TIME = 57726
View Source
const CURRENT_TIMESTAMP = 57722
View Source
const CURRENT_USER = 57729
View Source
const DATA = 57386
View Source
const DATABASE = 57723
View Source
const DATABASES = 57691
View Source
const DATE = 57580
View Source
const DATETIME = 57652
View Source
const DAY = 57733
View Source
const DAY_HOUR = 57734
View Source
const DAY_MICROSECOND = 57735
View Source
const DAY_MINUTE = 57736
View Source
const DAY_SECOND = 57737
View Source
const DEALLOCATE = 57554
View Source
const DECIMAL = 57436
View Source
const DECIMAL_TYPE = 57648
View Source
const DEFAULT = 57373
View Source
const DEFINER = 57608
View Source
const DEFINITION = 57824
View Source
const DELAY_KEY_WRITE = 57899
View Source
const DELETE = 57355
View Source
const DENSE_RANK = 57796
View Source
const DESC = 57370
View Source
const DESCRIBE = 57578
View Source
const DESCRIPTION = 57795
View Source
const DIRECTORY = 57601
View Source
const DISABLE = 57462
View Source
const DISCARD = 57459
View Source
const DISK = 57918
View Source
const DISTINCT = 57366
View Source
const DISTINCTROW = 57380
View Source
const DIV = 57495
View Source
const DO = 57378
View Source
const DOUBLE = 57646
View Source
const DROP = 57547
View Source
const DUMPFILE = 57392
View Source
const DUPLICATE = 57372
View Source
const DYNAMIC = 57908
View Source
const ELSE = 57483
View Source
const EMPTY = 57797
View Source
const EMPTY_FROM_CLAUSE = 57469
View Source
const ENABLE = 57461
View Source
const ENCLOSED = 57391
View Source
const ENCRYPTION = 57900
View Source
const END = 57484
View Source
const ENFORCED = 57825
View Source
const ENGINE = 57901
View Source
const ENGINES = 57692
View Source
const ENGINE_ATTRIBUTE = 57826
View Source
const ENUM = 57671
View Source
const ERROR = 57887
View Source
const ESCAPE = 57581
View Source
const ESCAPED = 57390
View Source
const EVENT = 57693
View Source
const EXCEPT = 57798
View Source
const EXCHANGE = 57586
View Source
const EXCLUDE = 57827
View Source
const EXCLUSIVE = 57426
View Source
const EXECUTE = 57591
View Source
const EXISTS = 57368
View Source
const EXPANSION = 57788
View Source
const EXPIRE = 57627
View Source
const EXPLAIN = 57579
View Source
const EXPORT = 57895
View Source
const EXPRESSION_PREC_SETTER = 57474
View Source
const EXTENDED = 57694
View Source
const EXTRACT = 57454
View Source
const FALSE = 57457
View Source
const FIELDS = 57695
View Source
const FIRST = 57618
View Source
const FIRST_VALUE = 57799
View Source
const FIXED = 57907
View Source
const FLOAT = 57435
View Source
const FLOAT_TYPE = 57647
View Source
const FLUSH = 57551
View Source
const FOLLOWING = 57828
View Source
const FOR = 57364
View Source
const FORCE = 57417
View Source
const FOREIGN = 57573
View Source
const FORMAT = 57880
View Source
const FROM = 57356
View Source
const FULL = 57696
View Source
const FULLTEXT = 57566
View Source
const FUNCTION = 57697
View Source
const FUNCTION_CALL_NON_KEYWORD = 57347
View Source
const GE = 57486
View Source
const GENERAL = 57888
View Source
const GENERATED = 57382
View Source
const GEOMCOLLECTION = 57829
View Source
const GEOMETRY = 57672
View Source
const GEOMETRYCOLLECTION = 57676
View Source
const GET_MASTER_PUBLIC_KEY = 57830
View Source
const GLOBAL = 57711
View Source
const GROUP = 57358
View Source
const GROUPING = 57800
View Source
const GROUPS = 57801
View Source
const GROUP_CONCAT = 57757
View Source
const GTID_EXECUTED = 57698
View Source
const HASH = 57925
View Source
const HAVING = 57359
View Source
const HEADER = 57394
View Source
const HEX = 57431
View Source
const HEXNUM = 57437
View Source
const HISTOGRAM = 57831
View Source
const HISTORY = 57832
View Source
const HOSTS = 57889
View Source
const HOUR = 57738
View Source
const HOUR_MICROSECOND = 57739
View Source
const HOUR_MINUTE = 57740
View Source
const HOUR_SECOND = 57741
View Source
const ID = 57428
View Source
const IF = 57562
View Source
const IGNORE = 57561
View Source
const IMPORT = 57460
View Source
const IN = 57492
View Source
const INACTIVE = 57833
View Source
const INDEX = 57558
View Source
const INDEXES = 57569
View Source
const INNER = 57412
View Source
const INPLACE = 57420
View Source
const INSERT = 57353
View Source
const INSERT_METHOD = 57902
View Source
const INSTANT = 57422
View Source
const INT = 57641
View Source
const INTEGER = 57642
View Source
const INTEGRAL = 57434
View Source
const INTERVAL = 57542
View Source
const INTNUM = 57644
View Source
const INTO = 57371
View Source
const INVISIBLE = 57834
View Source
const INVOKER = 57616
View Source
const IS = 57489
View Source
const ISOLATION = 57713
View Source
const JOIN = 57408
View Source
const JSON = 57668
View Source
const JSON_ARRAY = 57765
View Source
const JSON_ARRAY_APPEND = 57772
View Source
const JSON_ARRAY_INSERT = 57773
View Source
const JSON_CONTAINS = 57447
View Source
const JSON_CONTAINS_PATH = 57448
View Source
const JSON_DEPTH = 57768
View Source
const JSON_EXTRACT = 57449
View Source
const JSON_EXTRACT_OP = 57543
View Source
const JSON_INSERT = 57774
View Source
const JSON_KEYS = 57450
View Source
const JSON_LENGTH = 57770
View Source
const JSON_MERGE = 57775
View Source
const JSON_MERGE_PATCH = 57776
View Source
const JSON_MERGE_PRESERVE = 57777
View Source
const JSON_OBJECT = 57766
View Source
const JSON_OVERLAPS = 57451
View Source
const JSON_PRETTY = 57444
View Source
const JSON_QUOTE = 57767
View Source
const JSON_REMOVE = 57778
View Source
const JSON_REPLACE = 57779
View Source
const JSON_SCHEMA_VALID = 57669
View Source
const JSON_SCHEMA_VALIDATION_REPORT = 57670
View Source
const JSON_SEARCH = 57452
View Source
const JSON_SET = 57780
View Source
const JSON_STORAGE_FREE = 57446
View Source
const JSON_STORAGE_SIZE = 57445
View Source
const JSON_TABLE = 57802
View Source
const JSON_TYPE = 57769
View Source
const JSON_UNQUOTE = 57781
View Source
const JSON_UNQUOTE_EXTRACT_OP = 57544
View Source
const JSON_VALID = 57771
View Source
const JSON_VALUE = 57453
View Source
const KEY = 57473
View Source
const KEYS = 57377
View Source
const KEYSPACES = 57699
View Source
const KEY_BLOCK_SIZE = 57567
View Source
const LAG = 57803
View Source
const LANGUAGE = 57785
View Source
const LAST = 57620
View Source
const LAST_INSERT_ID = 57400
View Source
const LAST_VALUE = 57804
View Source
const LATERAL = 57805
View Source
const LE = 57485
View Source
const LEAD = 57806
View Source
const LEADING = 57467
View Source
const LEFT = 57410
View Source
const LESS = 57595
View Source
const LEVEL = 57714
View Source
const LEX_ERROR = 57348
View Source
const LIKE = 57490
View Source
const LIMIT = 57362
View Source
const LINEAR = 57920
View Source
const LINES = 57388
View Source
const LINESTRING = 57674
View Source
const LIST = 57922
View Source
const LIST_ARG = 57439
View Source
const LOAD = 57387
View Source
const LOCAL = 57883
View Source
const LOCALTIME = 57727
View Source
const LOCALTIMESTAMP = 57728
View Source
const LOCK = 57375
View Source
const LOCKED = 57835
View Source
const LOGS = 57886
View Source
const LONGBLOB = 57667
View Source
const LONGTEXT = 57663
View Source
const LOWER_THAN_CHARSET = 57470
View Source
const LOW_PRIORITY = 57884
View Source
const LTRIM = 57762
View Source
const MANIFEST = 57395
View Source
const MASTER_COMPRESSION_ALGORITHMS = 57836
View Source
const MASTER_PUBLIC_KEY_PATH = 57837
View Source
const MASTER_TLS_CIPHERSUITES = 57838
View Source
const MASTER_ZSTD_COMPRESSION_LEVEL = 57839
View Source
const MATCH = 57782
View Source
const MAXVALUE = 57592
View Source
const MAX_ROWS = 57903
View Source
const MEDIUMBLOB = 57666
View Source
const MEDIUMINT = 57640
View Source
const MEDIUMTEXT = 57662
View Source
const MEMBER = 57346
View Source
const MEMORY = 57917
View Source
const MERGE = 57613
View Source
const MICROSECOND = 57742
View Source
const MINUTE = 57743
View Source
const MINUTE_MICROSECOND = 57744
View Source
const MINUTE_SECOND = 57745
View Source
const MIN_ROWS = 57904
View Source
const MOD = 57496
View Source
const MODE = 57404
View Source
const MODIFY = 57553
View Source
const MONTH = 57746
View Source
const MULTILINESTRING = 57678
View Source
const MULTIPOINT = 57677
View Source
const MULTIPOLYGON = 57679
View Source
const NAME = 57602
View Source
const NAMES = 57710
View Source
const NATURAL = 57415
View Source
const NCHAR = 57659
View Source
const NCHAR_STRING = 57433
View Source
const NE = 57487
View Source
const NESTED = 57840
View Source
const NETWORK_NAMESPACE = 57841
View Source
const NEXT = 57401
View Source
const NO = 57574
View Source
const NONE = 57424
View Source
const NOT = 57478
View Source
const NOW = 57725
View Source
const NOWAIT = 57842
View Source
const NO_WRITE_TO_BINLOG = 57885
View Source
const NTH_VALUE = 57807
View Source
const NTILE = 57808
View Source
const NULL = 57455
View Source
const NULLS = 57843
View Source
const NULLX = 57682
View Source
const NULL_SAFE_EQUAL = 57488
View Source
const NUMERIC = 57649
View Source
const OF = 57809
View Source
const OFF = 57458
View Source
const OFFSET = 57363
View Source
const OJ = 57844
View Source
const OLD = 57845
View Source
const ON = 57418
View Source
const ONLY = 57717
View Source
const OPEN = 57700
View Source
const OPTIMIZE = 57583
View Source
const OPTIMIZER_COSTS = 57890
View Source
const OPTION = 57609
View Source
const OPTIONAL = 57846
View Source
const OPTIONALLY = 57398
View Source
const OR = 57475
View Source
const ORDER = 57360
View Source
const ORDINALITY = 57847
View Source
const ORGANIZATION = 57848
View Source
const OTHERS = 57849
View Source
const OUTER = 57413
View Source
const OUTFILE = 57384
View Source
const OVER = 57810
View Source
const OVERWRITE = 57396
View Source
const PACK_KEYS = 57905
View Source
const PARSER = 57381
View Source
const PARTIAL = 57850
View Source
const PARTITION = 57593
View Source
const PARTITIONING = 57588
View Source
const PARTITIONS = 57919
View Source
const PASSWORD = 57906
View Source
const PATH = 57851
View Source
const PERCENT_RANK = 57811
View Source
const PERSIST = 57852
View Source
const PERSIST_ONLY = 57853
View Source
const PLUGINS = 57701
View Source
const POINT = 57673
View Source
const POLYGON = 57675
View Source
const PRECEDING = 57854
View Source
const PREPARE = 57590
View Source
const PRIMARY = 57563
View Source
const PRIVILEGES = 57702
View Source
const PRIVILEGE_CHECKS_USER = 57855
View Source
const PROCEDURE = 57597
View Source
const PROCESS = 57856
View Source
const PROCESSLIST = 57703
View Source
const QUARTER = 57747
View Source
const QUERY = 57787
View Source
const RANDOM = 57857
View Source
const RANGE = 57921
View Source
const RANK = 57812
View Source
const RATIO = 57628
View Source
const READ = 57715
View Source
const REAL = 57645
View Source
const REBUILD = 57587
View Source
const RECURSIVE = 57813
View Source
const REDUNDANT = 57910
View Source
const REFERENCE = 57858
View Source
const REFERENCES = 57575
View Source
const REGEXP = 57491
View Source
const RELAY = 57894
View Source
const RELEASE = 57635
View Source
const REMOVE = 57589
View Source
const RENAME = 57548
View Source
const REORGANIZE = 57594
View Source
const REPAIR = 57582
View Source
const REPEATABLE = 57718
View Source
const REPLACE = 57752
View Source
const REQUIRE_ROW_FORMAT = 57859
View Source
const RESOURCE = 57860
View Source
const RESPECT = 57861
View Source
const RESTART = 57862
View Source
const RESTRICT = 57576
View Source
const RETAIN = 57863
View Source
const RETRY = 57622
View Source
const RETURNING = 57879
View Source
const REUSE = 57864
View Source
const REVERT = 57555
View Source
const RIGHT = 57411
View Source
const ROLE = 57865
View Source
const ROLLBACK = 57633
View Source
const ROW_FORMAT = 57912
View Source
const ROW_NUMBER = 57814
View Source
const RTRIM = 57763
View Source
const S3 = 57385
View Source
const SAVEPOINT = 57634
View Source
const SCHEMA = 57556
View Source
const SCHEMAS = 57704
View Source
const SECOND = 57748
View Source
const SECONDARY = 57866
View Source
const SECONDARY_ENGINE = 57867
View Source
const SECONDARY_ENGINE_ATTRIBUTE = 57868
View Source
const SECONDARY_LOAD = 57869
View Source
const SECONDARY_UNLOAD = 57870
View Source
const SECOND_MICROSECOND = 57749
View Source
const SECURITY = 57617
View Source
const SELECT = 57350
View Source
const SEPARATOR = 57758
View Source
const SEQUENCE = 57612
View Source
const SERIALIZABLE = 57721
View Source
const SESSION = 57712
View Source
const SET = 57374
View Source
const SHARE = 57403
View Source
const SHARED = 57425
View Source
const SHIFT_LEFT = 57493
View Source
const SHIFT_RIGHT = 57494
View Source
const SHOW = 57577
View Source
const SIGNED = 57685
View Source
const SIMPLE = 57871
View Source
const SKIP = 57872
View Source
const SLOW = 57892
View Source
const SMALLINT = 57639
View Source
const SPATIAL = 57565
View Source
const SQL = 57610
View Source
const SQL_CACHE = 57406
View Source
const SQL_CALC_FOUND_ROWS = 57407
View Source
const SQL_NO_CACHE = 57405
View Source
const SRID = 57873
View Source
const START = 57630
View Source
const STARTING = 57397
View Source
const STATS_AUTO_RECALC = 57913
View Source
const STATS_PERSISTENT = 57914
View Source
const STATS_SAMPLE_PAGES = 57915
View Source
const STATUS = 57604
View Source
const STORAGE = 57916
View Source
const STORED = 57465
View Source
const STRAIGHT_JOIN = 57409
View Source
const STREAM = 57351
View Source
const STRING = 57432
View Source
const SUBPARTITION = 57923
View Source
const SUBPARTITIONS = 57924
View Source
const SUBQUERY_AS_EXPR = 57427
View Source
const SUBSTR = 57755
View Source
const SUBSTRING = 57756
View Source
const SYSTEM = 57815
View Source
const TABLE = 57557
View Source
const TABLES = 57705
View Source
const TABLESPACE = 57463
View Source
const TEMPORARY = 57614
View Source
const TEMPTABLE = 57615
View Source
const TERMINATED = 57389
View Source
const TEXT = 57660
View Source
const THAN = 57596
View Source
const THEN = 57482
View Source
const THREAD_PRIORITY = 57874
View Source
const THROTTLE = 57625
View Source
const TIES = 57875
View Source
const TIME = 57650
View Source
const TIMESTAMP = 57651
View Source
const TIMESTAMPADD = 57759
View Source
const TIMESTAMPDIFF = 57760
View Source
const TINYBLOB = 57665
View Source
const TINYINT = 57638
View Source
const TINYTEXT = 57661
View Source
const TO = 57560
View Source
const TRADITIONAL = 57882
View Source
const TRAILING = 57468
View Source
const TRANSACTION = 57631
View Source
const TREE = 57881
View Source
const TRIGGER = 57598
View Source
const TRIGGERS = 57706
View Source
const TRIM = 57764
View Source
const TRUE = 57456
View Source
const TRUNCATE = 57584
View Source
const UNARY = 57497
View Source
const UNBOUNDED = 57876
View Source
const UNCOMMITTED = 57720
View Source
const UNDEFINED = 57611
View Source
const UNDERSCORE_ARMSCII8 = 57500
View Source
const UNDERSCORE_ASCII = 57501
View Source
const UNDERSCORE_BIG5 = 57502
View Source
const UNDERSCORE_BINARY = 57503
View Source
const UNDERSCORE_CP1250 = 57504
View Source
const UNDERSCORE_CP1251 = 57505
View Source
const UNDERSCORE_CP1256 = 57506
View Source
const UNDERSCORE_CP1257 = 57507
View Source
const UNDERSCORE_CP850 = 57508
View Source
const UNDERSCORE_CP852 = 57509
View Source
const UNDERSCORE_CP866 = 57510
View Source
const UNDERSCORE_CP932 = 57511
View Source
const UNDERSCORE_DEC8 = 57512
View Source
const UNDERSCORE_EUCJPMS = 57513
View Source
const UNDERSCORE_EUCKR = 57514
View Source
const UNDERSCORE_GB18030 = 57515
View Source
const UNDERSCORE_GB2312 = 57516
View Source
const UNDERSCORE_GBK = 57517
View Source
const UNDERSCORE_GEOSTD8 = 57518
View Source
const UNDERSCORE_GREEK = 57519
View Source
const UNDERSCORE_HEBREW = 57520
View Source
const UNDERSCORE_HP8 = 57521
View Source
const UNDERSCORE_KEYBCS2 = 57522
View Source
const UNDERSCORE_KOI8R = 57523
View Source
const UNDERSCORE_KOI8U = 57524
View Source
const UNDERSCORE_LATIN1 = 57525
View Source
const UNDERSCORE_LATIN2 = 57526
View Source
const UNDERSCORE_LATIN5 = 57527
View Source
const UNDERSCORE_LATIN7 = 57528
View Source
const UNDERSCORE_MACCE = 57529
View Source
const UNDERSCORE_MACROMAN = 57530
View Source
const UNDERSCORE_SJIS = 57531
View Source
const UNDERSCORE_SWE7 = 57532
View Source
const UNDERSCORE_TIS620 = 57533
View Source
const UNDERSCORE_UCS2 = 57534
View Source
const UNDERSCORE_UJIS = 57535
View Source
const UNDERSCORE_UTF16 = 57536
View Source
const UNDERSCORE_UTF16LE = 57537
View Source
const UNDERSCORE_UTF32 = 57538
View Source
const UNDERSCORE_UTF8 = 57539
View Source
const UNDERSCORE_UTF8MB3 = 57541
View Source
const UNDERSCORE_UTF8MB4 = 57540
View Source
const UNICODE = 57681
View Source
const UNION = 57349
View Source
const UNIQUE = 57472
View Source
const UNLOCK = 57376
View Source
const UNSIGNED = 57686
View Source
const UNTHROTTLE = 57626
View Source
const UNUSED = 57791
View Source
const UPDATE = 57354
View Source
const UPGRADE = 57603
View Source
const USE = 57416
View Source
const USER = 57707
View Source
const USER_RESOURCES = 57891
View Source
const USING = 57419
View Source
const UTC_DATE = 57730
View Source
const UTC_TIME = 57731
View Source
const UTC_TIMESTAMP = 57732
View Source
const VALIDATION = 57790
View Source
const VALUE = 57402
View Source
const VALUES = 57399
View Source
const VALUE_ARG = 57438
View Source
const VARBINARY = 57658
View Source
const VARCHAR = 57655
View Source
const VARIABLES = 57605
View Source
const VCPU = 57877
View Source
const VGTID_EXECUTED = 57708
View Source
const VIEW = 57559
View Source
const VINDEX = 57599
View Source
const VINDEXES = 57600
View Source
const VIRTUAL = 57464
View Source
const VISIBLE = 57878
View Source
const VSCHEMA = 57709
View Source
const VSTREAM = 57352
View Source
const WARNINGS = 57606
View Source
const WEEK = 57751
View Source
const WEIGHT_STRING = 57761
View Source
const WHEN = 57481
View Source
const WHERE = 57357
View Source
const WINDOW = 57816
View Source
const WITH = 57786
View Source
const WITHOUT = 57789
View Source
const WORK = 57636
View Source
const WRITE = 57716
View Source
const XOR = 57476
View Source
const YEAR = 57653
View Source
const YEAR_MONTH = 57750
View Source
const ZEROFILL = 57687

Variables

View Source
var MySQLServerVersion = flag.String("mysql_server_version", "", "MySQL server version to advertise.")

MySQLServerVersion is what Vitess will present as it's version during the connection handshake, and as the value to the @@version system variable. If nothing is provided, Vitess will report itself as a specific MySQL version with the vitess version appended to it

View Source
var MySQLVersion = "50709" // default version if nothing else is stated

MySQLVersion is the version of MySQL that the parser would emulate

Functions

func ConvertMySQLVersionToCommentVersion

func ConvertMySQLVersionToCommentVersion(version string) (string, error)

ConvertMySQLVersionToCommentVersion converts the MySQL version into comment version format.

func ExtractMysqlComment

func ExtractMysqlComment(sql string) (string, string)

ExtractMysqlComment extracts the version and SQL from a comment-only query such as /*!50708 sql here */

func GetKeywords

func GetKeywords() []cache.Keyword

func IsMySQL80AndAbove

func IsMySQL80AndAbove() bool

func KeywordString

func KeywordString(id int) string

KeywordString returns the string corresponding to the given keyword

func Parse

func Parse(lexer tokenizer.Tokenizer) int

func ParsePooled

func ParsePooled(lexer tokenizer.Tokenizer) int

mysqParsePooled is a wrapper around mysqParse that pools the parser objects. There isn't a particularly good reason to use yyParse directly, since it immediately discards its parser.

N.B: Parser pooling means that you CANNOT take references directly to parse stack variables (e.g. $$ = &$4) in sql.y rules. You must instead add an intermediate reference like so:

showCollationFilterOpt := $4
$$ = &Show{Type: string($2), ShowCollationFilterOpt: &showCollationFilterOpt}

Types

type MysqlTokenizer

type MysqlTokenizer struct {
	AllowComments       bool
	SkipSpecialComments bool
	SkipToEnd           bool
	LastError           error
	ParseTree           ast.Statement
	BindVars            map[string]struct{}

	Pos int
	// contains filtered or unexported fields
}

MysqlTokenizer is the struct used to generate SQL tokens for the parser.

func NewMysqlStringTokenizer

func NewMysqlStringTokenizer(sql string) *MysqlTokenizer

NewMysqlStringTokenizer creates a new Tokenizer for the sql string.

func (*MysqlTokenizer) BindVar

func (tkn *MysqlTokenizer) BindVar(bvar string, value struct{})

BindVar implements sql_parser.Tokenizer.

func (*MysqlTokenizer) Cur

func (tkn *MysqlTokenizer) Cur() rune

func (*MysqlTokenizer) DecNesting

func (tkn *MysqlTokenizer) DecNesting()

DecNesting implements sql_parser.Tokenizer.

func (*MysqlTokenizer) Error

func (tkn *MysqlTokenizer) Error(err string)

Error is called by go yacc if there's a parsing error.

func (*MysqlTokenizer) GetBindVars

func (tkn *MysqlTokenizer) GetBindVars() ast.BindVars

GetBindVars implements tokenizer.Tokenizer.

func (*MysqlTokenizer) GetDialect

func (tkn *MysqlTokenizer) GetDialect() dialect.SqlDialect

GetDialect implements tokenizer.Tokenizer.

func (*MysqlTokenizer) GetIdToken

func (tkn *MysqlTokenizer) GetIdToken() int

GetIdToken implements sql_parser.Tokenizer.

func (*MysqlTokenizer) GetKeywordString

func (tkn *MysqlTokenizer) GetKeywordString(token int) string

GetKeywordString implements sql_parser.Tokenizer.

func (*MysqlTokenizer) GetLastError

func (tkn *MysqlTokenizer) GetLastError() error

GetLastError implements tokenizer.Tokenizer.

func (*MysqlTokenizer) GetNesting

func (tkn *MysqlTokenizer) GetNesting() int

GetNesting implements sql_parser.Tokenizer.

func (*MysqlTokenizer) GetParseTree

func (tkn *MysqlTokenizer) GetParseTree() ast.Statement

GetParseTree implements sql_parser.Tokenizer.

func (*MysqlTokenizer) GetPartialDDL

func (tkn *MysqlTokenizer) GetPartialDDL() ast.Statement

GetPartialDDL implements sql_parser.Tokenizer.

func (*MysqlTokenizer) GetPos

func (tkn *MysqlTokenizer) GetPos() int

GetPos implements tokenizer.Tokenizer.

func (*MysqlTokenizer) GetText

func (tkn *MysqlTokenizer) GetText(startPos int) string

GetText implements tokenizer.Tokenizer.

func (*MysqlTokenizer) IncNesting

func (tkn *MysqlTokenizer) IncNesting()

IncNesting implements sql_parser.Tokenizer.

func (*MysqlTokenizer) Lex

func (tkn *MysqlTokenizer) Lex(lval *mysqSymType) int

Lex returns the next token form the Tokenizer. This function is used by go yacc.

func (*MysqlTokenizer) Peek

func (tkn *MysqlTokenizer) Peek(dist int) rune

func (*MysqlTokenizer) Reset

func (tkn *MysqlTokenizer) Reset()

Reset clears any internal state.

func (*MysqlTokenizer) ResetTo

func (tkn *MysqlTokenizer) ResetTo(nextPos int)

ResetTo implements tokenizer.Tokenizer.

func (*MysqlTokenizer) Scan

func (tkn *MysqlTokenizer) Scan() (int, string)

Scan scans the tokenizer for the next token and returns the token type and an optional value.

func (*MysqlTokenizer) SetAllowComments

func (tkn *MysqlTokenizer) SetAllowComments(allow bool)

SetAllowComments implements sql_parser.Tokenizer.

func (*MysqlTokenizer) SetIgnoreCommentKeyword

func (tkn *MysqlTokenizer) SetIgnoreCommentKeyword(ignore bool)

SetIgnoreCommentKeyword implements sql_parser.Tokenizer.

func (*MysqlTokenizer) SetMulti

func (tkn *MysqlTokenizer) SetMulti(multi bool)

SetMulti implements tokenizer.Tokenizer.

func (*MysqlTokenizer) SetParseTree

func (tkn *MysqlTokenizer) SetParseTree(stmt ast.Statement)

SetParseTree implements sql_parser.Tokenizer.

func (*MysqlTokenizer) SetPartialDDL

func (tkn *MysqlTokenizer) SetPartialDDL(node ast.Statement)

SetPartialDDL implements sql_parser.Tokenizer.

func (*MysqlTokenizer) SetSkipSpecialComments

func (tkn *MysqlTokenizer) SetSkipSpecialComments(skip bool)

SetSkipSpecialComments implements tokenizer.Tokenizer.

func (*MysqlTokenizer) SetSkipToEnd

func (tkn *MysqlTokenizer) SetSkipToEnd(skip bool)

SetSkipToEnd implements sql_parser.Tokenizer.

func (*MysqlTokenizer) Skip

func (tkn *MysqlTokenizer) Skip(dist int)

func (*MysqlTokenizer) SkipBlank

func (tkn *MysqlTokenizer) SkipBlank()

SkipBlank skips the cursor while it finds whitespace

type PositionedErr

type PositionedErr struct {
	Err  string
	Pos  int
	Near string
}

PositionedErr holds context related to parser errors

func (PositionedErr) Error

func (p PositionedErr) Error() string

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL