From 6664f6a5f1ddfe993b78a403744c187e494ebc64 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Maur=C3=ADcio=20Meneghini=20Fauth?= Date: Wed, 5 Jan 2022 16:34:26 -0300 Subject: [PATCH] Rename class members to use camel case format MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Maurício Meneghini Fauth --- phpcs.xml.dist | 1 - phpstan-baseline.neon | 176 +++++----- psalm-baseline.xml | 156 ++++----- src/Components/AlterOperation.php | 14 +- src/Components/CaseExpression.php | 18 +- src/Components/Condition.php | 8 +- src/Components/CreateDefinition.php | 4 +- src/Components/DataType.php | 4 +- src/Components/Expression.php | 6 +- src/Components/IntoKeyword.php | 30 +- src/Components/JoinKeyword.php | 16 +- src/Components/Key.php | 4 +- src/Components/PartitionDefinition.php | 4 +- src/Components/Reference.php | 4 +- src/Context.php | 33 +- src/Contexts/ContextMariaDb100000.php | 2 +- src/Contexts/ContextMariaDb100100.php | 2 +- src/Contexts/ContextMariaDb100200.php | 2 +- src/Contexts/ContextMariaDb100300.php | 2 +- src/Contexts/ContextMariaDb100400.php | 2 +- src/Contexts/ContextMariaDb100500.php | 2 +- src/Contexts/ContextMariaDb100600.php | 2 +- src/Contexts/ContextMySql50000.php | 2 +- src/Contexts/ContextMySql50100.php | 2 +- src/Contexts/ContextMySql50500.php | 2 +- src/Contexts/ContextMySql50600.php | 2 +- src/Contexts/ContextMySql50700.php | 2 +- src/Contexts/ContextMySql80000.php | 2 +- src/Core.php | 2 +- src/Lexer.php | 8 +- src/Parser.php | 12 +- src/Statement.php | 51 ++- src/Statements/AlterStatement.php | 12 +- src/Statements/AnalyzeStatement.php | 2 +- src/Statements/BackupStatement.php | 2 +- src/Statements/CheckStatement.php | 2 +- src/Statements/ChecksumStatement.php | 2 +- src/Statements/CreateStatement.php | 26 +- src/Statements/DeleteStatement.php | 8 +- src/Statements/DropStatement.php | 6 +- src/Statements/InsertStatement.php | 4 +- src/Statements/LoadStatement.php | 74 ++-- src/Statements/MaintenanceStatement.php | 4 +- src/Statements/OptimizeStatement.php | 2 +- src/Statements/PurgeStatement.php | 16 +- src/Statements/RepairStatement.php | 2 +- src/Statements/ReplaceStatement.php | 4 +- src/Statements/RestoreStatement.php | 2 +- src/Statements/SelectStatement.php | 18 +- src/Statements/SetStatement.php | 14 +- src/Statements/ShowStatement.php | 2 +- src/Statements/TransactionStatement.php | 2 +- src/Statements/TruncateStatement.php | 2 +- src/Statements/UpdateStatement.php | 6 +- src/Statements/WithStatement.php | 8 +- src/Tools/ContextGenerator.php | 10 +- src/Utils/Formatter.php | 22 +- src/Utils/Query.php | 8 +- tests/Lexer/ContextTest.php | 14 +- tests/data/bugs/gh14.out | 36 +- tests/data/bugs/gh16.out | 72 ++-- tests/data/bugs/gh317.out | 28 +- tests/data/bugs/gh9.out | 70 ++-- tests/data/bugs/pma11800.out | 22 +- tests/data/bugs/pma11836.out | 36 +- tests/data/bugs/pma11843.out | 36 +- tests/data/bugs/pma11867.out | 16 +- tests/data/bugs/pma11879.out | 28 +- tests/data/lexer/lex.out | 4 +- tests/data/lexer/lexBool.out | 4 +- tests/data/lexer/lexComment.out | 4 +- tests/data/lexer/lexCommentEnd.out | 4 +- tests/data/lexer/lexDelimiter.out | 4 +- tests/data/lexer/lexDelimiter2.out | 4 +- tests/data/lexer/lexDelimiterErr1.out | 4 +- tests/data/lexer/lexDelimiterErr2.out | 4 +- tests/data/lexer/lexDelimiterErr3.out | 4 +- tests/data/lexer/lexDelimiterLen.out | 4 +- tests/data/lexer/lexKeyword.out | 4 +- tests/data/lexer/lexKeyword2.out | 4 +- tests/data/lexer/lexLabel1.out | 4 +- tests/data/lexer/lexLabel2.out | 4 +- tests/data/lexer/lexNoLabel.out | 4 +- tests/data/lexer/lexNumber.out | 4 +- tests/data/lexer/lexOperator.out | 4 +- .../lexer/lexOperatorStarIsArithmetic.out | 4 +- .../data/lexer/lexOperatorStarIsWildcard.out | 4 +- tests/data/lexer/lexString.out | 4 +- tests/data/lexer/lexStringErr1.out | 4 +- tests/data/lexer/lexSymbol.out | 4 +- tests/data/lexer/lexSymbolErr1.out | 4 +- tests/data/lexer/lexSymbolErr2.out | 4 +- tests/data/lexer/lexSymbolErr3.out | 4 +- tests/data/lexer/lexSymbolUser.out | 4 +- tests/data/lexer/lexUtf8.out | 4 +- tests/data/lexer/lexWhitespace.out | 4 +- tests/data/lexer/lexWildcardThenComment.out | 4 +- tests/data/misc/parseParameter.out | 28 +- tests/data/parser/parse.out | 22 +- tests/data/parser/parse2.out | 34 +- tests/data/parser/parseAlter.out | 36 +- tests/data/parser/parseAlter10.out | 28 +- tests/data/parser/parseAlter11.out | 28 +- tests/data/parser/parseAlter12.out | 28 +- tests/data/parser/parseAlter13.out | 28 +- tests/data/parser/parseAlter2.out | 24 +- tests/data/parser/parseAlter3.out | 28 +- tests/data/parser/parseAlter4.out | 26 +- tests/data/parser/parseAlter5.out | 26 +- tests/data/parser/parseAlter6.out | 26 +- tests/data/parser/parseAlter7.out | 38 +-- tests/data/parser/parseAlter8.out | 28 +- tests/data/parser/parseAlter9.out | 28 +- tests/data/parser/parseAlterErr.out | 28 +- tests/data/parser/parseAlterErr2.out | 28 +- tests/data/parser/parseAlterErr3.out | 28 +- tests/data/parser/parseAlterErr4.out | 28 +- .../parser/parseAlterTableCharacterSet1.out | 26 +- .../parser/parseAlterTableCharacterSet2.out | 26 +- .../parser/parseAlterTableCharacterSet3.out | 26 +- .../parser/parseAlterTableCharacterSet4.out | 28 +- .../parser/parseAlterTableCharacterSet5.out | 28 +- .../parser/parseAlterTableCharacterSet6.out | 28 +- .../parser/parseAlterTableCharacterSet7.out | 28 +- .../parseAlterTableSetAutoIncrementError.out | 26 +- tests/data/parser/parseAlterUser.out | 30 +- tests/data/parser/parseAlterUser1.out | 26 +- tests/data/parser/parseAlterUser2.out | 26 +- tests/data/parser/parseAlterUser3.out | 26 +- tests/data/parser/parseAlterUser4.out | 26 +- tests/data/parser/parseAlterUser5.out | 28 +- tests/data/parser/parseAlterUser6.out | 26 +- tests/data/parser/parseAlterUser7.out | 26 +- tests/data/parser/parseAlterUser8.out | 26 +- tests/data/parser/parseAlterWithInvisible.out | 48 +-- tests/data/parser/parseArrayErr1.out | 24 +- tests/data/parser/parseArrayErr3.out | 24 +- tests/data/parser/parseCall.out | 16 +- tests/data/parser/parseCall2.out | 16 +- tests/data/parser/parseCall3.out | 16 +- tests/data/parser/parseCreateDatabase.out | 26 +- tests/data/parser/parseCreateDatabaseErr.out | 26 +- tests/data/parser/parseCreateFunction.out | 30 +- tests/data/parser/parseCreateFunctionErr1.out | 28 +- tests/data/parser/parseCreateFunctionErr2.out | 26 +- tests/data/parser/parseCreateFunctionErr3.out | 26 +- tests/data/parser/parseCreateProcedure.out | 28 +- tests/data/parser/parseCreateProcedure1.out | 30 +- tests/data/parser/parseCreateProcedure2.out | 30 +- tests/data/parser/parseCreateSchema.out | 26 +- tests/data/parser/parseCreateSchemaErr.out | 26 +- tests/data/parser/parseCreateTable.out | 48 +-- tests/data/parser/parseCreateTable2.out | 100 +++--- tests/data/parser/parseCreateTable3.out | 46 +-- tests/data/parser/parseCreateTable4.out | 56 +-- tests/data/parser/parseCreateTable5.out | 32 +- tests/data/parser/parseCreateTable6.out | 32 +- tests/data/parser/parseCreateTable7.out | 60 ++-- .../data/parser/parseCreateTableAsSelect.out | 40 +-- .../parser/parseCreateTableEnforcedCheck.out | 32 +- tests/data/parser/parseCreateTableErr1.out | 30 +- tests/data/parser/parseCreateTableErr2.out | 24 +- tests/data/parser/parseCreateTableErr3.out | 26 +- tests/data/parser/parseCreateTableErr4.out | 26 +- tests/data/parser/parseCreateTableErr5.out | 26 +- tests/data/parser/parseCreateTableLike.out | 28 +- .../parseCreateTableNotEnforcedCheck.out | 32 +- tests/data/parser/parseCreateTableSelect.out | 40 +-- tests/data/parser/parseCreateTableSpatial.out | 30 +- ...parseCreateTableTimestampWithPrecision.out | 42 +-- .../parseCreateTableWithInvisibleKey.out | 82 ++--- tests/data/parser/parseCreateTrigger.out | 28 +- tests/data/parser/parseCreateUser.out | 26 +- tests/data/parser/parseCreateView.out | 54 +-- tests/data/parser/parseCreateView2.out | 26 +- tests/data/parser/parseCreateView3.out | 46 +-- tests/data/parser/parseCreateView4.out | 26 +- tests/data/parser/parseCreateViewAsWithAs.out | 172 +++++----- tests/data/parser/parseCreateViewMultiple.out | 30 +- .../data/parser/parseCreateViewWithQuotes.out | 44 +-- .../data/parser/parseCreateViewWithUnion.out | 44 +-- .../parser/parseCreateViewWithWrongSyntax.out | 42 +-- .../parser/parseCreateViewWithoutQuotes.out | 44 +-- tests/data/parser/parseDelete.out | 40 +-- tests/data/parser/parseDelete10.out | 28 +- tests/data/parser/parseDelete11.out | 28 +- tests/data/parser/parseDelete12.out | 22 +- tests/data/parser/parseDelete2.out | 18 +- tests/data/parser/parseDelete3.out | 22 +- tests/data/parser/parseDelete4.out | 24 +- tests/data/parser/parseDelete5.out | 24 +- tests/data/parser/parseDelete6.out | 20 +- tests/data/parser/parseDelete7.out | 20 +- tests/data/parser/parseDelete8.out | 18 +- tests/data/parser/parseDelete9.out | 24 +- tests/data/parser/parseDeleteErr1.out | 16 +- tests/data/parser/parseDeleteErr10.out | 24 +- tests/data/parser/parseDeleteErr11.out | 22 +- tests/data/parser/parseDeleteErr12.out | 24 +- tests/data/parser/parseDeleteErr2.out | 20 +- tests/data/parser/parseDeleteErr3.out | 20 +- tests/data/parser/parseDeleteErr4.out | 26 +- tests/data/parser/parseDeleteErr5.out | 24 +- tests/data/parser/parseDeleteErr6.out | 26 +- tests/data/parser/parseDeleteErr7.out | 24 +- tests/data/parser/parseDeleteErr8.out | 18 +- tests/data/parser/parseDeleteErr9.out | 24 +- tests/data/parser/parseDeleteJoin.out | 42 +-- tests/data/parser/parseDelimiter.out | 52 +-- tests/data/parser/parseDrop.out | 18 +- tests/data/parser/parseDrop2.out | 18 +- tests/data/parser/parseExplain.out | 16 +- tests/data/parser/parseInsert.out | 28 +- tests/data/parser/parseInsertErr.out | 26 +- tests/data/parser/parseInsertErr2.out | 28 +- tests/data/parser/parseInsertIntoErr.out | 34 +- tests/data/parser/parseInsertIntoSet.out | 28 +- .../data/parser/parseInsertOnDuplicateKey.out | 28 +- .../parser/parseInsertOnDuplicateKeyErr.out | 28 +- tests/data/parser/parseInsertSelect.out | 42 +-- .../parseInsertSelectOnDuplicateKey.out | 42 +-- tests/data/parser/parseInsertSet.out | 28 +- .../parser/parseInsertSetOnDuplicateKey.out | 28 +- tests/data/parser/parseLimitErr1.out | 24 +- tests/data/parser/parseLimitErr2.out | 24 +- tests/data/parser/parseLoad1.out | 42 +-- tests/data/parser/parseLoad2.out | 46 +-- tests/data/parser/parseLoad3.out | 46 +-- tests/data/parser/parseLoad4.out | 52 +-- tests/data/parser/parseLoad5.out | 46 +-- tests/data/parser/parseLoad6.out | 52 +-- tests/data/parser/parseLoadErr1.out | 38 +-- tests/data/parser/parseLoadErr2.out | 38 +-- tests/data/parser/parseLoadErr3.out | 42 +-- tests/data/parser/parseLoadErr4.out | 40 +-- tests/data/parser/parseLoadErr5.out | 42 +-- tests/data/parser/parseLoadErr6.out | 42 +-- tests/data/parser/parseLock1.out | 18 +- tests/data/parser/parseLock2.out | 18 +- tests/data/parser/parseLock3.out | 18 +- tests/data/parser/parseLock4.out | 18 +- tests/data/parser/parseLock5.out | 20 +- tests/data/parser/parseLock6.out | 20 +- tests/data/parser/parseLockErr1.out | 18 +- tests/data/parser/parseLockErr10.out | 18 +- tests/data/parser/parseLockErr2.out | 18 +- tests/data/parser/parseLockErr3.out | 16 +- tests/data/parser/parseLockErr4.out | 16 +- tests/data/parser/parseLockErr5.out | 18 +- tests/data/parser/parseLockErr6.out | 18 +- tests/data/parser/parseLockErr7.out | 18 +- tests/data/parser/parseLockErr8.out | 18 +- tests/data/parser/parseLockErr9.out | 18 +- tests/data/parser/parsePurge.out | 24 +- tests/data/parser/parsePurge2.out | 24 +- tests/data/parser/parsePurge3.out | 24 +- tests/data/parser/parsePurge4.out | 24 +- tests/data/parser/parsePurgeErr.out | 22 +- tests/data/parser/parsePurgeErr2.out | 22 +- tests/data/parser/parsePurgeErr3.out | 24 +- tests/data/parser/parseRename.out | 20 +- tests/data/parser/parseRename2.out | 24 +- tests/data/parser/parseRenameErr1.out | 18 +- tests/data/parser/parseRenameErr2.out | 16 +- tests/data/parser/parseRenameErr3.out | 18 +- tests/data/parser/parseRenameErr4.out | 20 +- tests/data/parser/parseRenameErr5.out | 16 +- tests/data/parser/parseReplace.out | 28 +- tests/data/parser/parseReplace2.out | 28 +- tests/data/parser/parseReplaceErr.out | 28 +- tests/data/parser/parseReplaceErr2.out | 26 +- tests/data/parser/parseReplaceErr3.out | 28 +- tests/data/parser/parseReplaceIntoErr.out | 34 +- tests/data/parser/parseReplaceSelect.out | 42 +-- tests/data/parser/parseReplaceSet.out | 28 +- tests/data/parser/parseReplaceValues.out | 28 +- tests/data/parser/parseRestore.out | 18 +- tests/data/parser/parseSelect.out | 40 +-- tests/data/parser/parseSelect10.out | 28 +- tests/data/parser/parseSelect11.out | 22 +- tests/data/parser/parseSelect2.out | 28 +- tests/data/parser/parseSelect3.out | 36 +- tests/data/parser/parseSelect4.out | 28 +- tests/data/parser/parseSelect5.out | 32 +- tests/data/parser/parseSelect6.out | 48 +-- tests/data/parser/parseSelect7.out | 48 +-- tests/data/parser/parseSelect8.out | 32 +- tests/data/parser/parseSelect9.out | 54 +-- tests/data/parser/parseSelectCase1.out | 36 +- tests/data/parser/parseSelectCase2.out | 36 +- tests/data/parser/parseSelectCase3.out | 40 +-- tests/data/parser/parseSelectCase4.out | 38 +-- tests/data/parser/parseSelectCase5.out | 26 +- tests/data/parser/parseSelectCaseAlias1.out | 40 +-- tests/data/parser/parseSelectCaseAlias2.out | 40 +-- tests/data/parser/parseSelectCaseAlias3.out | 26 +- tests/data/parser/parseSelectCaseAlias4.out | 26 +- tests/data/parser/parseSelectCaseAlias5.out | 36 +- tests/data/parser/parseSelectCaseAlias6.out | 36 +- .../data/parser/parseSelectCaseAliasErr1.out | 36 +- .../data/parser/parseSelectCaseAliasErr2.out | 36 +- .../data/parser/parseSelectCaseAliasErr3.out | 36 +- .../data/parser/parseSelectCaseAliasErr4.out | 32 +- tests/data/parser/parseSelectCaseErr1.out | 30 +- tests/data/parser/parseSelectCaseErr2.out | 28 +- tests/data/parser/parseSelectCaseErr3.out | 32 +- tests/data/parser/parseSelectCaseErr4.out | 30 +- tests/data/parser/parseSelectCaseErr5.out | 36 +- tests/data/parser/parseSelectEndOptions1.out | 30 +- tests/data/parser/parseSelectEndOptions2.out | 30 +- .../data/parser/parseSelectEndOptionsErr.out | 30 +- tests/data/parser/parseSelectErr1.out | 38 +-- tests/data/parser/parseSelectErr2.out | 28 +- tests/data/parser/parseSelectExists.out | 22 +- tests/data/parser/parseSelectIndexHint1.out | 135 ++++---- tests/data/parser/parseSelectIndexHint2.out | 135 ++++---- .../data/parser/parseSelectIndexHintErr1.out | 59 ++-- .../data/parser/parseSelectIndexHintErr2.out | 27 +- .../data/parser/parseSelectIndexHintErr3.out | 27 +- .../data/parser/parseSelectIndexHintErr4.out | 59 ++-- tests/data/parser/parseSelectIntoOptions1.out | 44 +-- tests/data/parser/parseSelectIntoOptions2.out | 44 +-- tests/data/parser/parseSelectIntoOptions3.out | 42 +-- tests/data/parser/parseSelectJoinCross.out | 36 +- tests/data/parser/parseSelectJoinMultiple.out | 36 +- .../data/parser/parseSelectJoinMultiple2.out | 40 +-- tests/data/parser/parseSelectJoinNatural.out | 32 +- .../parser/parseSelectJoinNaturalLeft.out | 32 +- .../parseSelectJoinNaturalLeftOuter.out | 28 +- .../parser/parseSelectJoinNaturalRight.out | 28 +- .../parseSelectJoinNaturalRightOuter.out | 28 +- tests/data/parser/parseSelectJoinStraight.out | 36 +- tests/data/parser/parseSelectNested.out | 24 +- .../data/parser/parseSelectOrderByComment.out | 26 +- .../parseSelectOverAlias_mariadb_100600.out | 28 +- tests/data/parser/parseSelectUnion.out | 46 +-- tests/data/parser/parseSelectUnion2.out | 94 ++--- tests/data/parser/parseSelectWhere.out | 320 +++++++++--------- .../parser/parseSelectWithParenthesis.out | 24 +- tests/data/parser/parseSelectWrongOrder.out | 30 +- tests/data/parser/parseSelectWrongOrder2.out | 32 +- tests/data/parser/parseSetCharacterSet.out | 18 +- .../data/parser/parseSetCharacterSetError.out | 18 +- tests/data/parser/parseSetCharset.out | 18 +- tests/data/parser/parseSetCharsetError.out | 18 +- tests/data/parser/parseSetError1.out | 18 +- tests/data/parser/parseSetNames.out | 18 +- tests/data/parser/parseSetNames2.out | 18 +- tests/data/parser/parseSetNames3.out | 18 +- tests/data/parser/parseSetNamesError.out | 18 +- tests/data/parser/parseSetNamesError2.out | 18 +- tests/data/parser/parseSetNamesError3.out | 18 +- tests/data/parser/parseTransaction.out | 52 +-- tests/data/parser/parseTransaction2.out | 52 +-- tests/data/parser/parseTransaction3.out | 24 +- tests/data/parser/parseTransactionErr1.out | 16 +- tests/data/parser/parseUnlock1.out | 16 +- tests/data/parser/parseUnlockErr1.out | 16 +- tests/data/parser/parseUpdate.out | 18 +- tests/data/parser/parseUpdate2.out | 22 +- tests/data/parser/parseUpdate3.out | 22 +- tests/data/parser/parseUpdateErr.out | 22 +- tests/data/parser/parseWithStatement.out | 84 ++--- tests/data/parser/parseWithStatement1.out | 82 ++--- tests/data/parser/parseWithStatement2.out | 72 ++-- tests/data/parser/parseWithStatement3.out | 108 +++--- tests/data/parser/parseWithStatement4.out | 62 ++-- tests/data/parser/parseWithStatement5.out | 82 ++--- tests/data/parser/parseWithStatement6.out | 26 +- tests/data/parser/parseWithStatement7.out | 74 ++-- tests/data/parser/parseWithStatementErr.out | 34 +- tests/data/parser/parseWithStatementErr1.out | 70 ++-- tests/data/parser/parseWithStatementErr2.out | 46 +-- tests/data/parser/parseWithStatementErr3.out | 62 ++-- tests/data/parser/parseWithStatementErr4.out | 62 ++-- tests/data/parser/parseWithStatementErr5.out | 32 +- tests/data/parser/parseWithStatementErr6.out | 66 ++-- tests/data/parser/parseWithStatementErr7.out | 30 +- tests/data/parser/parseWithStatementErr8.out | 58 ++-- 379 files changed, 5465 insertions(+), 5468 deletions(-) diff --git a/phpcs.xml.dist b/phpcs.xml.dist index 68a5105e9..e92bf9c8e 100644 --- a/phpcs.xml.dist +++ b/phpcs.xml.dist @@ -19,7 +19,6 @@ - diff --git a/phpstan-baseline.neon b/phpstan-baseline.neon index 24d338c39..60964f0dd 100644 --- a/phpstan-baseline.neon +++ b/phpstan-baseline.neon @@ -41,37 +41,37 @@ parameters: path: src/Components/AlterOperation.php - - message: "#^Property PhpMyAdmin\\\\SqlParser\\\\Components\\\\AlterOperation\\:\\:\\$DB_OPTIONS type has no value type specified in iterable type array\\.$#" + message: "#^Property PhpMyAdmin\\\\SqlParser\\\\Components\\\\AlterOperation\\:\\:\\$databaseOptions type has no value type specified in iterable type array\\.$#" count: 1 path: src/Components/AlterOperation.php - - message: "#^Property PhpMyAdmin\\\\SqlParser\\\\Components\\\\AlterOperation\\:\\:\\$TABLE_OPTIONS type has no value type specified in iterable type array\\.$#" - count: 1 + message: "#^Property PhpMyAdmin\\\\SqlParser\\\\Components\\\\AlterOperation\\:\\:\\$field \\(PhpMyAdmin\\\\SqlParser\\\\Components\\\\Expression\\) does not accept PhpMyAdmin\\\\SqlParser\\\\Components\\\\Expression\\|null\\.$#" + count: 2 path: src/Components/AlterOperation.php - - message: "#^Property PhpMyAdmin\\\\SqlParser\\\\Components\\\\AlterOperation\\:\\:\\$USER_OPTIONS type has no value type specified in iterable type array\\.$#" + message: "#^Property PhpMyAdmin\\\\SqlParser\\\\Components\\\\AlterOperation\\:\\:\\$field \\(PhpMyAdmin\\\\SqlParser\\\\Components\\\\Expression\\) in isset\\(\\) is not nullable\\.$#" count: 1 path: src/Components/AlterOperation.php - - message: "#^Property PhpMyAdmin\\\\SqlParser\\\\Components\\\\AlterOperation\\:\\:\\$VIEW_OPTIONS type has no value type specified in iterable type array\\.$#" + message: "#^Property PhpMyAdmin\\\\SqlParser\\\\Components\\\\AlterOperation\\:\\:\\$options \\(PhpMyAdmin\\\\SqlParser\\\\Components\\\\OptionsArray\\) does not accept PhpMyAdmin\\\\SqlParser\\\\Components\\\\OptionsArray\\|null\\.$#" count: 1 path: src/Components/AlterOperation.php - - message: "#^Property PhpMyAdmin\\\\SqlParser\\\\Components\\\\AlterOperation\\:\\:\\$field \\(PhpMyAdmin\\\\SqlParser\\\\Components\\\\Expression\\) does not accept PhpMyAdmin\\\\SqlParser\\\\Components\\\\Expression\\|null\\.$#" - count: 2 + message: "#^Property PhpMyAdmin\\\\SqlParser\\\\Components\\\\AlterOperation\\:\\:\\$tableOptions type has no value type specified in iterable type array\\.$#" + count: 1 path: src/Components/AlterOperation.php - - message: "#^Property PhpMyAdmin\\\\SqlParser\\\\Components\\\\AlterOperation\\:\\:\\$field \\(PhpMyAdmin\\\\SqlParser\\\\Components\\\\Expression\\) in isset\\(\\) is not nullable\\.$#" + message: "#^Property PhpMyAdmin\\\\SqlParser\\\\Components\\\\AlterOperation\\:\\:\\$userOptions type has no value type specified in iterable type array\\.$#" count: 1 path: src/Components/AlterOperation.php - - message: "#^Property PhpMyAdmin\\\\SqlParser\\\\Components\\\\AlterOperation\\:\\:\\$options \\(PhpMyAdmin\\\\SqlParser\\\\Components\\\\OptionsArray\\) does not accept PhpMyAdmin\\\\SqlParser\\\\Components\\\\OptionsArray\\|null\\.$#" + message: "#^Property PhpMyAdmin\\\\SqlParser\\\\Components\\\\AlterOperation\\:\\:\\$viewOptions type has no value type specified in iterable type array\\.$#" count: 1 path: src/Components/AlterOperation.php @@ -156,7 +156,7 @@ parameters: path: src/Components/CaseExpression.php - - message: "#^Property PhpMyAdmin\\\\SqlParser\\\\Components\\\\CaseExpression\\:\\:\\$compare_values type has no value type specified in iterable type array\\.$#" + message: "#^Property PhpMyAdmin\\\\SqlParser\\\\Components\\\\CaseExpression\\:\\:\\$compareValues type has no value type specified in iterable type array\\.$#" count: 1 path: src/Components/CaseExpression.php @@ -191,12 +191,12 @@ parameters: path: src/Components/Condition.php - - message: "#^Property PhpMyAdmin\\\\SqlParser\\\\Components\\\\Condition\\:\\:\\$ALLOWED_KEYWORDS type has no value type specified in iterable type array\\.$#" + message: "#^Property PhpMyAdmin\\\\SqlParser\\\\Components\\\\Condition\\:\\:\\$allowedKeywords type has no value type specified in iterable type array\\.$#" count: 1 path: src/Components/Condition.php - - message: "#^Property PhpMyAdmin\\\\SqlParser\\\\Components\\\\Condition\\:\\:\\$DELIMITERS type has no value type specified in iterable type array\\.$#" + message: "#^Property PhpMyAdmin\\\\SqlParser\\\\Components\\\\Condition\\:\\:\\$delimiters type has no value type specified in iterable type array\\.$#" count: 1 path: src/Components/Condition.php @@ -226,7 +226,7 @@ parameters: path: src/Components/CreateDefinition.php - - message: "#^Property PhpMyAdmin\\\\SqlParser\\\\Components\\\\CreateDefinition\\:\\:\\$FIELD_OPTIONS type has no value type specified in iterable type array\\.$#" + message: "#^Property PhpMyAdmin\\\\SqlParser\\\\Components\\\\CreateDefinition\\:\\:\\$fieldOptions type has no value type specified in iterable type array\\.$#" count: 1 path: src/Components/CreateDefinition.php @@ -266,7 +266,7 @@ parameters: path: src/Components/DataType.php - - message: "#^Property PhpMyAdmin\\\\SqlParser\\\\Components\\\\DataType\\:\\:\\$DATA_TYPE_OPTIONS type has no value type specified in iterable type array\\.$#" + message: "#^Property PhpMyAdmin\\\\SqlParser\\\\Components\\\\DataType\\:\\:\\$dataTypeOptions type has no value type specified in iterable type array\\.$#" count: 1 path: src/Components/DataType.php @@ -311,13 +311,13 @@ parameters: path: src/Components/Expression.php - - message: "#^Property PhpMyAdmin\\\\SqlParser\\\\Components\\\\Expression\\:\\:\\$ALLOWED_KEYWORDS type has no value type specified in iterable type array\\.$#" - count: 1 + message: "#^Property PhpMyAdmin\\\\SqlParser\\\\Components\\\\Expression\\:\\:\\$alias \\(string\\|null\\) does not accept mixed\\.$#" + count: 3 path: src/Components/Expression.php - - message: "#^Property PhpMyAdmin\\\\SqlParser\\\\Components\\\\Expression\\:\\:\\$alias \\(string\\|null\\) does not accept mixed\\.$#" - count: 3 + message: "#^Property PhpMyAdmin\\\\SqlParser\\\\Components\\\\Expression\\:\\:\\$allowedKeywords type has no value type specified in iterable type array\\.$#" + count: 1 path: src/Components/Expression.php - @@ -481,22 +481,22 @@ parameters: path: src/Components/IntoKeyword.php - - message: "#^Property PhpMyAdmin\\\\SqlParser\\\\Components\\\\IntoKeyword\\:\\:\\$FIELDS_OPTIONS type has no value type specified in iterable type array\\.$#" + message: "#^Property PhpMyAdmin\\\\SqlParser\\\\Components\\\\IntoKeyword\\:\\:\\$columns type has no value type specified in iterable type array\\.$#" count: 1 path: src/Components/IntoKeyword.php - - message: "#^Property PhpMyAdmin\\\\SqlParser\\\\Components\\\\IntoKeyword\\:\\:\\$LINES_OPTIONS type has no value type specified in iterable type array\\.$#" + message: "#^Property PhpMyAdmin\\\\SqlParser\\\\Components\\\\IntoKeyword\\:\\:\\$dest \\(PhpMyAdmin\\\\SqlParser\\\\Components\\\\Expression\\|string\\|null\\) does not accept mixed\\.$#" count: 1 path: src/Components/IntoKeyword.php - - message: "#^Property PhpMyAdmin\\\\SqlParser\\\\Components\\\\IntoKeyword\\:\\:\\$columns type has no value type specified in iterable type array\\.$#" + message: "#^Property PhpMyAdmin\\\\SqlParser\\\\Components\\\\IntoKeyword\\:\\:\\$statementFieldsOptions type has no value type specified in iterable type array\\.$#" count: 1 path: src/Components/IntoKeyword.php - - message: "#^Property PhpMyAdmin\\\\SqlParser\\\\Components\\\\IntoKeyword\\:\\:\\$dest \\(PhpMyAdmin\\\\SqlParser\\\\Components\\\\Expression\\|string\\|null\\) does not accept mixed\\.$#" + message: "#^Property PhpMyAdmin\\\\SqlParser\\\\Components\\\\IntoKeyword\\:\\:\\$statementLinesOptions type has no value type specified in iterable type array\\.$#" count: 1 path: src/Components/IntoKeyword.php @@ -516,13 +516,13 @@ parameters: path: src/Components/JoinKeyword.php - - message: "#^Property PhpMyAdmin\\\\SqlParser\\\\Components\\\\JoinKeyword\\:\\:\\$JOINS type has no value type specified in iterable type array\\.$#" - count: 1 + message: "#^Property PhpMyAdmin\\\\SqlParser\\\\Components\\\\JoinKeyword\\:\\:\\$expr \\(PhpMyAdmin\\\\SqlParser\\\\Components\\\\Expression\\) does not accept PhpMyAdmin\\\\SqlParser\\\\Components\\\\Expression\\|null\\.$#" + count: 2 path: src/Components/JoinKeyword.php - - message: "#^Property PhpMyAdmin\\\\SqlParser\\\\Components\\\\JoinKeyword\\:\\:\\$expr \\(PhpMyAdmin\\\\SqlParser\\\\Components\\\\Expression\\) does not accept PhpMyAdmin\\\\SqlParser\\\\Components\\\\Expression\\|null\\.$#" - count: 2 + message: "#^Property PhpMyAdmin\\\\SqlParser\\\\Components\\\\JoinKeyword\\:\\:\\$joins type has no value type specified in iterable type array\\.$#" + count: 1 path: src/Components/JoinKeyword.php - @@ -581,7 +581,7 @@ parameters: path: src/Components/Key.php - - message: "#^Property PhpMyAdmin\\\\SqlParser\\\\Components\\\\Key\\:\\:\\$KEY_OPTIONS type has no value type specified in iterable type array\\.$#" + message: "#^Property PhpMyAdmin\\\\SqlParser\\\\Components\\\\Key\\:\\:\\$keyOptions type has no value type specified in iterable type array\\.$#" count: 1 path: src/Components/Key.php @@ -751,22 +751,22 @@ parameters: path: src/Components/PartitionDefinition.php - - message: "#^Property PhpMyAdmin\\\\SqlParser\\\\Components\\\\PartitionDefinition\\:\\:\\$OPTIONS type has no value type specified in iterable type array\\.$#" + message: "#^Property PhpMyAdmin\\\\SqlParser\\\\Components\\\\PartitionDefinition\\:\\:\\$expr \\(PhpMyAdmin\\\\SqlParser\\\\Components\\\\Expression\\|string\\) does not accept PhpMyAdmin\\\\SqlParser\\\\Components\\\\Expression\\|null\\.$#" count: 1 path: src/Components/PartitionDefinition.php - - message: "#^Property PhpMyAdmin\\\\SqlParser\\\\Components\\\\PartitionDefinition\\:\\:\\$expr \\(PhpMyAdmin\\\\SqlParser\\\\Components\\\\Expression\\|string\\) does not accept PhpMyAdmin\\\\SqlParser\\\\Components\\\\Expression\\|null\\.$#" + message: "#^Property PhpMyAdmin\\\\SqlParser\\\\Components\\\\PartitionDefinition\\:\\:\\$name \\(string\\) does not accept mixed\\.$#" count: 1 path: src/Components/PartitionDefinition.php - - message: "#^Property PhpMyAdmin\\\\SqlParser\\\\Components\\\\PartitionDefinition\\:\\:\\$name \\(string\\) does not accept mixed\\.$#" + message: "#^Property PhpMyAdmin\\\\SqlParser\\\\Components\\\\PartitionDefinition\\:\\:\\$options \\(PhpMyAdmin\\\\SqlParser\\\\Components\\\\OptionsArray\\) in empty\\(\\) is not falsy\\.$#" count: 1 path: src/Components/PartitionDefinition.php - - message: "#^Property PhpMyAdmin\\\\SqlParser\\\\Components\\\\PartitionDefinition\\:\\:\\$options \\(PhpMyAdmin\\\\SqlParser\\\\Components\\\\OptionsArray\\) in empty\\(\\) is not falsy\\.$#" + message: "#^Property PhpMyAdmin\\\\SqlParser\\\\Components\\\\PartitionDefinition\\:\\:\\$partitionOptions type has no value type specified in iterable type array\\.$#" count: 1 path: src/Components/PartitionDefinition.php @@ -806,17 +806,17 @@ parameters: path: src/Components/Reference.php - - message: "#^Property PhpMyAdmin\\\\SqlParser\\\\Components\\\\Reference\\:\\:\\$REFERENCES_OPTIONS type has no value type specified in iterable type array\\.$#" + message: "#^Property PhpMyAdmin\\\\SqlParser\\\\Components\\\\Reference\\:\\:\\$columns type has no value type specified in iterable type array\\.$#" count: 1 path: src/Components/Reference.php - - message: "#^Property PhpMyAdmin\\\\SqlParser\\\\Components\\\\Reference\\:\\:\\$columns type has no value type specified in iterable type array\\.$#" + message: "#^Property PhpMyAdmin\\\\SqlParser\\\\Components\\\\Reference\\:\\:\\$options \\(PhpMyAdmin\\\\SqlParser\\\\Components\\\\OptionsArray\\) does not accept PhpMyAdmin\\\\SqlParser\\\\Components\\\\OptionsArray\\|null\\.$#" count: 1 path: src/Components/Reference.php - - message: "#^Property PhpMyAdmin\\\\SqlParser\\\\Components\\\\Reference\\:\\:\\$options \\(PhpMyAdmin\\\\SqlParser\\\\Components\\\\OptionsArray\\) does not accept PhpMyAdmin\\\\SqlParser\\\\Components\\\\OptionsArray\\|null\\.$#" + message: "#^Property PhpMyAdmin\\\\SqlParser\\\\Components\\\\Reference\\:\\:\\$referencesOptions type has no value type specified in iterable type array\\.$#" count: 1 path: src/Components/Reference.php @@ -906,12 +906,12 @@ parameters: path: src/Context.php - - message: "#^Property PhpMyAdmin\\\\SqlParser\\\\Context\\:\\:\\$KEYWORDS type has no value type specified in iterable type array\\.$#" + message: "#^Property PhpMyAdmin\\\\SqlParser\\\\Context\\:\\:\\$keywords type has no value type specified in iterable type array\\.$#" count: 1 path: src/Context.php - - message: "#^Property PhpMyAdmin\\\\SqlParser\\\\Context\\:\\:\\$OPERATORS type has no value type specified in iterable type array\\.$#" + message: "#^Property PhpMyAdmin\\\\SqlParser\\\\Context\\:\\:\\$operators type has no value type specified in iterable type array\\.$#" count: 1 path: src/Context.php @@ -936,12 +936,12 @@ parameters: path: src/Lexer.php - - message: "#^Property PhpMyAdmin\\\\SqlParser\\\\Lexer\\:\\:\\$PARSER_METHODS type has no value type specified in iterable type array\\.$#" + message: "#^Property PhpMyAdmin\\\\SqlParser\\\\Lexer\\:\\:\\$delimiter \\(string\\) does not accept null\\.$#" count: 1 path: src/Lexer.php - - message: "#^Property PhpMyAdmin\\\\SqlParser\\\\Lexer\\:\\:\\$delimiter \\(string\\) does not accept null\\.$#" + message: "#^Property PhpMyAdmin\\\\SqlParser\\\\Lexer\\:\\:\\$parserMethods type has no value type specified in iterable type array\\.$#" count: 1 path: src/Lexer.php @@ -981,12 +981,12 @@ parameters: path: src/Parser.php - - message: "#^Property PhpMyAdmin\\\\SqlParser\\\\Parser\\:\\:\\$KEYWORD_PARSERS type has no value type specified in iterable type array\\.$#" + message: "#^Property PhpMyAdmin\\\\SqlParser\\\\Parser\\:\\:\\$keywordParsers type has no value type specified in iterable type array\\.$#" count: 1 path: src/Parser.php - - message: "#^Property PhpMyAdmin\\\\SqlParser\\\\Parser\\:\\:\\$STATEMENT_PARSERS type has no value type specified in iterable type array\\.$#" + message: "#^Property PhpMyAdmin\\\\SqlParser\\\\Parser\\:\\:\\$statementParsers type has no value type specified in iterable type array\\.$#" count: 1 path: src/Parser.php @@ -1006,17 +1006,17 @@ parameters: path: src/Statement.php - - message: "#^Property PhpMyAdmin\\\\SqlParser\\\\Statement\\:\\:\\$CLAUSES type has no value type specified in iterable type array\\.$#" + message: "#^Property PhpMyAdmin\\\\SqlParser\\\\Statement\\:\\:\\$clauses type has no value type specified in iterable type array\\.$#" count: 1 path: src/Statement.php - - message: "#^Property PhpMyAdmin\\\\SqlParser\\\\Statement\\:\\:\\$END_OPTIONS type has no value type specified in iterable type array\\.$#" + message: "#^Property PhpMyAdmin\\\\SqlParser\\\\Statement\\:\\:\\$statementEndOptions type has no value type specified in iterable type array\\.$#" count: 1 path: src/Statement.php - - message: "#^Property PhpMyAdmin\\\\SqlParser\\\\Statement\\:\\:\\$OPTIONS type has no value type specified in iterable type array\\.$#" + message: "#^Property PhpMyAdmin\\\\SqlParser\\\\Statement\\:\\:\\$statementOptions type has no value type specified in iterable type array\\.$#" count: 1 path: src/Statement.php @@ -1041,17 +1041,17 @@ parameters: path: src/Statements/AlterStatement.php - - message: "#^Property PhpMyAdmin\\\\SqlParser\\\\Statements\\\\AlterStatement\\:\\:\\$OPTIONS type has no value type specified in iterable type array\\.$#" + message: "#^Property PhpMyAdmin\\\\SqlParser\\\\Statements\\\\AlterStatement\\:\\:\\$statementOptions type has no value type specified in iterable type array\\.$#" count: 1 path: src/Statements/AlterStatement.php - - message: "#^Property PhpMyAdmin\\\\SqlParser\\\\Statements\\\\AnalyzeStatement\\:\\:\\$OPTIONS type has no value type specified in iterable type array\\.$#" + message: "#^Property PhpMyAdmin\\\\SqlParser\\\\Statements\\\\AnalyzeStatement\\:\\:\\$statementOptions type has no value type specified in iterable type array\\.$#" count: 1 path: src/Statements/AnalyzeStatement.php - - message: "#^Property PhpMyAdmin\\\\SqlParser\\\\Statements\\\\BackupStatement\\:\\:\\$OPTIONS type has no value type specified in iterable type array\\.$#" + message: "#^Property PhpMyAdmin\\\\SqlParser\\\\Statements\\\\BackupStatement\\:\\:\\$statementOptions type has no value type specified in iterable type array\\.$#" count: 1 path: src/Statements/BackupStatement.php @@ -1066,12 +1066,12 @@ parameters: path: src/Statements/CallStatement.php - - message: "#^Property PhpMyAdmin\\\\SqlParser\\\\Statements\\\\CheckStatement\\:\\:\\$OPTIONS type has no value type specified in iterable type array\\.$#" + message: "#^Property PhpMyAdmin\\\\SqlParser\\\\Statements\\\\CheckStatement\\:\\:\\$statementOptions type has no value type specified in iterable type array\\.$#" count: 1 path: src/Statements/CheckStatement.php - - message: "#^Property PhpMyAdmin\\\\SqlParser\\\\Statements\\\\ChecksumStatement\\:\\:\\$OPTIONS type has no value type specified in iterable type array\\.$#" + message: "#^Property PhpMyAdmin\\\\SqlParser\\\\Statements\\\\ChecksumStatement\\:\\:\\$statementOptions type has no value type specified in iterable type array\\.$#" count: 1 path: src/Statements/ChecksumStatement.php @@ -1111,47 +1111,47 @@ parameters: path: src/Statements/CreateStatement.php - - message: "#^Property PhpMyAdmin\\\\SqlParser\\\\Statements\\\\CreateStatement\\:\\:\\$DB_OPTIONS type has no value type specified in iterable type array\\.$#" + message: "#^Property PhpMyAdmin\\\\SqlParser\\\\Statements\\\\CreateStatement\\:\\:\\$databaseOptions type has no value type specified in iterable type array\\.$#" count: 1 path: src/Statements/CreateStatement.php - - message: "#^Property PhpMyAdmin\\\\SqlParser\\\\Statements\\\\CreateStatement\\:\\:\\$FUNC_OPTIONS type has no value type specified in iterable type array\\.$#" + message: "#^Property PhpMyAdmin\\\\SqlParser\\\\Statements\\\\CreateStatement\\:\\:\\$fields \\(array\\\\|PhpMyAdmin\\\\SqlParser\\\\Components\\\\ArrayObj\\|null\\) does not accept array\\\\|PhpMyAdmin\\\\SqlParser\\\\Components\\\\ArrayObj\\.$#" count: 1 path: src/Statements/CreateStatement.php - - message: "#^Property PhpMyAdmin\\\\SqlParser\\\\Statements\\\\CreateStatement\\:\\:\\$OPTIONS type has no value type specified in iterable type array\\.$#" + message: "#^Property PhpMyAdmin\\\\SqlParser\\\\Statements\\\\CreateStatement\\:\\:\\$functionOptions type has no value type specified in iterable type array\\.$#" count: 1 path: src/Statements/CreateStatement.php - - message: "#^Property PhpMyAdmin\\\\SqlParser\\\\Statements\\\\CreateStatement\\:\\:\\$TABLE_OPTIONS type has no value type specified in iterable type array\\.$#" + message: "#^Property PhpMyAdmin\\\\SqlParser\\\\Statements\\\\CreateStatement\\:\\:\\$partitions \\(array\\\\|null\\) does not accept array\\\\|PhpMyAdmin\\\\SqlParser\\\\Components\\\\ArrayObj\\.$#" count: 1 path: src/Statements/CreateStatement.php - - message: "#^Property PhpMyAdmin\\\\SqlParser\\\\Statements\\\\CreateStatement\\:\\:\\$TRIGGER_OPTIONS type has no value type specified in iterable type array\\.$#" + message: "#^Property PhpMyAdmin\\\\SqlParser\\\\Statements\\\\CreateStatement\\:\\:\\$partitionsNum \\(int\\|null\\) does not accept mixed\\.$#" count: 1 path: src/Statements/CreateStatement.php - - message: "#^Property PhpMyAdmin\\\\SqlParser\\\\Statements\\\\CreateStatement\\:\\:\\$fields \\(array\\\\|PhpMyAdmin\\\\SqlParser\\\\Components\\\\ArrayObj\\|null\\) does not accept array\\\\|PhpMyAdmin\\\\SqlParser\\\\Components\\\\ArrayObj\\.$#" + message: "#^Property PhpMyAdmin\\\\SqlParser\\\\Statements\\\\CreateStatement\\:\\:\\$statementOptions type has no value type specified in iterable type array\\.$#" count: 1 path: src/Statements/CreateStatement.php - - message: "#^Property PhpMyAdmin\\\\SqlParser\\\\Statements\\\\CreateStatement\\:\\:\\$partitions \\(array\\\\|null\\) does not accept array\\\\|PhpMyAdmin\\\\SqlParser\\\\Components\\\\ArrayObj\\.$#" + message: "#^Property PhpMyAdmin\\\\SqlParser\\\\Statements\\\\CreateStatement\\:\\:\\$subpartitionsNum \\(int\\|null\\) does not accept mixed\\.$#" count: 1 path: src/Statements/CreateStatement.php - - message: "#^Property PhpMyAdmin\\\\SqlParser\\\\Statements\\\\CreateStatement\\:\\:\\$partitionsNum \\(int\\|null\\) does not accept mixed\\.$#" + message: "#^Property PhpMyAdmin\\\\SqlParser\\\\Statements\\\\CreateStatement\\:\\:\\$tableOptions type has no value type specified in iterable type array\\.$#" count: 1 path: src/Statements/CreateStatement.php - - message: "#^Property PhpMyAdmin\\\\SqlParser\\\\Statements\\\\CreateStatement\\:\\:\\$subpartitionsNum \\(int\\|null\\) does not accept mixed\\.$#" + message: "#^Property PhpMyAdmin\\\\SqlParser\\\\Statements\\\\CreateStatement\\:\\:\\$triggerOptions type has no value type specified in iterable type array\\.$#" count: 1 path: src/Statements/CreateStatement.php @@ -1186,27 +1186,27 @@ parameters: path: src/Statements/DeleteStatement.php - - message: "#^Property PhpMyAdmin\\\\SqlParser\\\\Statements\\\\DeleteStatement\\:\\:\\$CLAUSES type has no value type specified in iterable type array\\.$#" + message: "#^Property PhpMyAdmin\\\\SqlParser\\\\Statements\\\\DeleteStatement\\:\\:\\$clauses type has no value type specified in iterable type array\\.$#" count: 1 path: src/Statements/DeleteStatement.php - - message: "#^Property PhpMyAdmin\\\\SqlParser\\\\Statements\\\\DeleteStatement\\:\\:\\$OPTIONS type has no value type specified in iterable type array\\.$#" + message: "#^Property PhpMyAdmin\\\\SqlParser\\\\Statements\\\\DeleteStatement\\:\\:\\$statementOptions type has no value type specified in iterable type array\\.$#" count: 1 path: src/Statements/DeleteStatement.php - - message: "#^Property PhpMyAdmin\\\\SqlParser\\\\Statements\\\\DropStatement\\:\\:\\$CLAUSES type has no value type specified in iterable type array\\.$#" + message: "#^Property PhpMyAdmin\\\\SqlParser\\\\Statements\\\\DropStatement\\:\\:\\$clauses type has no value type specified in iterable type array\\.$#" count: 1 path: src/Statements/DropStatement.php - - message: "#^Property PhpMyAdmin\\\\SqlParser\\\\Statements\\\\DropStatement\\:\\:\\$OPTIONS type has no value type specified in iterable type array\\.$#" + message: "#^Property PhpMyAdmin\\\\SqlParser\\\\Statements\\\\DropStatement\\:\\:\\$statementOptions type has no value type specified in iterable type array\\.$#" count: 1 path: src/Statements/DropStatement.php - - message: "#^Property PhpMyAdmin\\\\SqlParser\\\\Statements\\\\InsertStatement\\:\\:\\$OPTIONS type has no value type specified in iterable type array\\.$#" + message: "#^Property PhpMyAdmin\\\\SqlParser\\\\Statements\\\\InsertStatement\\:\\:\\$statementOptions type has no value type specified in iterable type array\\.$#" count: 1 path: src/Statements/InsertStatement.php @@ -1231,22 +1231,22 @@ parameters: path: src/Statements/LoadStatement.php - - message: "#^Property PhpMyAdmin\\\\SqlParser\\\\Statements\\\\LoadStatement\\:\\:\\$FIELDS_OPTIONS type has no value type specified in iterable type array\\.$#" + message: "#^Property PhpMyAdmin\\\\SqlParser\\\\Statements\\\\LoadStatement\\:\\:\\$partition \\(PhpMyAdmin\\\\SqlParser\\\\Components\\\\ArrayObj\\|null\\) does not accept array\\\\|PhpMyAdmin\\\\SqlParser\\\\Components\\\\ArrayObj\\.$#" count: 1 path: src/Statements/LoadStatement.php - - message: "#^Property PhpMyAdmin\\\\SqlParser\\\\Statements\\\\LoadStatement\\:\\:\\$LINES_OPTIONS type has no value type specified in iterable type array\\.$#" + message: "#^Property PhpMyAdmin\\\\SqlParser\\\\Statements\\\\LoadStatement\\:\\:\\$statementFieldsOptions type has no value type specified in iterable type array\\.$#" count: 1 path: src/Statements/LoadStatement.php - - message: "#^Property PhpMyAdmin\\\\SqlParser\\\\Statements\\\\LoadStatement\\:\\:\\$OPTIONS type has no value type specified in iterable type array\\.$#" + message: "#^Property PhpMyAdmin\\\\SqlParser\\\\Statements\\\\LoadStatement\\:\\:\\$statementLinesOptions type has no value type specified in iterable type array\\.$#" count: 1 path: src/Statements/LoadStatement.php - - message: "#^Property PhpMyAdmin\\\\SqlParser\\\\Statements\\\\LoadStatement\\:\\:\\$partition \\(PhpMyAdmin\\\\SqlParser\\\\Components\\\\ArrayObj\\|null\\) does not accept array\\\\|PhpMyAdmin\\\\SqlParser\\\\Components\\\\ArrayObj\\.$#" + message: "#^Property PhpMyAdmin\\\\SqlParser\\\\Statements\\\\LoadStatement\\:\\:\\$statementOptions type has no value type specified in iterable type array\\.$#" count: 1 path: src/Statements/LoadStatement.php @@ -1256,7 +1256,7 @@ parameters: path: src/Statements/MaintenanceStatement.php - - message: "#^Property PhpMyAdmin\\\\SqlParser\\\\Statements\\\\OptimizeStatement\\:\\:\\$OPTIONS type has no value type specified in iterable type array\\.$#" + message: "#^Property PhpMyAdmin\\\\SqlParser\\\\Statements\\\\OptimizeStatement\\:\\:\\$statementOptions type has no value type specified in iterable type array\\.$#" count: 1 path: src/Statements/OptimizeStatement.php @@ -1266,17 +1266,17 @@ parameters: path: src/Statements/PurgeStatement.php - - message: "#^Property PhpMyAdmin\\\\SqlParser\\\\Statements\\\\PurgeStatement\\:\\:\\$end_expr \\(string\\|null\\) does not accept PhpMyAdmin\\\\SqlParser\\\\Components\\\\Expression\\|null\\.$#" + message: "#^Property PhpMyAdmin\\\\SqlParser\\\\Statements\\\\PurgeStatement\\:\\:\\$endExpr \\(string\\|null\\) does not accept PhpMyAdmin\\\\SqlParser\\\\Components\\\\Expression\\|null\\.$#" count: 1 path: src/Statements/PurgeStatement.php - - message: "#^Property PhpMyAdmin\\\\SqlParser\\\\Statements\\\\PurgeStatement\\:\\:\\$end_option \\(string\\|null\\) does not accept mixed\\.$#" + message: "#^Property PhpMyAdmin\\\\SqlParser\\\\Statements\\\\PurgeStatement\\:\\:\\$endOption \\(string\\|null\\) does not accept mixed\\.$#" count: 1 path: src/Statements/PurgeStatement.php - - message: "#^Property PhpMyAdmin\\\\SqlParser\\\\Statements\\\\PurgeStatement\\:\\:\\$log_type \\(string\\|null\\) does not accept mixed\\.$#" + message: "#^Property PhpMyAdmin\\\\SqlParser\\\\Statements\\\\PurgeStatement\\:\\:\\$logType \\(string\\|null\\) does not accept mixed\\.$#" count: 1 path: src/Statements/PurgeStatement.php @@ -1286,7 +1286,7 @@ parameters: path: src/Statements/RenameStatement.php - - message: "#^Property PhpMyAdmin\\\\SqlParser\\\\Statements\\\\RepairStatement\\:\\:\\$OPTIONS type has no value type specified in iterable type array\\.$#" + message: "#^Property PhpMyAdmin\\\\SqlParser\\\\Statements\\\\RepairStatement\\:\\:\\$statementOptions type has no value type specified in iterable type array\\.$#" count: 1 path: src/Statements/RepairStatement.php @@ -1301,7 +1301,7 @@ parameters: path: src/Statements/ReplaceStatement.php - - message: "#^Property PhpMyAdmin\\\\SqlParser\\\\Statements\\\\ReplaceStatement\\:\\:\\$OPTIONS type has no value type specified in iterable type array\\.$#" + message: "#^Property PhpMyAdmin\\\\SqlParser\\\\Statements\\\\ReplaceStatement\\:\\:\\$statementOptions type has no value type specified in iterable type array\\.$#" count: 1 path: src/Statements/ReplaceStatement.php @@ -1311,7 +1311,7 @@ parameters: path: src/Statements/ReplaceStatement.php - - message: "#^Property PhpMyAdmin\\\\SqlParser\\\\Statements\\\\RestoreStatement\\:\\:\\$OPTIONS type has no value type specified in iterable type array\\.$#" + message: "#^Property PhpMyAdmin\\\\SqlParser\\\\Statements\\\\RestoreStatement\\:\\:\\$statementOptions type has no value type specified in iterable type array\\.$#" count: 1 path: src/Statements/RestoreStatement.php @@ -1321,12 +1321,12 @@ parameters: path: src/Statements/SelectStatement.php - - message: "#^Property PhpMyAdmin\\\\SqlParser\\\\Statements\\\\SelectStatement\\:\\:\\$CLAUSES type has no value type specified in iterable type array\\.$#" + message: "#^Property PhpMyAdmin\\\\SqlParser\\\\Statements\\\\SelectStatement\\:\\:\\$clauses type has no value type specified in iterable type array\\.$#" count: 1 path: src/Statements/SelectStatement.php - - message: "#^Property PhpMyAdmin\\\\SqlParser\\\\Statements\\\\SelectStatement\\:\\:\\$OPTIONS type has no value type specified in iterable type array\\.$#" + message: "#^Property PhpMyAdmin\\\\SqlParser\\\\Statements\\\\SelectStatement\\:\\:\\$statementOptions type has no value type specified in iterable type array\\.$#" count: 1 path: src/Statements/SelectStatement.php @@ -1351,22 +1351,22 @@ parameters: path: src/Statements/SetStatement.php - - message: "#^Property PhpMyAdmin\\\\SqlParser\\\\Statements\\\\SetStatement\\:\\:\\$CLAUSES type has no value type specified in iterable type array\\.$#" + message: "#^Property PhpMyAdmin\\\\SqlParser\\\\Statements\\\\SetStatement\\:\\:\\$clauses type has no value type specified in iterable type array\\.$#" count: 1 path: src/Statements/SetStatement.php - - message: "#^Property PhpMyAdmin\\\\SqlParser\\\\Statements\\\\SetStatement\\:\\:\\$END_OPTIONS type has no value type specified in iterable type array\\.$#" + message: "#^Property PhpMyAdmin\\\\SqlParser\\\\Statements\\\\SetStatement\\:\\:\\$statementEndOptions type has no value type specified in iterable type array\\.$#" count: 1 path: src/Statements/SetStatement.php - - message: "#^Property PhpMyAdmin\\\\SqlParser\\\\Statements\\\\SetStatement\\:\\:\\$OPTIONS type has no value type specified in iterable type array\\.$#" + message: "#^Property PhpMyAdmin\\\\SqlParser\\\\Statements\\\\SetStatement\\:\\:\\$statementOptions type has no value type specified in iterable type array\\.$#" count: 1 path: src/Statements/SetStatement.php - - message: "#^Property PhpMyAdmin\\\\SqlParser\\\\Statements\\\\ShowStatement\\:\\:\\$OPTIONS type has no value type specified in iterable type array\\.$#" + message: "#^Property PhpMyAdmin\\\\SqlParser\\\\Statements\\\\ShowStatement\\:\\:\\$statementOptions type has no value type specified in iterable type array\\.$#" count: 1 path: src/Statements/ShowStatement.php @@ -1391,22 +1391,22 @@ parameters: path: src/Statements/TransactionStatement.php - - message: "#^Property PhpMyAdmin\\\\SqlParser\\\\Statements\\\\TransactionStatement\\:\\:\\$OPTIONS type has no value type specified in iterable type array\\.$#" + message: "#^Property PhpMyAdmin\\\\SqlParser\\\\Statements\\\\TransactionStatement\\:\\:\\$statementOptions type has no value type specified in iterable type array\\.$#" count: 1 path: src/Statements/TransactionStatement.php - - message: "#^Property PhpMyAdmin\\\\SqlParser\\\\Statements\\\\TruncateStatement\\:\\:\\$OPTIONS type has no value type specified in iterable type array\\.$#" + message: "#^Property PhpMyAdmin\\\\SqlParser\\\\Statements\\\\TruncateStatement\\:\\:\\$statementOptions type has no value type specified in iterable type array\\.$#" count: 1 path: src/Statements/TruncateStatement.php - - message: "#^Property PhpMyAdmin\\\\SqlParser\\\\Statements\\\\UpdateStatement\\:\\:\\$CLAUSES type has no value type specified in iterable type array\\.$#" + message: "#^Property PhpMyAdmin\\\\SqlParser\\\\Statements\\\\UpdateStatement\\:\\:\\$clauses type has no value type specified in iterable type array\\.$#" count: 1 path: src/Statements/UpdateStatement.php - - message: "#^Property PhpMyAdmin\\\\SqlParser\\\\Statements\\\\UpdateStatement\\:\\:\\$OPTIONS type has no value type specified in iterable type array\\.$#" + message: "#^Property PhpMyAdmin\\\\SqlParser\\\\Statements\\\\UpdateStatement\\:\\:\\$statementOptions type has no value type specified in iterable type array\\.$#" count: 1 path: src/Statements/UpdateStatement.php @@ -1451,12 +1451,12 @@ parameters: path: src/Tools/ContextGenerator.php - - message: "#^Property PhpMyAdmin\\\\SqlParser\\\\Tools\\\\ContextGenerator\\:\\:\\$LABELS_FLAGS type has no value type specified in iterable type array\\.$#" + message: "#^Property PhpMyAdmin\\\\SqlParser\\\\Tools\\\\ContextGenerator\\:\\:\\$labelsFlags type has no value type specified in iterable type array\\.$#" count: 1 path: src/Tools/ContextGenerator.php - - message: "#^Property PhpMyAdmin\\\\SqlParser\\\\Tools\\\\ContextGenerator\\:\\:\\$LINKS type has no value type specified in iterable type array\\.$#" + message: "#^Property PhpMyAdmin\\\\SqlParser\\\\Tools\\\\ContextGenerator\\:\\:\\$links type has no value type specified in iterable type array\\.$#" count: 1 path: src/Tools/ContextGenerator.php @@ -1626,17 +1626,17 @@ parameters: path: src/Utils/Formatter.php - - message: "#^Property PhpMyAdmin\\\\SqlParser\\\\Utils\\\\Formatter\\:\\:\\$INLINE_CLAUSES type has no value type specified in iterable type array\\.$#" + message: "#^Property PhpMyAdmin\\\\SqlParser\\\\Utils\\\\Formatter\\:\\:\\$inlineClauses type has no value type specified in iterable type array\\.$#" count: 1 path: src/Utils/Formatter.php - - message: "#^Property PhpMyAdmin\\\\SqlParser\\\\Utils\\\\Formatter\\:\\:\\$SHORT_CLAUSES type has no value type specified in iterable type array\\.$#" + message: "#^Property PhpMyAdmin\\\\SqlParser\\\\Utils\\\\Formatter\\:\\:\\$options type has no value type specified in iterable type array\\.$#" count: 1 path: src/Utils/Formatter.php - - message: "#^Property PhpMyAdmin\\\\SqlParser\\\\Utils\\\\Formatter\\:\\:\\$options type has no value type specified in iterable type array\\.$#" + message: "#^Property PhpMyAdmin\\\\SqlParser\\\\Utils\\\\Formatter\\:\\:\\$shortClauses type has no value type specified in iterable type array\\.$#" count: 1 path: src/Utils/Formatter.php diff --git a/psalm-baseline.xml b/psalm-baseline.xml index da0569068..3651dcdf9 100644 --- a/psalm-baseline.xml +++ b/psalm-baseline.xml @@ -8,7 +8,7 @@ $arrayKey - Parser::$STATEMENT_PARSERS[$token->value] + Parser::$statementParsers[$token->value] $unknown @@ -88,7 +88,7 @@ $ret->alias - $component->compare_values[$i] + $component->compareValues[$i] $component->results[$i] $component->results[$i] $token->value @@ -108,10 +108,10 @@ $token->value - static::$ALLOWED_KEYWORDS[$token->value] + static::$allowedKeywords[$token->value] - static::$ALLOWED_KEYWORDS[$token->value] + static::$allowedKeywords[$token->value] string @@ -172,12 +172,12 @@ Context::escape($fields) - Parser::$STATEMENT_PARSERS[$token->keyword] - self::$ALLOWED_KEYWORDS[$token->keyword] + Parser::$statementParsers[$token->keyword] + self::$allowedKeywords[$token->keyword] - Parser::$STATEMENT_PARSERS[$token->keyword] - self::$ALLOWED_KEYWORDS[$token->keyword] + Parser::$statementParsers[$token->keyword] + self::$allowedKeywords[$token->keyword] $field @@ -293,8 +293,8 @@ ArrayObj::parse($parser, $list)->values - $component->fields_options - $component->lines_options + $component->fieldsOptions + $component->linesOptions $component->dest @@ -308,16 +308,16 @@ $this - static::$JOINS[$token->keyword] - static::$JOINS[$token->keyword] - static::$JOINS[$token->keyword] - static::$JOINS[$token->keyword] + static::$joins[$token->keyword] + static::$joins[$token->keyword] + static::$joins[$token->keyword] + static::$joins[$token->keyword] - static::$JOINS[$token->keyword] - static::$JOINS[$token->keyword] - static::$JOINS[$token->keyword] - static::$JOINS[$token->keyword] + static::$joins[$token->keyword] + static::$joins[$token->keyword] + static::$joins[$token->keyword] + static::$joins[$token->keyword] $expr->type @@ -327,14 +327,14 @@ $component - array_search($c->type, static::$JOINS) + array_search($c->type, static::$joins) ArrayObj::parse($parser, $list) - static::$JOINS - static::$JOINS + static::$joins + static::$joins $expr @@ -609,15 +609,15 @@ - $context::$KEYWORDS + $context::$keywords $value $value - self::$KEYWORDS - static::$MODE + self::$keywords + static::$mode int|null @@ -625,88 +625,88 @@ constant('static::SQL_MODE_' . $m) - static::$KEYWORDS[$str] + static::$keywords[$str] - static::$KEYWORDS[$str] - static::$OPERATORS[$str] + static::$keywords[$str] + static::$operators[$str] - $KEYWORDS + $keywords - $KEYWORDS + $keywords - $KEYWORDS + $keywords - $KEYWORDS + $keywords - $KEYWORDS + $keywords - $KEYWORDS + $keywords - $KEYWORDS + $keywords - $KEYWORDS + $keywords - $KEYWORDS + $keywords - $KEYWORDS + $keywords - $KEYWORDS + $keywords - $KEYWORDS + $keywords - $KEYWORDS + $keywords @@ -875,10 +875,10 @@ new $class($this, $this->list) - static::$STATEMENT_PARSERS[$token->keyword] + static::$statementParsers[$token->keyword] - static::$STATEMENT_PARSERS[$token->keyword] + static::$statementParsers[$token->keyword] $msg @@ -932,25 +932,25 @@ $clause[0] $clause[1] - Parser::$KEYWORD_PARSERS[$name]['class'] - Parser::$KEYWORD_PARSERS[$name]['field'] - Parser::$KEYWORD_PARSERS[$tokenValue]['class'] - Parser::$KEYWORD_PARSERS[$tokenValue]['field'] - Parser::$KEYWORD_PARSERS[$tokenValue]['options'] + Parser::$keywordParsers[$name]['class'] + Parser::$keywordParsers[$name]['field'] + Parser::$keywordParsers[$tokenValue]['class'] + Parser::$keywordParsers[$tokenValue]['field'] + Parser::$keywordParsers[$tokenValue]['options'] $parsedClauses[$token->value] $parsedClauses[$token->value] - Parser::$KEYWORD_PARSERS[$token->value] - Parser::$KEYWORD_PARSERS[$tokenValue] - Parser::$STATEMENT_PARSERS[$token->keyword] - Parser::$STATEMENT_PARSERS[$token->value] - static::$CLAUSES[$token->value] - static::$OPTIONS[$token->value] + Parser::$keywordParsers[$token->value] + Parser::$keywordParsers[$tokenValue] + Parser::$statementParsers[$token->keyword] + Parser::$statementParsers[$token->value] + static::$clauses[$token->value] + static::$statementOptions[$token->value] - Parser::$KEYWORD_PARSERS[$tokenValue] - Parser::$STATEMENT_PARSERS[$token->keyword] + Parser::$keywordParsers[$tokenValue] + Parser::$statementParsers[$token->keyword] $class @@ -1100,9 +1100,9 @@ ArrayObj::parse($parser, $list) - $this->fields_options - $this->file_name - $this->lines_rows + $this->fieldsOptions + $this->fileName + $this->linesRows $this->options $this->table @@ -1122,12 +1122,12 @@ Expression::parse($parser, $list, []) - $this->end_option - $this->log_type + $this->endOption + $this->logType - $this->end_expr - $this->log_type + $this->endExpr + $this->logType @@ -1150,7 +1150,7 @@ - $END_OPTIONS + $statementEndOptions @@ -1161,7 +1161,7 @@ $options - $this->end_options + $this->endOptions $this->set @@ -1374,22 +1374,22 @@ $newFormats[$j][$name] - JoinKeyword::$JOINS[$list->tokens[$list->idx - 2]->value] - JoinKeyword::$JOINS[$list->tokens[$list->idx - 4]->value] - JoinKeyword::$JOINS[$list->tokens[$list->idx - 6]->value] - JoinKeyword::$JOINS[$prev->value] - Parser::$KEYWORD_PARSERS[$token->keyword] - Parser::$STATEMENT_PARSERS[$token->keyword] - self::$INLINE_CLAUSES[$lastClause] - self::$INLINE_CLAUSES[$lastClause] - self::$SHORT_CLAUSES[$lastClause] + JoinKeyword::$joins[$list->tokens[$list->idx - 2]->value] + JoinKeyword::$joins[$list->tokens[$list->idx - 4]->value] + JoinKeyword::$joins[$list->tokens[$list->idx - 6]->value] + JoinKeyword::$joins[$prev->value] + Parser::$keywordParsers[$token->keyword] + Parser::$statementParsers[$token->keyword] + self::$inlineClauses[$lastClause] + self::$inlineClauses[$lastClause] + self::$shortClauses[$lastClause] - Parser::$KEYWORD_PARSERS[$token->keyword] - Parser::$STATEMENT_PARSERS[$token->keyword] - self::$INLINE_CLAUSES[$lastClause] - self::$INLINE_CLAUSES[$lastClause] - self::$SHORT_CLAUSES[$lastClause] + Parser::$keywordParsers[$token->keyword] + Parser::$statementParsers[$token->keyword] + self::$inlineClauses[$lastClause] + self::$inlineClauses[$lastClause] + self::$shortClauses[$lastClause] $blocksIndentation[] diff --git a/src/Components/AlterOperation.php b/src/Components/AlterOperation.php index e7fe68e4d..630a6785a 100644 --- a/src/Components/AlterOperation.php +++ b/src/Components/AlterOperation.php @@ -27,7 +27,7 @@ final class AlterOperation implements Component * * @var array */ - public static $DB_OPTIONS = [ + public static $databaseOptions = [ 'CHARACTER SET' => [ 1, 'var', @@ -63,7 +63,7 @@ final class AlterOperation implements Component * * @var array */ - public static $TABLE_OPTIONS = [ + public static $tableOptions = [ 'ENGINE' => [ 1, 'var=', @@ -136,7 +136,7 @@ final class AlterOperation implements Component * * @var array */ - public static $USER_OPTIONS = [ + public static $userOptions = [ 'ATTRIBUTE' => [ 1, 'var', @@ -176,7 +176,7 @@ final class AlterOperation implements Component * * @var array */ - public static $VIEW_OPTIONS = ['AS' => 1]; + public static $viewOptions = ['AS' => 1]; /** * Options of this operation. @@ -322,7 +322,7 @@ public static function parse(Parser $parser, TokensList $list, array $options = break; } } elseif (! self::checkIfTokenQuotedSymbol($token)) { - if (! empty(Parser::$STATEMENT_PARSERS[$token->value])) { + if (! empty(Parser::$statementParsers[$token->value])) { // We want to get the next non-comment and non-space token after $token // therefore, the first getNext call will start with the current $idx which's $token, // will return it and increase $idx by 1, which's not guaranteed to be non-comment @@ -347,8 +347,8 @@ public static function parse(Parser $parser, TokensList $list, array $options = break; } } elseif ( - (array_key_exists($arrayKey, self::$DB_OPTIONS) - || array_key_exists($arrayKey, self::$TABLE_OPTIONS)) + (array_key_exists($arrayKey, self::$databaseOptions) + || array_key_exists($arrayKey, self::$tableOptions)) && ! self::checkIfColumnDefinitionKeyword($arrayKey) ) { // This alter operation has finished, which means a comma diff --git a/src/Components/CaseExpression.php b/src/Components/CaseExpression.php index 2c9c92c94..5a962e4ce 100644 --- a/src/Components/CaseExpression.php +++ b/src/Components/CaseExpression.php @@ -46,14 +46,14 @@ final class CaseExpression implements Component * * @var array */ - public $compare_values = []; + public $compareValues = []; /** * The result in ELSE section of expr. * * @var Expression|null */ - public $else_result; + public $elseResult; /** * The alias of this CASE statement. @@ -123,7 +123,7 @@ public static function parse(Parser $parser, TokensList $list, array $options = break; case 'ELSE': ++$list->idx; // Skip 'ELSE' - $ret->else_result = Expression::parse($parser, $list); + $ret->elseResult = Expression::parse($parser, $list); $state = 0; // last clause of CASE expression break; case 'END': @@ -147,11 +147,11 @@ public static function parse(Parser $parser, TokensList $list, array $options = ++$list->idx; // Skip 'WHEN' $newValue = Expression::parse($parser, $list); $state = 2; - $ret->compare_values[] = $newValue; + $ret->compareValues[] = $newValue; break; case 'ELSE': ++$list->idx; // Skip 'ELSE' - $ret->else_result = Expression::parse($parser, $list); + $ret->elseResult = Expression::parse($parser, $list); $state = 0; // last clause of CASE expression break; case 'END': @@ -273,10 +273,10 @@ public static function build($component, array $options = []) if (isset($component->value)) { // Syntax type 0 $ret .= $component->value . ' '; - $valuesCount = count($component->compare_values); + $valuesCount = count($component->compareValues); $resultsCount = count($component->results); for ($i = 0; $i < $valuesCount && $i < $resultsCount; ++$i) { - $ret .= 'WHEN ' . $component->compare_values[$i] . ' '; + $ret .= 'WHEN ' . $component->compareValues[$i] . ' '; $ret .= 'THEN ' . $component->results[$i] . ' '; } } else { @@ -289,8 +289,8 @@ public static function build($component, array $options = []) } } - if (isset($component->else_result)) { - $ret .= 'ELSE ' . $component->else_result . ' '; + if (isset($component->elseResult)) { + $ret .= 'ELSE ' . $component->elseResult . ' '; } $ret .= 'END'; diff --git a/src/Components/Condition.php b/src/Components/Condition.php index 15d4f7a04..714b90bf0 100644 --- a/src/Components/Condition.php +++ b/src/Components/Condition.php @@ -27,7 +27,7 @@ final class Condition implements Component * * @var array */ - public static $DELIMITERS = [ + public static $delimiters = [ '&&', '||', 'AND', @@ -40,7 +40,7 @@ final class Condition implements Component * * @var array */ - public static $ALLOWED_KEYWORDS = [ + public static $allowedKeywords = [ 'ALL' => 1, 'AND' => 1, 'BETWEEN' => 1, @@ -146,7 +146,7 @@ public static function parse(Parser $parser, TokensList $list, array $options = } // Conditions are delimited by logical operators. - if (in_array($token->value, static::$DELIMITERS, true)) { + if (in_array($token->value, static::$delimiters, true)) { if ($betweenBefore && ($token->value === 'AND')) { // The syntax of keyword `BETWEEN` is hard-coded. $betweenBefore = false; @@ -177,7 +177,7 @@ public static function parse(Parser $parser, TokensList $list, array $options = $betweenBefore = true; } - if (($brackets === 0) && empty(static::$ALLOWED_KEYWORDS[$token->value])) { + if (($brackets === 0) && empty(static::$allowedKeywords[$token->value])) { break; } } diff --git a/src/Components/CreateDefinition.php b/src/Components/CreateDefinition.php index e73e731c1..516ff2ee3 100644 --- a/src/Components/CreateDefinition.php +++ b/src/Components/CreateDefinition.php @@ -31,7 +31,7 @@ final class CreateDefinition implements Component * * @var array */ - public static $FIELD_OPTIONS = [ + public static $fieldOptions = [ // Tells the `OptionsArray` to not sort the options. // See the note below. '_UNSORTED' => true, @@ -270,7 +270,7 @@ public static function parse(Parser $parser, TokensList $list, array $options = $expr->type = DataType::parse($parser, $list); $state = 3; } elseif ($state === 3) { - $expr->options = OptionsArray::parse($parser, $list, static::$FIELD_OPTIONS); + $expr->options = OptionsArray::parse($parser, $list, static::$fieldOptions); $state = 4; } elseif ($state === 4) { if ($token->type === Token::TYPE_KEYWORD && $token->keyword === 'REFERENCES') { diff --git a/src/Components/DataType.php b/src/Components/DataType.php index a16b2eeb6..c3810258d 100644 --- a/src/Components/DataType.php +++ b/src/Components/DataType.php @@ -27,7 +27,7 @@ final class DataType implements Component * * @var array */ - public static $DATA_TYPE_OPTIONS = [ + public static $dataTypeOptions = [ 'BINARY' => 1, 'CHARACTER SET' => [ 2, @@ -139,7 +139,7 @@ public static function parse(Parser $parser, TokensList $list, array $options = $parameters->raw : $parameters->values; } - $ret->options = OptionsArray::parse($parser, $list, static::$DATA_TYPE_OPTIONS); + $ret->options = OptionsArray::parse($parser, $list, static::$dataTypeOptions); ++$list->idx; break; } diff --git a/src/Components/Expression.php b/src/Components/Expression.php index 00cb318c0..0f284e2a8 100644 --- a/src/Components/Expression.php +++ b/src/Components/Expression.php @@ -31,7 +31,7 @@ final class Expression implements Component * * @var array */ - private static $ALLOWED_KEYWORDS = [ + private static $allowedKeywords = [ 'AS' => 1, 'DUAL' => 1, 'NULL' => 1, @@ -227,7 +227,7 @@ public static function parse(Parser $parser, TokensList $list, array $options = } if ($token->type === Token::TYPE_KEYWORD) { - if (($brackets > 0) && empty($ret->subquery) && ! empty(Parser::$STATEMENT_PARSERS[$token->keyword])) { + if (($brackets > 0) && empty($ret->subquery) && ! empty(Parser::$statementParsers[$token->keyword])) { // A `(` was previously found and this keyword is the // beginning of a statement, so this is a subquery. $ret->subquery = $token->keyword; @@ -238,7 +238,7 @@ public static function parse(Parser $parser, TokensList $list, array $options = ) { $isExpr = true; } elseif (($token->flags & Token::FLAG_KEYWORD_RESERVED) && ($brackets === 0)) { - if (empty(self::$ALLOWED_KEYWORDS[$token->keyword])) { + if (empty(self::$allowedKeywords[$token->keyword])) { // A reserved keyword that is not allowed in the // expression was found so the expression must have // ended and a new clause is starting. diff --git a/src/Components/IntoKeyword.php b/src/Components/IntoKeyword.php index 87aedb142..3bbed9c17 100644 --- a/src/Components/IntoKeyword.php +++ b/src/Components/IntoKeyword.php @@ -25,7 +25,7 @@ final class IntoKeyword implements Component * * @var array */ - public static $FIELDS_OPTIONS = [ + public static $statementFieldsOptions = [ 'TERMINATED BY' => [ 1, 'expr', @@ -46,7 +46,7 @@ final class IntoKeyword implements Component * * @var array */ - public static $LINES_OPTIONS = [ + public static $statementLinesOptions = [ 'STARTING BY' => [ 1, 'expr', @@ -88,27 +88,27 @@ final class IntoKeyword implements Component /** * Options for FIELDS/COLUMNS keyword. * - * @see static::$FIELDS_OPTIONS + * @see IntoKeyword::$statementFieldsOptions * * @var OptionsArray|null */ - public $fields_options; + public $fieldsOptions; /** * Whether to use `FIELDS` or `COLUMNS` while building. * * @var bool|null */ - public $fields_keyword; + public $fieldsKeyword; /** * Options for OPTIONS keyword. * - * @see static::$LINES_OPTIONS + * @see IntoKeyword::$statementLinesOptions * * @var OptionsArray|null */ - public $lines_options; + public $linesOptions; /** * @param string|null $type type of destination (may be OUTFILE) @@ -130,8 +130,8 @@ public function __construct( $this->dest = $dest; $this->columns = $columns; $this->values = $values; - $this->fields_options = $fieldsOptions; - $this->fields_keyword = $fieldsKeyword; + $this->fieldsOptions = $fieldsOptions; + $this->fieldsKeyword = $fieldsKeyword; } /** @@ -252,12 +252,12 @@ public function parseFileOptions(Parser $parser, TokensList $list, $keyword = 'F if ($keyword === 'FIELDS' || $keyword === 'COLUMNS') { // parse field options - $this->fields_options = OptionsArray::parse($parser, $list, static::$FIELDS_OPTIONS); + $this->fieldsOptions = OptionsArray::parse($parser, $list, static::$statementFieldsOptions); - $this->fields_keyword = ($keyword === 'FIELDS'); + $this->fieldsKeyword = ($keyword === 'FIELDS'); } else { // parse line options - $this->lines_options = OptionsArray::parse($parser, $list, static::$LINES_OPTIONS); + $this->linesOptions = OptionsArray::parse($parser, $list, static::$statementLinesOptions); } } @@ -281,13 +281,13 @@ public static function build($component, array $options = []) $ret = 'OUTFILE "' . $component->dest . '"'; - $fieldsOptionsString = OptionsArray::build($component->fields_options); + $fieldsOptionsString = OptionsArray::build($component->fieldsOptions); if (trim($fieldsOptionsString) !== '') { - $ret .= $component->fields_keyword ? ' FIELDS' : ' COLUMNS'; + $ret .= $component->fieldsKeyword ? ' FIELDS' : ' COLUMNS'; $ret .= ' ' . $fieldsOptionsString; } - $linesOptionsString = OptionsArray::build($component->lines_options, ['expr' => true]); + $linesOptionsString = OptionsArray::build($component->linesOptions, ['expr' => true]); if (trim($linesOptionsString) !== '') { $ret .= ' LINES ' . $linesOptionsString; } diff --git a/src/Components/JoinKeyword.php b/src/Components/JoinKeyword.php index 6b6f0ecea..fa7613647 100644 --- a/src/Components/JoinKeyword.php +++ b/src/Components/JoinKeyword.php @@ -25,7 +25,7 @@ final class JoinKeyword implements Component * * @var array */ - public static $JOINS = [ + public static $joins = [ 'CROSS JOIN' => 'CROSS', 'FULL JOIN' => 'FULL', 'FULL OUTER JOIN' => 'FULL', @@ -46,7 +46,7 @@ final class JoinKeyword implements Component /** * Type of this join. * - * @see static::$JOINS + * @see JoinKeyword::$joins * * @var string */ @@ -74,7 +74,7 @@ final class JoinKeyword implements Component public $using; /** - * @see JoinKeyword::$JOINS + * @see JoinKeyword::$joins * * @param string $type Join type * @param Expression $expr join expression @@ -146,11 +146,11 @@ public static function parse(Parser $parser, TokensList $list, array $options = } if ($state === 0) { - if (($token->type !== Token::TYPE_KEYWORD) || empty(static::$JOINS[$token->keyword])) { + if (($token->type !== Token::TYPE_KEYWORD) || empty(static::$joins[$token->keyword])) { break; } - $expr->type = static::$JOINS[$token->keyword]; + $expr->type = static::$joins[$token->keyword]; $state = 1; } elseif ($state === 1) { $expr->expr = Expression::parse($parser, $list, ['field' => 'table']); @@ -165,14 +165,14 @@ public static function parse(Parser $parser, TokensList $list, array $options = $state = 4; break; default: - if (empty(static::$JOINS[$token->keyword])) { + if (empty(static::$joins[$token->keyword])) { /* Next clause is starting */ break 2; } $ret[] = $expr; $expr = new static(); - $expr->type = static::$JOINS[$token->keyword]; + $expr->type = static::$joins[$token->keyword]; $state = 1; break; @@ -210,7 +210,7 @@ public static function build($component, array $options = []) { $ret = []; foreach ($component as $c) { - $ret[] = array_search($c->type, static::$JOINS) . ' ' . $c->expr + $ret[] = array_search($c->type, static::$joins) . ' ' . $c->expr . (! empty($c->on) ? ' ON ' . Condition::build($c->on) : '') . (! empty($c->using) diff --git a/src/Components/Key.php b/src/Components/Key.php index 3933fefa5..fd44886f2 100644 --- a/src/Components/Key.php +++ b/src/Components/Key.php @@ -28,7 +28,7 @@ final class Key implements Component * * @var array */ - public static $KEY_OPTIONS = [ + public static $keyOptions = [ 'KEY_BLOCK_SIZE' => [ 1, 'var=', @@ -224,7 +224,7 @@ public static function parse(Parser $parser, TokensList $list, array $options = $lastColumn['length'] = $token->value; } } elseif ($state === 4) { - $ret->options = OptionsArray::parse($parser, $list, static::$KEY_OPTIONS); + $ret->options = OptionsArray::parse($parser, $list, static::$keyOptions); ++$list->idx; break; } elseif ($state === 5) { diff --git a/src/Components/PartitionDefinition.php b/src/Components/PartitionDefinition.php index 91fa36de8..1789a690a 100644 --- a/src/Components/PartitionDefinition.php +++ b/src/Components/PartitionDefinition.php @@ -30,7 +30,7 @@ final class PartitionDefinition implements Component * * @var array */ - public static $OPTIONS = [ + public static $partitionOptions = [ 'STORAGE ENGINE' => [ 1, 'var', @@ -206,7 +206,7 @@ public static function parse(Parser $parser, TokensList $list, array $options = $state = 5; } elseif ($state === 5) { - $ret->options = OptionsArray::parse($parser, $list, static::$OPTIONS); + $ret->options = OptionsArray::parse($parser, $list, static::$partitionOptions); $state = 6; } elseif ($state === 6) { if (($token->type === Token::TYPE_OPERATOR) && ($token->value === '(')) { diff --git a/src/Components/Reference.php b/src/Components/Reference.php index 30ca643fe..2db0d4975 100644 --- a/src/Components/Reference.php +++ b/src/Components/Reference.php @@ -26,7 +26,7 @@ final class Reference implements Component * * @var array */ - public static $REFERENCES_OPTIONS = [ + public static $referencesOptions = [ 'MATCH' => [ 1, 'var', @@ -130,7 +130,7 @@ public static function parse(Parser $parser, TokensList $list, array $options = $ret->columns = ArrayObj::parse($parser, $list)->values; $state = 2; } elseif ($state === 2) { - $ret->options = OptionsArray::parse($parser, $list, static::$REFERENCES_OPTIONS); + $ret->options = OptionsArray::parse($parser, $list, static::$referencesOptions); ++$list->idx; break; } diff --git a/src/Context.php b/src/Context.php index 827d0266a..824a20ad7 100644 --- a/src/Context.php +++ b/src/Context.php @@ -31,23 +31,18 @@ abstract class Context { /** * The maximum length of a keyword. - * - * @see static::$TOKEN_KEYWORD */ public const KEYWORD_MAX_LENGTH = 30; /** * The maximum length of a label. * - * @see static::$TOKEN_LABEL * Ref: https://dev.mysql.com/doc/refman/5.7/en/statement-labels.html */ public const LABEL_MAX_LENGTH = 16; /** * The maximum length of an operator. - * - * @see static::$TOKEN_OPERATOR */ public const OPERATOR_MAX_LENGTH = 4; @@ -89,14 +84,14 @@ abstract class Context * * @var array */ - public static $KEYWORDS = []; + public static $keywords = []; /** * List of operators and their flags. * * @var array */ - public static $OPERATORS = [ + public static $operators = [ // Some operators (*, =) may have ambiguous flags, because they depend on // the context they are being used in. // For example: 1. SELECT * FROM table; # SQL specific (wildcard) @@ -149,7 +144,7 @@ abstract class Context * * @var int */ - public static $MODE = 0; + public static $mode = 0; /* * Server SQL Modes @@ -277,12 +272,12 @@ public static function isKeyword($str, $isReserved = false) { $str = strtoupper($str); - if (isset(static::$KEYWORDS[$str])) { - if ($isReserved && ! (static::$KEYWORDS[$str] & Token::FLAG_KEYWORD_RESERVED)) { + if (isset(static::$keywords[$str])) { + if ($isReserved && ! (static::$keywords[$str] & Token::FLAG_KEYWORD_RESERVED)) { return null; } - return static::$KEYWORDS[$str]; + return static::$keywords[$str]; } return null; @@ -300,11 +295,11 @@ public static function isKeyword($str, $isReserved = false) */ public static function isOperator($str) { - if (! isset(static::$OPERATORS[$str])) { + if (! isset(static::$operators[$str])) { return null; } - return static::$OPERATORS[$str]; + return static::$operators[$str]; } // ------------------------------------------------------------------------- @@ -512,7 +507,7 @@ public static function load($context = '') } self::$loadedContext = $context; - self::$KEYWORDS = $context::$KEYWORDS; + self::$keywords = $context::$keywords; } /** @@ -573,14 +568,14 @@ public static function loadClosest($context = '') */ public static function setMode($mode = '') { - static::$MODE = 0; + static::$mode = 0; if (empty($mode)) { return; } $mode = explode(',', $mode); foreach ($mode as $m) { - static::$MODE |= constant('static::SQL_MODE_' . $m); + static::$mode |= constant('static::SQL_MODE_' . $m); } } @@ -602,11 +597,11 @@ public static function escape($str, $quote = '`') return $str; } - if ((static::$MODE & self::SQL_MODE_NO_ENCLOSING_QUOTES) && (! static::isKeyword($str, true))) { + if ((static::$mode & self::SQL_MODE_NO_ENCLOSING_QUOTES) && (! static::isKeyword($str, true))) { return $str; } - if (static::$MODE & self::SQL_MODE_ANSI_QUOTES) { + if (static::$mode & self::SQL_MODE_ANSI_QUOTES) { $quote = '"'; } @@ -636,6 +631,6 @@ public static function hasMode($flag = null) return false; } - return (self::$MODE & $flag) === $flag; + return (self::$mode & $flag) === $flag; } } diff --git a/src/Contexts/ContextMariaDb100000.php b/src/Contexts/ContextMariaDb100000.php index e6955aa40..c7670a60a 100644 --- a/src/Contexts/ContextMariaDb100000.php +++ b/src/Contexts/ContextMariaDb100000.php @@ -29,7 +29,7 @@ class ContextMariaDb100000 extends Context * @var array * @phpstan-var non-empty-array */ - public static $KEYWORDS = [ + public static $keywords = [ 'AT' => 1, 'DO' => 1, 'IO' => 1, 'NO' => 1, 'XA' => 1, 'ANY' => 1, 'CPU' => 1, 'END' => 1, 'IPC' => 1, 'NDB' => 1, 'NEW' => 1, 'ONE' => 1, 'ROW' => 1, diff --git a/src/Contexts/ContextMariaDb100100.php b/src/Contexts/ContextMariaDb100100.php index fd4867bb7..e96f6a194 100644 --- a/src/Contexts/ContextMariaDb100100.php +++ b/src/Contexts/ContextMariaDb100100.php @@ -29,7 +29,7 @@ class ContextMariaDb100100 extends Context * @var array * @phpstan-var non-empty-array */ - public static $KEYWORDS = [ + public static $keywords = [ 'AT' => 1, 'DO' => 1, 'IO' => 1, 'NO' => 1, 'XA' => 1, 'ANY' => 1, 'CPU' => 1, 'END' => 1, 'IPC' => 1, 'NDB' => 1, 'NEW' => 1, 'ONE' => 1, 'ROW' => 1, 'XID' => 1, diff --git a/src/Contexts/ContextMariaDb100200.php b/src/Contexts/ContextMariaDb100200.php index f2f68df54..9bc352444 100644 --- a/src/Contexts/ContextMariaDb100200.php +++ b/src/Contexts/ContextMariaDb100200.php @@ -29,7 +29,7 @@ class ContextMariaDb100200 extends Context * @var array * @phpstan-var non-empty-array */ - public static $KEYWORDS = [ + public static $keywords = [ 'AT' => 1, 'DO' => 1, 'IO' => 1, 'NO' => 1, 'XA' => 1, 'ANY' => 1, 'CPU' => 1, 'END' => 1, 'IPC' => 1, 'NDB' => 1, 'NEW' => 1, 'ONE' => 1, 'ROW' => 1, 'XID' => 1, diff --git a/src/Contexts/ContextMariaDb100300.php b/src/Contexts/ContextMariaDb100300.php index 08b26f1ad..91c1c9e34 100644 --- a/src/Contexts/ContextMariaDb100300.php +++ b/src/Contexts/ContextMariaDb100300.php @@ -29,7 +29,7 @@ class ContextMariaDb100300 extends Context * @var array * @phpstan-var non-empty-array */ - public static $KEYWORDS = [ + public static $keywords = [ 'AT' => 1, 'DO' => 1, 'IO' => 1, 'NO' => 1, 'XA' => 1, 'ANY' => 1, 'CPU' => 1, 'END' => 1, 'IPC' => 1, 'NDB' => 1, 'NEW' => 1, 'ONE' => 1, 'ROW' => 1, 'XID' => 1, diff --git a/src/Contexts/ContextMariaDb100400.php b/src/Contexts/ContextMariaDb100400.php index 46513405e..0d1ba96c7 100644 --- a/src/Contexts/ContextMariaDb100400.php +++ b/src/Contexts/ContextMariaDb100400.php @@ -29,7 +29,7 @@ class ContextMariaDb100400 extends Context * @var array * @phpstan-var non-empty-array */ - public static $KEYWORDS = [ + public static $keywords = [ 'AT' => 1, 'DO' => 1, 'IO' => 1, 'NO' => 1, 'XA' => 1, 'ANY' => 1, 'CPU' => 1, 'END' => 1, 'IPC' => 1, 'NDB' => 1, 'NEW' => 1, 'ONE' => 1, 'ROW' => 1, 'XID' => 1, diff --git a/src/Contexts/ContextMariaDb100500.php b/src/Contexts/ContextMariaDb100500.php index 744b85d7a..9dfa3b63a 100644 --- a/src/Contexts/ContextMariaDb100500.php +++ b/src/Contexts/ContextMariaDb100500.php @@ -29,7 +29,7 @@ class ContextMariaDb100500 extends Context * @var array * @phpstan-var non-empty-array */ - public static $KEYWORDS = [ + public static $keywords = [ 'AT' => 1, 'DO' => 1, 'IO' => 1, 'NO' => 1, 'XA' => 1, 'ANY' => 1, 'CPU' => 1, 'END' => 1, 'IPC' => 1, 'NDB' => 1, 'NEW' => 1, 'ONE' => 1, 'ROW' => 1, 'XID' => 1, diff --git a/src/Contexts/ContextMariaDb100600.php b/src/Contexts/ContextMariaDb100600.php index 4691859da..4c0ddbe26 100644 --- a/src/Contexts/ContextMariaDb100600.php +++ b/src/Contexts/ContextMariaDb100600.php @@ -29,7 +29,7 @@ class ContextMariaDb100600 extends Context * @var array * @phpstan-var non-empty-array */ - public static $KEYWORDS = [ + public static $keywords = [ 'AT' => 1, 'DO' => 1, 'IO' => 1, 'NO' => 1, 'XA' => 1, 'ANY' => 1, 'CPU' => 1, 'END' => 1, 'IPC' => 1, 'NDB' => 1, 'NEW' => 1, 'ONE' => 1, 'ROW' => 1, 'XID' => 1, diff --git a/src/Contexts/ContextMySql50000.php b/src/Contexts/ContextMySql50000.php index f649fe4f3..73d7f6897 100644 --- a/src/Contexts/ContextMySql50000.php +++ b/src/Contexts/ContextMySql50000.php @@ -29,7 +29,7 @@ class ContextMySql50000 extends Context * @var array * @phpstan-var non-empty-array */ - public static $KEYWORDS = [ + public static $keywords = [ 'DO' => 1, 'IO' => 1, 'NO' => 1, 'XA' => 1, 'ANY' => 1, 'BDB' => 1, 'CPU' => 1, 'END' => 1, 'IPC' => 1, 'NDB' => 1, 'NEW' => 1, 'ONE' => 1, 'ROW' => 1, diff --git a/src/Contexts/ContextMySql50100.php b/src/Contexts/ContextMySql50100.php index 098344a89..df09f8696 100644 --- a/src/Contexts/ContextMySql50100.php +++ b/src/Contexts/ContextMySql50100.php @@ -29,7 +29,7 @@ class ContextMySql50100 extends Context * @var array * @phpstan-var non-empty-array */ - public static $KEYWORDS = [ + public static $keywords = [ 'AT' => 1, 'DO' => 1, 'IO' => 1, 'NO' => 1, 'XA' => 1, 'ANY' => 1, 'BDB' => 1, 'CPU' => 1, 'END' => 1, 'IPC' => 1, 'NDB' => 1, 'NEW' => 1, 'ONE' => 1, 'ROW' => 1, diff --git a/src/Contexts/ContextMySql50500.php b/src/Contexts/ContextMySql50500.php index e69c22556..e95455a21 100644 --- a/src/Contexts/ContextMySql50500.php +++ b/src/Contexts/ContextMySql50500.php @@ -29,7 +29,7 @@ class ContextMySql50500 extends Context * @var array * @phpstan-var non-empty-array */ - public static $KEYWORDS = [ + public static $keywords = [ 'AT' => 1, 'DO' => 1, 'IO' => 1, 'NO' => 1, 'XA' => 1, 'ANY' => 1, 'CPU' => 1, 'END' => 1, 'IPC' => 1, 'NDB' => 1, 'NEW' => 1, 'ONE' => 1, 'ROW' => 1, diff --git a/src/Contexts/ContextMySql50600.php b/src/Contexts/ContextMySql50600.php index 7e1cf3c99..87378acee 100644 --- a/src/Contexts/ContextMySql50600.php +++ b/src/Contexts/ContextMySql50600.php @@ -29,7 +29,7 @@ class ContextMySql50600 extends Context * @var array * @phpstan-var non-empty-array */ - public static $KEYWORDS = [ + public static $keywords = [ 'AT' => 1, 'DO' => 1, 'IO' => 1, 'NO' => 1, 'XA' => 1, 'ANY' => 1, 'CPU' => 1, 'END' => 1, 'IPC' => 1, 'NDB' => 1, 'NEW' => 1, 'ONE' => 1, 'ROW' => 1, diff --git a/src/Contexts/ContextMySql50700.php b/src/Contexts/ContextMySql50700.php index 6d06c4c01..ca560faf0 100644 --- a/src/Contexts/ContextMySql50700.php +++ b/src/Contexts/ContextMySql50700.php @@ -29,7 +29,7 @@ class ContextMySql50700 extends Context * @var array * @phpstan-var non-empty-array */ - public static $KEYWORDS = [ + public static $keywords = [ 'AT' => 1, 'DO' => 1, 'IO' => 1, 'NO' => 1, 'XA' => 1, 'ANY' => 1, 'CPU' => 1, 'END' => 1, 'IPC' => 1, 'NDB' => 1, 'NEW' => 1, 'ONE' => 1, 'ROW' => 1, 'XID' => 1, diff --git a/src/Contexts/ContextMySql80000.php b/src/Contexts/ContextMySql80000.php index e0babeaf2..ddf807d5a 100644 --- a/src/Contexts/ContextMySql80000.php +++ b/src/Contexts/ContextMySql80000.php @@ -29,7 +29,7 @@ class ContextMySql80000 extends Context * @var array * @phpstan-var non-empty-array */ - public static $KEYWORDS = [ + public static $keywords = [ 'AT' => 1, 'DO' => 1, 'IO' => 1, 'NO' => 1, 'XA' => 1, 'ANY' => 1, 'CPU' => 1, 'END' => 1, 'IPC' => 1, 'NDB' => 1, 'NEW' => 1, 'ONE' => 1, 'ROW' => 1, 'XID' => 1, diff --git a/src/Core.php b/src/Core.php index b3197a7ce..67cdd99e3 100644 --- a/src/Core.php +++ b/src/Core.php @@ -35,7 +35,7 @@ class Core public function __construct() { - if (Context::$KEYWORDS !== []) { + if (Context::$keywords !== []) { return; } diff --git a/src/Lexer.php b/src/Lexer.php index d6ea661ca..a772f2324 100644 --- a/src/Lexer.php +++ b/src/Lexer.php @@ -52,7 +52,7 @@ class Lexer extends Core * * @var array */ - public static $PARSER_METHODS = [ + public static $parserMethods = [ // It is best to put the parsers in order of their complexity // (ascending) and their occurrence rate (descending). // @@ -125,7 +125,7 @@ class Lexer extends Core * * @var string */ - public static $DEFAULT_DELIMITER = ';'; + public static $defaultDelimiter = ';'; /** * Statements delimiter. @@ -189,7 +189,7 @@ public function __construct($str, $strict = false, $delimiter = null) $this->strict = $strict; // Setting the delimiter. - $this->setDelimiter(! empty($delimiter) ? $delimiter : static::$DEFAULT_DELIMITER); + $this->setDelimiter(! empty($delimiter) ? $delimiter : static::$defaultDelimiter); $this->lex(); } @@ -240,7 +240,7 @@ public function lex() */ $token = null; - foreach (static::$PARSER_METHODS as $method) { + foreach (static::$parserMethods as $method) { $token = $this->$method(); if ($token) { diff --git a/src/Parser.php b/src/Parser.php index e40e2e0e0..a80b4f903 100644 --- a/src/Parser.php +++ b/src/Parser.php @@ -27,7 +27,7 @@ class Parser extends Core * * @var array */ - public static $STATEMENT_PARSERS = [ + public static $statementParsers = [ // MySQL Utility Statements 'DESCRIBE' => 'PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement', 'DESC' => 'PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement', @@ -101,7 +101,7 @@ class Parser extends Core * * @var array */ - public static $KEYWORD_PARSERS = [ + public static $keywordParsers = [ // This is not a proper keyword and was added here to help the // formatter. 'PARTITION BY' => [], @@ -115,7 +115,7 @@ class Parser extends Core ], '_END_OPTIONS' => [ 'class' => 'PhpMyAdmin\\SqlParser\\Components\\OptionsArray', - 'field' => 'end_options', + 'field' => 'endOptions', ], 'INTERSECT' => [ @@ -470,8 +470,8 @@ public function parse() } // Checking if it is a known statement that can be parsed. - if (empty(static::$STATEMENT_PARSERS[$token->keyword])) { - if (! isset(static::$STATEMENT_PARSERS[$token->keyword])) { + if (empty(static::$statementParsers[$token->keyword])) { + if (! isset(static::$statementParsers[$token->keyword])) { // A statement is considered recognized if the parser // is aware that it is a statement, but it does not have // a parser for it yet. @@ -489,7 +489,7 @@ public function parse() * * @var string */ - $class = static::$STATEMENT_PARSERS[$token->keyword]; + $class = static::$statementParsers[$token->keyword]; /** * Processed statement. diff --git a/src/Statement.php b/src/Statement.php index 48b40fa3a..e844c9a7e 100644 --- a/src/Statement.php +++ b/src/Statement.php @@ -45,7 +45,7 @@ abstract class Statement implements Stringable * * @var array */ - public static $OPTIONS = []; + public static $statementOptions = []; /** * The clauses of this statement, in order. @@ -59,15 +59,15 @@ abstract class Statement implements Stringable * * @var array */ - public static $CLAUSES = []; + public static $clauses = []; /** @var array */ - public static $END_OPTIONS = []; + public static $statementEndOptions = []; /** * The options of this query. * - * @see static::$OPTIONS + * @see Statement::$statementOptions * * @var OptionsArray|null */ @@ -144,7 +144,7 @@ public function build() /** * The type of the clause. * - * @see self::$CLAUSES + * @see Statement::$clauses * * @var int */ @@ -155,7 +155,7 @@ public function build() * * @var Component */ - $class = Parser::$KEYWORD_PARSERS[$name]['class']; + $class = Parser::$keywordParsers[$name]['class']; /** * The name of the field that is used as source for the builder. @@ -163,7 +163,7 @@ public function build() * * @var string */ - $field = Parser::$KEYWORD_PARSERS[$name]['field']; + $field = Parser::$keywordParsers[$name]['field']; // The field is empty, there is nothing to be built. if (empty($this->$field)) { @@ -223,7 +223,7 @@ public function parse(Parser $parser, TokensList $list) * For statements that do not have any options this is set to `true` by * default. */ - $parsedOptions = empty(static::$OPTIONS); + $parsedOptions = empty(static::$statementOptions); for (; $list->idx < $list->count; ++$list->idx) { /** @@ -313,10 +313,7 @@ public function parse(Parser $parser, TokensList $list) $options = []; // Looking for duplicated clauses. - if ( - ! empty(Parser::$KEYWORD_PARSERS[$token->value]) - || ! empty(Parser::$STATEMENT_PARSERS[$token->value]) - ) { + if (! empty(Parser::$keywordParsers[$token->value]) || ! empty(Parser::$statementParsers[$token->value])) { if (! empty($parsedClauses[$token->value])) { $parser->error('This type of clause was previously parsed.', $token); break; @@ -330,19 +327,19 @@ public function parse(Parser $parser, TokensList $list) // but it might be the beginning of a statement of truncate, // so let the value use the keyword field for truncate type. $tokenValue = in_array($token->keyword, ['TRUNCATE']) ? $token->keyword : $token->value; - if (! empty(Parser::$KEYWORD_PARSERS[$tokenValue]) && $list->idx < $list->count) { - $class = Parser::$KEYWORD_PARSERS[$tokenValue]['class']; - $field = Parser::$KEYWORD_PARSERS[$tokenValue]['field']; - if (! empty(Parser::$KEYWORD_PARSERS[$tokenValue]['options'])) { - $options = Parser::$KEYWORD_PARSERS[$tokenValue]['options']; + if (! empty(Parser::$keywordParsers[$tokenValue]) && $list->idx < $list->count) { + $class = Parser::$keywordParsers[$tokenValue]['class']; + $field = Parser::$keywordParsers[$tokenValue]['field']; + if (! empty(Parser::$keywordParsers[$tokenValue]['options'])) { + $options = Parser::$keywordParsers[$tokenValue]['options']; } } // Checking if this is the beginning of the statement. - if (! empty(Parser::$STATEMENT_PARSERS[$token->keyword])) { + if (! empty(Parser::$statementParsers[$token->keyword])) { if ( - ! empty(static::$CLAUSES) // Undefined for some statements. - && empty(static::$CLAUSES[$token->value]) + ! empty(static::$clauses) // Undefined for some statements. + && empty(static::$clauses[$token->value]) ) { // Some keywords (e.g. `SET`) may be the beginning of a // statement and a clause. @@ -357,12 +354,12 @@ public function parse(Parser $parser, TokensList $list) } if (! $parsedOptions) { - if (empty(static::$OPTIONS[$token->value])) { + if (empty(static::$statementOptions[$token->value])) { // Skipping keyword because if it is not a option. ++$list->idx; } - $this->options = OptionsArray::parse($parser, $list, static::$OPTIONS); + $this->options = OptionsArray::parse($parser, $list, static::$statementOptions); $parsedOptions = true; } } elseif ($class === null) { @@ -372,16 +369,16 @@ public function parse(Parser $parser, TokensList $list) || $token->value === 'LOCK IN SHARE MODE') ) { // Handle special end options in Select statement - // See Statements\SelectStatement::$END_OPTIONS - $this->end_options = OptionsArray::parse($parser, $list, static::$END_OPTIONS); + // See Statements\SelectStatement::$statementEndOptions + $this->endOptions = OptionsArray::parse($parser, $list, static::$statementEndOptions); } elseif ( $this instanceof Statements\SetStatement && ($token->value === 'COLLATE' || $token->value === 'DEFAULT') ) { // Handle special end options in SET statement - // See Statements\SetStatement::$END_OPTIONS - $this->end_options = OptionsArray::parse($parser, $list, static::$END_OPTIONS); + // See Statements\SetStatement::$statementEndOptions + $this->endOptions = OptionsArray::parse($parser, $list, static::$statementEndOptions); } else { // There is no parser for this keyword and isn't the beginning // of a statement (so no options) either. @@ -451,7 +448,7 @@ public function after(Parser $parser, TokensList $list, Token $token) */ public function getClauses() { - return static::$CLAUSES; + return static::$clauses; } /** diff --git a/src/Statements/AlterStatement.php b/src/Statements/AlterStatement.php index 891d52e7b..c352862e9 100644 --- a/src/Statements/AlterStatement.php +++ b/src/Statements/AlterStatement.php @@ -41,7 +41,7 @@ class AlterStatement extends Statement * * @var array */ - public static $OPTIONS = [ + public static $statementOptions = [ 'ONLINE' => 1, 'OFFLINE' => 1, 'IGNORE' => 2, @@ -64,7 +64,7 @@ class AlterStatement extends Statement public function parse(Parser $parser, TokensList $list) { ++$list->idx; // Skipping `ALTER`. - $this->options = OptionsArray::parse($parser, $list, static::$OPTIONS); + $this->options = OptionsArray::parse($parser, $list, static::$statementOptions); ++$list->idx; // Parsing affected table. @@ -110,13 +110,13 @@ public function parse(Parser $parser, TokensList $list) if ($state === 0) { $options = []; if ($this->options->has('DATABASE')) { - $options = AlterOperation::$DB_OPTIONS; + $options = AlterOperation::$databaseOptions; } elseif ($this->options->has('TABLE')) { - $options = AlterOperation::$TABLE_OPTIONS; + $options = AlterOperation::$tableOptions; } elseif ($this->options->has('VIEW')) { - $options = AlterOperation::$VIEW_OPTIONS; + $options = AlterOperation::$viewOptions; } elseif ($this->options->has('USER')) { - $options = AlterOperation::$USER_OPTIONS; + $options = AlterOperation::$userOptions; } $this->altered[] = AlterOperation::parse($parser, $list, $options); diff --git a/src/Statements/AnalyzeStatement.php b/src/Statements/AnalyzeStatement.php index eef3730aa..bbbbfbe5e 100644 --- a/src/Statements/AnalyzeStatement.php +++ b/src/Statements/AnalyzeStatement.php @@ -23,7 +23,7 @@ class AnalyzeStatement extends Statement * * @var array */ - public static $OPTIONS = [ + public static $statementOptions = [ 'TABLE' => 1, 'NO_WRITE_TO_BINLOG' => 2, diff --git a/src/Statements/BackupStatement.php b/src/Statements/BackupStatement.php index 1e2a4e554..6ba2f0c6a 100644 --- a/src/Statements/BackupStatement.php +++ b/src/Statements/BackupStatement.php @@ -19,7 +19,7 @@ class BackupStatement extends MaintenanceStatement * * @var array */ - public static $OPTIONS = [ + public static $statementOptions = [ 'TABLE' => 1, 'NO_WRITE_TO_BINLOG' => 2, diff --git a/src/Statements/CheckStatement.php b/src/Statements/CheckStatement.php index 4519dd6c8..ddc1f5d7d 100644 --- a/src/Statements/CheckStatement.php +++ b/src/Statements/CheckStatement.php @@ -19,7 +19,7 @@ class CheckStatement extends MaintenanceStatement * * @var array */ - public static $OPTIONS = [ + public static $statementOptions = [ 'TABLE' => 1, 'FOR UPGRADE' => 2, diff --git a/src/Statements/ChecksumStatement.php b/src/Statements/ChecksumStatement.php index 69f4ed1c0..dd8d85ca7 100644 --- a/src/Statements/ChecksumStatement.php +++ b/src/Statements/ChecksumStatement.php @@ -19,7 +19,7 @@ class ChecksumStatement extends MaintenanceStatement * * @var array */ - public static $OPTIONS = [ + public static $statementOptions = [ 'TABLE' => 1, 'QUICK' => 2, diff --git a/src/Statements/CreateStatement.php b/src/Statements/CreateStatement.php index 07675e22b..7470e8c95 100644 --- a/src/Statements/CreateStatement.php +++ b/src/Statements/CreateStatement.php @@ -32,7 +32,7 @@ class CreateStatement extends Statement * * @var array */ - public static $OPTIONS = [ + public static $statementOptions = [ // CREATE TABLE 'TEMPORARY' => 1, @@ -78,7 +78,7 @@ class CreateStatement extends Statement * * @var array */ - public static $DB_OPTIONS = [ + public static $databaseOptions = [ 'CHARACTER SET' => [ 1, 'var=', @@ -110,7 +110,7 @@ class CreateStatement extends Statement * * @var array */ - public static $TABLE_OPTIONS = [ + public static $tableOptions = [ 'ENGINE' => [ 1, 'var=', @@ -218,7 +218,7 @@ class CreateStatement extends Statement * * @var array */ - public static $FUNC_OPTIONS = [ + public static $functionOptions = [ 'NOT' => [ 2, 'var', @@ -270,7 +270,7 @@ class CreateStatement extends Statement * * @var array */ - public static $TRIGGER_OPTIONS = [ + public static $triggerOptions = [ 'BEFORE' => 1, 'AFTER' => 1, 'INSERT' => 2, @@ -292,9 +292,9 @@ class CreateStatement extends Statement * * Used by `CREATE TABLE`, `CREATE FUNCTION` and `CREATE PROCEDURE`. * - * @see static::$TABLE_OPTIONS - * @see static::$FUNC_OPTIONS - * @see static::$TRIGGER_OPTIONS + * @see CreateStatement::$tableOptions + * @see CreateStatement::$functionOptions + * @see CreateStatement::$triggerOptions * * @var OptionsArray|null */ @@ -532,7 +532,7 @@ public function parse(Parser $parser, TokensList $list) ++$list->idx; // Skipping `CREATE`. // Parsing options. - $this->options = OptionsArray::parse($parser, $list, static::$OPTIONS); + $this->options = OptionsArray::parse($parser, $list, static::$statementOptions); ++$list->idx; // Skipping last option. $isDatabase = $this->options->has('DATABASE') || $this->options->has('SCHEMA'); @@ -564,7 +564,7 @@ public function parse(Parser $parser, TokensList $list) } if ($isDatabase) { - $this->entityOptions = OptionsArray::parse($parser, $list, static::$DB_OPTIONS); + $this->entityOptions = OptionsArray::parse($parser, $list, static::$databaseOptions); } elseif ($this->options->has('TABLE')) { if (($token->type === Token::TYPE_KEYWORD) && ($token->keyword === 'SELECT')) { /* CREATE TABLE ... SELECT */ @@ -608,7 +608,7 @@ public function parse(Parser $parser, TokensList $list) ++$list->idx; - $this->entityOptions = OptionsArray::parse($parser, $list, static::$TABLE_OPTIONS); + $this->entityOptions = OptionsArray::parse($parser, $list, static::$tableOptions); /** * The field that is being filled (`partitionBy` or @@ -716,7 +716,7 @@ public function parse(Parser $parser, TokensList $list) ++$list->idx; - $this->entityOptions = OptionsArray::parse($parser, $list, static::$FUNC_OPTIONS); + $this->entityOptions = OptionsArray::parse($parser, $list, static::$functionOptions); ++$list->idx; for (; $list->idx < $list->count; ++$list->idx) { @@ -761,7 +761,7 @@ public function parse(Parser $parser, TokensList $list) } } elseif ($this->options->has('TRIGGER')) { // Parsing the time and the event. - $this->entityOptions = OptionsArray::parse($parser, $list, static::$TRIGGER_OPTIONS); + $this->entityOptions = OptionsArray::parse($parser, $list, static::$triggerOptions); ++$list->idx; $list->getNextOfTypeAndValue(Token::TYPE_KEYWORD, 'ON'); diff --git a/src/Statements/DeleteStatement.php b/src/Statements/DeleteStatement.php index 39a57587b..083ac3777 100644 --- a/src/Statements/DeleteStatement.php +++ b/src/Statements/DeleteStatement.php @@ -54,7 +54,7 @@ class DeleteStatement extends Statement * * @var array */ - public static $OPTIONS = [ + public static $statementOptions = [ 'LOW_PRIORITY' => 1, 'QUICK' => 2, 'IGNORE' => 3, @@ -63,11 +63,11 @@ class DeleteStatement extends Statement /** * The clauses of this statement, in order. * - * @see Statement::$CLAUSES + * @see Statement::$clauses * * @var array */ - public static $CLAUSES = [ + public static $clauses = [ 'DELETE' => [ 'DELETE', 2, @@ -206,7 +206,7 @@ public function parse(Parser $parser, TokensList $list) ++$list->idx; // Skipping `DELETE`. // parse any options if provided - $this->options = OptionsArray::parse($parser, $list, static::$OPTIONS); + $this->options = OptionsArray::parse($parser, $list, static::$statementOptions); ++$list->idx; /** diff --git a/src/Statements/DropStatement.php b/src/Statements/DropStatement.php index c70e2192c..80fc52ef0 100644 --- a/src/Statements/DropStatement.php +++ b/src/Statements/DropStatement.php @@ -20,7 +20,7 @@ class DropStatement extends Statement * * @var array */ - public static $OPTIONS = [ + public static $statementOptions = [ 'DATABASE' => 1, 'EVENT' => 1, 'FUNCTION' => 1, @@ -42,11 +42,11 @@ class DropStatement extends Statement /** * The clauses of this statement, in order. * - * @see Statement::$CLAUSES + * @see Statement::$clauses * * @var array */ - public static $CLAUSES = [ + public static $clauses = [ 'DROP' => [ 'DROP', 2, diff --git a/src/Statements/InsertStatement.php b/src/Statements/InsertStatement.php index 046f96ede..0936ae23a 100644 --- a/src/Statements/InsertStatement.php +++ b/src/Statements/InsertStatement.php @@ -61,7 +61,7 @@ class InsertStatement extends Statement * * @var array */ - public static $OPTIONS = [ + public static $statementOptions = [ 'LOW_PRIORITY' => 1, 'DELAYED' => 2, 'HIGH_PRIORITY' => 3, @@ -146,7 +146,7 @@ public function parse(Parser $parser, TokensList $list) ++$list->idx; // Skipping `INSERT`. // parse any options if provided - $this->options = OptionsArray::parse($parser, $list, static::$OPTIONS); + $this->options = OptionsArray::parse($parser, $list, static::$statementOptions); ++$list->idx; /** diff --git a/src/Statements/LoadStatement.php b/src/Statements/LoadStatement.php index ae710f74d..08d6f34e7 100644 --- a/src/Statements/LoadStatement.php +++ b/src/Statements/LoadStatement.php @@ -49,7 +49,7 @@ class LoadStatement extends Statement * * @var array */ - public static $OPTIONS = [ + public static $statementOptions = [ 'LOW_PRIORITY' => 1, 'CONCURRENT' => 1, 'LOCAL' => 2, @@ -60,7 +60,7 @@ class LoadStatement extends Statement * * @var array */ - public static $FIELDS_OPTIONS = [ + public static $statementFieldsOptions = [ 'TERMINATED BY' => [ 1, 'expr', @@ -81,7 +81,7 @@ class LoadStatement extends Statement * * @var array */ - public static $LINES_OPTIONS = [ + public static $statementLinesOptions = [ 'STARTING BY' => [ 1, 'expr', @@ -97,7 +97,7 @@ class LoadStatement extends Statement * * @var Expression|null */ - public $file_name; + public $fileName; /** * Table used as destination for this statement. @@ -118,39 +118,39 @@ class LoadStatement extends Statement * * @var Expression|null */ - public $charset_name; + public $charsetName; /** * Options for FIELDS/COLUMNS keyword. * - * @see static::$FIELDS_OPTIONS + * @see LoadStatement::$statementFieldsOptions * * @var OptionsArray|null */ - public $fields_options; + public $fieldsOptions; /** * Whether to use `FIELDS` or `COLUMNS` while building. * * @var string|null */ - public $fields_keyword; + public $fieldsKeyword; /** * Options for OPTIONS keyword. * - * @see static::$LINES_OPTIONS + * @see LoadStatement::$statementLinesOptions * * @var OptionsArray|null */ - public $lines_options; + public $linesOptions; /** * Column names or user variables. * * @var Expression[]|null */ - public $col_name_or_user_var; + public $columnNamesOrUserVariables; /** * SET clause's updated values(optional). @@ -164,21 +164,21 @@ class LoadStatement extends Statement * * @var Expression|null */ - public $ignore_number; + public $ignoreNumber; /** * REPLACE/IGNORE Keyword. * * @var string|null */ - public $replace_ignore; + public $replaceIgnore; /** * LINES/ROWS Keyword. * * @var string|null */ - public $lines_rows; + public $linesRows; /** * @return string @@ -186,10 +186,10 @@ class LoadStatement extends Statement public function build() { $ret = 'LOAD DATA ' . $this->options - . ' INFILE ' . $this->file_name; + . ' INFILE ' . $this->fileName; - if ($this->replace_ignore !== null) { - $ret .= ' ' . trim($this->replace_ignore); + if ($this->replaceIgnore !== null) { + $ret .= ' ' . trim($this->replaceIgnore); } $ret .= ' INTO TABLE ' . $this->table; @@ -198,24 +198,24 @@ public function build() $ret .= ' PARTITION ' . ArrayObj::build($this->partition); } - if ($this->charset_name !== null) { - $ret .= ' CHARACTER SET ' . $this->charset_name; + if ($this->charsetName !== null) { + $ret .= ' CHARACTER SET ' . $this->charsetName; } - if ($this->fields_keyword !== null) { - $ret .= ' ' . $this->fields_keyword . ' ' . $this->fields_options; + if ($this->fieldsKeyword !== null) { + $ret .= ' ' . $this->fieldsKeyword . ' ' . $this->fieldsOptions; } - if ($this->lines_options !== null && strlen((string) $this->lines_options) > 0) { - $ret .= ' LINES ' . $this->lines_options; + if ($this->linesOptions !== null && strlen((string) $this->linesOptions) > 0) { + $ret .= ' LINES ' . $this->linesOptions; } - if ($this->ignore_number !== null) { - $ret .= ' IGNORE ' . $this->ignore_number . ' ' . $this->lines_rows; + if ($this->ignoreNumber !== null) { + $ret .= ' IGNORE ' . $this->ignoreNumber . ' ' . $this->linesRows; } - if ($this->col_name_or_user_var !== null && count($this->col_name_or_user_var) > 0) { - $ret .= ' ' . ExpressionArray::build($this->col_name_or_user_var); + if ($this->columnNamesOrUserVariables !== null && count($this->columnNamesOrUserVariables) > 0) { + $ret .= ' ' . ExpressionArray::build($this->columnNamesOrUserVariables); } if ($this->set !== null && count($this->set) > 0) { @@ -234,7 +234,7 @@ public function parse(Parser $parser, TokensList $list) ++$list->idx; // Skipping `LOAD DATA`. // parse any options if provided - $this->options = OptionsArray::parse($parser, $list, static::$OPTIONS); + $this->options = OptionsArray::parse($parser, $list, static::$statementOptions); ++$list->idx; /** @@ -272,7 +272,7 @@ public function parse(Parser $parser, TokensList $list) } ++$list->idx; - $this->file_name = Expression::parse( + $this->fileName = Expression::parse( $parser, $list, ['parseField' => 'file'] @@ -281,7 +281,7 @@ public function parse(Parser $parser, TokensList $list) } elseif ($state === 1) { if ($token->type === Token::TYPE_KEYWORD) { if ($token->keyword === 'REPLACE' || $token->keyword === 'IGNORE') { - $this->replace_ignore = trim($token->keyword); + $this->replaceIgnore = trim($token->keyword); } elseif ($token->keyword === 'INTO') { $state = 2; } @@ -303,7 +303,7 @@ public function parse(Parser $parser, TokensList $list) break; } } elseif ($token->type === Token::TYPE_OPERATOR && $token->token === '(') { - $this->col_name_or_user_var + $this->columnNamesOrUserVariables = ExpressionArray::parse($parser, $list); $state = 7; } else { @@ -327,12 +327,12 @@ public function parseFileOptions(Parser $parser, TokensList $list, $keyword = 'F if ($keyword === 'FIELDS' || $keyword === 'COLUMNS') { // parse field options - $this->fields_options = OptionsArray::parse($parser, $list, static::$FIELDS_OPTIONS); + $this->fieldsOptions = OptionsArray::parse($parser, $list, static::$statementFieldsOptions); - $this->fields_keyword = $keyword; + $this->fieldsKeyword = $keyword; } else { // parse line options - $this->lines_options = OptionsArray::parse($parser, $list, static::$LINES_OPTIONS); + $this->linesOptions = OptionsArray::parse($parser, $list, static::$statementLinesOptions); } } @@ -360,7 +360,7 @@ public function parseKeywordsAccordingToState($parser, $list, $state) case 4: if ($token->keyword === 'CHARACTER SET') { ++$list->idx; - $this->charset_name = Expression::parse($parser, $list); + $this->charsetName = Expression::parse($parser, $list); return 5; } @@ -378,7 +378,7 @@ public function parseKeywordsAccordingToState($parser, $list, $state) if ($token->keyword === 'IGNORE') { ++$list->idx; - $this->ignore_number = Expression::parse($parser, $list); + $this->ignoreNumber = Expression::parse($parser, $list); $nextToken = $list->getNextOfType(Token::TYPE_KEYWORD); if ( @@ -386,7 +386,7 @@ public function parseKeywordsAccordingToState($parser, $list, $state) && (($nextToken->keyword === 'LINES') || ($nextToken->keyword === 'ROWS')) ) { - $this->lines_rows = $nextToken->token; + $this->linesRows = $nextToken->token; } return 7; diff --git a/src/Statements/MaintenanceStatement.php b/src/Statements/MaintenanceStatement.php index d3c0f281c..25e8765fb 100644 --- a/src/Statements/MaintenanceStatement.php +++ b/src/Statements/MaintenanceStatement.php @@ -44,7 +44,7 @@ public function after(Parser $parser, TokensList $list, Token $token) { // [some options] is going to be parsed first. // - // There is a parser specified in `Parser::$KEYWORD_PARSERS` + // There is a parser specified in `Parser::$keywordParsers` // which parses the name of the tables. // // Finally, we parse here [some more options] and that's all. @@ -53,7 +53,7 @@ public function after(Parser $parser, TokensList $list, Token $token) OptionsArray::parse( $parser, $list, - static::$OPTIONS + static::$statementOptions ) ); } diff --git a/src/Statements/OptimizeStatement.php b/src/Statements/OptimizeStatement.php index e661d5b18..9209e69ae 100644 --- a/src/Statements/OptimizeStatement.php +++ b/src/Statements/OptimizeStatement.php @@ -23,7 +23,7 @@ class OptimizeStatement extends Statement * * @var array */ - public static $OPTIONS = [ + public static $statementOptions = [ 'TABLE' => 1, 'NO_WRITE_TO_BINLOG' => 2, diff --git a/src/Statements/PurgeStatement.php b/src/Statements/PurgeStatement.php index f825823d3..1b325c24f 100644 --- a/src/Statements/PurgeStatement.php +++ b/src/Statements/PurgeStatement.php @@ -29,29 +29,29 @@ class PurgeStatement extends Statement * * @var string|null */ - public $log_type; + public $logType; /** * The end option of this query. * * @var string|null */ - public $end_option; + public $endOption; /** * The end expr of this query. * * @var string|null */ - public $end_expr; + public $endExpr; /** * @return string */ public function build() { - $ret = 'PURGE ' . $this->log_type . ' LOGS ' - . ($this->end_option !== null ? ($this->end_option . ' ' . $this->end_expr) : ''); + $ret = 'PURGE ' . $this->logType . ' LOGS ' + . ($this->endOption !== null ? ($this->endOption . ' ' . $this->endExpr) : ''); return trim($ret); } @@ -91,7 +91,7 @@ public function parse(Parser $parser, TokensList $list) switch ($state) { case 0: // parse `{ BINARY | MASTER }` - $this->log_type = self::parseExpectedKeyword($parser, $token, ['BINARY', 'MASTER']); + $this->logType = self::parseExpectedKeyword($parser, $token, ['BINARY', 'MASTER']); break; case 1: // parse `LOGS` @@ -99,11 +99,11 @@ public function parse(Parser $parser, TokensList $list) break; case 2: // parse `{ TO | BEFORE }` - $this->end_option = self::parseExpectedKeyword($parser, $token, ['TO', 'BEFORE']); + $this->endOption = self::parseExpectedKeyword($parser, $token, ['TO', 'BEFORE']); break; case 3: // parse `expr` - $this->end_expr = Expression::parse($parser, $list, []); + $this->endExpr = Expression::parse($parser, $list, []); break; default: $parser->error('Unexpected token.', $token); diff --git a/src/Statements/RepairStatement.php b/src/Statements/RepairStatement.php index bdbc40dbc..cf3558ed1 100644 --- a/src/Statements/RepairStatement.php +++ b/src/Statements/RepairStatement.php @@ -21,7 +21,7 @@ class RepairStatement extends MaintenanceStatement * * @var array */ - public static $OPTIONS = [ + public static $statementOptions = [ 'TABLE' => 1, 'NO_WRITE_TO_BINLOG' => 2, diff --git a/src/Statements/ReplaceStatement.php b/src/Statements/ReplaceStatement.php index 6b3814d8b..744b259d4 100644 --- a/src/Statements/ReplaceStatement.php +++ b/src/Statements/ReplaceStatement.php @@ -48,7 +48,7 @@ class ReplaceStatement extends Statement * * @var array */ - public static $OPTIONS = [ + public static $statementOptions = [ 'LOW_PRIORITY' => 1, 'DELAYED' => 1, ]; @@ -113,7 +113,7 @@ public function parse(Parser $parser, TokensList $list) ++$list->idx; // Skipping `REPLACE`. // parse any options if provided - $this->options = OptionsArray::parse($parser, $list, static::$OPTIONS); + $this->options = OptionsArray::parse($parser, $list, static::$statementOptions); ++$list->idx; diff --git a/src/Statements/RestoreStatement.php b/src/Statements/RestoreStatement.php index 186d7c714..cc660165a 100644 --- a/src/Statements/RestoreStatement.php +++ b/src/Statements/RestoreStatement.php @@ -19,7 +19,7 @@ class RestoreStatement extends MaintenanceStatement * * @var array */ - public static $OPTIONS = [ + public static $statementOptions = [ 'TABLE' => 1, 'FROM' => [ diff --git a/src/Statements/SelectStatement.php b/src/Statements/SelectStatement.php index 944eb0b1b..3d45db1de 100644 --- a/src/Statements/SelectStatement.php +++ b/src/Statements/SelectStatement.php @@ -55,7 +55,7 @@ class SelectStatement extends Statement * * @var array */ - public static $OPTIONS = [ + public static $statementOptions = [ 'ALL' => 1, 'DISTINCT' => 1, 'DISTINCTROW' => 1, @@ -74,7 +74,7 @@ class SelectStatement extends Statement ]; /** @var array */ - public static $END_OPTIONS = [ + public static $statementEndOptions = [ 'FOR UPDATE' => 1, 'LOCK IN SHARE MODE' => 1, ]; @@ -82,11 +82,11 @@ class SelectStatement extends Statement /** * The clauses of this statement, in order. * - * @see Statement::$CLAUSES + * @see Statement::$clauses * * @var array */ - public static $CLAUSES = [ + public static $clauses = [ 'SELECT' => [ 'SELECT', 2, @@ -239,7 +239,7 @@ class SelectStatement extends Statement * * @var IndexHint[]|null */ - public $index_hints; + public $indexHints; /** * Partitions used as source for this statement. @@ -314,11 +314,11 @@ class SelectStatement extends Statement /** * The end options of this query. * - * @see static::$END_OPTIONS + * @see SelectStatement::$statementEndOptions * * @var OptionsArray|null */ - public $end_options; + public $endOptions; /** * Gets the clauses of this statement. @@ -331,7 +331,7 @@ public function getClauses() // The `ORDER BY` and `LIMIT` clauses should be at the end of the // statement. if (! empty($this->union)) { - $clauses = static::$CLAUSES; + $clauses = static::$clauses; unset($clauses['ORDER BY'], $clauses['LIMIT']); $clauses['ORDER BY'] = [ 'ORDER BY', @@ -345,6 +345,6 @@ public function getClauses() return $clauses; } - return static::$CLAUSES; + return static::$clauses; } } diff --git a/src/Statements/SetStatement.php b/src/Statements/SetStatement.php index 99b86dbf9..80056bec7 100644 --- a/src/Statements/SetStatement.php +++ b/src/Statements/SetStatement.php @@ -21,11 +21,11 @@ class SetStatement extends Statement /** * The clauses of this statement, in order. * - * @see Statement::$CLAUSES + * @see Statement::$clauses * * @var array */ - public static $CLAUSES = [ + public static $clauses = [ 'SET' => [ 'SET', 3, @@ -41,7 +41,7 @@ class SetStatement extends Statement * * @var array */ - public static $OPTIONS = [ + public static $statementOptions = [ 'CHARSET' => [ 3, 'var', @@ -69,7 +69,7 @@ class SetStatement extends Statement ]; /** @var array */ - public static $END_OPTIONS = [ + public static $statementEndOptions = [ 'COLLATE' => [ 1, 'var', @@ -87,11 +87,11 @@ class SetStatement extends Statement /** * The end options of this query. * - * @see static::$END_OPTIONS + * @see SetStatement::$statementEndOptions * * @var OptionsArray|null */ - public $end_options; + public $endOptions; /** * The updated values. @@ -107,7 +107,7 @@ public function build() { $ret = 'SET ' . OptionsArray::build($this->options) . ' ' . SetOperation::build($this->set) - . ' ' . OptionsArray::build($this->end_options); + . ' ' . OptionsArray::build($this->endOptions); return trim($ret); } diff --git a/src/Statements/ShowStatement.php b/src/Statements/ShowStatement.php index 15ce49959..165e61c14 100644 --- a/src/Statements/ShowStatement.php +++ b/src/Statements/ShowStatement.php @@ -17,7 +17,7 @@ class ShowStatement extends NotImplementedStatement * * @var array */ - public static $OPTIONS = [ + public static $statementOptions = [ 'CREATE' => 1, 'AUTHORS' => 2, 'BINARY' => 2, diff --git a/src/Statements/TransactionStatement.php b/src/Statements/TransactionStatement.php index f28b1611a..7b32bc25f 100644 --- a/src/Statements/TransactionStatement.php +++ b/src/Statements/TransactionStatement.php @@ -53,7 +53,7 @@ class TransactionStatement extends Statement * * @var array */ - public static $OPTIONS = [ + public static $statementOptions = [ 'START TRANSACTION' => 1, 'BEGIN' => 1, 'COMMIT' => 1, diff --git a/src/Statements/TruncateStatement.php b/src/Statements/TruncateStatement.php index 7c1932903..92e6ce268 100644 --- a/src/Statements/TruncateStatement.php +++ b/src/Statements/TruncateStatement.php @@ -20,7 +20,7 @@ class TruncateStatement extends Statement * * @var array */ - public static $OPTIONS = ['TABLE' => 1]; + public static $statementOptions = ['TABLE' => 1]; /** * The name of the truncated table. diff --git a/src/Statements/UpdateStatement.php b/src/Statements/UpdateStatement.php index 1036213b2..dfc26fb74 100644 --- a/src/Statements/UpdateStatement.php +++ b/src/Statements/UpdateStatement.php @@ -36,7 +36,7 @@ class UpdateStatement extends Statement * * @var array */ - public static $OPTIONS = [ + public static $statementOptions = [ 'LOW_PRIORITY' => 1, 'IGNORE' => 2, ]; @@ -44,11 +44,11 @@ class UpdateStatement extends Statement /** * The clauses of this statement, in order. * - * @see Statement::$CLAUSES + * @see Statement::$clauses * * @var array */ - public static $CLAUSES = [ + public static $clauses = [ 'UPDATE' => [ 'UPDATE', 2, diff --git a/src/Statements/WithStatement.php b/src/Statements/WithStatement.php index a2fddb2da..d581b0221 100644 --- a/src/Statements/WithStatement.php +++ b/src/Statements/WithStatement.php @@ -32,16 +32,16 @@ final class WithStatement extends Statement * * @var mixed[] */ - public static $OPTIONS = ['RECURSIVE' => 1]; + public static $statementOptions = ['RECURSIVE' => 1]; /** * The clauses of this statement, in order. * - * @see Statement::$CLAUSES + * @see Statement::$clauses * * @var mixed[] */ - public static $CLAUSES = [ + public static $clauses = [ 'WITH' => [ 'WITH', 2, @@ -100,7 +100,7 @@ public function parse(Parser $parser, TokensList $list) ++$list->idx; // Skipping `WITH`. // parse any options if provided - $this->options = OptionsArray::parse($parser, $list, static::$OPTIONS); + $this->options = OptionsArray::parse($parser, $list, static::$statementOptions); ++$list->idx; for (; $list->idx < $list->count; ++$list->idx) { diff --git a/src/Tools/ContextGenerator.php b/src/Tools/ContextGenerator.php index 52723fb06..64db23015 100644 --- a/src/Tools/ContextGenerator.php +++ b/src/Tools/ContextGenerator.php @@ -42,7 +42,7 @@ class ContextGenerator * * @var array */ - public static $LABELS_FLAGS = [ + public static $labelsFlags = [ '(R)' => 2, // reserved '(D)' => 8, // data type '(K)' => 16, // keyword @@ -54,7 +54,7 @@ class ContextGenerator * * @var array */ - public static $LINKS = [ + public static $links = [ 'MySql50000' => 'https://dev.mysql.com/doc/refman/5.0/en/keywords.html', 'MySql50100' => 'https://dev.mysql.com/doc/refman/5.1/en/keywords.html', 'MySql50500' => 'https://dev.mysql.com/doc/refman/5.5/en/keywords.html', @@ -111,7 +111,7 @@ class %2$s extends Context * @var array * @phpstan-var non-empty-array */ - public static $KEYWORDS = [ + public static $keywords = [ %4$s ]; } @@ -158,7 +158,7 @@ public static function readWords(array $files) $value = trim($words[$i]); // Reserved, data types, keys, functions, etc. keywords. - foreach (static::$LABELS_FLAGS as $label => $flags) { + foreach (static::$labelsFlags as $label => $flags) { if (strstr($value, $label) === false) { continue; } @@ -364,7 +364,7 @@ public static function build($input, $output) [ 'name' => $formattedName, 'class' => $class, - 'link' => static::$LINKS[$name], + 'link' => static::$links[$name], 'keywords' => static::readWords( [ $directory . '_common.txt', diff --git a/src/Utils/Formatter.php b/src/Utils/Formatter.php index 6162e24f8..c5f4ab1cd 100644 --- a/src/Utils/Formatter.php +++ b/src/Utils/Formatter.php @@ -57,7 +57,7 @@ class Formatter * * @var array */ - public static $SHORT_CLAUSES = [ + public static $shortClauses = [ 'CREATE' => true, 'INSERT' => true, ]; @@ -69,7 +69,7 @@ class Formatter * * @var array */ - public static $INLINE_CLAUSES = [ + public static $inlineClauses = [ 'CREATE' => true, 'INTO' => true, 'LIMIT' => true, @@ -428,7 +428,7 @@ public function formatList($list) if ( $this->options['parts_newline'] && ! $formattedOptions - && empty(self::$INLINE_CLAUSES[$lastClause]) + && empty(self::$inlineClauses[$lastClause]) && ( $curr->type !== Token::TYPE_KEYWORD || ( @@ -448,7 +448,7 @@ public function formatList($list) if ($isClause) { if ( ($isClause === 2 || $this->options['clause_newline']) - && empty(self::$SHORT_CLAUSES[$lastClause]) + && empty(self::$shortClauses[$lastClause]) ) { $lineEnded = true; if ($this->options['parts_newline'] && $indent > 0) { @@ -459,11 +459,11 @@ public function formatList($list) // Inline JOINs if ( - ($prev->type === Token::TYPE_KEYWORD && isset(JoinKeyword::$JOINS[$prev->value])) + ($prev->type === Token::TYPE_KEYWORD && isset(JoinKeyword::$joins[$prev->value])) || (in_array($curr->value, ['ON', 'USING'], true) - && isset(JoinKeyword::$JOINS[$list->tokens[$list->idx - 2]->value])) - || isset($list->tokens[$list->idx - 4], JoinKeyword::$JOINS[$list->tokens[$list->idx - 4]->value]) - || isset($list->tokens[$list->idx - 6], JoinKeyword::$JOINS[$list->tokens[$list->idx - 6]->value]) + && isset(JoinKeyword::$joins[$list->tokens[$list->idx - 2]->value])) + || isset($list->tokens[$list->idx - 4], JoinKeyword::$joins[$list->tokens[$list->idx - 4]->value]) + || isset($list->tokens[$list->idx - 6], JoinKeyword::$joins[$list->tokens[$list->idx - 6]->value]) ) { $lineEnded = false; } @@ -486,7 +486,7 @@ public function formatList($list) if ( end($blocksLineEndings) === true || ( - empty(self::$INLINE_CLAUSES[$lastClause]) + empty(self::$inlineClauses[$lastClause]) && ! $shortGroup && $this->options['parts_newline'] ) @@ -762,13 +762,13 @@ public static function getGroupLength($list) public static function isClause($token) { if ( - ($token->type === Token::TYPE_KEYWORD && isset(Parser::$STATEMENT_PARSERS[$token->keyword])) + ($token->type === Token::TYPE_KEYWORD && isset(Parser::$statementParsers[$token->keyword])) || ($token->type === Token::TYPE_NONE && strtoupper($token->token) === 'DELIMITER') ) { return 2; } - if ($token->type === Token::TYPE_KEYWORD && isset(Parser::$KEYWORD_PARSERS[$token->keyword])) { + if ($token->type === Token::TYPE_KEYWORD && isset(Parser::$keywordParsers[$token->keyword])) { return 1; } diff --git a/src/Utils/Query.php b/src/Utils/Query.php index b1dfea5b1..c804e8efe 100644 --- a/src/Utils/Query.php +++ b/src/Utils/Query.php @@ -81,7 +81,7 @@ class Query * * @var string[] */ - public static $FUNCTIONS = [ + public static $functions = [ 'SUM', 'AVG', 'STD', @@ -124,7 +124,7 @@ class Query * union: false * } */ - public static $ALLFLAGS = [ + public static $allFlags = [ /* * select ... DISTINCT ... */ @@ -322,7 +322,7 @@ private static function getFlagsSelect($statement, $flags) if (! empty($expr->function)) { if ($expr->function === 'COUNT') { $flags['is_count'] = true; - } elseif (in_array($expr->function, static::$FUNCTIONS)) { + } elseif (in_array($expr->function, static::$functions)) { $flags['is_func'] = true; } } @@ -370,7 +370,7 @@ public static function getFlags($statement, $all = false) { $flags = ['querytype' => false]; if ($all) { - $flags = self::$ALLFLAGS; + $flags = self::$allFlags; } if ($statement instanceof AlterStatement) { diff --git a/tests/Lexer/ContextTest.php b/tests/Lexer/ContextTest.php index 05e97f3f8..f852f0c24 100644 --- a/tests/Lexer/ContextTest.php +++ b/tests/Lexer/ContextTest.php @@ -16,14 +16,14 @@ public function testLoad(): void { // Default context is 5.7.0. $this->assertEquals('\\PhpMyAdmin\\SqlParser\\Contexts\\ContextMySql50700', Context::$loadedContext); - $this->assertArrayHasKey('STORED', Context::$KEYWORDS); - $this->assertArrayNotHasKey('AUTHORS', Context::$KEYWORDS); + $this->assertArrayHasKey('STORED', Context::$keywords); + $this->assertArrayNotHasKey('AUTHORS', Context::$keywords); // Restoring context. Context::load(''); $this->assertEquals('\\PhpMyAdmin\\SqlParser\\Contexts\\ContextMySql50700', Context::$defaultContext); - $this->assertArrayHasKey('STORED', Context::$KEYWORDS); - $this->assertArrayNotHasKey('AUTHORS', Context::$KEYWORDS); + $this->assertArrayHasKey('STORED', Context::$keywords); + $this->assertArrayNotHasKey('AUTHORS', Context::$keywords); } /** @@ -119,12 +119,12 @@ public function testMode(): void Context::setMode('REAL_AS_FLOAT,ANSI_QUOTES,IGNORE_SPACE'); $this->assertEquals( Context::SQL_MODE_REAL_AS_FLOAT | Context::SQL_MODE_ANSI_QUOTES | Context::SQL_MODE_IGNORE_SPACE, - Context::$MODE + Context::$mode ); Context::setMode('TRADITIONAL'); - $this->assertEquals(Context::SQL_MODE_TRADITIONAL, Context::$MODE); + $this->assertEquals(Context::SQL_MODE_TRADITIONAL, Context::$mode); Context::setMode(); - $this->assertEquals(0, Context::$MODE); + $this->assertEquals(0, Context::$mode); } public function testEscape(): void diff --git a/tests/data/bugs/gh14.out b/tests/data/bugs/gh14.out index c21621757..4ddaca185 100644 --- a/tests/data/bugs/gh14.out +++ b/tests/data/bugs/gh14.out @@ -2,7 +2,7 @@ "query": "ALTER TABLE\n `actor` MODIFY `actor_id` SMALLINT(5) UNSIGNED NOT NULL AUTO_INCREMENT,\n AUTO_INCREMENT = 201;", "lexer": { "@type": "PhpMyAdmin\\SqlParser\\Lexer", - "PARSER_METHODS": [ + "parserMethods": [ "parseDelimiter", "parseWhitespace", "parseNumber", @@ -286,7 +286,7 @@ "count": 29, "idx": 29 }, - "DEFAULT_DELIMITER": ";", + "defaultDelimiter": ";", "delimiter": ";", "delimiterLen": 1, "strict": false, @@ -294,7 +294,7 @@ }, "parser": { "@type": "PhpMyAdmin\\SqlParser\\Parser", - "STATEMENT_PARSERS": { + "statementParsers": { "DESCRIBE": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", "DESC": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", "EXPLAIN": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", @@ -339,7 +339,7 @@ "LOCK": "PhpMyAdmin\\SqlParser\\Statements\\LockStatement", "UNLOCK": "PhpMyAdmin\\SqlParser\\Statements\\LockStatement" }, - "KEYWORD_PARSERS": { + "keywordParsers": { "PARTITION BY": [], "SUBPARTITION BY": [], "_OPTIONS": { @@ -348,7 +348,7 @@ }, "_END_OPTIONS": { "class": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", - "field": "end_options" + "field": "endOptions" }, "INTERSECT": { "class": "PhpMyAdmin\\SqlParser\\Components\\UnionKeyword", @@ -598,7 +598,7 @@ "@type": "PhpMyAdmin\\SqlParser\\Statements\\AlterStatement", "table": { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -623,7 +623,7 @@ "altered": [ { "@type": "PhpMyAdmin\\SqlParser\\Components\\AlterOperation", - "DB_OPTIONS": { + "databaseOptions": { "CHARACTER SET": [ 1, "var" @@ -653,7 +653,7 @@ "var" ] }, - "TABLE_OPTIONS": { + "tableOptions": { "ENGINE": [ 1, "var=" @@ -718,7 +718,7 @@ "INDEX": 2, "CHARACTER SET": 3 }, - "USER_OPTIONS": { + "userOptions": { "ATTRIBUTE": [ 1, "var" @@ -749,7 +749,7 @@ "UNLOCK": 2, "IDENTIFIED": 3 }, - "VIEW_OPTIONS": { + "viewOptions": { "AS": 1 }, "options": { @@ -760,7 +760,7 @@ }, "field": { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -817,7 +817,7 @@ }, { "@type": "PhpMyAdmin\\SqlParser\\Components\\AlterOperation", - "DB_OPTIONS": { + "databaseOptions": { "CHARACTER SET": [ 1, "var" @@ -847,7 +847,7 @@ "var" ] }, - "TABLE_OPTIONS": { + "tableOptions": { "ENGINE": [ 1, "var=" @@ -912,7 +912,7 @@ "INDEX": 2, "CHARACTER SET": 3 }, - "USER_OPTIONS": { + "userOptions": { "ATTRIBUTE": [ 1, "var" @@ -943,7 +943,7 @@ "UNLOCK": 2, "IDENTIFIED": 3 }, - "VIEW_OPTIONS": { + "viewOptions": { "AS": 1 }, "options": { @@ -961,7 +961,7 @@ "unknown": [] } ], - "OPTIONS": { + "statementOptions": { "ONLINE": 1, "OFFLINE": 1, "IGNORE": 2, @@ -975,8 +975,8 @@ "USER": 3, "VIEW": 3 }, - "CLAUSES": [], - "END_OPTIONS": [], + "clauses": [], + "statementEndOptions": [], "options": { "@type": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", "options": { diff --git a/tests/data/bugs/gh16.out b/tests/data/bugs/gh16.out index b9a1d4f57..0c1add6bb 100644 --- a/tests/data/bugs/gh16.out +++ b/tests/data/bugs/gh16.out @@ -2,7 +2,7 @@ "query": "CREATE TABLE `jos_core_acl_aro` (\n `id` int(11) NOT NULL,\n `section_value` varchar(240) NOT NULL DEFAULT '0',\n `value` varchar(240) NOT NULL DEFAULT '',\n `order_value` int(11) NOT NULL DEFAULT '0',\n `name` varchar(255) NOT NULL DEFAULT '',\n `hidden` int(11) NOT NULL DEFAULT '0',\n PRIMARY KEY (`id`),\n UNIQUE KEY `jos_section_value_value_aro` (`section_value`(100),`value`(15)) USING BTREE,\n KEY `jos_gacl_hidden_aro` (`hidden`)\n) ENGINE=InnoDB DEFAULT CHARSET=latin1", "lexer": { "@type": "PhpMyAdmin\\SqlParser\\Lexer", - "PARSER_METHODS": [ + "parserMethods": [ "parseDelimiter", "parseWhitespace", "parseNumber", @@ -1231,7 +1231,7 @@ "count": 134, "idx": 134 }, - "DEFAULT_DELIMITER": ";", + "defaultDelimiter": ";", "delimiter": ";", "delimiterLen": 1, "strict": false, @@ -1239,7 +1239,7 @@ }, "parser": { "@type": "PhpMyAdmin\\SqlParser\\Parser", - "STATEMENT_PARSERS": { + "statementParsers": { "DESCRIBE": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", "DESC": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", "EXPLAIN": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", @@ -1284,7 +1284,7 @@ "LOCK": "PhpMyAdmin\\SqlParser\\Statements\\LockStatement", "UNLOCK": "PhpMyAdmin\\SqlParser\\Statements\\LockStatement" }, - "KEYWORD_PARSERS": { + "keywordParsers": { "PARTITION BY": [], "SUBPARTITION BY": [], "_OPTIONS": { @@ -1293,7 +1293,7 @@ }, "_END_OPTIONS": { "class": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", - "field": "end_options" + "field": "endOptions" }, "INTERSECT": { "class": "PhpMyAdmin\\SqlParser\\Components\\UnionKeyword", @@ -1541,7 +1541,7 @@ "statements": [ { "@type": "PhpMyAdmin\\SqlParser\\Statements\\CreateStatement", - "OPTIONS": { + "statementOptions": { "TEMPORARY": 1, "OR REPLACE": 2, "ALGORITHM": [ @@ -1573,7 +1573,7 @@ "SCHEMA": 6, "IF NOT EXISTS": 7 }, - "DB_OPTIONS": { + "databaseOptions": { "CHARACTER SET": [ 1, "var=" @@ -1599,7 +1599,7 @@ "var=" ] }, - "TABLE_OPTIONS": { + "tableOptions": { "ENGINE": [ 1, "var=" @@ -1701,7 +1701,7 @@ "var" ] }, - "FUNC_OPTIONS": { + "functionOptions": { "NOT": [ 2, "var" @@ -1746,7 +1746,7 @@ "DETERMINISTIC": 2, "DATA": 5 }, - "TRIGGER_OPTIONS": { + "triggerOptions": { "BEFORE": 1, "AFTER": 1, "INSERT": 2, @@ -1755,7 +1755,7 @@ }, "name": { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -1797,7 +1797,7 @@ "fields": [ { "@type": "PhpMyAdmin\\SqlParser\\Components\\CreateDefinition", - "FIELD_OPTIONS": { + "fieldOptions": { "_UNSORTED": true, "NOT NULL": 1, "NULL": 1, @@ -1859,7 +1859,7 @@ "isConstraint": null, "type": { "@type": "PhpMyAdmin\\SqlParser\\Components\\DataType", - "DATA_TYPE_OPTIONS": { + "dataTypeOptions": { "BINARY": 1, "CHARACTER SET": [ 2, @@ -1896,7 +1896,7 @@ }, { "@type": "PhpMyAdmin\\SqlParser\\Components\\CreateDefinition", - "FIELD_OPTIONS": { + "fieldOptions": { "_UNSORTED": true, "NOT NULL": 1, "NULL": 1, @@ -1958,7 +1958,7 @@ "isConstraint": null, "type": { "@type": "PhpMyAdmin\\SqlParser\\Components\\DataType", - "DATA_TYPE_OPTIONS": { + "dataTypeOptions": { "BINARY": 1, "CHARACTER SET": [ 2, @@ -1995,7 +1995,7 @@ "equals": false, "expr": { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -2024,7 +2024,7 @@ }, { "@type": "PhpMyAdmin\\SqlParser\\Components\\CreateDefinition", - "FIELD_OPTIONS": { + "fieldOptions": { "_UNSORTED": true, "NOT NULL": 1, "NULL": 1, @@ -2086,7 +2086,7 @@ "isConstraint": null, "type": { "@type": "PhpMyAdmin\\SqlParser\\Components\\DataType", - "DATA_TYPE_OPTIONS": { + "dataTypeOptions": { "BINARY": 1, "CHARACTER SET": [ 2, @@ -2123,7 +2123,7 @@ "equals": false, "expr": { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -2152,7 +2152,7 @@ }, { "@type": "PhpMyAdmin\\SqlParser\\Components\\CreateDefinition", - "FIELD_OPTIONS": { + "fieldOptions": { "_UNSORTED": true, "NOT NULL": 1, "NULL": 1, @@ -2214,7 +2214,7 @@ "isConstraint": null, "type": { "@type": "PhpMyAdmin\\SqlParser\\Components\\DataType", - "DATA_TYPE_OPTIONS": { + "dataTypeOptions": { "BINARY": 1, "CHARACTER SET": [ 2, @@ -2251,7 +2251,7 @@ "equals": false, "expr": { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -2280,7 +2280,7 @@ }, { "@type": "PhpMyAdmin\\SqlParser\\Components\\CreateDefinition", - "FIELD_OPTIONS": { + "fieldOptions": { "_UNSORTED": true, "NOT NULL": 1, "NULL": 1, @@ -2342,7 +2342,7 @@ "isConstraint": null, "type": { "@type": "PhpMyAdmin\\SqlParser\\Components\\DataType", - "DATA_TYPE_OPTIONS": { + "dataTypeOptions": { "BINARY": 1, "CHARACTER SET": [ 2, @@ -2379,7 +2379,7 @@ "equals": false, "expr": { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -2408,7 +2408,7 @@ }, { "@type": "PhpMyAdmin\\SqlParser\\Components\\CreateDefinition", - "FIELD_OPTIONS": { + "fieldOptions": { "_UNSORTED": true, "NOT NULL": 1, "NULL": 1, @@ -2470,7 +2470,7 @@ "isConstraint": null, "type": { "@type": "PhpMyAdmin\\SqlParser\\Components\\DataType", - "DATA_TYPE_OPTIONS": { + "dataTypeOptions": { "BINARY": 1, "CHARACTER SET": [ 2, @@ -2507,7 +2507,7 @@ "equals": false, "expr": { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -2536,7 +2536,7 @@ }, { "@type": "PhpMyAdmin\\SqlParser\\Components\\CreateDefinition", - "FIELD_OPTIONS": { + "fieldOptions": { "_UNSORTED": true, "NOT NULL": 1, "NULL": 1, @@ -2599,7 +2599,7 @@ "type": null, "key": { "@type": "PhpMyAdmin\\SqlParser\\Components\\Key", - "KEY_OPTIONS": { + "keyOptions": { "KEY_BLOCK_SIZE": [ 1, "var=" @@ -2651,7 +2651,7 @@ }, { "@type": "PhpMyAdmin\\SqlParser\\Components\\CreateDefinition", - "FIELD_OPTIONS": { + "fieldOptions": { "_UNSORTED": true, "NOT NULL": 1, "NULL": 1, @@ -2714,7 +2714,7 @@ "type": null, "key": { "@type": "PhpMyAdmin\\SqlParser\\Components\\Key", - "KEY_OPTIONS": { + "keyOptions": { "KEY_BLOCK_SIZE": [ 1, "var=" @@ -2778,7 +2778,7 @@ }, { "@type": "PhpMyAdmin\\SqlParser\\Components\\CreateDefinition", - "FIELD_OPTIONS": { + "fieldOptions": { "_UNSORTED": true, "NOT NULL": 1, "NULL": 1, @@ -2841,7 +2841,7 @@ "type": null, "key": { "@type": "PhpMyAdmin\\SqlParser\\Components\\Key", - "KEY_OPTIONS": { + "keyOptions": { "KEY_BLOCK_SIZE": [ 1, "var=" @@ -2904,8 +2904,8 @@ "return": null, "parameters": null, "body": [], - "CLAUSES": [], - "END_OPTIONS": [], + "clauses": [], + "statementEndOptions": [], "options": { "@type": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", "options": { diff --git a/tests/data/bugs/gh317.out b/tests/data/bugs/gh317.out index 631ab962e..995d2bac5 100644 --- a/tests/data/bugs/gh317.out +++ b/tests/data/bugs/gh317.out @@ -2,7 +2,7 @@ "query": "ALTER TABLE `demo` ADD KEY `IDX_REPAIR` (`REPAIR`);", "lexer": { "@type": "PhpMyAdmin\\SqlParser\\Lexer", - "PARSER_METHODS": [ + "parserMethods": [ "parseDelimiter", "parseWhitespace", "parseNumber", @@ -178,7 +178,7 @@ "count": 17, "idx": 17 }, - "DEFAULT_DELIMITER": ";", + "defaultDelimiter": ";", "delimiter": ";", "delimiterLen": 1, "strict": false, @@ -186,7 +186,7 @@ }, "parser": { "@type": "PhpMyAdmin\\SqlParser\\Parser", - "STATEMENT_PARSERS": { + "statementParsers": { "DESCRIBE": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", "DESC": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", "EXPLAIN": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", @@ -231,7 +231,7 @@ "LOCK": "PhpMyAdmin\\SqlParser\\Statements\\LockStatement", "UNLOCK": "PhpMyAdmin\\SqlParser\\Statements\\LockStatement" }, - "KEYWORD_PARSERS": { + "keywordParsers": { "PARTITION BY": [], "SUBPARTITION BY": [], "_OPTIONS": { @@ -240,7 +240,7 @@ }, "_END_OPTIONS": { "class": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", - "field": "end_options" + "field": "endOptions" }, "INTERSECT": { "class": "PhpMyAdmin\\SqlParser\\Components\\UnionKeyword", @@ -490,7 +490,7 @@ "@type": "PhpMyAdmin\\SqlParser\\Statements\\AlterStatement", "table": { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -515,7 +515,7 @@ "altered": [ { "@type": "PhpMyAdmin\\SqlParser\\Components\\AlterOperation", - "DB_OPTIONS": { + "databaseOptions": { "CHARACTER SET": [ 1, "var" @@ -545,7 +545,7 @@ "var" ] }, - "TABLE_OPTIONS": { + "tableOptions": { "ENGINE": [ 1, "var=" @@ -610,7 +610,7 @@ "INDEX": 2, "CHARACTER SET": 3 }, - "USER_OPTIONS": { + "userOptions": { "ATTRIBUTE": [ 1, "var" @@ -641,7 +641,7 @@ "UNLOCK": 2, "IDENTIFIED": 3 }, - "VIEW_OPTIONS": { + "viewOptions": { "AS": 1 }, "options": { @@ -653,7 +653,7 @@ }, "field": { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -688,7 +688,7 @@ ] } ], - "OPTIONS": { + "statementOptions": { "ONLINE": 1, "OFFLINE": 1, "IGNORE": 2, @@ -702,8 +702,8 @@ "USER": 3, "VIEW": 3 }, - "CLAUSES": [], - "END_OPTIONS": [], + "clauses": [], + "statementEndOptions": [], "options": { "@type": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", "options": { diff --git a/tests/data/bugs/gh9.out b/tests/data/bugs/gh9.out index 40eb80777..aecf9e77d 100644 --- a/tests/data/bugs/gh9.out +++ b/tests/data/bugs/gh9.out @@ -2,7 +2,7 @@ "query": "SELECT * FROM foo WHERE\nSELECT * FROM foo WHERE\n\nSTART TRANSACTION;\n\nCREATE TABLE `tb` (`uid` INT UNSIGNED NOT NULL\n`position` INT NOT NULL,\nPRIMARY KEY ( `uid` ) ,\nINDEX ( `position` )\n) ENGINE = InnoDB;\n\nCOMMIT;", "lexer": { "@type": "PhpMyAdmin\\SqlParser\\Lexer", - "PARSER_METHODS": [ + "parserMethods": [ "parseDelimiter", "parseWhitespace", "parseNumber", @@ -700,7 +700,7 @@ "count": 75, "idx": 75 }, - "DEFAULT_DELIMITER": ";", + "defaultDelimiter": ";", "delimiter": ";", "delimiterLen": 1, "strict": false, @@ -708,7 +708,7 @@ }, "parser": { "@type": "PhpMyAdmin\\SqlParser\\Parser", - "STATEMENT_PARSERS": { + "statementParsers": { "DESCRIBE": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", "DESC": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", "EXPLAIN": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", @@ -753,7 +753,7 @@ "LOCK": "PhpMyAdmin\\SqlParser\\Statements\\LockStatement", "UNLOCK": "PhpMyAdmin\\SqlParser\\Statements\\LockStatement" }, - "KEYWORD_PARSERS": { + "keywordParsers": { "PARTITION BY": [], "SUBPARTITION BY": [], "_OPTIONS": { @@ -762,7 +762,7 @@ }, "_END_OPTIONS": { "class": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", - "field": "end_options" + "field": "endOptions" }, "INTERSECT": { "class": "PhpMyAdmin\\SqlParser\\Components\\UnionKeyword", @@ -1010,7 +1010,7 @@ "statements": [ { "@type": "PhpMyAdmin\\SqlParser\\Statements\\SelectStatement", - "OPTIONS": { + "statementOptions": { "ALL": 1, "DISTINCT": 1, "DISTINCTROW": 1, @@ -1027,11 +1027,11 @@ "SQL_NO_CACHE": 8, "SQL_CALC_FOUND_ROWS": 9 }, - "END_OPTIONS": { + "statementEndOptions": { "FOR UPDATE": 1, "LOCK IN SHARE MODE": 1 }, - "CLAUSES": { + "clauses": { "SELECT": [ "SELECT", 2 @@ -1160,7 +1160,7 @@ "expr": [ { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -1186,7 +1186,7 @@ "from": [ { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -1209,7 +1209,7 @@ "subquery": null } ], - "index_hints": null, + "indexHints": null, "partition": null, "where": [], "group": null, @@ -1220,7 +1220,7 @@ "into": null, "join": null, "union": [], - "end_options": null, + "endOptions": null, "options": { "@type": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", "options": [] @@ -1230,7 +1230,7 @@ }, { "@type": "PhpMyAdmin\\SqlParser\\Statements\\SelectStatement", - "OPTIONS": { + "statementOptions": { "ALL": 1, "DISTINCT": 1, "DISTINCTROW": 1, @@ -1247,11 +1247,11 @@ "SQL_NO_CACHE": 8, "SQL_CALC_FOUND_ROWS": 9 }, - "END_OPTIONS": { + "statementEndOptions": { "FOR UPDATE": 1, "LOCK IN SHARE MODE": 1 }, - "CLAUSES": { + "clauses": { "SELECT": [ "SELECT", 2 @@ -1380,7 +1380,7 @@ "expr": [ { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -1406,7 +1406,7 @@ "from": [ { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -1429,7 +1429,7 @@ "subquery": null } ], - "index_hints": null, + "indexHints": null, "partition": null, "where": [], "group": null, @@ -1440,7 +1440,7 @@ "into": null, "join": null, "union": [], - "end_options": null, + "endOptions": null, "options": { "@type": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", "options": [] @@ -1454,7 +1454,7 @@ "statements": [ { "@type": "PhpMyAdmin\\SqlParser\\Statements\\CreateStatement", - "OPTIONS": { + "statementOptions": { "TEMPORARY": 1, "OR REPLACE": 2, "ALGORITHM": [ @@ -1486,7 +1486,7 @@ "SCHEMA": 6, "IF NOT EXISTS": 7 }, - "DB_OPTIONS": { + "databaseOptions": { "CHARACTER SET": [ 1, "var=" @@ -1512,7 +1512,7 @@ "var=" ] }, - "TABLE_OPTIONS": { + "tableOptions": { "ENGINE": [ 1, "var=" @@ -1614,7 +1614,7 @@ "var" ] }, - "FUNC_OPTIONS": { + "functionOptions": { "NOT": [ 2, "var" @@ -1659,7 +1659,7 @@ "DETERMINISTIC": 2, "DATA": 5 }, - "TRIGGER_OPTIONS": { + "triggerOptions": { "BEFORE": 1, "AFTER": 1, "INSERT": 2, @@ -1668,7 +1668,7 @@ }, "name": { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -1697,7 +1697,7 @@ "fields": [ { "@type": "PhpMyAdmin\\SqlParser\\Components\\CreateDefinition", - "FIELD_OPTIONS": { + "fieldOptions": { "_UNSORTED": true, "NOT NULL": 1, "NULL": 1, @@ -1759,7 +1759,7 @@ "isConstraint": null, "type": { "@type": "PhpMyAdmin\\SqlParser\\Components\\DataType", - "DATA_TYPE_OPTIONS": { + "dataTypeOptions": { "BINARY": 1, "CHARACTER SET": [ 2, @@ -1807,8 +1807,8 @@ "return": null, "parameters": null, "body": [], - "CLAUSES": [], - "END_OPTIONS": [], + "clauses": [], + "statementEndOptions": [], "options": { "@type": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", "options": { @@ -1824,7 +1824,7 @@ "type": 2, "statements": null, "end": null, - "OPTIONS": { + "statementOptions": { "START TRANSACTION": 1, "BEGIN": 1, "COMMIT": 1, @@ -1836,8 +1836,8 @@ "RELEASE": 4, "NO RELEASE": 4 }, - "CLAUSES": [], - "END_OPTIONS": [], + "clauses": [], + "statementEndOptions": [], "options": { "@type": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", "options": { @@ -1847,7 +1847,7 @@ "first": 72, "last": 72 }, - "OPTIONS": { + "statementOptions": { "START TRANSACTION": 1, "BEGIN": 1, "COMMIT": 1, @@ -1859,8 +1859,8 @@ "RELEASE": 4, "NO RELEASE": 4 }, - "CLAUSES": [], - "END_OPTIONS": [], + "clauses": [], + "statementEndOptions": [], "options": { "@type": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", "options": { diff --git a/tests/data/bugs/pma11800.out b/tests/data/bugs/pma11800.out index a1d22fbd5..9c7a09dec 100644 --- a/tests/data/bugs/pma11800.out +++ b/tests/data/bugs/pma11800.out @@ -2,7 +2,7 @@ "query": "SELECT 'a' REGEXP '^[a-d]';", "lexer": { "@type": "PhpMyAdmin\\SqlParser\\Lexer", - "PARSER_METHODS": [ + "parserMethods": [ "parseDelimiter", "parseWhitespace", "parseNumber", @@ -106,7 +106,7 @@ "count": 9, "idx": 9 }, - "DEFAULT_DELIMITER": ";", + "defaultDelimiter": ";", "delimiter": ";", "delimiterLen": 1, "strict": false, @@ -114,7 +114,7 @@ }, "parser": { "@type": "PhpMyAdmin\\SqlParser\\Parser", - "STATEMENT_PARSERS": { + "statementParsers": { "DESCRIBE": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", "DESC": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", "EXPLAIN": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", @@ -159,7 +159,7 @@ "LOCK": "PhpMyAdmin\\SqlParser\\Statements\\LockStatement", "UNLOCK": "PhpMyAdmin\\SqlParser\\Statements\\LockStatement" }, - "KEYWORD_PARSERS": { + "keywordParsers": { "PARTITION BY": [], "SUBPARTITION BY": [], "_OPTIONS": { @@ -168,7 +168,7 @@ }, "_END_OPTIONS": { "class": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", - "field": "end_options" + "field": "endOptions" }, "INTERSECT": { "class": "PhpMyAdmin\\SqlParser\\Components\\UnionKeyword", @@ -416,7 +416,7 @@ "statements": [ { "@type": "PhpMyAdmin\\SqlParser\\Statements\\SelectStatement", - "OPTIONS": { + "statementOptions": { "ALL": 1, "DISTINCT": 1, "DISTINCTROW": 1, @@ -433,11 +433,11 @@ "SQL_NO_CACHE": 8, "SQL_CALC_FOUND_ROWS": 9 }, - "END_OPTIONS": { + "statementEndOptions": { "FOR UPDATE": 1, "LOCK IN SHARE MODE": 1 }, - "CLAUSES": { + "clauses": { "SELECT": [ "SELECT", 2 @@ -566,7 +566,7 @@ "expr": [ { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -590,7 +590,7 @@ } ], "from": [], - "index_hints": null, + "indexHints": null, "partition": null, "where": null, "group": null, @@ -601,7 +601,7 @@ "into": null, "join": null, "union": [], - "end_options": null, + "endOptions": null, "options": { "@type": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", "options": [] diff --git a/tests/data/bugs/pma11836.out b/tests/data/bugs/pma11836.out index 9a442e313..775b43caf 100644 --- a/tests/data/bugs/pma11836.out +++ b/tests/data/bugs/pma11836.out @@ -2,7 +2,7 @@ "query": "SELECT * FROM alumnos WHERE id = IF(id = 1, id, nombre) AND id not in (SELECT id FROM alumnos)", "lexer": { "@type": "PhpMyAdmin\\SqlParser\\Lexer", - "PARSER_METHODS": [ + "parserMethods": [ "parseDelimiter", "parseWhitespace", "parseNumber", @@ -430,7 +430,7 @@ "count": 45, "idx": 45 }, - "DEFAULT_DELIMITER": ";", + "defaultDelimiter": ";", "delimiter": ";", "delimiterLen": 1, "strict": false, @@ -438,7 +438,7 @@ }, "parser": { "@type": "PhpMyAdmin\\SqlParser\\Parser", - "STATEMENT_PARSERS": { + "statementParsers": { "DESCRIBE": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", "DESC": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", "EXPLAIN": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", @@ -483,7 +483,7 @@ "LOCK": "PhpMyAdmin\\SqlParser\\Statements\\LockStatement", "UNLOCK": "PhpMyAdmin\\SqlParser\\Statements\\LockStatement" }, - "KEYWORD_PARSERS": { + "keywordParsers": { "PARTITION BY": [], "SUBPARTITION BY": [], "_OPTIONS": { @@ -492,7 +492,7 @@ }, "_END_OPTIONS": { "class": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", - "field": "end_options" + "field": "endOptions" }, "INTERSECT": { "class": "PhpMyAdmin\\SqlParser\\Components\\UnionKeyword", @@ -740,7 +740,7 @@ "statements": [ { "@type": "PhpMyAdmin\\SqlParser\\Statements\\SelectStatement", - "OPTIONS": { + "statementOptions": { "ALL": 1, "DISTINCT": 1, "DISTINCTROW": 1, @@ -757,11 +757,11 @@ "SQL_NO_CACHE": 8, "SQL_CALC_FOUND_ROWS": 9 }, - "END_OPTIONS": { + "statementEndOptions": { "FOR UPDATE": 1, "LOCK IN SHARE MODE": 1 }, - "CLAUSES": { + "clauses": { "SELECT": [ "SELECT", 2 @@ -890,7 +890,7 @@ "expr": [ { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -916,7 +916,7 @@ "from": [ { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -939,19 +939,19 @@ "subquery": null } ], - "index_hints": null, + "indexHints": null, "partition": null, "where": [ { "@type": "PhpMyAdmin\\SqlParser\\Components\\Condition", - "DELIMITERS": [ + "delimiters": [ "&&", "||", "AND", "OR", "XOR" ], - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "ALL": 1, "AND": 1, "BETWEEN": 1, @@ -981,14 +981,14 @@ }, { "@type": "PhpMyAdmin\\SqlParser\\Components\\Condition", - "DELIMITERS": [ + "delimiters": [ "&&", "||", "AND", "OR", "XOR" ], - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "ALL": 1, "AND": 1, "BETWEEN": 1, @@ -1015,14 +1015,14 @@ }, { "@type": "PhpMyAdmin\\SqlParser\\Components\\Condition", - "DELIMITERS": [ + "delimiters": [ "&&", "||", "AND", "OR", "XOR" ], - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "ALL": 1, "AND": 1, "BETWEEN": 1, @@ -1059,7 +1059,7 @@ "into": null, "join": null, "union": [], - "end_options": null, + "endOptions": null, "options": { "@type": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", "options": [] diff --git a/tests/data/bugs/pma11843.out b/tests/data/bugs/pma11843.out index a5a90ae75..28e95e8de 100644 --- a/tests/data/bugs/pma11843.out +++ b/tests/data/bugs/pma11843.out @@ -2,7 +2,7 @@ "query": "CREATE TABLE `mytable` (\n `id` int(11) NOT NULL,\n `created_at` timestamp(6) NOT NULL DEFAULT CURRENT_TIMESTAMP\n);", "lexer": { "@type": "PhpMyAdmin\\SqlParser\\Lexer", - "PARSER_METHODS": [ + "parserMethods": [ "parseDelimiter", "parseWhitespace", "parseNumber", @@ -331,7 +331,7 @@ "count": 34, "idx": 34 }, - "DEFAULT_DELIMITER": ";", + "defaultDelimiter": ";", "delimiter": ";", "delimiterLen": 1, "strict": false, @@ -339,7 +339,7 @@ }, "parser": { "@type": "PhpMyAdmin\\SqlParser\\Parser", - "STATEMENT_PARSERS": { + "statementParsers": { "DESCRIBE": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", "DESC": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", "EXPLAIN": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", @@ -384,7 +384,7 @@ "LOCK": "PhpMyAdmin\\SqlParser\\Statements\\LockStatement", "UNLOCK": "PhpMyAdmin\\SqlParser\\Statements\\LockStatement" }, - "KEYWORD_PARSERS": { + "keywordParsers": { "PARTITION BY": [], "SUBPARTITION BY": [], "_OPTIONS": { @@ -393,7 +393,7 @@ }, "_END_OPTIONS": { "class": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", - "field": "end_options" + "field": "endOptions" }, "INTERSECT": { "class": "PhpMyAdmin\\SqlParser\\Components\\UnionKeyword", @@ -641,7 +641,7 @@ "statements": [ { "@type": "PhpMyAdmin\\SqlParser\\Statements\\CreateStatement", - "OPTIONS": { + "statementOptions": { "TEMPORARY": 1, "OR REPLACE": 2, "ALGORITHM": [ @@ -673,7 +673,7 @@ "SCHEMA": 6, "IF NOT EXISTS": 7 }, - "DB_OPTIONS": { + "databaseOptions": { "CHARACTER SET": [ 1, "var=" @@ -699,7 +699,7 @@ "var=" ] }, - "TABLE_OPTIONS": { + "tableOptions": { "ENGINE": [ 1, "var=" @@ -801,7 +801,7 @@ "var" ] }, - "FUNC_OPTIONS": { + "functionOptions": { "NOT": [ 2, "var" @@ -846,7 +846,7 @@ "DETERMINISTIC": 2, "DATA": 5 }, - "TRIGGER_OPTIONS": { + "triggerOptions": { "BEFORE": 1, "AFTER": 1, "INSERT": 2, @@ -855,7 +855,7 @@ }, "name": { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -884,7 +884,7 @@ "fields": [ { "@type": "PhpMyAdmin\\SqlParser\\Components\\CreateDefinition", - "FIELD_OPTIONS": { + "fieldOptions": { "_UNSORTED": true, "NOT NULL": 1, "NULL": 1, @@ -946,7 +946,7 @@ "isConstraint": null, "type": { "@type": "PhpMyAdmin\\SqlParser\\Components\\DataType", - "DATA_TYPE_OPTIONS": { + "dataTypeOptions": { "BINARY": 1, "CHARACTER SET": [ 2, @@ -983,7 +983,7 @@ }, { "@type": "PhpMyAdmin\\SqlParser\\Components\\CreateDefinition", - "FIELD_OPTIONS": { + "fieldOptions": { "_UNSORTED": true, "NOT NULL": 1, "NULL": 1, @@ -1045,7 +1045,7 @@ "isConstraint": null, "type": { "@type": "PhpMyAdmin\\SqlParser\\Components\\DataType", - "DATA_TYPE_OPTIONS": { + "dataTypeOptions": { "BINARY": 1, "CHARACTER SET": [ 2, @@ -1082,7 +1082,7 @@ "equals": false, "expr": { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -1122,8 +1122,8 @@ "return": null, "parameters": null, "body": [], - "CLAUSES": [], - "END_OPTIONS": [], + "clauses": [], + "statementEndOptions": [], "options": { "@type": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", "options": { diff --git a/tests/data/bugs/pma11867.out b/tests/data/bugs/pma11867.out index 8eb940cfb..60f45a335 100644 --- a/tests/data/bugs/pma11867.out +++ b/tests/data/bugs/pma11867.out @@ -2,7 +2,7 @@ "query": "DESC tablename;", "lexer": { "@type": "PhpMyAdmin\\SqlParser\\Lexer", - "PARSER_METHODS": [ + "parserMethods": [ "parseDelimiter", "parseWhitespace", "parseNumber", @@ -70,7 +70,7 @@ "count": 5, "idx": 5 }, - "DEFAULT_DELIMITER": ";", + "defaultDelimiter": ";", "delimiter": ";", "delimiterLen": 1, "strict": false, @@ -78,7 +78,7 @@ }, "parser": { "@type": "PhpMyAdmin\\SqlParser\\Parser", - "STATEMENT_PARSERS": { + "statementParsers": { "DESCRIBE": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", "DESC": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", "EXPLAIN": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", @@ -123,7 +123,7 @@ "LOCK": "PhpMyAdmin\\SqlParser\\Statements\\LockStatement", "UNLOCK": "PhpMyAdmin\\SqlParser\\Statements\\LockStatement" }, - "KEYWORD_PARSERS": { + "keywordParsers": { "PARTITION BY": [], "SUBPARTITION BY": [], "_OPTIONS": { @@ -132,7 +132,7 @@ }, "_END_OPTIONS": { "class": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", - "field": "end_options" + "field": "endOptions" }, "INTERSECT": { "class": "PhpMyAdmin\\SqlParser\\Components\\UnionKeyword", @@ -391,9 +391,9 @@ "@type": "@4" } ], - "OPTIONS": [], - "CLAUSES": [], - "END_OPTIONS": [], + "statementOptions": [], + "clauses": [], + "statementEndOptions": [], "options": null, "first": 0, "last": 3 diff --git a/tests/data/bugs/pma11879.out b/tests/data/bugs/pma11879.out index 116ea558c..a5fef382a 100644 --- a/tests/data/bugs/pma11879.out +++ b/tests/data/bugs/pma11879.out @@ -2,7 +2,7 @@ "query": "INSERT INTO\n tbproject(`id`, `name`, `description`, `create_dt`, `dbtype`, `useclause`, `sync_comments`)\nVALUES\n (NULL, 'testdb', 'Descrizione test', NOW(), 'mySQL', '', 1);", "lexer": { "@type": "PhpMyAdmin\\SqlParser\\Lexer", - "PARSER_METHODS": [ + "parserMethods": [ "parseDelimiter", "parseWhitespace", "parseNumber", @@ -511,7 +511,7 @@ "count": 54, "idx": 54 }, - "DEFAULT_DELIMITER": ";", + "defaultDelimiter": ";", "delimiter": ";", "delimiterLen": 1, "strict": false, @@ -519,7 +519,7 @@ }, "parser": { "@type": "PhpMyAdmin\\SqlParser\\Parser", - "STATEMENT_PARSERS": { + "statementParsers": { "DESCRIBE": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", "DESC": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", "EXPLAIN": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", @@ -564,7 +564,7 @@ "LOCK": "PhpMyAdmin\\SqlParser\\Statements\\LockStatement", "UNLOCK": "PhpMyAdmin\\SqlParser\\Statements\\LockStatement" }, - "KEYWORD_PARSERS": { + "keywordParsers": { "PARTITION BY": [], "SUBPARTITION BY": [], "_OPTIONS": { @@ -573,7 +573,7 @@ }, "_END_OPTIONS": { "class": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", - "field": "end_options" + "field": "endOptions" }, "INTERSECT": { "class": "PhpMyAdmin\\SqlParser\\Components\\UnionKeyword", @@ -821,7 +821,7 @@ "statements": [ { "@type": "PhpMyAdmin\\SqlParser\\Statements\\InsertStatement", - "OPTIONS": { + "statementOptions": { "LOW_PRIORITY": 1, "DELAYED": 2, "HIGH_PRIORITY": 3, @@ -829,7 +829,7 @@ }, "into": { "@type": "PhpMyAdmin\\SqlParser\\Components\\IntoKeyword", - "FIELDS_OPTIONS": { + "statementFieldsOptions": { "TERMINATED BY": [ 1, "expr" @@ -844,7 +844,7 @@ "expr" ] }, - "LINES_OPTIONS": { + "statementLinesOptions": { "STARTING BY": [ 1, "expr" @@ -857,7 +857,7 @@ "type": null, "dest": { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -889,9 +889,9 @@ "sync_comments" ], "values": null, - "fields_options": null, - "fields_keyword": null, - "lines_options": null + "fieldsOptions": null, + "fieldsKeyword": null, + "linesOptions": null }, "values": [ { @@ -920,8 +920,8 @@ "select": null, "with": null, "onDuplicateSet": null, - "CLAUSES": [], - "END_OPTIONS": [], + "clauses": [], + "statementEndOptions": [], "options": { "@type": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", "options": [] diff --git a/tests/data/lexer/lex.out b/tests/data/lexer/lex.out index 866c6223c..5b2b2ac15 100644 --- a/tests/data/lexer/lex.out +++ b/tests/data/lexer/lex.out @@ -2,7 +2,7 @@ "query": "SELECT \\\\", "lexer": { "@type": "PhpMyAdmin\\SqlParser\\Lexer", - "PARSER_METHODS": [ + "parserMethods": [ "parseDelimiter", "parseWhitespace", "parseNumber", @@ -70,7 +70,7 @@ "count": 5, "idx": 0 }, - "DEFAULT_DELIMITER": ";", + "defaultDelimiter": ";", "delimiter": ";", "delimiterLen": 1, "strict": false, diff --git a/tests/data/lexer/lexBool.out b/tests/data/lexer/lexBool.out index bfda4cfc7..86b404b88 100644 --- a/tests/data/lexer/lexBool.out +++ b/tests/data/lexer/lexBool.out @@ -2,7 +2,7 @@ "query": "SELECT true, FalSe", "lexer": { "@type": "PhpMyAdmin\\SqlParser\\Lexer", - "PARSER_METHODS": [ + "parserMethods": [ "parseDelimiter", "parseWhitespace", "parseNumber", @@ -88,7 +88,7 @@ "count": 7, "idx": 0 }, - "DEFAULT_DELIMITER": ";", + "defaultDelimiter": ";", "delimiter": ";", "delimiterLen": 1, "strict": false, diff --git a/tests/data/lexer/lexComment.out b/tests/data/lexer/lexComment.out index db6c07167..e598fb29e 100644 --- a/tests/data/lexer/lexComment.out +++ b/tests/data/lexer/lexComment.out @@ -2,7 +2,7 @@ "query": "# comment\nSELECT \/*!50000 STRAIGHT_JOIN *\/ col1 FROM table1, table2 \/* select query *\/\n-- comment\n-- comment 2", "lexer": { "@type": "PhpMyAdmin\\SqlParser\\Lexer", - "PARSER_METHODS": [ + "parserMethods": [ "parseDelimiter", "parseWhitespace", "parseNumber", @@ -250,7 +250,7 @@ "count": 25, "idx": 0 }, - "DEFAULT_DELIMITER": ";", + "defaultDelimiter": ";", "delimiter": ";", "delimiterLen": 1, "strict": false, diff --git a/tests/data/lexer/lexCommentEnd.out b/tests/data/lexer/lexCommentEnd.out index 1ec219d5c..83f55f003 100644 --- a/tests/data/lexer/lexCommentEnd.out +++ b/tests/data/lexer/lexCommentEnd.out @@ -2,7 +2,7 @@ "query": "SELECT 1\n-- comment\n--", "lexer": { "@type": "PhpMyAdmin\\SqlParser\\Lexer", - "PARSER_METHODS": [ + "parserMethods": [ "parseDelimiter", "parseWhitespace", "parseNumber", @@ -97,7 +97,7 @@ "count": 8, "idx": 0 }, - "DEFAULT_DELIMITER": ";", + "defaultDelimiter": ";", "delimiter": ";", "delimiterLen": 1, "strict": false, diff --git a/tests/data/lexer/lexDelimiter.out b/tests/data/lexer/lexDelimiter.out index 1cb443c8f..08065ae67 100644 --- a/tests/data/lexer/lexDelimiter.out +++ b/tests/data/lexer/lexDelimiter.out @@ -2,7 +2,7 @@ "query": "DELIMITER GO\nSELECT a,b FROM foo GO\nSELECT * FROM bar", "lexer": { "@type": "PhpMyAdmin\\SqlParser\\Lexer", - "PARSER_METHODS": [ + "parserMethods": [ "parseDelimiter", "parseWhitespace", "parseNumber", @@ -241,7 +241,7 @@ "count": 24, "idx": 0 }, - "DEFAULT_DELIMITER": ";", + "defaultDelimiter": ";", "delimiter": "GO", "delimiterLen": 2, "strict": false, diff --git a/tests/data/lexer/lexDelimiter2.out b/tests/data/lexer/lexDelimiter2.out index c8020d7a9..97d89b41e 100644 --- a/tests/data/lexer/lexDelimiter2.out +++ b/tests/data/lexer/lexDelimiter2.out @@ -2,7 +2,7 @@ "query": "DELIMTER \/\/\nSELECT a,b FROM test \/\/\nSELECT * FROM bar \/\/", "lexer": { "@type": "PhpMyAdmin\\SqlParser\\Lexer", - "PARSER_METHODS": [ + "parserMethods": [ "parseDelimiter", "parseWhitespace", "parseNumber", @@ -286,7 +286,7 @@ "count": 29, "idx": 0 }, - "DEFAULT_DELIMITER": ";", + "defaultDelimiter": ";", "delimiter": ";", "delimiterLen": 1, "strict": false, diff --git a/tests/data/lexer/lexDelimiterErr1.out b/tests/data/lexer/lexDelimiterErr1.out index 97a9e78ec..25fdd6a60 100644 --- a/tests/data/lexer/lexDelimiterErr1.out +++ b/tests/data/lexer/lexDelimiterErr1.out @@ -2,7 +2,7 @@ "query": "DELIMITER", "lexer": { "@type": "PhpMyAdmin\\SqlParser\\Lexer", - "PARSER_METHODS": [ + "parserMethods": [ "parseDelimiter", "parseWhitespace", "parseNumber", @@ -43,7 +43,7 @@ "count": 2, "idx": 0 }, - "DEFAULT_DELIMITER": ";", + "defaultDelimiter": ";", "delimiter": ";", "delimiterLen": 1, "strict": false, diff --git a/tests/data/lexer/lexDelimiterErr2.out b/tests/data/lexer/lexDelimiterErr2.out index bc260a61b..71325f10f 100644 --- a/tests/data/lexer/lexDelimiterErr2.out +++ b/tests/data/lexer/lexDelimiterErr2.out @@ -2,7 +2,7 @@ "query": "DELIMITER \r", "lexer": { "@type": "PhpMyAdmin\\SqlParser\\Lexer", - "PARSER_METHODS": [ + "parserMethods": [ "parseDelimiter", "parseWhitespace", "parseNumber", @@ -52,7 +52,7 @@ "count": 3, "idx": 0 }, - "DEFAULT_DELIMITER": ";", + "defaultDelimiter": ";", "delimiter": ";", "delimiterLen": 1, "strict": false, diff --git a/tests/data/lexer/lexDelimiterErr3.out b/tests/data/lexer/lexDelimiterErr3.out index 557462f9f..732deb4a5 100644 --- a/tests/data/lexer/lexDelimiterErr3.out +++ b/tests/data/lexer/lexDelimiterErr3.out @@ -2,7 +2,7 @@ "query": "DELIMITER;\n", "lexer": { "@type": "PhpMyAdmin\\SqlParser\\Lexer", - "PARSER_METHODS": [ + "parserMethods": [ "parseDelimiter", "parseWhitespace", "parseNumber", @@ -61,7 +61,7 @@ "count": 4, "idx": 0 }, - "DEFAULT_DELIMITER": ";", + "defaultDelimiter": ";", "delimiter": ";", "delimiterLen": 1, "strict": false, diff --git a/tests/data/lexer/lexDelimiterLen.out b/tests/data/lexer/lexDelimiterLen.out index 041d31a67..e6b630f77 100644 --- a/tests/data/lexer/lexDelimiterLen.out +++ b/tests/data/lexer/lexDelimiterLen.out @@ -2,7 +2,7 @@ "query": "DELIMITER abcdefghijklmnopqrstuvwxyz\nSELECT 1 abcdefghijklmnopqrstuvwxyz\n", "lexer": { "@type": "PhpMyAdmin\\SqlParser\\Lexer", - "PARSER_METHODS": [ + "parserMethods": [ "parseDelimiter", "parseWhitespace", "parseNumber", @@ -142,7 +142,7 @@ "count": 13, "idx": 0 }, - "DEFAULT_DELIMITER": ";", + "defaultDelimiter": ";", "delimiter": "abcdefghijklmno", "delimiterLen": 15, "strict": false, diff --git a/tests/data/lexer/lexKeyword.out b/tests/data/lexer/lexKeyword.out index c6c5028ad..b177c501e 100644 --- a/tests/data/lexer/lexKeyword.out +++ b/tests/data/lexer/lexKeyword.out @@ -2,7 +2,7 @@ "query": "SELECT 1", "lexer": { "@type": "PhpMyAdmin\\SqlParser\\Lexer", - "PARSER_METHODS": [ + "parserMethods": [ "parseDelimiter", "parseWhitespace", "parseNumber", @@ -61,7 +61,7 @@ "count": 4, "idx": 0 }, - "DEFAULT_DELIMITER": ";", + "defaultDelimiter": ";", "delimiter": ";", "delimiterLen": 1, "strict": false, diff --git a/tests/data/lexer/lexKeyword2.out b/tests/data/lexer/lexKeyword2.out index ddc0f5768..3b12649fd 100644 --- a/tests/data/lexer/lexKeyword2.out +++ b/tests/data/lexer/lexKeyword2.out @@ -2,7 +2,7 @@ "query": "SELECT tbl.TABLE FROM tbl", "lexer": { "@type": "PhpMyAdmin\\SqlParser\\Lexer", - "PARSER_METHODS": [ + "parserMethods": [ "parseDelimiter", "parseWhitespace", "parseNumber", @@ -115,7 +115,7 @@ "count": 10, "idx": 0 }, - "DEFAULT_DELIMITER": ";", + "defaultDelimiter": ";", "delimiter": ";", "delimiterLen": 1, "strict": false, diff --git a/tests/data/lexer/lexLabel1.out b/tests/data/lexer/lexLabel1.out index 1c90ccf2f..8d609dd4c 100644 --- a/tests/data/lexer/lexLabel1.out +++ b/tests/data/lexer/lexLabel1.out @@ -2,7 +2,7 @@ "query": "CREATE PROCEDURE doiterate(p1 INT)\nBEGIN\n label1 : LOOP\n SET p1 = p1 + 1;\n IF p1 < 10 THEN\n ITERATE label1;\n END IF;\n LEAVE label1;\n END LOOP label1;\n SET @x = p1;\nEND", "lexer": { "@type": "PhpMyAdmin\\SqlParser\\Lexer", - "PARSER_METHODS": [ + "parserMethods": [ "parseDelimiter", "parseWhitespace", "parseNumber", @@ -682,7 +682,7 @@ "count": 73, "idx": 0 }, - "DEFAULT_DELIMITER": ";", + "defaultDelimiter": ";", "delimiter": ";", "delimiterLen": 1, "strict": false, diff --git a/tests/data/lexer/lexLabel2.out b/tests/data/lexer/lexLabel2.out index eb17b092f..aff8b47c9 100644 --- a/tests/data/lexer/lexLabel2.out +++ b/tests/data/lexer/lexLabel2.out @@ -2,7 +2,7 @@ "query": "CREATE PROCEDURE doiterate(p1 INT)\nBEGIN\n label1: LOOP\n SET p1 = p1 + 1;\n IF p1 < 10 THEN\n ITERATE label1;\n END IF;\n LEAVE label1;\n END LOOP label1;\n SET @x = p1;\nEND", "lexer": { "@type": "PhpMyAdmin\\SqlParser\\Lexer", - "PARSER_METHODS": [ + "parserMethods": [ "parseDelimiter", "parseWhitespace", "parseNumber", @@ -682,7 +682,7 @@ "count": 73, "idx": 0 }, - "DEFAULT_DELIMITER": ";", + "defaultDelimiter": ";", "delimiter": ";", "delimiterLen": 1, "strict": false, diff --git a/tests/data/lexer/lexNoLabel.out b/tests/data/lexer/lexNoLabel.out index 165a496cd..a1a364502 100644 --- a/tests/data/lexer/lexNoLabel.out +++ b/tests/data/lexer/lexNoLabel.out @@ -2,7 +2,7 @@ "query": "SELECT wins FROM players WHERE auth = '[U1:123456789]' LIMIT 1\n", "lexer": { "@type": "PhpMyAdmin\\SqlParser\\Lexer", - "PARSER_METHODS": [ + "parserMethods": [ "parseDelimiter", "parseWhitespace", "parseNumber", @@ -214,7 +214,7 @@ "count": 21, "idx": 0 }, - "DEFAULT_DELIMITER": ";", + "defaultDelimiter": ";", "delimiter": ";", "delimiterLen": 1, "strict": false, diff --git a/tests/data/lexer/lexNumber.out b/tests/data/lexer/lexNumber.out index 5137a02a3..29216c183 100644 --- a/tests/data/lexer/lexNumber.out +++ b/tests/data/lexer/lexNumber.out @@ -2,7 +2,7 @@ "query": "SELECT 12, 34, 5.67, 0x89, -10, --11, +12, .15, 0xFFa, 0xfFA, 0XFfA, -0xFFa, -0xfFA, -0XFfA, 1e-10, 1e10, .5e10, b'10';\n-- invalid number\nSELECT 12ex10, b'15';", "lexer": { "@type": "PhpMyAdmin\\SqlParser\\Lexer", - "PARSER_METHODS": [ + "parserMethods": [ "parseDelimiter", "parseWhitespace", "parseNumber", @@ -628,7 +628,7 @@ "count": 67, "idx": 0 }, - "DEFAULT_DELIMITER": ";", + "defaultDelimiter": ";", "delimiter": ";", "delimiterLen": 1, "strict": false, diff --git a/tests/data/lexer/lexOperator.out b/tests/data/lexer/lexOperator.out index 68a66ae4f..8f278d3fb 100644 --- a/tests/data/lexer/lexOperator.out +++ b/tests/data/lexer/lexOperator.out @@ -2,7 +2,7 @@ "query": "SELECT 1 + 2", "lexer": { "@type": "PhpMyAdmin\\SqlParser\\Lexer", - "PARSER_METHODS": [ + "parserMethods": [ "parseDelimiter", "parseWhitespace", "parseNumber", @@ -97,7 +97,7 @@ "count": 8, "idx": 0 }, - "DEFAULT_DELIMITER": ";", + "defaultDelimiter": ";", "delimiter": ";", "delimiterLen": 1, "strict": false, diff --git a/tests/data/lexer/lexOperatorStarIsArithmetic.out b/tests/data/lexer/lexOperatorStarIsArithmetic.out index fff4d4f90..4509d2bf7 100644 --- a/tests/data/lexer/lexOperatorStarIsArithmetic.out +++ b/tests/data/lexer/lexOperatorStarIsArithmetic.out @@ -2,7 +2,7 @@ "query": "SELECT 2*3\nSELECT 2 * 3\nSELECT field * 8\nSELECT 8 * field\nSELECT foo * bar\nSELECT `escaped_field` * 16\nSELECT 16 * `escaped_field`\nSELECT `foo` * `bar`\nSELECT `foo`*`bar`\nSELECT 1 * (SELECT COUNT(1) FROM nb_rows)\nSELECT (SELECT COUNT(1) FROM nb_rows) * 1\nSELECT (SELECT COUNT(1) FROM nb_rows) * (SELECT COUNT(1) FROM nb_rows)\nSELECT (1 * 1) * (2 * 2)\nSELECT 1 * (2 * (3 * (4 * 5)))\nSELECT 2.71 * 3.14\nSELECT 2.71 * -3.14\nSELECT -2.71 * 3.14\nSELECT -2.71 * -3.14\nSELECT 0xABC * 0xCBA\nSELECT 0xABC * -0xCBA\nSELECT -0xABC * 0xCBA\nSELECT -0xABC * -0xCBA\n\n-- Now same but with comments inside (C style comments could conflicts with operator if lexer is failing)\nSELECT 2 * \/* comment *\/3\nSELECT 2\/* comment *\/ * 3\nSELECT 2\/* comment with * inside *\/ * 3\nSELECT \/* comment *\/ field \/* comment *\/ * \/* comment *\/ 8 \/* comment *\/\nSELECT \/* comment *\/ 8 \/* comment *\/ * \/* comment *\/ field \/* comment *\/\nSELECT \/* comment *\/ foo \/* comment *\/ * \/* comment *\/ bar \/* comment *\/\nSELECT \/* comment *\/ `escaped_field` \/* comment *\/ * \/* comment *\/ 16 \/* comment *\/\nSELECT \/* comment *\/ 16 \/* comment *\/ * \/* comment *\/ `escaped_field` \/* comment *\/\nSELECT \/* comment *\/ `foo` \/* comment *\/ * \/* comment *\/ `bar` \/* comment *\/\nSELECT \/* `comment` *\/ `foo` \/* `comment` *\/ * \/* `comment` *\/ `bar` \/* `comment` *\/\nSELECT \/* comment *\/ 1 \/* comment *\/ * \/* comment *\/ (SELECT COUNT(\/* comment *\/1\/* comment *\/) \/* comment *\/ FROM nb_rows)\nSELECT \/* comment *\/ (SELECT COUNT(1) \/* comment *\/FROM\/* comment *\/ nb_rows) \/* comment *\/ * \/* comment *\/ 1\nSELECT (SELECT \/* comment *\/ COUNT(1) \/* comment *\/ FROM \/* comment *\/ nb_rows) \/* comment *\/ * \/* comment *\/ (SELECT COUNT(1) FROM nb_rows)\nSELECT (1 * 1) \/* comment *\/ * \/* comment *\/ (2 * 2)\nSELECT \/* comment *\/ 1 \/* comment *\/ * \/* comment *\/ (2 \/* comment *\/ * \/* comment *\/ (3 \/* comment *\/ * \/* comment *\/ (4 \/* comment *\/ * \/* comment *\/ 5))) \/* comment *\/\nSELECT 2.71 \/* comment *\/ * \/* comment *\/ 3.14\nSELECT 2.71 \/* comment *\/ * \/* comment *\/ -3.14\nSELECT -2.71 \/* comment *\/ * \/* comment *\/ 3.14\nSELECT -2.71 \/* comment *\/ * \/* comment *\/ -3.14\nSELECT 0xABC \/* comment *\/ * \/* comment *\/ 0xCBA\nSELECT 0xABC \/* comment *\/ * \/* comment *\/ -0xCBA\nSELECT -0xABC \/* comment *\/ * \/* comment *\/ 0xCBA\nSELECT -0xABC \/* comment *\/ * \/* comment *\/ -0xCBA\nSELECT 1 \/* comment with FROM keyword *\/ * \/* comment with USING keyword *\/1\nSELECT 1 \/* comment with ) *\/ * \/* comment with , keyword *\/1\n\n", "lexer": { "@type": "PhpMyAdmin\\SqlParser\\Lexer", - "PARSER_METHODS": [ + "parserMethods": [ "parseDelimiter", "parseWhitespace", "parseNumber", @@ -6073,7 +6073,7 @@ "count": 672, "idx": 0 }, - "DEFAULT_DELIMITER": ";", + "defaultDelimiter": ";", "delimiter": ";", "delimiterLen": 1, "strict": false, diff --git a/tests/data/lexer/lexOperatorStarIsWildcard.out b/tests/data/lexer/lexOperatorStarIsWildcard.out index c2d62a969..c491b4d79 100644 --- a/tests/data/lexer/lexOperatorStarIsWildcard.out +++ b/tests/data/lexer/lexOperatorStarIsWildcard.out @@ -2,7 +2,7 @@ "query": "SELECT * FROM\nSELECT *FROM\nSELECT a.* FROM\nSELECT a.*,b.* FROM\nSELECT a.*, b.* FROM\nSELECT a.*, \/* with a comment *\/ b.* FROM\nSELECT a.*,\/* with a comment *\/b.* FROM\nSELECT a.* \/* comment *\/ FROM\n-- SELECT a.*\/* comment *\/ FROM (This one is not working yet because of https:\/\/github.com\/phpmyadmin\/sql-parser\/issues\/285. Please uncomment when this issue is fixed.)\nSELECT DISTINCT * FROM\nSELECT DISTINCT *FROM\nSELECT DISTINCT a.* FROM\nSELECT DISTINCT a.*,b.* FROM\nSELECT DISTINCT a.*, b.* FROM\nSELECT DISTINCT a.*, \/* with a comment *\/ b.* FROM\nSELECT DISTINCT a.*,\/* with a comment *\/b.* FROM\nSELECT DISTINCT a.* \/* comment *\/ FROM\n-- SELECT DISTINCT a.*\/* comment *\/ FROM (This one is not working yet because of https:\/\/github.com\/phpmyadmin\/sql-parser\/issues\/285. Please uncomment when this issue is fixed.)\nSELECT `*` FROM table_name\nSELECT `*`.* FROM table_name AS `*`\nSELECT COUNT(*) FROM table_name\nSELECT COUNT( * ) FROM table_name\nSELECT COUNT( * \/* comment with *,USING,FROM *\/) FROM table_name\nSELECT COUNT(`*`) FROM table_name\nSELECT 1 FROM table_name WHERE LABEL LIKE '%*%'\nDELETE a.* USING\nDELETE a.*, b.* USING\nDELETE a.* ,b.* USING\nDELETE a.* , b.* USING\nDELETE a.* \/* comment *\/ USING\nDELETE a.* \/* comment *\/, b.* \/*comment*\/ USING\nDELETE a.* \/* comment *\/ ,b.* \/*comment*\/ USING\nDELETE a.* \/* comment *\/ , b.* \/*comment*\/ USING\n\n", "lexer": { "@type": "PhpMyAdmin\\SqlParser\\Lexer", - "PARSER_METHODS": [ + "parserMethods": [ "parseDelimiter", "parseWhitespace", "parseNumber", @@ -3463,7 +3463,7 @@ "count": 382, "idx": 0 }, - "DEFAULT_DELIMITER": ";", + "defaultDelimiter": ";", "delimiter": ";", "delimiterLen": 1, "strict": false, diff --git a/tests/data/lexer/lexString.out b/tests/data/lexer/lexString.out index ef595a3f9..b83822668 100644 --- a/tests/data/lexer/lexString.out +++ b/tests/data/lexer/lexString.out @@ -2,7 +2,7 @@ "query": "SELECT 'foo', \"bar\", \"foo\\\\ bar\"", "lexer": { "@type": "PhpMyAdmin\\SqlParser\\Lexer", - "PARSER_METHODS": [ + "parserMethods": [ "parseDelimiter", "parseWhitespace", "parseNumber", @@ -115,7 +115,7 @@ "count": 10, "idx": 0 }, - "DEFAULT_DELIMITER": ";", + "defaultDelimiter": ";", "delimiter": ";", "delimiterLen": 1, "strict": false, diff --git a/tests/data/lexer/lexStringErr1.out b/tests/data/lexer/lexStringErr1.out index a3086d5de..8b3f393bc 100644 --- a/tests/data/lexer/lexStringErr1.out +++ b/tests/data/lexer/lexStringErr1.out @@ -2,7 +2,7 @@ "query": "SELECT 'foo', \"bar\", \"foo\\\\ bar", "lexer": { "@type": "PhpMyAdmin\\SqlParser\\Lexer", - "PARSER_METHODS": [ + "parserMethods": [ "parseDelimiter", "parseWhitespace", "parseNumber", @@ -115,7 +115,7 @@ "count": 10, "idx": 0 }, - "DEFAULT_DELIMITER": ";", + "defaultDelimiter": ";", "delimiter": ";", "delimiterLen": 1, "strict": false, diff --git a/tests/data/lexer/lexSymbol.out b/tests/data/lexer/lexSymbol.out index 5622cbace..0e83e5305 100644 --- a/tests/data/lexer/lexSymbol.out +++ b/tests/data/lexer/lexSymbol.out @@ -2,7 +2,7 @@ "query": "SET @idx := 1;\nSELECT @idx, @`idx`, @'idx', @@hostname", "lexer": { "@type": "PhpMyAdmin\\SqlParser\\Lexer", - "PARSER_METHODS": [ + "parserMethods": [ "parseDelimiter", "parseWhitespace", "parseNumber", @@ -223,7 +223,7 @@ "count": 22, "idx": 0 }, - "DEFAULT_DELIMITER": ";", + "defaultDelimiter": ";", "delimiter": ";", "delimiterLen": 1, "strict": false, diff --git a/tests/data/lexer/lexSymbolErr1.out b/tests/data/lexer/lexSymbolErr1.out index ad595a7f0..83bb2be1d 100644 --- a/tests/data/lexer/lexSymbolErr1.out +++ b/tests/data/lexer/lexSymbolErr1.out @@ -2,7 +2,7 @@ "query": "SET @idx := 1;\nSELECT @idx, @`idx`, @'idx", "lexer": { "@type": "PhpMyAdmin\\SqlParser\\Lexer", - "PARSER_METHODS": [ + "parserMethods": [ "parseDelimiter", "parseWhitespace", "parseNumber", @@ -196,7 +196,7 @@ "count": 19, "idx": 0 }, - "DEFAULT_DELIMITER": ";", + "defaultDelimiter": ";", "delimiter": ";", "delimiterLen": 1, "strict": false, diff --git a/tests/data/lexer/lexSymbolErr2.out b/tests/data/lexer/lexSymbolErr2.out index f4a62acfb..90be012e0 100644 --- a/tests/data/lexer/lexSymbolErr2.out +++ b/tests/data/lexer/lexSymbolErr2.out @@ -2,7 +2,7 @@ "query": "SET @idx := 1;\nSELECT @idx, @`idx`, @ ", "lexer": { "@type": "PhpMyAdmin\\SqlParser\\Lexer", - "PARSER_METHODS": [ + "parserMethods": [ "parseDelimiter", "parseWhitespace", "parseNumber", @@ -196,7 +196,7 @@ "count": 19, "idx": 0 }, - "DEFAULT_DELIMITER": ";", + "defaultDelimiter": ";", "delimiter": ";", "delimiterLen": 1, "strict": false, diff --git a/tests/data/lexer/lexSymbolErr3.out b/tests/data/lexer/lexSymbolErr3.out index c11efeab6..26a3ca88e 100644 --- a/tests/data/lexer/lexSymbolErr3.out +++ b/tests/data/lexer/lexSymbolErr3.out @@ -2,7 +2,7 @@ "query": "SELECT `idx", "lexer": { "@type": "PhpMyAdmin\\SqlParser\\Lexer", - "PARSER_METHODS": [ + "parserMethods": [ "parseDelimiter", "parseWhitespace", "parseNumber", @@ -61,7 +61,7 @@ "count": 4, "idx": 0 }, - "DEFAULT_DELIMITER": ";", + "defaultDelimiter": ";", "delimiter": ";", "delimiterLen": 1, "strict": false, diff --git a/tests/data/lexer/lexSymbolUser.out b/tests/data/lexer/lexSymbolUser.out index 102d20659..273fc2be7 100644 --- a/tests/data/lexer/lexSymbolUser.out +++ b/tests/data/lexer/lexSymbolUser.out @@ -2,7 +2,7 @@ "query": "CREATE USER 'user'@'hostname' IDENTIFIED BY 'password';", "lexer": { "@type": "PhpMyAdmin\\SqlParser\\Lexer", - "PARSER_METHODS": [ + "parserMethods": [ "parseDelimiter", "parseWhitespace", "parseNumber", @@ -142,7 +142,7 @@ "count": 13, "idx": 0 }, - "DEFAULT_DELIMITER": ";", + "defaultDelimiter": ";", "delimiter": ";", "delimiterLen": 1, "strict": false, diff --git a/tests/data/lexer/lexUtf8.out b/tests/data/lexer/lexUtf8.out index 90255f892..8843af71d 100644 --- a/tests/data/lexer/lexUtf8.out +++ b/tests/data/lexer/lexUtf8.out @@ -2,7 +2,7 @@ "query": "select * from école", "lexer": { "@type": "PhpMyAdmin\\SqlParser\\Lexer", - "PARSER_METHODS": [ + "parserMethods": [ "parseDelimiter", "parseWhitespace", "parseNumber", @@ -211,7 +211,7 @@ "count": 8, "idx": 0 }, - "DEFAULT_DELIMITER": ";", + "defaultDelimiter": ";", "delimiter": ";", "delimiterLen": 1, "strict": false, diff --git a/tests/data/lexer/lexWhitespace.out b/tests/data/lexer/lexWhitespace.out index 3d58df126..1d99a2263 100644 --- a/tests/data/lexer/lexWhitespace.out +++ b/tests/data/lexer/lexWhitespace.out @@ -2,7 +2,7 @@ "query": "\n\n\nSELECT \n\t\t'w h i t e\t\ts p a c e'\n\n\t\t\n\t\t\t\n \n ", "lexer": { "@type": "PhpMyAdmin\\SqlParser\\Lexer", - "PARSER_METHODS": [ + "parserMethods": [ "parseDelimiter", "parseWhitespace", "parseNumber", @@ -79,7 +79,7 @@ "count": 6, "idx": 0 }, - "DEFAULT_DELIMITER": ";", + "defaultDelimiter": ";", "delimiter": ";", "delimiterLen": 1, "strict": false, diff --git a/tests/data/lexer/lexWildcardThenComment.out b/tests/data/lexer/lexWildcardThenComment.out index 7682d555b..5c9e7fbbb 100644 --- a/tests/data/lexer/lexWildcardThenComment.out +++ b/tests/data/lexer/lexWildcardThenComment.out @@ -2,7 +2,7 @@ "query": "SELECT *\/* comment *\/\n\nSELECT \/* comment *\/*\n\nSELECT 2*\/* comment *\/3\n\nSELECT 2\/* comment *\/*3\n\nSELECT *\/*\ncomment\non\nmultiple\nlines\n*\/FROM\n\nDELETE foo.*\/* foo *\/ USING\n\nDELETE foo.*\/* foo *\/,bar.*\/*bar*\/ USING\n\nSELECT `*`\/*with comment*\/ AS star_field\n\nSELECT `*`,*\/*with comment*\/\n\nDELETE a.*\/*multi\nline \/* with C open tag\ncomment inside *\/ USING\n\nSELECT 2*\/* operator *\/3 + 3\/* operator *\/*2,\/* start wildcard *\/*\/* end wildcard *\/\n\nSELECT `*`\/*a*\/*\/*b*\/`*`\n\n-- invalid queries\n\/* SELECT *\/*", "lexer": { "@type": "PhpMyAdmin\\SqlParser\\Lexer", - "PARSER_METHODS": [ + "parserMethods": [ "parseDelimiter", "parseWhitespace", "parseNumber", @@ -1006,7 +1006,7 @@ "count": 109, "idx": 0 }, - "DEFAULT_DELIMITER": ";", + "defaultDelimiter": ";", "delimiter": ";", "delimiterLen": 1, "strict": false, diff --git a/tests/data/misc/parseParameter.out b/tests/data/misc/parseParameter.out index 9b7aa6452..0e22853fe 100644 --- a/tests/data/misc/parseParameter.out +++ b/tests/data/misc/parseParameter.out @@ -2,7 +2,7 @@ "query": "INSERT INTO `person` (`firstname`, `lastname`, `email`) VALUES (:firstname, :lastname, :email);", "lexer": { "@type": "PhpMyAdmin\\SqlParser\\Lexer", - "PARSER_METHODS": [ + "parserMethods": [ "parseDelimiter", "parseWhitespace", "parseNumber", @@ -286,7 +286,7 @@ "count": 29, "idx": 29 }, - "DEFAULT_DELIMITER": ";", + "defaultDelimiter": ";", "delimiter": ";", "delimiterLen": 1, "strict": false, @@ -294,7 +294,7 @@ }, "parser": { "@type": "PhpMyAdmin\\SqlParser\\Parser", - "STATEMENT_PARSERS": { + "statementParsers": { "DESCRIBE": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", "DESC": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", "EXPLAIN": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", @@ -339,7 +339,7 @@ "LOCK": "PhpMyAdmin\\SqlParser\\Statements\\LockStatement", "UNLOCK": "PhpMyAdmin\\SqlParser\\Statements\\LockStatement" }, - "KEYWORD_PARSERS": { + "keywordParsers": { "PARTITION BY": [], "SUBPARTITION BY": [], "_OPTIONS": { @@ -348,7 +348,7 @@ }, "_END_OPTIONS": { "class": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", - "field": "end_options" + "field": "endOptions" }, "INTERSECT": { "class": "PhpMyAdmin\\SqlParser\\Components\\UnionKeyword", @@ -596,7 +596,7 @@ "statements": [ { "@type": "PhpMyAdmin\\SqlParser\\Statements\\InsertStatement", - "OPTIONS": { + "statementOptions": { "LOW_PRIORITY": 1, "DELAYED": 2, "HIGH_PRIORITY": 3, @@ -604,7 +604,7 @@ }, "into": { "@type": "PhpMyAdmin\\SqlParser\\Components\\IntoKeyword", - "FIELDS_OPTIONS": { + "statementFieldsOptions": { "TERMINATED BY": [ 1, "expr" @@ -619,7 +619,7 @@ "expr" ] }, - "LINES_OPTIONS": { + "statementLinesOptions": { "STARTING BY": [ 1, "expr" @@ -632,7 +632,7 @@ "type": null, "dest": { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -660,9 +660,9 @@ "email" ], "values": null, - "fields_options": null, - "fields_keyword": null, - "lines_options": null + "fieldsOptions": null, + "fieldsKeyword": null, + "linesOptions": null }, "values": [ { @@ -683,8 +683,8 @@ "select": null, "with": null, "onDuplicateSet": null, - "CLAUSES": [], - "END_OPTIONS": [], + "clauses": [], + "statementEndOptions": [], "options": { "@type": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", "options": [] diff --git a/tests/data/parser/parse.out b/tests/data/parser/parse.out index 7c26d5f92..2f4d6d783 100644 --- a/tests/data/parser/parse.out +++ b/tests/data/parser/parse.out @@ -2,7 +2,7 @@ "query": "SELECT 1;", "lexer": { "@type": "PhpMyAdmin\\SqlParser\\Lexer", - "PARSER_METHODS": [ + "parserMethods": [ "parseDelimiter", "parseWhitespace", "parseNumber", @@ -70,7 +70,7 @@ "count": 5, "idx": 5 }, - "DEFAULT_DELIMITER": ";", + "defaultDelimiter": ";", "delimiter": ";", "delimiterLen": 1, "strict": false, @@ -78,7 +78,7 @@ }, "parser": { "@type": "PhpMyAdmin\\SqlParser\\Parser", - "STATEMENT_PARSERS": { + "statementParsers": { "DESCRIBE": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", "DESC": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", "EXPLAIN": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", @@ -123,7 +123,7 @@ "LOCK": "PhpMyAdmin\\SqlParser\\Statements\\LockStatement", "UNLOCK": "PhpMyAdmin\\SqlParser\\Statements\\LockStatement" }, - "KEYWORD_PARSERS": { + "keywordParsers": { "PARTITION BY": [], "SUBPARTITION BY": [], "_OPTIONS": { @@ -132,7 +132,7 @@ }, "_END_OPTIONS": { "class": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", - "field": "end_options" + "field": "endOptions" }, "INTERSECT": { "class": "PhpMyAdmin\\SqlParser\\Components\\UnionKeyword", @@ -380,7 +380,7 @@ "statements": [ { "@type": "PhpMyAdmin\\SqlParser\\Statements\\SelectStatement", - "OPTIONS": { + "statementOptions": { "ALL": 1, "DISTINCT": 1, "DISTINCTROW": 1, @@ -397,11 +397,11 @@ "SQL_NO_CACHE": 8, "SQL_CALC_FOUND_ROWS": 9 }, - "END_OPTIONS": { + "statementEndOptions": { "FOR UPDATE": 1, "LOCK IN SHARE MODE": 1 }, - "CLAUSES": { + "clauses": { "SELECT": [ "SELECT", 2 @@ -530,7 +530,7 @@ "expr": [ { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -554,7 +554,7 @@ } ], "from": [], - "index_hints": null, + "indexHints": null, "partition": null, "where": null, "group": null, @@ -565,7 +565,7 @@ "into": null, "join": null, "union": [], - "end_options": null, + "endOptions": null, "options": { "@type": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", "options": [] diff --git a/tests/data/parser/parse2.out b/tests/data/parser/parse2.out index 12e59a109..c5f20af12 100644 --- a/tests/data/parser/parse2.out +++ b/tests/data/parser/parse2.out @@ -2,7 +2,7 @@ "query": "(SELECT 1);((SELECT 2));", "lexer": { "@type": "PhpMyAdmin\\SqlParser\\Lexer", - "PARSER_METHODS": [ + "parserMethods": [ "parseDelimiter", "parseWhitespace", "parseNumber", @@ -160,7 +160,7 @@ "count": 15, "idx": 15 }, - "DEFAULT_DELIMITER": ";", + "defaultDelimiter": ";", "delimiter": ";", "delimiterLen": 1, "strict": false, @@ -168,7 +168,7 @@ }, "parser": { "@type": "PhpMyAdmin\\SqlParser\\Parser", - "STATEMENT_PARSERS": { + "statementParsers": { "DESCRIBE": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", "DESC": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", "EXPLAIN": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", @@ -213,7 +213,7 @@ "LOCK": "PhpMyAdmin\\SqlParser\\Statements\\LockStatement", "UNLOCK": "PhpMyAdmin\\SqlParser\\Statements\\LockStatement" }, - "KEYWORD_PARSERS": { + "keywordParsers": { "PARTITION BY": [], "SUBPARTITION BY": [], "_OPTIONS": { @@ -222,7 +222,7 @@ }, "_END_OPTIONS": { "class": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", - "field": "end_options" + "field": "endOptions" }, "INTERSECT": { "class": "PhpMyAdmin\\SqlParser\\Components\\UnionKeyword", @@ -470,7 +470,7 @@ "statements": [ { "@type": "PhpMyAdmin\\SqlParser\\Statements\\SelectStatement", - "OPTIONS": { + "statementOptions": { "ALL": 1, "DISTINCT": 1, "DISTINCTROW": 1, @@ -487,11 +487,11 @@ "SQL_NO_CACHE": 8, "SQL_CALC_FOUND_ROWS": 9 }, - "END_OPTIONS": { + "statementEndOptions": { "FOR UPDATE": 1, "LOCK IN SHARE MODE": 1 }, - "CLAUSES": { + "clauses": { "SELECT": [ "SELECT", 2 @@ -620,7 +620,7 @@ "expr": [ { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -644,7 +644,7 @@ } ], "from": [], - "index_hints": null, + "indexHints": null, "partition": null, "where": null, "group": null, @@ -655,7 +655,7 @@ "into": null, "join": null, "union": [], - "end_options": null, + "endOptions": null, "options": { "@type": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", "options": [] @@ -665,7 +665,7 @@ }, { "@type": "PhpMyAdmin\\SqlParser\\Statements\\SelectStatement", - "OPTIONS": { + "statementOptions": { "ALL": 1, "DISTINCT": 1, "DISTINCTROW": 1, @@ -682,11 +682,11 @@ "SQL_NO_CACHE": 8, "SQL_CALC_FOUND_ROWS": 9 }, - "END_OPTIONS": { + "statementEndOptions": { "FOR UPDATE": 1, "LOCK IN SHARE MODE": 1 }, - "CLAUSES": { + "clauses": { "SELECT": [ "SELECT", 2 @@ -815,7 +815,7 @@ "expr": [ { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -839,7 +839,7 @@ } ], "from": [], - "index_hints": null, + "indexHints": null, "partition": null, "where": null, "group": null, @@ -850,7 +850,7 @@ "into": null, "join": null, "union": [], - "end_options": null, + "endOptions": null, "options": { "@type": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", "options": [] diff --git a/tests/data/parser/parseAlter.out b/tests/data/parser/parseAlter.out index 09b7a5313..3885f30b6 100644 --- a/tests/data/parser/parseAlter.out +++ b/tests/data/parser/parseAlter.out @@ -2,7 +2,7 @@ "query": "ALTER TABLE `actor`\n ADD PRIMARY KEY (`actor_id`),\n ADD KEY `idx_actor_last_name` (`last_name`);", "lexer": { "@type": "PhpMyAdmin\\SqlParser\\Lexer", - "PARSER_METHODS": [ + "parserMethods": [ "parseDelimiter", "parseWhitespace", "parseNumber", @@ -259,7 +259,7 @@ "count": 26, "idx": 26 }, - "DEFAULT_DELIMITER": ";", + "defaultDelimiter": ";", "delimiter": ";", "delimiterLen": 1, "strict": false, @@ -267,7 +267,7 @@ }, "parser": { "@type": "PhpMyAdmin\\SqlParser\\Parser", - "STATEMENT_PARSERS": { + "statementParsers": { "DESCRIBE": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", "DESC": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", "EXPLAIN": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", @@ -312,7 +312,7 @@ "LOCK": "PhpMyAdmin\\SqlParser\\Statements\\LockStatement", "UNLOCK": "PhpMyAdmin\\SqlParser\\Statements\\LockStatement" }, - "KEYWORD_PARSERS": { + "keywordParsers": { "PARTITION BY": [], "SUBPARTITION BY": [], "_OPTIONS": { @@ -321,7 +321,7 @@ }, "_END_OPTIONS": { "class": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", - "field": "end_options" + "field": "endOptions" }, "INTERSECT": { "class": "PhpMyAdmin\\SqlParser\\Components\\UnionKeyword", @@ -571,7 +571,7 @@ "@type": "PhpMyAdmin\\SqlParser\\Statements\\AlterStatement", "table": { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -596,7 +596,7 @@ "altered": [ { "@type": "PhpMyAdmin\\SqlParser\\Components\\AlterOperation", - "DB_OPTIONS": { + "databaseOptions": { "CHARACTER SET": [ 1, "var" @@ -626,7 +626,7 @@ "var" ] }, - "TABLE_OPTIONS": { + "tableOptions": { "ENGINE": [ 1, "var=" @@ -691,7 +691,7 @@ "INDEX": 2, "CHARACTER SET": 3 }, - "USER_OPTIONS": { + "userOptions": { "ATTRIBUTE": [ 1, "var" @@ -722,7 +722,7 @@ "UNLOCK": 2, "IDENTIFIED": 3 }, - "VIEW_OPTIONS": { + "viewOptions": { "AS": 1 }, "options": { @@ -747,7 +747,7 @@ }, { "@type": "PhpMyAdmin\\SqlParser\\Components\\AlterOperation", - "DB_OPTIONS": { + "databaseOptions": { "CHARACTER SET": [ 1, "var" @@ -777,7 +777,7 @@ "var" ] }, - "TABLE_OPTIONS": { + "tableOptions": { "ENGINE": [ 1, "var=" @@ -842,7 +842,7 @@ "INDEX": 2, "CHARACTER SET": 3 }, - "USER_OPTIONS": { + "userOptions": { "ATTRIBUTE": [ 1, "var" @@ -873,7 +873,7 @@ "UNLOCK": 2, "IDENTIFIED": 3 }, - "VIEW_OPTIONS": { + "viewOptions": { "AS": 1 }, "options": { @@ -885,7 +885,7 @@ }, "field": { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -920,7 +920,7 @@ ] } ], - "OPTIONS": { + "statementOptions": { "ONLINE": 1, "OFFLINE": 1, "IGNORE": 2, @@ -934,8 +934,8 @@ "USER": 3, "VIEW": 3 }, - "CLAUSES": [], - "END_OPTIONS": [], + "clauses": [], + "statementEndOptions": [], "options": { "@type": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", "options": { diff --git a/tests/data/parser/parseAlter10.out b/tests/data/parser/parseAlter10.out index 1e2663c7b..970c0f454 100644 --- a/tests/data/parser/parseAlter10.out +++ b/tests/data/parser/parseAlter10.out @@ -2,7 +2,7 @@ "query": "ALTER TABLE `database`.`table` MODIFY `field` INT(11) AUTO_INCREMENT PRIMARY KEY;", "lexer": { "@type": "PhpMyAdmin\\SqlParser\\Lexer", - "PARSER_METHODS": [ + "parserMethods": [ "parseDelimiter", "parseWhitespace", "parseNumber", @@ -223,7 +223,7 @@ "count": 22, "idx": 22 }, - "DEFAULT_DELIMITER": ";", + "defaultDelimiter": ";", "delimiter": ";", "delimiterLen": 1, "strict": false, @@ -231,7 +231,7 @@ }, "parser": { "@type": "PhpMyAdmin\\SqlParser\\Parser", - "STATEMENT_PARSERS": { + "statementParsers": { "DESCRIBE": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", "DESC": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", "EXPLAIN": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", @@ -276,7 +276,7 @@ "LOCK": "PhpMyAdmin\\SqlParser\\Statements\\LockStatement", "UNLOCK": "PhpMyAdmin\\SqlParser\\Statements\\LockStatement" }, - "KEYWORD_PARSERS": { + "keywordParsers": { "PARTITION BY": [], "SUBPARTITION BY": [], "_OPTIONS": { @@ -285,7 +285,7 @@ }, "_END_OPTIONS": { "class": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", - "field": "end_options" + "field": "endOptions" }, "INTERSECT": { "class": "PhpMyAdmin\\SqlParser\\Components\\UnionKeyword", @@ -535,7 +535,7 @@ "@type": "PhpMyAdmin\\SqlParser\\Statements\\AlterStatement", "table": { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -560,7 +560,7 @@ "altered": [ { "@type": "PhpMyAdmin\\SqlParser\\Components\\AlterOperation", - "DB_OPTIONS": { + "databaseOptions": { "CHARACTER SET": [ 1, "var" @@ -590,7 +590,7 @@ "var" ] }, - "TABLE_OPTIONS": { + "tableOptions": { "ENGINE": [ 1, "var=" @@ -655,7 +655,7 @@ "INDEX": 2, "CHARACTER SET": 3 }, - "USER_OPTIONS": { + "userOptions": { "ATTRIBUTE": [ 1, "var" @@ -686,7 +686,7 @@ "UNLOCK": 2, "IDENTIFIED": 3 }, - "VIEW_OPTIONS": { + "viewOptions": { "AS": 1 }, "options": { @@ -697,7 +697,7 @@ }, "field": { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -747,7 +747,7 @@ ] } ], - "OPTIONS": { + "statementOptions": { "ONLINE": 1, "OFFLINE": 1, "IGNORE": 2, @@ -761,8 +761,8 @@ "USER": 3, "VIEW": 3 }, - "CLAUSES": [], - "END_OPTIONS": [], + "clauses": [], + "statementEndOptions": [], "options": { "@type": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", "options": { diff --git a/tests/data/parser/parseAlter11.out b/tests/data/parser/parseAlter11.out index 5771523fb..8634b1edc 100644 --- a/tests/data/parser/parseAlter11.out +++ b/tests/data/parser/parseAlter11.out @@ -2,7 +2,7 @@ "query": "ALTER TABLE `actor` ADD `last_update2` SET ('value1','value2','value3') NOT NULL AFTER last_update", "lexer": { "@type": "PhpMyAdmin\\SqlParser\\Lexer", - "PARSER_METHODS": [ + "parserMethods": [ "parseDelimiter", "parseWhitespace", "parseNumber", @@ -259,7 +259,7 @@ "count": 26, "idx": 26 }, - "DEFAULT_DELIMITER": ";", + "defaultDelimiter": ";", "delimiter": ";", "delimiterLen": 1, "strict": false, @@ -267,7 +267,7 @@ }, "parser": { "@type": "PhpMyAdmin\\SqlParser\\Parser", - "STATEMENT_PARSERS": { + "statementParsers": { "DESCRIBE": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", "DESC": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", "EXPLAIN": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", @@ -312,7 +312,7 @@ "LOCK": "PhpMyAdmin\\SqlParser\\Statements\\LockStatement", "UNLOCK": "PhpMyAdmin\\SqlParser\\Statements\\LockStatement" }, - "KEYWORD_PARSERS": { + "keywordParsers": { "PARTITION BY": [], "SUBPARTITION BY": [], "_OPTIONS": { @@ -321,7 +321,7 @@ }, "_END_OPTIONS": { "class": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", - "field": "end_options" + "field": "endOptions" }, "INTERSECT": { "class": "PhpMyAdmin\\SqlParser\\Components\\UnionKeyword", @@ -571,7 +571,7 @@ "@type": "PhpMyAdmin\\SqlParser\\Statements\\AlterStatement", "table": { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -596,7 +596,7 @@ "altered": [ { "@type": "PhpMyAdmin\\SqlParser\\Components\\AlterOperation", - "DB_OPTIONS": { + "databaseOptions": { "CHARACTER SET": [ 1, "var" @@ -626,7 +626,7 @@ "var" ] }, - "TABLE_OPTIONS": { + "tableOptions": { "ENGINE": [ 1, "var=" @@ -691,7 +691,7 @@ "INDEX": 2, "CHARACTER SET": 3 }, - "USER_OPTIONS": { + "userOptions": { "ATTRIBUTE": [ 1, "var" @@ -722,7 +722,7 @@ "UNLOCK": 2, "IDENTIFIED": 3 }, - "VIEW_OPTIONS": { + "viewOptions": { "AS": 1 }, "options": { @@ -733,7 +733,7 @@ }, "field": { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -777,7 +777,7 @@ ] } ], - "OPTIONS": { + "statementOptions": { "ONLINE": 1, "OFFLINE": 1, "IGNORE": 2, @@ -791,8 +791,8 @@ "USER": 3, "VIEW": 3 }, - "CLAUSES": [], - "END_OPTIONS": [], + "clauses": [], + "statementEndOptions": [], "options": { "@type": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", "options": { diff --git a/tests/data/parser/parseAlter12.out b/tests/data/parser/parseAlter12.out index c9b330eb3..1e9c65548 100644 --- a/tests/data/parser/parseAlter12.out +++ b/tests/data/parser/parseAlter12.out @@ -2,7 +2,7 @@ "query": "ALTER TABLE actor ALTER last_update2 SET DEFAULT 'value1';", "lexer": { "@type": "PhpMyAdmin\\SqlParser\\Lexer", - "PARSER_METHODS": [ + "parserMethods": [ "parseDelimiter", "parseWhitespace", "parseNumber", @@ -178,7 +178,7 @@ "count": 17, "idx": 17 }, - "DEFAULT_DELIMITER": ";", + "defaultDelimiter": ";", "delimiter": ";", "delimiterLen": 1, "strict": false, @@ -186,7 +186,7 @@ }, "parser": { "@type": "PhpMyAdmin\\SqlParser\\Parser", - "STATEMENT_PARSERS": { + "statementParsers": { "DESCRIBE": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", "DESC": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", "EXPLAIN": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", @@ -231,7 +231,7 @@ "LOCK": "PhpMyAdmin\\SqlParser\\Statements\\LockStatement", "UNLOCK": "PhpMyAdmin\\SqlParser\\Statements\\LockStatement" }, - "KEYWORD_PARSERS": { + "keywordParsers": { "PARTITION BY": [], "SUBPARTITION BY": [], "_OPTIONS": { @@ -240,7 +240,7 @@ }, "_END_OPTIONS": { "class": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", - "field": "end_options" + "field": "endOptions" }, "INTERSECT": { "class": "PhpMyAdmin\\SqlParser\\Components\\UnionKeyword", @@ -490,7 +490,7 @@ "@type": "PhpMyAdmin\\SqlParser\\Statements\\AlterStatement", "table": { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -515,7 +515,7 @@ "altered": [ { "@type": "PhpMyAdmin\\SqlParser\\Components\\AlterOperation", - "DB_OPTIONS": { + "databaseOptions": { "CHARACTER SET": [ 1, "var" @@ -545,7 +545,7 @@ "var" ] }, - "TABLE_OPTIONS": { + "tableOptions": { "ENGINE": [ 1, "var=" @@ -610,7 +610,7 @@ "INDEX": 2, "CHARACTER SET": 3 }, - "USER_OPTIONS": { + "userOptions": { "ATTRIBUTE": [ 1, "var" @@ -641,7 +641,7 @@ "UNLOCK": 2, "IDENTIFIED": 3 }, - "VIEW_OPTIONS": { + "viewOptions": { "AS": 1 }, "options": { @@ -652,7 +652,7 @@ }, "field": { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -681,7 +681,7 @@ ] } ], - "OPTIONS": { + "statementOptions": { "ONLINE": 1, "OFFLINE": 1, "IGNORE": 2, @@ -695,8 +695,8 @@ "USER": 3, "VIEW": 3 }, - "CLAUSES": [], - "END_OPTIONS": [], + "clauses": [], + "statementEndOptions": [], "options": { "@type": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", "options": { diff --git a/tests/data/parser/parseAlter13.out b/tests/data/parser/parseAlter13.out index a4260b45f..137e9a060 100644 --- a/tests/data/parser/parseAlter13.out +++ b/tests/data/parser/parseAlter13.out @@ -2,7 +2,7 @@ "query": "ALTER TABLE `actor` ADD `last_update2` SET ('value1','value2','value3')", "lexer": { "@type": "PhpMyAdmin\\SqlParser\\Lexer", - "PARSER_METHODS": [ + "parserMethods": [ "parseDelimiter", "parseWhitespace", "parseNumber", @@ -205,7 +205,7 @@ "count": 20, "idx": 21 }, - "DEFAULT_DELIMITER": ";", + "defaultDelimiter": ";", "delimiter": ";", "delimiterLen": 1, "strict": false, @@ -213,7 +213,7 @@ }, "parser": { "@type": "PhpMyAdmin\\SqlParser\\Parser", - "STATEMENT_PARSERS": { + "statementParsers": { "DESCRIBE": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", "DESC": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", "EXPLAIN": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", @@ -258,7 +258,7 @@ "LOCK": "PhpMyAdmin\\SqlParser\\Statements\\LockStatement", "UNLOCK": "PhpMyAdmin\\SqlParser\\Statements\\LockStatement" }, - "KEYWORD_PARSERS": { + "keywordParsers": { "PARTITION BY": [], "SUBPARTITION BY": [], "_OPTIONS": { @@ -267,7 +267,7 @@ }, "_END_OPTIONS": { "class": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", - "field": "end_options" + "field": "endOptions" }, "INTERSECT": { "class": "PhpMyAdmin\\SqlParser\\Components\\UnionKeyword", @@ -517,7 +517,7 @@ "@type": "PhpMyAdmin\\SqlParser\\Statements\\AlterStatement", "table": { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -542,7 +542,7 @@ "altered": [ { "@type": "PhpMyAdmin\\SqlParser\\Components\\AlterOperation", - "DB_OPTIONS": { + "databaseOptions": { "CHARACTER SET": [ 1, "var" @@ -572,7 +572,7 @@ "var" ] }, - "TABLE_OPTIONS": { + "tableOptions": { "ENGINE": [ 1, "var=" @@ -637,7 +637,7 @@ "INDEX": 2, "CHARACTER SET": 3 }, - "USER_OPTIONS": { + "userOptions": { "ATTRIBUTE": [ 1, "var" @@ -668,7 +668,7 @@ "UNLOCK": 2, "IDENTIFIED": 3 }, - "VIEW_OPTIONS": { + "viewOptions": { "AS": 1 }, "options": { @@ -679,7 +679,7 @@ }, "field": { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -708,7 +708,7 @@ ] } ], - "OPTIONS": { + "statementOptions": { "ONLINE": 1, "OFFLINE": 1, "IGNORE": 2, @@ -722,8 +722,8 @@ "USER": 3, "VIEW": 3 }, - "CLAUSES": [], - "END_OPTIONS": [], + "clauses": [], + "statementEndOptions": [], "options": { "@type": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", "options": { diff --git a/tests/data/parser/parseAlter2.out b/tests/data/parser/parseAlter2.out index 065cf346f..0e3008703 100644 --- a/tests/data/parser/parseAlter2.out +++ b/tests/data/parser/parseAlter2.out @@ -2,7 +2,7 @@ "query": "ALTER \/* *\/ TABLE \/* *\/ table\nCONVERT \/* *\/ TO \/* *\/ CHARACTER \/* *\/ SET \/* *\/ utf8;", "lexer": { "@type": "PhpMyAdmin\\SqlParser\\Lexer", - "PARSER_METHODS": [ + "parserMethods": [ "parseDelimiter", "parseWhitespace", "parseNumber", @@ -286,7 +286,7 @@ "count": 29, "idx": 29 }, - "DEFAULT_DELIMITER": ";", + "defaultDelimiter": ";", "delimiter": ";", "delimiterLen": 1, "strict": false, @@ -294,7 +294,7 @@ }, "parser": { "@type": "PhpMyAdmin\\SqlParser\\Parser", - "STATEMENT_PARSERS": { + "statementParsers": { "DESCRIBE": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", "DESC": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", "EXPLAIN": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", @@ -339,7 +339,7 @@ "LOCK": "PhpMyAdmin\\SqlParser\\Statements\\LockStatement", "UNLOCK": "PhpMyAdmin\\SqlParser\\Statements\\LockStatement" }, - "KEYWORD_PARSERS": { + "keywordParsers": { "PARTITION BY": [], "SUBPARTITION BY": [], "_OPTIONS": { @@ -348,7 +348,7 @@ }, "_END_OPTIONS": { "class": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", - "field": "end_options" + "field": "endOptions" }, "INTERSECT": { "class": "PhpMyAdmin\\SqlParser\\Components\\UnionKeyword", @@ -600,7 +600,7 @@ "altered": [ { "@type": "PhpMyAdmin\\SqlParser\\Components\\AlterOperation", - "DB_OPTIONS": { + "databaseOptions": { "CHARACTER SET": [ 1, "var" @@ -630,7 +630,7 @@ "var" ] }, - "TABLE_OPTIONS": { + "tableOptions": { "ENGINE": [ 1, "var=" @@ -695,7 +695,7 @@ "INDEX": 2, "CHARACTER SET": 3 }, - "USER_OPTIONS": { + "userOptions": { "ATTRIBUTE": [ 1, "var" @@ -726,7 +726,7 @@ "UNLOCK": 2, "IDENTIFIED": 3 }, - "VIEW_OPTIONS": { + "viewOptions": { "AS": 1 }, "options": { @@ -749,7 +749,7 @@ ] } ], - "OPTIONS": { + "statementOptions": { "ONLINE": 1, "OFFLINE": 1, "IGNORE": 2, @@ -763,8 +763,8 @@ "USER": 3, "VIEW": 3 }, - "CLAUSES": [], - "END_OPTIONS": [], + "clauses": [], + "statementEndOptions": [], "options": { "@type": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", "options": { diff --git a/tests/data/parser/parseAlter3.out b/tests/data/parser/parseAlter3.out index 1a9fe520a..5c10f746d 100644 --- a/tests/data/parser/parseAlter3.out +++ b/tests/data/parser/parseAlter3.out @@ -2,7 +2,7 @@ "query": "ALTER TABLE `tbl` CHANGE `uid` `uid` INT( 10 ) UNSIGNED NOT NULL AUTO_INCREMENT\n\nALTER TABLE `tbl` CHANGE `field_1` `field_2` INT( 10 ) UNSIGNED NOT NULL", "lexer": { "@type": "PhpMyAdmin\\SqlParser\\Lexer", - "PARSER_METHODS": [ + "parserMethods": [ "parseDelimiter", "parseWhitespace", "parseNumber", @@ -457,7 +457,7 @@ "count": 48, "idx": 48 }, - "DEFAULT_DELIMITER": ";", + "defaultDelimiter": ";", "delimiter": ";", "delimiterLen": 1, "strict": false, @@ -465,7 +465,7 @@ }, "parser": { "@type": "PhpMyAdmin\\SqlParser\\Parser", - "STATEMENT_PARSERS": { + "statementParsers": { "DESCRIBE": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", "DESC": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", "EXPLAIN": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", @@ -510,7 +510,7 @@ "LOCK": "PhpMyAdmin\\SqlParser\\Statements\\LockStatement", "UNLOCK": "PhpMyAdmin\\SqlParser\\Statements\\LockStatement" }, - "KEYWORD_PARSERS": { + "keywordParsers": { "PARTITION BY": [], "SUBPARTITION BY": [], "_OPTIONS": { @@ -519,7 +519,7 @@ }, "_END_OPTIONS": { "class": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", - "field": "end_options" + "field": "endOptions" }, "INTERSECT": { "class": "PhpMyAdmin\\SqlParser\\Components\\UnionKeyword", @@ -769,7 +769,7 @@ "@type": "PhpMyAdmin\\SqlParser\\Statements\\AlterStatement", "table": { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -794,7 +794,7 @@ "altered": [ { "@type": "PhpMyAdmin\\SqlParser\\Components\\AlterOperation", - "DB_OPTIONS": { + "databaseOptions": { "CHARACTER SET": [ 1, "var" @@ -824,7 +824,7 @@ "var" ] }, - "TABLE_OPTIONS": { + "tableOptions": { "ENGINE": [ 1, "var=" @@ -889,7 +889,7 @@ "INDEX": 2, "CHARACTER SET": 3 }, - "USER_OPTIONS": { + "userOptions": { "ATTRIBUTE": [ 1, "var" @@ -920,7 +920,7 @@ "UNLOCK": 2, "IDENTIFIED": 3 }, - "VIEW_OPTIONS": { + "viewOptions": { "AS": 1 }, "options": { @@ -931,7 +931,7 @@ }, "field": { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -1002,7 +1002,7 @@ ] } ], - "OPTIONS": { + "statementOptions": { "ONLINE": 1, "OFFLINE": 1, "IGNORE": 2, @@ -1016,8 +1016,8 @@ "USER": 3, "VIEW": 3 }, - "CLAUSES": [], - "END_OPTIONS": [], + "clauses": [], + "statementEndOptions": [], "options": { "@type": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", "options": { diff --git a/tests/data/parser/parseAlter4.out b/tests/data/parser/parseAlter4.out index a48e9459f..dbe0c9814 100644 --- a/tests/data/parser/parseAlter4.out +++ b/tests/data/parser/parseAlter4.out @@ -2,7 +2,7 @@ "query": "ALTER TABLE my_table COMMENT='Comment of table';", "lexer": { "@type": "PhpMyAdmin\\SqlParser\\Lexer", - "PARSER_METHODS": [ + "parserMethods": [ "parseDelimiter", "parseWhitespace", "parseNumber", @@ -124,7 +124,7 @@ "count": 11, "idx": 11 }, - "DEFAULT_DELIMITER": ";", + "defaultDelimiter": ";", "delimiter": ";", "delimiterLen": 1, "strict": false, @@ -132,7 +132,7 @@ }, "parser": { "@type": "PhpMyAdmin\\SqlParser\\Parser", - "STATEMENT_PARSERS": { + "statementParsers": { "DESCRIBE": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", "DESC": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", "EXPLAIN": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", @@ -177,7 +177,7 @@ "LOCK": "PhpMyAdmin\\SqlParser\\Statements\\LockStatement", "UNLOCK": "PhpMyAdmin\\SqlParser\\Statements\\LockStatement" }, - "KEYWORD_PARSERS": { + "keywordParsers": { "PARTITION BY": [], "SUBPARTITION BY": [], "_OPTIONS": { @@ -186,7 +186,7 @@ }, "_END_OPTIONS": { "class": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", - "field": "end_options" + "field": "endOptions" }, "INTERSECT": { "class": "PhpMyAdmin\\SqlParser\\Components\\UnionKeyword", @@ -436,7 +436,7 @@ "@type": "PhpMyAdmin\\SqlParser\\Statements\\AlterStatement", "table": { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -461,7 +461,7 @@ "altered": [ { "@type": "PhpMyAdmin\\SqlParser\\Components\\AlterOperation", - "DB_OPTIONS": { + "databaseOptions": { "CHARACTER SET": [ 1, "var" @@ -491,7 +491,7 @@ "var" ] }, - "TABLE_OPTIONS": { + "tableOptions": { "ENGINE": [ 1, "var=" @@ -556,7 +556,7 @@ "INDEX": 2, "CHARACTER SET": 3 }, - "USER_OPTIONS": { + "userOptions": { "ATTRIBUTE": [ 1, "var" @@ -587,7 +587,7 @@ "UNLOCK": 2, "IDENTIFIED": 3 }, - "VIEW_OPTIONS": { + "viewOptions": { "AS": 1 }, "options": { @@ -605,7 +605,7 @@ "unknown": [] } ], - "OPTIONS": { + "statementOptions": { "ONLINE": 1, "OFFLINE": 1, "IGNORE": 2, @@ -619,8 +619,8 @@ "USER": 3, "VIEW": 3 }, - "CLAUSES": [], - "END_OPTIONS": [], + "clauses": [], + "statementEndOptions": [], "options": { "@type": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", "options": { diff --git a/tests/data/parser/parseAlter5.out b/tests/data/parser/parseAlter5.out index 7aeadda5c..1084451e8 100644 --- a/tests/data/parser/parseAlter5.out +++ b/tests/data/parser/parseAlter5.out @@ -2,7 +2,7 @@ "query": "ALTER DATABASE `abc` CHARACTER SET = 'utf8'", "lexer": { "@type": "PhpMyAdmin\\SqlParser\\Lexer", - "PARSER_METHODS": [ + "parserMethods": [ "parseDelimiter", "parseWhitespace", "parseNumber", @@ -133,7 +133,7 @@ "count": 12, "idx": 12 }, - "DEFAULT_DELIMITER": ";", + "defaultDelimiter": ";", "delimiter": ";", "delimiterLen": 1, "strict": false, @@ -141,7 +141,7 @@ }, "parser": { "@type": "PhpMyAdmin\\SqlParser\\Parser", - "STATEMENT_PARSERS": { + "statementParsers": { "DESCRIBE": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", "DESC": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", "EXPLAIN": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", @@ -186,7 +186,7 @@ "LOCK": "PhpMyAdmin\\SqlParser\\Statements\\LockStatement", "UNLOCK": "PhpMyAdmin\\SqlParser\\Statements\\LockStatement" }, - "KEYWORD_PARSERS": { + "keywordParsers": { "PARTITION BY": [], "SUBPARTITION BY": [], "_OPTIONS": { @@ -195,7 +195,7 @@ }, "_END_OPTIONS": { "class": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", - "field": "end_options" + "field": "endOptions" }, "INTERSECT": { "class": "PhpMyAdmin\\SqlParser\\Components\\UnionKeyword", @@ -445,7 +445,7 @@ "@type": "PhpMyAdmin\\SqlParser\\Statements\\AlterStatement", "table": { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -470,7 +470,7 @@ "altered": [ { "@type": "PhpMyAdmin\\SqlParser\\Components\\AlterOperation", - "DB_OPTIONS": { + "databaseOptions": { "CHARACTER SET": [ 1, "var" @@ -500,7 +500,7 @@ "var" ] }, - "TABLE_OPTIONS": { + "tableOptions": { "ENGINE": [ 1, "var=" @@ -565,7 +565,7 @@ "INDEX": 2, "CHARACTER SET": 3 }, - "USER_OPTIONS": { + "userOptions": { "ATTRIBUTE": [ 1, "var" @@ -596,7 +596,7 @@ "UNLOCK": 2, "IDENTIFIED": 3 }, - "VIEW_OPTIONS": { + "viewOptions": { "AS": 1 }, "options": { @@ -614,7 +614,7 @@ "unknown": [] } ], - "OPTIONS": { + "statementOptions": { "ONLINE": 1, "OFFLINE": 1, "IGNORE": 2, @@ -628,8 +628,8 @@ "USER": 3, "VIEW": 3 }, - "CLAUSES": [], - "END_OPTIONS": [], + "clauses": [], + "statementEndOptions": [], "options": { "@type": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", "options": { diff --git a/tests/data/parser/parseAlter6.out b/tests/data/parser/parseAlter6.out index 2ed0ae8f1..e00c7103a 100644 --- a/tests/data/parser/parseAlter6.out +++ b/tests/data/parser/parseAlter6.out @@ -2,7 +2,7 @@ "query": "ALTER VIEW `abc` AS SELECT `a` FROM `b`", "lexer": { "@type": "PhpMyAdmin\\SqlParser\\Lexer", - "PARSER_METHODS": [ + "parserMethods": [ "parseDelimiter", "parseWhitespace", "parseNumber", @@ -169,7 +169,7 @@ "count": 16, "idx": 16 }, - "DEFAULT_DELIMITER": ";", + "defaultDelimiter": ";", "delimiter": ";", "delimiterLen": 1, "strict": false, @@ -177,7 +177,7 @@ }, "parser": { "@type": "PhpMyAdmin\\SqlParser\\Parser", - "STATEMENT_PARSERS": { + "statementParsers": { "DESCRIBE": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", "DESC": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", "EXPLAIN": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", @@ -222,7 +222,7 @@ "LOCK": "PhpMyAdmin\\SqlParser\\Statements\\LockStatement", "UNLOCK": "PhpMyAdmin\\SqlParser\\Statements\\LockStatement" }, - "KEYWORD_PARSERS": { + "keywordParsers": { "PARTITION BY": [], "SUBPARTITION BY": [], "_OPTIONS": { @@ -231,7 +231,7 @@ }, "_END_OPTIONS": { "class": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", - "field": "end_options" + "field": "endOptions" }, "INTERSECT": { "class": "PhpMyAdmin\\SqlParser\\Components\\UnionKeyword", @@ -481,7 +481,7 @@ "@type": "PhpMyAdmin\\SqlParser\\Statements\\AlterStatement", "table": { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -506,7 +506,7 @@ "altered": [ { "@type": "PhpMyAdmin\\SqlParser\\Components\\AlterOperation", - "DB_OPTIONS": { + "databaseOptions": { "CHARACTER SET": [ 1, "var" @@ -536,7 +536,7 @@ "var" ] }, - "TABLE_OPTIONS": { + "tableOptions": { "ENGINE": [ 1, "var=" @@ -601,7 +601,7 @@ "INDEX": 2, "CHARACTER SET": 3 }, - "USER_OPTIONS": { + "userOptions": { "ATTRIBUTE": [ 1, "var" @@ -632,7 +632,7 @@ "UNLOCK": 2, "IDENTIFIED": 3 }, - "VIEW_OPTIONS": { + "viewOptions": { "AS": 1 }, "options": { @@ -670,7 +670,7 @@ ] } ], - "OPTIONS": { + "statementOptions": { "ONLINE": 1, "OFFLINE": 1, "IGNORE": 2, @@ -684,8 +684,8 @@ "USER": 3, "VIEW": 3 }, - "CLAUSES": [], - "END_OPTIONS": [], + "clauses": [], + "statementEndOptions": [], "options": { "@type": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", "options": { diff --git a/tests/data/parser/parseAlter7.out b/tests/data/parser/parseAlter7.out index 6274e4b27..34246cfdb 100644 --- a/tests/data/parser/parseAlter7.out +++ b/tests/data/parser/parseAlter7.out @@ -2,7 +2,7 @@ "query": "ALTER TABLE `tbl` CHANGE `uid` `uid` INT( 10 ) UNSIGNED NOT NULL AUTO_INCREMENT, CHANGE `field_1` `field_2` INT( 10 ) UNSIGNED NOT NULL", "lexer": { "@type": "PhpMyAdmin\\SqlParser\\Lexer", - "PARSER_METHODS": [ + "parserMethods": [ "parseDelimiter", "parseWhitespace", "parseNumber", @@ -412,7 +412,7 @@ "count": 43, "idx": 43 }, - "DEFAULT_DELIMITER": ";", + "defaultDelimiter": ";", "delimiter": ";", "delimiterLen": 1, "strict": false, @@ -420,7 +420,7 @@ }, "parser": { "@type": "PhpMyAdmin\\SqlParser\\Parser", - "STATEMENT_PARSERS": { + "statementParsers": { "DESCRIBE": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", "DESC": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", "EXPLAIN": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", @@ -465,7 +465,7 @@ "LOCK": "PhpMyAdmin\\SqlParser\\Statements\\LockStatement", "UNLOCK": "PhpMyAdmin\\SqlParser\\Statements\\LockStatement" }, - "KEYWORD_PARSERS": { + "keywordParsers": { "PARTITION BY": [], "SUBPARTITION BY": [], "_OPTIONS": { @@ -474,7 +474,7 @@ }, "_END_OPTIONS": { "class": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", - "field": "end_options" + "field": "endOptions" }, "INTERSECT": { "class": "PhpMyAdmin\\SqlParser\\Components\\UnionKeyword", @@ -724,7 +724,7 @@ "@type": "PhpMyAdmin\\SqlParser\\Statements\\AlterStatement", "table": { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -749,7 +749,7 @@ "altered": [ { "@type": "PhpMyAdmin\\SqlParser\\Components\\AlterOperation", - "DB_OPTIONS": { + "databaseOptions": { "CHARACTER SET": [ 1, "var" @@ -779,7 +779,7 @@ "var" ] }, - "TABLE_OPTIONS": { + "tableOptions": { "ENGINE": [ 1, "var=" @@ -844,7 +844,7 @@ "INDEX": 2, "CHARACTER SET": 3 }, - "USER_OPTIONS": { + "userOptions": { "ATTRIBUTE": [ 1, "var" @@ -875,7 +875,7 @@ "UNLOCK": 2, "IDENTIFIED": 3 }, - "VIEW_OPTIONS": { + "viewOptions": { "AS": 1 }, "options": { @@ -886,7 +886,7 @@ }, "field": { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -955,7 +955,7 @@ }, { "@type": "PhpMyAdmin\\SqlParser\\Components\\AlterOperation", - "DB_OPTIONS": { + "databaseOptions": { "CHARACTER SET": [ 1, "var" @@ -985,7 +985,7 @@ "var" ] }, - "TABLE_OPTIONS": { + "tableOptions": { "ENGINE": [ 1, "var=" @@ -1050,7 +1050,7 @@ "INDEX": 2, "CHARACTER SET": 3 }, - "USER_OPTIONS": { + "userOptions": { "ATTRIBUTE": [ 1, "var" @@ -1081,7 +1081,7 @@ "UNLOCK": 2, "IDENTIFIED": 3 }, - "VIEW_OPTIONS": { + "viewOptions": { "AS": 1 }, "options": { @@ -1092,7 +1092,7 @@ }, "field": { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -1154,7 +1154,7 @@ ] } ], - "OPTIONS": { + "statementOptions": { "ONLINE": 1, "OFFLINE": 1, "IGNORE": 2, @@ -1168,8 +1168,8 @@ "USER": 3, "VIEW": 3 }, - "CLAUSES": [], - "END_OPTIONS": [], + "clauses": [], + "statementEndOptions": [], "options": { "@type": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", "options": { diff --git a/tests/data/parser/parseAlter8.out b/tests/data/parser/parseAlter8.out index b2b1f51b0..faec46a18 100644 --- a/tests/data/parser/parseAlter8.out +++ b/tests/data/parser/parseAlter8.out @@ -2,7 +2,7 @@ "query": "ALTER TABLE `api_tab_user` CHANGE `rank_id` `rank_id` INT(4) NOT NULL DEFAULT '4';", "lexer": { "@type": "PhpMyAdmin\\SqlParser\\Lexer", - "PARSER_METHODS": [ + "parserMethods": [ "parseDelimiter", "parseWhitespace", "parseNumber", @@ -241,7 +241,7 @@ "count": 24, "idx": 24 }, - "DEFAULT_DELIMITER": ";", + "defaultDelimiter": ";", "delimiter": ";", "delimiterLen": 1, "strict": false, @@ -249,7 +249,7 @@ }, "parser": { "@type": "PhpMyAdmin\\SqlParser\\Parser", - "STATEMENT_PARSERS": { + "statementParsers": { "DESCRIBE": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", "DESC": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", "EXPLAIN": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", @@ -294,7 +294,7 @@ "LOCK": "PhpMyAdmin\\SqlParser\\Statements\\LockStatement", "UNLOCK": "PhpMyAdmin\\SqlParser\\Statements\\LockStatement" }, - "KEYWORD_PARSERS": { + "keywordParsers": { "PARTITION BY": [], "SUBPARTITION BY": [], "_OPTIONS": { @@ -303,7 +303,7 @@ }, "_END_OPTIONS": { "class": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", - "field": "end_options" + "field": "endOptions" }, "INTERSECT": { "class": "PhpMyAdmin\\SqlParser\\Components\\UnionKeyword", @@ -553,7 +553,7 @@ "@type": "PhpMyAdmin\\SqlParser\\Statements\\AlterStatement", "table": { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -578,7 +578,7 @@ "altered": [ { "@type": "PhpMyAdmin\\SqlParser\\Components\\AlterOperation", - "DB_OPTIONS": { + "databaseOptions": { "CHARACTER SET": [ 1, "var" @@ -608,7 +608,7 @@ "var" ] }, - "TABLE_OPTIONS": { + "tableOptions": { "ENGINE": [ 1, "var=" @@ -673,7 +673,7 @@ "INDEX": 2, "CHARACTER SET": 3 }, - "USER_OPTIONS": { + "userOptions": { "ATTRIBUTE": [ 1, "var" @@ -704,7 +704,7 @@ "UNLOCK": 2, "IDENTIFIED": 3 }, - "VIEW_OPTIONS": { + "viewOptions": { "AS": 1 }, "options": { @@ -715,7 +715,7 @@ }, "field": { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -777,7 +777,7 @@ ] } ], - "OPTIONS": { + "statementOptions": { "ONLINE": 1, "OFFLINE": 1, "IGNORE": 2, @@ -791,8 +791,8 @@ "USER": 3, "VIEW": 3 }, - "CLAUSES": [], - "END_OPTIONS": [], + "clauses": [], + "statementEndOptions": [], "options": { "@type": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", "options": { diff --git a/tests/data/parser/parseAlter9.out b/tests/data/parser/parseAlter9.out index e8aeb2a85..2329bbcb2 100644 --- a/tests/data/parser/parseAlter9.out +++ b/tests/data/parser/parseAlter9.out @@ -2,7 +2,7 @@ "query": "ALTER TABLE place CHANGE COLUMN plc_location_type gplc_location_type ENUM('LOCATION') CHARACTER SET 'utf8' COLLATE 'utf8_unicode_ci' NOT NULL;", "lexer": { "@type": "PhpMyAdmin\\SqlParser\\Lexer", - "PARSER_METHODS": [ + "parserMethods": [ "parseDelimiter", "parseWhitespace", "parseNumber", @@ -295,7 +295,7 @@ "count": 30, "idx": 30 }, - "DEFAULT_DELIMITER": ";", + "defaultDelimiter": ";", "delimiter": ";", "delimiterLen": 1, "strict": false, @@ -303,7 +303,7 @@ }, "parser": { "@type": "PhpMyAdmin\\SqlParser\\Parser", - "STATEMENT_PARSERS": { + "statementParsers": { "DESCRIBE": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", "DESC": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", "EXPLAIN": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", @@ -348,7 +348,7 @@ "LOCK": "PhpMyAdmin\\SqlParser\\Statements\\LockStatement", "UNLOCK": "PhpMyAdmin\\SqlParser\\Statements\\LockStatement" }, - "KEYWORD_PARSERS": { + "keywordParsers": { "PARTITION BY": [], "SUBPARTITION BY": [], "_OPTIONS": { @@ -357,7 +357,7 @@ }, "_END_OPTIONS": { "class": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", - "field": "end_options" + "field": "endOptions" }, "INTERSECT": { "class": "PhpMyAdmin\\SqlParser\\Components\\UnionKeyword", @@ -607,7 +607,7 @@ "@type": "PhpMyAdmin\\SqlParser\\Statements\\AlterStatement", "table": { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -632,7 +632,7 @@ "altered": [ { "@type": "PhpMyAdmin\\SqlParser\\Components\\AlterOperation", - "DB_OPTIONS": { + "databaseOptions": { "CHARACTER SET": [ 1, "var" @@ -662,7 +662,7 @@ "var" ] }, - "TABLE_OPTIONS": { + "tableOptions": { "ENGINE": [ 1, "var=" @@ -727,7 +727,7 @@ "INDEX": 2, "CHARACTER SET": 3 }, - "USER_OPTIONS": { + "userOptions": { "ATTRIBUTE": [ 1, "var" @@ -758,7 +758,7 @@ "UNLOCK": 2, "IDENTIFIED": 3 }, - "VIEW_OPTIONS": { + "viewOptions": { "AS": 1 }, "options": { @@ -770,7 +770,7 @@ }, "field": { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -844,7 +844,7 @@ ] } ], - "OPTIONS": { + "statementOptions": { "ONLINE": 1, "OFFLINE": 1, "IGNORE": 2, @@ -858,8 +858,8 @@ "USER": 3, "VIEW": 3 }, - "CLAUSES": [], - "END_OPTIONS": [], + "clauses": [], + "statementEndOptions": [], "options": { "@type": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", "options": { diff --git a/tests/data/parser/parseAlterErr.out b/tests/data/parser/parseAlterErr.out index 433fa2421..ec5753b53 100644 --- a/tests/data/parser/parseAlterErr.out +++ b/tests/data/parser/parseAlterErr.out @@ -2,7 +2,7 @@ "query": "-- missing comma between alter operations\nALTER TABLE `tbl` CHANGE `uid` `uid` INT( 10 ) UNSIGNED NOT NULL AUTO_INCREMENT CHANGE `field_1` `field_2` INT( 10 ) UNSIGNED NOT NULL", "lexer": { "@type": "PhpMyAdmin\\SqlParser\\Lexer", - "PARSER_METHODS": [ + "parserMethods": [ "parseDelimiter", "parseWhitespace", "parseNumber", @@ -421,7 +421,7 @@ "count": 44, "idx": 44 }, - "DEFAULT_DELIMITER": ";", + "defaultDelimiter": ";", "delimiter": ";", "delimiterLen": 1, "strict": false, @@ -429,7 +429,7 @@ }, "parser": { "@type": "PhpMyAdmin\\SqlParser\\Parser", - "STATEMENT_PARSERS": { + "statementParsers": { "DESCRIBE": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", "DESC": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", "EXPLAIN": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", @@ -474,7 +474,7 @@ "LOCK": "PhpMyAdmin\\SqlParser\\Statements\\LockStatement", "UNLOCK": "PhpMyAdmin\\SqlParser\\Statements\\LockStatement" }, - "KEYWORD_PARSERS": { + "keywordParsers": { "PARTITION BY": [], "SUBPARTITION BY": [], "_OPTIONS": { @@ -483,7 +483,7 @@ }, "_END_OPTIONS": { "class": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", - "field": "end_options" + "field": "endOptions" }, "INTERSECT": { "class": "PhpMyAdmin\\SqlParser\\Components\\UnionKeyword", @@ -733,7 +733,7 @@ "@type": "PhpMyAdmin\\SqlParser\\Statements\\AlterStatement", "table": { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -758,7 +758,7 @@ "altered": [ { "@type": "PhpMyAdmin\\SqlParser\\Components\\AlterOperation", - "DB_OPTIONS": { + "databaseOptions": { "CHARACTER SET": [ 1, "var" @@ -788,7 +788,7 @@ "var" ] }, - "TABLE_OPTIONS": { + "tableOptions": { "ENGINE": [ 1, "var=" @@ -853,7 +853,7 @@ "INDEX": 2, "CHARACTER SET": 3 }, - "USER_OPTIONS": { + "userOptions": { "ATTRIBUTE": [ 1, "var" @@ -884,7 +884,7 @@ "UNLOCK": 2, "IDENTIFIED": 3 }, - "VIEW_OPTIONS": { + "viewOptions": { "AS": 1 }, "options": { @@ -895,7 +895,7 @@ }, "field": { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -966,7 +966,7 @@ ] } ], - "OPTIONS": { + "statementOptions": { "ONLINE": 1, "OFFLINE": 1, "IGNORE": 2, @@ -980,8 +980,8 @@ "USER": 3, "VIEW": 3 }, - "CLAUSES": [], - "END_OPTIONS": [], + "clauses": [], + "statementEndOptions": [], "options": { "@type": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", "options": { diff --git a/tests/data/parser/parseAlterErr2.out b/tests/data/parser/parseAlterErr2.out index 9dfe8d1f0..70679547f 100644 --- a/tests/data/parser/parseAlterErr2.out +++ b/tests/data/parser/parseAlterErr2.out @@ -2,7 +2,7 @@ "query": "-- missing comma between alter operations\nALTER TABLE tb_foo CHANGE inmsg inmsg date NULL AFTER outmsg2 CHANGE inmsg2 inmsg2 time NULL AFTER inmsg;\n", "lexer": { "@type": "PhpMyAdmin\\SqlParser\\Lexer", - "PARSER_METHODS": [ + "parserMethods": [ "parseDelimiter", "parseWhitespace", "parseNumber", @@ -367,7 +367,7 @@ "count": 38, "idx": 38 }, - "DEFAULT_DELIMITER": ";", + "defaultDelimiter": ";", "delimiter": ";", "delimiterLen": 1, "strict": false, @@ -375,7 +375,7 @@ }, "parser": { "@type": "PhpMyAdmin\\SqlParser\\Parser", - "STATEMENT_PARSERS": { + "statementParsers": { "DESCRIBE": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", "DESC": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", "EXPLAIN": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", @@ -420,7 +420,7 @@ "LOCK": "PhpMyAdmin\\SqlParser\\Statements\\LockStatement", "UNLOCK": "PhpMyAdmin\\SqlParser\\Statements\\LockStatement" }, - "KEYWORD_PARSERS": { + "keywordParsers": { "PARTITION BY": [], "SUBPARTITION BY": [], "_OPTIONS": { @@ -429,7 +429,7 @@ }, "_END_OPTIONS": { "class": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", - "field": "end_options" + "field": "endOptions" }, "INTERSECT": { "class": "PhpMyAdmin\\SqlParser\\Components\\UnionKeyword", @@ -679,7 +679,7 @@ "@type": "PhpMyAdmin\\SqlParser\\Statements\\AlterStatement", "table": { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -704,7 +704,7 @@ "altered": [ { "@type": "PhpMyAdmin\\SqlParser\\Components\\AlterOperation", - "DB_OPTIONS": { + "databaseOptions": { "CHARACTER SET": [ 1, "var" @@ -734,7 +734,7 @@ "var" ] }, - "TABLE_OPTIONS": { + "tableOptions": { "ENGINE": [ 1, "var=" @@ -799,7 +799,7 @@ "INDEX": 2, "CHARACTER SET": 3 }, - "USER_OPTIONS": { + "userOptions": { "ATTRIBUTE": [ 1, "var" @@ -830,7 +830,7 @@ "UNLOCK": 2, "IDENTIFIED": 3 }, - "VIEW_OPTIONS": { + "viewOptions": { "AS": 1 }, "options": { @@ -841,7 +841,7 @@ }, "field": { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -897,7 +897,7 @@ ] } ], - "OPTIONS": { + "statementOptions": { "ONLINE": 1, "OFFLINE": 1, "IGNORE": 2, @@ -911,8 +911,8 @@ "USER": 3, "VIEW": 3 }, - "CLAUSES": [], - "END_OPTIONS": [], + "clauses": [], + "statementEndOptions": [], "options": { "@type": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", "options": { diff --git a/tests/data/parser/parseAlterErr3.out b/tests/data/parser/parseAlterErr3.out index ae80babda..ecf12830b 100644 --- a/tests/data/parser/parseAlterErr3.out +++ b/tests/data/parser/parseAlterErr3.out @@ -2,7 +2,7 @@ "query": "-- missing comma between alter operations\nALTER TABLE `database`.`table` MODIFY `field` INT(11) AUTO_INCREMENT PRIMARY KEY;\n", "lexer": { "@type": "PhpMyAdmin\\SqlParser\\Lexer", - "PARSER_METHODS": [ + "parserMethods": [ "parseDelimiter", "parseWhitespace", "parseNumber", @@ -250,7 +250,7 @@ "count": 25, "idx": 25 }, - "DEFAULT_DELIMITER": ";", + "defaultDelimiter": ";", "delimiter": ";", "delimiterLen": 1, "strict": false, @@ -258,7 +258,7 @@ }, "parser": { "@type": "PhpMyAdmin\\SqlParser\\Parser", - "STATEMENT_PARSERS": { + "statementParsers": { "DESCRIBE": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", "DESC": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", "EXPLAIN": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", @@ -303,7 +303,7 @@ "LOCK": "PhpMyAdmin\\SqlParser\\Statements\\LockStatement", "UNLOCK": "PhpMyAdmin\\SqlParser\\Statements\\LockStatement" }, - "KEYWORD_PARSERS": { + "keywordParsers": { "PARTITION BY": [], "SUBPARTITION BY": [], "_OPTIONS": { @@ -312,7 +312,7 @@ }, "_END_OPTIONS": { "class": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", - "field": "end_options" + "field": "endOptions" }, "INTERSECT": { "class": "PhpMyAdmin\\SqlParser\\Components\\UnionKeyword", @@ -562,7 +562,7 @@ "@type": "PhpMyAdmin\\SqlParser\\Statements\\AlterStatement", "table": { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -587,7 +587,7 @@ "altered": [ { "@type": "PhpMyAdmin\\SqlParser\\Components\\AlterOperation", - "DB_OPTIONS": { + "databaseOptions": { "CHARACTER SET": [ 1, "var" @@ -617,7 +617,7 @@ "var" ] }, - "TABLE_OPTIONS": { + "tableOptions": { "ENGINE": [ 1, "var=" @@ -682,7 +682,7 @@ "INDEX": 2, "CHARACTER SET": 3 }, - "USER_OPTIONS": { + "userOptions": { "ATTRIBUTE": [ 1, "var" @@ -713,7 +713,7 @@ "UNLOCK": 2, "IDENTIFIED": 3 }, - "VIEW_OPTIONS": { + "viewOptions": { "AS": 1 }, "options": { @@ -724,7 +724,7 @@ }, "field": { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -774,7 +774,7 @@ ] } ], - "OPTIONS": { + "statementOptions": { "ONLINE": 1, "OFFLINE": 1, "IGNORE": 2, @@ -788,8 +788,8 @@ "USER": 3, "VIEW": 3 }, - "CLAUSES": [], - "END_OPTIONS": [], + "clauses": [], + "statementEndOptions": [], "options": { "@type": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", "options": { diff --git a/tests/data/parser/parseAlterErr4.out b/tests/data/parser/parseAlterErr4.out index 07598ed03..ef05482c7 100644 --- a/tests/data/parser/parseAlterErr4.out +++ b/tests/data/parser/parseAlterErr4.out @@ -2,7 +2,7 @@ "query": "ALTER TABLE actor ALTER last_update2 SET DEFAULT value1';", "lexer": { "@type": "PhpMyAdmin\\SqlParser\\Lexer", - "PARSER_METHODS": [ + "parserMethods": [ "parseDelimiter", "parseWhitespace", "parseNumber", @@ -178,7 +178,7 @@ "count": 17, "idx": 17 }, - "DEFAULT_DELIMITER": ";", + "defaultDelimiter": ";", "delimiter": ";", "delimiterLen": 1, "strict": false, @@ -186,7 +186,7 @@ }, "parser": { "@type": "PhpMyAdmin\\SqlParser\\Parser", - "STATEMENT_PARSERS": { + "statementParsers": { "DESCRIBE": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", "DESC": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", "EXPLAIN": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", @@ -231,7 +231,7 @@ "LOCK": "PhpMyAdmin\\SqlParser\\Statements\\LockStatement", "UNLOCK": "PhpMyAdmin\\SqlParser\\Statements\\LockStatement" }, - "KEYWORD_PARSERS": { + "keywordParsers": { "PARTITION BY": [], "SUBPARTITION BY": [], "_OPTIONS": { @@ -240,7 +240,7 @@ }, "_END_OPTIONS": { "class": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", - "field": "end_options" + "field": "endOptions" }, "INTERSECT": { "class": "PhpMyAdmin\\SqlParser\\Components\\UnionKeyword", @@ -490,7 +490,7 @@ "@type": "PhpMyAdmin\\SqlParser\\Statements\\AlterStatement", "table": { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -515,7 +515,7 @@ "altered": [ { "@type": "PhpMyAdmin\\SqlParser\\Components\\AlterOperation", - "DB_OPTIONS": { + "databaseOptions": { "CHARACTER SET": [ 1, "var" @@ -545,7 +545,7 @@ "var" ] }, - "TABLE_OPTIONS": { + "tableOptions": { "ENGINE": [ 1, "var=" @@ -610,7 +610,7 @@ "INDEX": 2, "CHARACTER SET": 3 }, - "USER_OPTIONS": { + "userOptions": { "ATTRIBUTE": [ 1, "var" @@ -641,7 +641,7 @@ "UNLOCK": 2, "IDENTIFIED": 3 }, - "VIEW_OPTIONS": { + "viewOptions": { "AS": 1 }, "options": { @@ -652,7 +652,7 @@ }, "field": { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -684,7 +684,7 @@ ] } ], - "OPTIONS": { + "statementOptions": { "ONLINE": 1, "OFFLINE": 1, "IGNORE": 2, @@ -698,8 +698,8 @@ "USER": 3, "VIEW": 3 }, - "CLAUSES": [], - "END_OPTIONS": [], + "clauses": [], + "statementEndOptions": [], "options": { "@type": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", "options": { diff --git a/tests/data/parser/parseAlterTableCharacterSet1.out b/tests/data/parser/parseAlterTableCharacterSet1.out index e03aa3f84..ba600e0dc 100644 --- a/tests/data/parser/parseAlterTableCharacterSet1.out +++ b/tests/data/parser/parseAlterTableCharacterSet1.out @@ -2,7 +2,7 @@ "query": "ALTER TABLE `d` DEFAULT CHARSET=hp8 COLLATE hp8_english_ci;\n", "lexer": { "@type": "PhpMyAdmin\\SqlParser\\Lexer", - "PARSER_METHODS": [ + "parserMethods": [ "parseDelimiter", "parseWhitespace", "parseNumber", @@ -169,7 +169,7 @@ "count": 16, "idx": 16 }, - "DEFAULT_DELIMITER": ";", + "defaultDelimiter": ";", "delimiter": ";", "delimiterLen": 1, "strict": false, @@ -177,7 +177,7 @@ }, "parser": { "@type": "PhpMyAdmin\\SqlParser\\Parser", - "STATEMENT_PARSERS": { + "statementParsers": { "DESCRIBE": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", "DESC": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", "EXPLAIN": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", @@ -222,7 +222,7 @@ "LOCK": "PhpMyAdmin\\SqlParser\\Statements\\LockStatement", "UNLOCK": "PhpMyAdmin\\SqlParser\\Statements\\LockStatement" }, - "KEYWORD_PARSERS": { + "keywordParsers": { "PARTITION BY": [], "SUBPARTITION BY": [], "_OPTIONS": { @@ -231,7 +231,7 @@ }, "_END_OPTIONS": { "class": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", - "field": "end_options" + "field": "endOptions" }, "INTERSECT": { "class": "PhpMyAdmin\\SqlParser\\Components\\UnionKeyword", @@ -481,7 +481,7 @@ "@type": "PhpMyAdmin\\SqlParser\\Statements\\AlterStatement", "table": { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -506,7 +506,7 @@ "altered": [ { "@type": "PhpMyAdmin\\SqlParser\\Components\\AlterOperation", - "DB_OPTIONS": { + "databaseOptions": { "CHARACTER SET": [ 1, "var" @@ -536,7 +536,7 @@ "var" ] }, - "TABLE_OPTIONS": { + "tableOptions": { "ENGINE": [ 1, "var=" @@ -601,7 +601,7 @@ "INDEX": 2, "CHARACTER SET": 3 }, - "USER_OPTIONS": { + "userOptions": { "ATTRIBUTE": [ 1, "var" @@ -632,7 +632,7 @@ "UNLOCK": 2, "IDENTIFIED": 3 }, - "VIEW_OPTIONS": { + "viewOptions": { "AS": 1 }, "options": { @@ -664,7 +664,7 @@ ] } ], - "OPTIONS": { + "statementOptions": { "ONLINE": 1, "OFFLINE": 1, "IGNORE": 2, @@ -678,8 +678,8 @@ "USER": 3, "VIEW": 3 }, - "CLAUSES": [], - "END_OPTIONS": [], + "clauses": [], + "statementEndOptions": [], "options": { "@type": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", "options": { diff --git a/tests/data/parser/parseAlterTableCharacterSet2.out b/tests/data/parser/parseAlterTableCharacterSet2.out index 1f5a0e4d1..4b17843f4 100644 --- a/tests/data/parser/parseAlterTableCharacterSet2.out +++ b/tests/data/parser/parseAlterTableCharacterSet2.out @@ -2,7 +2,7 @@ "query": "ALTER TABLE `d` CHARSET=hp8\n\n", "lexer": { "@type": "PhpMyAdmin\\SqlParser\\Lexer", - "PARSER_METHODS": [ + "parserMethods": [ "parseDelimiter", "parseWhitespace", "parseNumber", @@ -124,7 +124,7 @@ "count": 11, "idx": 11 }, - "DEFAULT_DELIMITER": ";", + "defaultDelimiter": ";", "delimiter": ";", "delimiterLen": 1, "strict": false, @@ -132,7 +132,7 @@ }, "parser": { "@type": "PhpMyAdmin\\SqlParser\\Parser", - "STATEMENT_PARSERS": { + "statementParsers": { "DESCRIBE": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", "DESC": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", "EXPLAIN": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", @@ -177,7 +177,7 @@ "LOCK": "PhpMyAdmin\\SqlParser\\Statements\\LockStatement", "UNLOCK": "PhpMyAdmin\\SqlParser\\Statements\\LockStatement" }, - "KEYWORD_PARSERS": { + "keywordParsers": { "PARTITION BY": [], "SUBPARTITION BY": [], "_OPTIONS": { @@ -186,7 +186,7 @@ }, "_END_OPTIONS": { "class": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", - "field": "end_options" + "field": "endOptions" }, "INTERSECT": { "class": "PhpMyAdmin\\SqlParser\\Components\\UnionKeyword", @@ -436,7 +436,7 @@ "@type": "PhpMyAdmin\\SqlParser\\Statements\\AlterStatement", "table": { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -461,7 +461,7 @@ "altered": [ { "@type": "PhpMyAdmin\\SqlParser\\Components\\AlterOperation", - "DB_OPTIONS": { + "databaseOptions": { "CHARACTER SET": [ 1, "var" @@ -491,7 +491,7 @@ "var" ] }, - "TABLE_OPTIONS": { + "tableOptions": { "ENGINE": [ 1, "var=" @@ -556,7 +556,7 @@ "INDEX": 2, "CHARACTER SET": 3 }, - "USER_OPTIONS": { + "userOptions": { "ATTRIBUTE": [ 1, "var" @@ -587,7 +587,7 @@ "UNLOCK": 2, "IDENTIFIED": 3 }, - "VIEW_OPTIONS": { + "viewOptions": { "AS": 1 }, "options": { @@ -610,7 +610,7 @@ ] } ], - "OPTIONS": { + "statementOptions": { "ONLINE": 1, "OFFLINE": 1, "IGNORE": 2, @@ -624,8 +624,8 @@ "USER": 3, "VIEW": 3 }, - "CLAUSES": [], - "END_OPTIONS": [], + "clauses": [], + "statementEndOptions": [], "options": { "@type": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", "options": { diff --git a/tests/data/parser/parseAlterTableCharacterSet3.out b/tests/data/parser/parseAlterTableCharacterSet3.out index 02b15d394..f315ef792 100644 --- a/tests/data/parser/parseAlterTableCharacterSet3.out +++ b/tests/data/parser/parseAlterTableCharacterSet3.out @@ -2,7 +2,7 @@ "query": "ALTER TABLE `d` CHARSET=hp8;\n", "lexer": { "@type": "PhpMyAdmin\\SqlParser\\Lexer", - "PARSER_METHODS": [ + "parserMethods": [ "parseDelimiter", "parseWhitespace", "parseNumber", @@ -133,7 +133,7 @@ "count": 12, "idx": 12 }, - "DEFAULT_DELIMITER": ";", + "defaultDelimiter": ";", "delimiter": ";", "delimiterLen": 1, "strict": false, @@ -141,7 +141,7 @@ }, "parser": { "@type": "PhpMyAdmin\\SqlParser\\Parser", - "STATEMENT_PARSERS": { + "statementParsers": { "DESCRIBE": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", "DESC": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", "EXPLAIN": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", @@ -186,7 +186,7 @@ "LOCK": "PhpMyAdmin\\SqlParser\\Statements\\LockStatement", "UNLOCK": "PhpMyAdmin\\SqlParser\\Statements\\LockStatement" }, - "KEYWORD_PARSERS": { + "keywordParsers": { "PARTITION BY": [], "SUBPARTITION BY": [], "_OPTIONS": { @@ -195,7 +195,7 @@ }, "_END_OPTIONS": { "class": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", - "field": "end_options" + "field": "endOptions" }, "INTERSECT": { "class": "PhpMyAdmin\\SqlParser\\Components\\UnionKeyword", @@ -445,7 +445,7 @@ "@type": "PhpMyAdmin\\SqlParser\\Statements\\AlterStatement", "table": { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -470,7 +470,7 @@ "altered": [ { "@type": "PhpMyAdmin\\SqlParser\\Components\\AlterOperation", - "DB_OPTIONS": { + "databaseOptions": { "CHARACTER SET": [ 1, "var" @@ -500,7 +500,7 @@ "var" ] }, - "TABLE_OPTIONS": { + "tableOptions": { "ENGINE": [ 1, "var=" @@ -565,7 +565,7 @@ "INDEX": 2, "CHARACTER SET": 3 }, - "USER_OPTIONS": { + "userOptions": { "ATTRIBUTE": [ 1, "var" @@ -596,7 +596,7 @@ "UNLOCK": 2, "IDENTIFIED": 3 }, - "VIEW_OPTIONS": { + "viewOptions": { "AS": 1 }, "options": { @@ -616,7 +616,7 @@ ] } ], - "OPTIONS": { + "statementOptions": { "ONLINE": 1, "OFFLINE": 1, "IGNORE": 2, @@ -630,8 +630,8 @@ "USER": 3, "VIEW": 3 }, - "CLAUSES": [], - "END_OPTIONS": [], + "clauses": [], + "statementEndOptions": [], "options": { "@type": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", "options": { diff --git a/tests/data/parser/parseAlterTableCharacterSet4.out b/tests/data/parser/parseAlterTableCharacterSet4.out index f005db763..740b9ecb2 100644 --- a/tests/data/parser/parseAlterTableCharacterSet4.out +++ b/tests/data/parser/parseAlterTableCharacterSet4.out @@ -2,7 +2,7 @@ "query": "ALTER TABLE tbl_name CONVERT TO CHARACTER SET charset_name;\n\n", "lexer": { "@type": "PhpMyAdmin\\SqlParser\\Lexer", - "PARSER_METHODS": [ + "parserMethods": [ "parseDelimiter", "parseWhitespace", "parseNumber", @@ -169,7 +169,7 @@ "count": 16, "idx": 16 }, - "DEFAULT_DELIMITER": ";", + "defaultDelimiter": ";", "delimiter": ";", "delimiterLen": 1, "strict": false, @@ -177,7 +177,7 @@ }, "parser": { "@type": "PhpMyAdmin\\SqlParser\\Parser", - "STATEMENT_PARSERS": { + "statementParsers": { "DESCRIBE": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", "DESC": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", "EXPLAIN": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", @@ -222,7 +222,7 @@ "LOCK": "PhpMyAdmin\\SqlParser\\Statements\\LockStatement", "UNLOCK": "PhpMyAdmin\\SqlParser\\Statements\\LockStatement" }, - "KEYWORD_PARSERS": { + "keywordParsers": { "PARTITION BY": [], "SUBPARTITION BY": [], "_OPTIONS": { @@ -231,7 +231,7 @@ }, "_END_OPTIONS": { "class": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", - "field": "end_options" + "field": "endOptions" }, "INTERSECT": { "class": "PhpMyAdmin\\SqlParser\\Components\\UnionKeyword", @@ -481,7 +481,7 @@ "@type": "PhpMyAdmin\\SqlParser\\Statements\\AlterStatement", "table": { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -506,7 +506,7 @@ "altered": [ { "@type": "PhpMyAdmin\\SqlParser\\Components\\AlterOperation", - "DB_OPTIONS": { + "databaseOptions": { "CHARACTER SET": [ 1, "var" @@ -536,7 +536,7 @@ "var" ] }, - "TABLE_OPTIONS": { + "tableOptions": { "ENGINE": [ 1, "var=" @@ -601,7 +601,7 @@ "INDEX": 2, "CHARACTER SET": 3 }, - "USER_OPTIONS": { + "userOptions": { "ATTRIBUTE": [ 1, "var" @@ -632,7 +632,7 @@ "UNLOCK": 2, "IDENTIFIED": 3 }, - "VIEW_OPTIONS": { + "viewOptions": { "AS": 1 }, "options": { @@ -645,7 +645,7 @@ }, "field": { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -670,7 +670,7 @@ "unknown": [] } ], - "OPTIONS": { + "statementOptions": { "ONLINE": 1, "OFFLINE": 1, "IGNORE": 2, @@ -684,8 +684,8 @@ "USER": 3, "VIEW": 3 }, - "CLAUSES": [], - "END_OPTIONS": [], + "clauses": [], + "statementEndOptions": [], "options": { "@type": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", "options": { diff --git a/tests/data/parser/parseAlterTableCharacterSet5.out b/tests/data/parser/parseAlterTableCharacterSet5.out index 52a09ae01..1009cc087 100644 --- a/tests/data/parser/parseAlterTableCharacterSet5.out +++ b/tests/data/parser/parseAlterTableCharacterSet5.out @@ -2,7 +2,7 @@ "query": "ALTER TABLE `d` CHARACTER SET utf8;\n\n", "lexer": { "@type": "PhpMyAdmin\\SqlParser\\Lexer", - "PARSER_METHODS": [ + "parserMethods": [ "parseDelimiter", "parseWhitespace", "parseNumber", @@ -133,7 +133,7 @@ "count": 12, "idx": 12 }, - "DEFAULT_DELIMITER": ";", + "defaultDelimiter": ";", "delimiter": ";", "delimiterLen": 1, "strict": false, @@ -141,7 +141,7 @@ }, "parser": { "@type": "PhpMyAdmin\\SqlParser\\Parser", - "STATEMENT_PARSERS": { + "statementParsers": { "DESCRIBE": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", "DESC": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", "EXPLAIN": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", @@ -186,7 +186,7 @@ "LOCK": "PhpMyAdmin\\SqlParser\\Statements\\LockStatement", "UNLOCK": "PhpMyAdmin\\SqlParser\\Statements\\LockStatement" }, - "KEYWORD_PARSERS": { + "keywordParsers": { "PARTITION BY": [], "SUBPARTITION BY": [], "_OPTIONS": { @@ -195,7 +195,7 @@ }, "_END_OPTIONS": { "class": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", - "field": "end_options" + "field": "endOptions" }, "INTERSECT": { "class": "PhpMyAdmin\\SqlParser\\Components\\UnionKeyword", @@ -445,7 +445,7 @@ "@type": "PhpMyAdmin\\SqlParser\\Statements\\AlterStatement", "table": { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -470,7 +470,7 @@ "altered": [ { "@type": "PhpMyAdmin\\SqlParser\\Components\\AlterOperation", - "DB_OPTIONS": { + "databaseOptions": { "CHARACTER SET": [ 1, "var" @@ -500,7 +500,7 @@ "var" ] }, - "TABLE_OPTIONS": { + "tableOptions": { "ENGINE": [ 1, "var=" @@ -565,7 +565,7 @@ "INDEX": 2, "CHARACTER SET": 3 }, - "USER_OPTIONS": { + "userOptions": { "ATTRIBUTE": [ 1, "var" @@ -596,7 +596,7 @@ "UNLOCK": 2, "IDENTIFIED": 3 }, - "VIEW_OPTIONS": { + "viewOptions": { "AS": 1 }, "options": { @@ -607,7 +607,7 @@ }, "field": { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -632,7 +632,7 @@ "unknown": [] } ], - "OPTIONS": { + "statementOptions": { "ONLINE": 1, "OFFLINE": 1, "IGNORE": 2, @@ -646,8 +646,8 @@ "USER": 3, "VIEW": 3 }, - "CLAUSES": [], - "END_OPTIONS": [], + "clauses": [], + "statementEndOptions": [], "options": { "@type": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", "options": { diff --git a/tests/data/parser/parseAlterTableCharacterSet6.out b/tests/data/parser/parseAlterTableCharacterSet6.out index f016c8893..5b411684d 100644 --- a/tests/data/parser/parseAlterTableCharacterSet6.out +++ b/tests/data/parser/parseAlterTableCharacterSet6.out @@ -2,7 +2,7 @@ "query": "ALTER TABLE `d` CHARACTER SET utf8 COLLATE utf8_general_ci;\n\n", "lexer": { "@type": "PhpMyAdmin\\SqlParser\\Lexer", - "PARSER_METHODS": [ + "parserMethods": [ "parseDelimiter", "parseWhitespace", "parseNumber", @@ -169,7 +169,7 @@ "count": 16, "idx": 16 }, - "DEFAULT_DELIMITER": ";", + "defaultDelimiter": ";", "delimiter": ";", "delimiterLen": 1, "strict": false, @@ -177,7 +177,7 @@ }, "parser": { "@type": "PhpMyAdmin\\SqlParser\\Parser", - "STATEMENT_PARSERS": { + "statementParsers": { "DESCRIBE": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", "DESC": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", "EXPLAIN": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", @@ -222,7 +222,7 @@ "LOCK": "PhpMyAdmin\\SqlParser\\Statements\\LockStatement", "UNLOCK": "PhpMyAdmin\\SqlParser\\Statements\\LockStatement" }, - "KEYWORD_PARSERS": { + "keywordParsers": { "PARTITION BY": [], "SUBPARTITION BY": [], "_OPTIONS": { @@ -231,7 +231,7 @@ }, "_END_OPTIONS": { "class": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", - "field": "end_options" + "field": "endOptions" }, "INTERSECT": { "class": "PhpMyAdmin\\SqlParser\\Components\\UnionKeyword", @@ -481,7 +481,7 @@ "@type": "PhpMyAdmin\\SqlParser\\Statements\\AlterStatement", "table": { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -506,7 +506,7 @@ "altered": [ { "@type": "PhpMyAdmin\\SqlParser\\Components\\AlterOperation", - "DB_OPTIONS": { + "databaseOptions": { "CHARACTER SET": [ 1, "var" @@ -536,7 +536,7 @@ "var" ] }, - "TABLE_OPTIONS": { + "tableOptions": { "ENGINE": [ 1, "var=" @@ -601,7 +601,7 @@ "INDEX": 2, "CHARACTER SET": 3 }, - "USER_OPTIONS": { + "userOptions": { "ATTRIBUTE": [ 1, "var" @@ -632,7 +632,7 @@ "UNLOCK": 2, "IDENTIFIED": 3 }, - "VIEW_OPTIONS": { + "viewOptions": { "AS": 1 }, "options": { @@ -643,7 +643,7 @@ }, "field": { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -678,7 +678,7 @@ ] } ], - "OPTIONS": { + "statementOptions": { "ONLINE": 1, "OFFLINE": 1, "IGNORE": 2, @@ -692,8 +692,8 @@ "USER": 3, "VIEW": 3 }, - "CLAUSES": [], - "END_OPTIONS": [], + "clauses": [], + "statementEndOptions": [], "options": { "@type": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", "options": { diff --git a/tests/data/parser/parseAlterTableCharacterSet7.out b/tests/data/parser/parseAlterTableCharacterSet7.out index f51b1f37b..d7a3a3df4 100644 --- a/tests/data/parser/parseAlterTableCharacterSet7.out +++ b/tests/data/parser/parseAlterTableCharacterSet7.out @@ -2,7 +2,7 @@ "query": "ALTER TABLE `d` CHARACTER SET utf8 COLLATE utf8_general_ci;\n\n", "lexer": { "@type": "PhpMyAdmin\\SqlParser\\Lexer", - "PARSER_METHODS": [ + "parserMethods": [ "parseDelimiter", "parseWhitespace", "parseNumber", @@ -169,7 +169,7 @@ "count": 16, "idx": 16 }, - "DEFAULT_DELIMITER": ";", + "defaultDelimiter": ";", "delimiter": ";", "delimiterLen": 1, "strict": false, @@ -177,7 +177,7 @@ }, "parser": { "@type": "PhpMyAdmin\\SqlParser\\Parser", - "STATEMENT_PARSERS": { + "statementParsers": { "DESCRIBE": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", "DESC": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", "EXPLAIN": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", @@ -222,7 +222,7 @@ "LOCK": "PhpMyAdmin\\SqlParser\\Statements\\LockStatement", "UNLOCK": "PhpMyAdmin\\SqlParser\\Statements\\LockStatement" }, - "KEYWORD_PARSERS": { + "keywordParsers": { "PARTITION BY": [], "SUBPARTITION BY": [], "_OPTIONS": { @@ -231,7 +231,7 @@ }, "_END_OPTIONS": { "class": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", - "field": "end_options" + "field": "endOptions" }, "INTERSECT": { "class": "PhpMyAdmin\\SqlParser\\Components\\UnionKeyword", @@ -481,7 +481,7 @@ "@type": "PhpMyAdmin\\SqlParser\\Statements\\AlterStatement", "table": { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -506,7 +506,7 @@ "altered": [ { "@type": "PhpMyAdmin\\SqlParser\\Components\\AlterOperation", - "DB_OPTIONS": { + "databaseOptions": { "CHARACTER SET": [ 1, "var" @@ -536,7 +536,7 @@ "var" ] }, - "TABLE_OPTIONS": { + "tableOptions": { "ENGINE": [ 1, "var=" @@ -601,7 +601,7 @@ "INDEX": 2, "CHARACTER SET": 3 }, - "USER_OPTIONS": { + "userOptions": { "ATTRIBUTE": [ 1, "var" @@ -632,7 +632,7 @@ "UNLOCK": 2, "IDENTIFIED": 3 }, - "VIEW_OPTIONS": { + "viewOptions": { "AS": 1 }, "options": { @@ -643,7 +643,7 @@ }, "field": { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -678,7 +678,7 @@ ] } ], - "OPTIONS": { + "statementOptions": { "ONLINE": 1, "OFFLINE": 1, "IGNORE": 2, @@ -692,8 +692,8 @@ "USER": 3, "VIEW": 3 }, - "CLAUSES": [], - "END_OPTIONS": [], + "clauses": [], + "statementEndOptions": [], "options": { "@type": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", "options": { diff --git a/tests/data/parser/parseAlterTableSetAutoIncrementError.out b/tests/data/parser/parseAlterTableSetAutoIncrementError.out index d1d4cdebd..8e5c12662 100644 --- a/tests/data/parser/parseAlterTableSetAutoIncrementError.out +++ b/tests/data/parser/parseAlterTableSetAutoIncrementError.out @@ -2,7 +2,7 @@ "query": "ALTER TABLE t1 AUTO_INCREMENT\n", "lexer": { "@type": "PhpMyAdmin\\SqlParser\\Lexer", - "PARSER_METHODS": [ + "parserMethods": [ "parseDelimiter", "parseWhitespace", "parseNumber", @@ -106,7 +106,7 @@ "count": 9, "idx": 9 }, - "DEFAULT_DELIMITER": ";", + "defaultDelimiter": ";", "delimiter": ";", "delimiterLen": 1, "strict": false, @@ -114,7 +114,7 @@ }, "parser": { "@type": "PhpMyAdmin\\SqlParser\\Parser", - "STATEMENT_PARSERS": { + "statementParsers": { "DESCRIBE": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", "DESC": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", "EXPLAIN": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", @@ -159,7 +159,7 @@ "LOCK": "PhpMyAdmin\\SqlParser\\Statements\\LockStatement", "UNLOCK": "PhpMyAdmin\\SqlParser\\Statements\\LockStatement" }, - "KEYWORD_PARSERS": { + "keywordParsers": { "PARTITION BY": [], "SUBPARTITION BY": [], "_OPTIONS": { @@ -168,7 +168,7 @@ }, "_END_OPTIONS": { "class": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", - "field": "end_options" + "field": "endOptions" }, "INTERSECT": { "class": "PhpMyAdmin\\SqlParser\\Components\\UnionKeyword", @@ -418,7 +418,7 @@ "@type": "PhpMyAdmin\\SqlParser\\Statements\\AlterStatement", "table": { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -443,7 +443,7 @@ "altered": [ { "@type": "PhpMyAdmin\\SqlParser\\Components\\AlterOperation", - "DB_OPTIONS": { + "databaseOptions": { "CHARACTER SET": [ 1, "var" @@ -473,7 +473,7 @@ "var" ] }, - "TABLE_OPTIONS": { + "tableOptions": { "ENGINE": [ 1, "var=" @@ -538,7 +538,7 @@ "INDEX": 2, "CHARACTER SET": 3 }, - "USER_OPTIONS": { + "userOptions": { "ATTRIBUTE": [ 1, "var" @@ -569,7 +569,7 @@ "UNLOCK": 2, "IDENTIFIED": 3 }, - "VIEW_OPTIONS": { + "viewOptions": { "AS": 1 }, "options": { @@ -587,7 +587,7 @@ "unknown": [] } ], - "OPTIONS": { + "statementOptions": { "ONLINE": 1, "OFFLINE": 1, "IGNORE": 2, @@ -601,8 +601,8 @@ "USER": 3, "VIEW": 3 }, - "CLAUSES": [], - "END_OPTIONS": [], + "clauses": [], + "statementEndOptions": [], "options": { "@type": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", "options": { diff --git a/tests/data/parser/parseAlterUser.out b/tests/data/parser/parseAlterUser.out index 99bce25ca..4d48b29df 100644 --- a/tests/data/parser/parseAlterUser.out +++ b/tests/data/parser/parseAlterUser.out @@ -2,7 +2,7 @@ "query": "ALTER USER 'jeffrey'@'localhost'\n IDENTIFIED BY 'new_password' PASSWORD EXPIRE;", "lexer": { "@type": "PhpMyAdmin\\SqlParser\\Lexer", - "PARSER_METHODS": [ + "parserMethods": [ "parseDelimiter", "parseWhitespace", "parseNumber", @@ -178,7 +178,7 @@ "count": 17, "idx": 17 }, - "DEFAULT_DELIMITER": ";", + "defaultDelimiter": ";", "delimiter": ";", "delimiterLen": 1, "strict": false, @@ -186,7 +186,7 @@ }, "parser": { "@type": "PhpMyAdmin\\SqlParser\\Parser", - "STATEMENT_PARSERS": { + "statementParsers": { "DESCRIBE": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", "DESC": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", "EXPLAIN": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", @@ -231,7 +231,7 @@ "LOCK": "PhpMyAdmin\\SqlParser\\Statements\\LockStatement", "UNLOCK": "PhpMyAdmin\\SqlParser\\Statements\\LockStatement" }, - "KEYWORD_PARSERS": { + "keywordParsers": { "PARTITION BY": [], "SUBPARTITION BY": [], "_OPTIONS": { @@ -240,7 +240,7 @@ }, "_END_OPTIONS": { "class": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", - "field": "end_options" + "field": "endOptions" }, "INTERSECT": { "class": "PhpMyAdmin\\SqlParser\\Components\\UnionKeyword", @@ -490,7 +490,7 @@ "@type": "PhpMyAdmin\\SqlParser\\Statements\\AlterStatement", "table": { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -515,7 +515,7 @@ "altered": [ { "@type": "PhpMyAdmin\\SqlParser\\Components\\AlterOperation", - "DB_OPTIONS": { + "databaseOptions": { "CHARACTER SET": [ 1, "var" @@ -545,7 +545,7 @@ "var" ] }, - "TABLE_OPTIONS": { + "tableOptions": { "ENGINE": [ 1, "var=" @@ -610,7 +610,7 @@ "INDEX": 2, "CHARACTER SET": 3 }, - "USER_OPTIONS": { + "userOptions": { "ATTRIBUTE": [ 1, "var" @@ -641,7 +641,7 @@ "UNLOCK": 2, "IDENTIFIED": 3 }, - "VIEW_OPTIONS": { + "viewOptions": { "AS": 1 }, "options": { @@ -652,7 +652,7 @@ "equals": false, "expr": { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -681,7 +681,7 @@ }, "field": { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -706,7 +706,7 @@ "unknown": [] } ], - "OPTIONS": { + "statementOptions": { "ONLINE": 1, "OFFLINE": 1, "IGNORE": 2, @@ -720,8 +720,8 @@ "USER": 3, "VIEW": 3 }, - "CLAUSES": [], - "END_OPTIONS": [], + "clauses": [], + "statementEndOptions": [], "options": { "@type": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", "options": { diff --git a/tests/data/parser/parseAlterUser1.out b/tests/data/parser/parseAlterUser1.out index b66464bb1..fb631e65c 100644 --- a/tests/data/parser/parseAlterUser1.out +++ b/tests/data/parser/parseAlterUser1.out @@ -2,7 +2,7 @@ "query": "ALTER USER trevor REQUIRE NONE;", "lexer": { "@type": "PhpMyAdmin\\SqlParser\\Lexer", - "PARSER_METHODS": [ + "parserMethods": [ "parseDelimiter", "parseWhitespace", "parseNumber", @@ -124,7 +124,7 @@ "count": 11, "idx": 11 }, - "DEFAULT_DELIMITER": ";", + "defaultDelimiter": ";", "delimiter": ";", "delimiterLen": 1, "strict": false, @@ -132,7 +132,7 @@ }, "parser": { "@type": "PhpMyAdmin\\SqlParser\\Parser", - "STATEMENT_PARSERS": { + "statementParsers": { "DESCRIBE": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", "DESC": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", "EXPLAIN": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", @@ -177,7 +177,7 @@ "LOCK": "PhpMyAdmin\\SqlParser\\Statements\\LockStatement", "UNLOCK": "PhpMyAdmin\\SqlParser\\Statements\\LockStatement" }, - "KEYWORD_PARSERS": { + "keywordParsers": { "PARTITION BY": [], "SUBPARTITION BY": [], "_OPTIONS": { @@ -186,7 +186,7 @@ }, "_END_OPTIONS": { "class": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", - "field": "end_options" + "field": "endOptions" }, "INTERSECT": { "class": "PhpMyAdmin\\SqlParser\\Components\\UnionKeyword", @@ -436,7 +436,7 @@ "@type": "PhpMyAdmin\\SqlParser\\Statements\\AlterStatement", "table": { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -461,7 +461,7 @@ "altered": [ { "@type": "PhpMyAdmin\\SqlParser\\Components\\AlterOperation", - "DB_OPTIONS": { + "databaseOptions": { "CHARACTER SET": [ 1, "var" @@ -491,7 +491,7 @@ "var" ] }, - "TABLE_OPTIONS": { + "tableOptions": { "ENGINE": [ 1, "var=" @@ -556,7 +556,7 @@ "INDEX": 2, "CHARACTER SET": 3 }, - "USER_OPTIONS": { + "userOptions": { "ATTRIBUTE": [ 1, "var" @@ -587,7 +587,7 @@ "UNLOCK": 2, "IDENTIFIED": 3 }, - "VIEW_OPTIONS": { + "viewOptions": { "AS": 1 }, "options": { @@ -605,7 +605,7 @@ "unknown": [] } ], - "OPTIONS": { + "statementOptions": { "ONLINE": 1, "OFFLINE": 1, "IGNORE": 2, @@ -619,8 +619,8 @@ "USER": 3, "VIEW": 3 }, - "CLAUSES": [], - "END_OPTIONS": [], + "clauses": [], + "statementEndOptions": [], "options": { "@type": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", "options": { diff --git a/tests/data/parser/parseAlterUser2.out b/tests/data/parser/parseAlterUser2.out index 32007f423..36a9c1527 100644 --- a/tests/data/parser/parseAlterUser2.out +++ b/tests/data/parser/parseAlterUser2.out @@ -2,7 +2,7 @@ "query": "ALTER USER 'user'@'localhost' ACCOUNT LOCK;", "lexer": { "@type": "PhpMyAdmin\\SqlParser\\Lexer", - "PARSER_METHODS": [ + "parserMethods": [ "parseDelimiter", "parseWhitespace", "parseNumber", @@ -124,7 +124,7 @@ "count": 11, "idx": 11 }, - "DEFAULT_DELIMITER": ";", + "defaultDelimiter": ";", "delimiter": ";", "delimiterLen": 1, "strict": false, @@ -132,7 +132,7 @@ }, "parser": { "@type": "PhpMyAdmin\\SqlParser\\Parser", - "STATEMENT_PARSERS": { + "statementParsers": { "DESCRIBE": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", "DESC": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", "EXPLAIN": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", @@ -177,7 +177,7 @@ "LOCK": "PhpMyAdmin\\SqlParser\\Statements\\LockStatement", "UNLOCK": "PhpMyAdmin\\SqlParser\\Statements\\LockStatement" }, - "KEYWORD_PARSERS": { + "keywordParsers": { "PARTITION BY": [], "SUBPARTITION BY": [], "_OPTIONS": { @@ -186,7 +186,7 @@ }, "_END_OPTIONS": { "class": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", - "field": "end_options" + "field": "endOptions" }, "INTERSECT": { "class": "PhpMyAdmin\\SqlParser\\Components\\UnionKeyword", @@ -436,7 +436,7 @@ "@type": "PhpMyAdmin\\SqlParser\\Statements\\AlterStatement", "table": { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -461,7 +461,7 @@ "altered": [ { "@type": "PhpMyAdmin\\SqlParser\\Components\\AlterOperation", - "DB_OPTIONS": { + "databaseOptions": { "CHARACTER SET": [ 1, "var" @@ -491,7 +491,7 @@ "var" ] }, - "TABLE_OPTIONS": { + "tableOptions": { "ENGINE": [ 1, "var=" @@ -556,7 +556,7 @@ "INDEX": 2, "CHARACTER SET": 3 }, - "USER_OPTIONS": { + "userOptions": { "ATTRIBUTE": [ 1, "var" @@ -587,7 +587,7 @@ "UNLOCK": 2, "IDENTIFIED": 3 }, - "VIEW_OPTIONS": { + "viewOptions": { "AS": 1 }, "options": { @@ -601,7 +601,7 @@ "unknown": [] } ], - "OPTIONS": { + "statementOptions": { "ONLINE": 1, "OFFLINE": 1, "IGNORE": 2, @@ -615,8 +615,8 @@ "USER": 3, "VIEW": 3 }, - "CLAUSES": [], - "END_OPTIONS": [], + "clauses": [], + "statementEndOptions": [], "options": { "@type": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", "options": { diff --git a/tests/data/parser/parseAlterUser3.out b/tests/data/parser/parseAlterUser3.out index 76608cca6..6ede99e3a 100644 --- a/tests/data/parser/parseAlterUser3.out +++ b/tests/data/parser/parseAlterUser3.out @@ -2,7 +2,7 @@ "query": "ALTER USER 'testosama' REQUIRE SSL WITH MAX_CONNECTIONS_PER_HOUR 20;", "lexer": { "@type": "PhpMyAdmin\\SqlParser\\Lexer", - "PARSER_METHODS": [ + "parserMethods": [ "parseDelimiter", "parseWhitespace", "parseNumber", @@ -178,7 +178,7 @@ "count": 17, "idx": 17 }, - "DEFAULT_DELIMITER": ";", + "defaultDelimiter": ";", "delimiter": ";", "delimiterLen": 1, "strict": false, @@ -186,7 +186,7 @@ }, "parser": { "@type": "PhpMyAdmin\\SqlParser\\Parser", - "STATEMENT_PARSERS": { + "statementParsers": { "DESCRIBE": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", "DESC": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", "EXPLAIN": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", @@ -231,7 +231,7 @@ "LOCK": "PhpMyAdmin\\SqlParser\\Statements\\LockStatement", "UNLOCK": "PhpMyAdmin\\SqlParser\\Statements\\LockStatement" }, - "KEYWORD_PARSERS": { + "keywordParsers": { "PARTITION BY": [], "SUBPARTITION BY": [], "_OPTIONS": { @@ -240,7 +240,7 @@ }, "_END_OPTIONS": { "class": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", - "field": "end_options" + "field": "endOptions" }, "INTERSECT": { "class": "PhpMyAdmin\\SqlParser\\Components\\UnionKeyword", @@ -490,7 +490,7 @@ "@type": "PhpMyAdmin\\SqlParser\\Statements\\AlterStatement", "table": { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -515,7 +515,7 @@ "altered": [ { "@type": "PhpMyAdmin\\SqlParser\\Components\\AlterOperation", - "DB_OPTIONS": { + "databaseOptions": { "CHARACTER SET": [ 1, "var" @@ -545,7 +545,7 @@ "var" ] }, - "TABLE_OPTIONS": { + "tableOptions": { "ENGINE": [ 1, "var=" @@ -610,7 +610,7 @@ "INDEX": 2, "CHARACTER SET": 3 }, - "USER_OPTIONS": { + "userOptions": { "ATTRIBUTE": [ 1, "var" @@ -641,7 +641,7 @@ "UNLOCK": 2, "IDENTIFIED": 3 }, - "VIEW_OPTIONS": { + "viewOptions": { "AS": 1 }, "options": { @@ -669,7 +669,7 @@ ] } ], - "OPTIONS": { + "statementOptions": { "ONLINE": 1, "OFFLINE": 1, "IGNORE": 2, @@ -683,8 +683,8 @@ "USER": 3, "VIEW": 3 }, - "CLAUSES": [], - "END_OPTIONS": [], + "clauses": [], + "statementEndOptions": [], "options": { "@type": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", "options": { diff --git a/tests/data/parser/parseAlterUser4.out b/tests/data/parser/parseAlterUser4.out index 18ad0329c..a03d713be 100644 --- a/tests/data/parser/parseAlterUser4.out +++ b/tests/data/parser/parseAlterUser4.out @@ -2,7 +2,7 @@ "query": "ALTER USER 'user'\n WITH MAX_QUERIES_PER_HOUR 500 MAX_UPDATES_PER_HOUR 100;", "lexer": { "@type": "PhpMyAdmin\\SqlParser\\Lexer", - "PARSER_METHODS": [ + "parserMethods": [ "parseDelimiter", "parseWhitespace", "parseNumber", @@ -178,7 +178,7 @@ "count": 17, "idx": 17 }, - "DEFAULT_DELIMITER": ";", + "defaultDelimiter": ";", "delimiter": ";", "delimiterLen": 1, "strict": false, @@ -186,7 +186,7 @@ }, "parser": { "@type": "PhpMyAdmin\\SqlParser\\Parser", - "STATEMENT_PARSERS": { + "statementParsers": { "DESCRIBE": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", "DESC": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", "EXPLAIN": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", @@ -231,7 +231,7 @@ "LOCK": "PhpMyAdmin\\SqlParser\\Statements\\LockStatement", "UNLOCK": "PhpMyAdmin\\SqlParser\\Statements\\LockStatement" }, - "KEYWORD_PARSERS": { + "keywordParsers": { "PARTITION BY": [], "SUBPARTITION BY": [], "_OPTIONS": { @@ -240,7 +240,7 @@ }, "_END_OPTIONS": { "class": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", - "field": "end_options" + "field": "endOptions" }, "INTERSECT": { "class": "PhpMyAdmin\\SqlParser\\Components\\UnionKeyword", @@ -490,7 +490,7 @@ "@type": "PhpMyAdmin\\SqlParser\\Statements\\AlterStatement", "table": { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -515,7 +515,7 @@ "altered": [ { "@type": "PhpMyAdmin\\SqlParser\\Components\\AlterOperation", - "DB_OPTIONS": { + "databaseOptions": { "CHARACTER SET": [ 1, "var" @@ -545,7 +545,7 @@ "var" ] }, - "TABLE_OPTIONS": { + "tableOptions": { "ENGINE": [ 1, "var=" @@ -610,7 +610,7 @@ "INDEX": 2, "CHARACTER SET": 3 }, - "USER_OPTIONS": { + "userOptions": { "ATTRIBUTE": [ 1, "var" @@ -641,7 +641,7 @@ "UNLOCK": 2, "IDENTIFIED": 3 }, - "VIEW_OPTIONS": { + "viewOptions": { "AS": 1 }, "options": { @@ -675,7 +675,7 @@ ] } ], - "OPTIONS": { + "statementOptions": { "ONLINE": 1, "OFFLINE": 1, "IGNORE": 2, @@ -689,8 +689,8 @@ "USER": 3, "VIEW": 3 }, - "CLAUSES": [], - "END_OPTIONS": [], + "clauses": [], + "statementEndOptions": [], "options": { "@type": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", "options": { diff --git a/tests/data/parser/parseAlterUser5.out b/tests/data/parser/parseAlterUser5.out index 9df5d2fb1..92c73a800 100644 --- a/tests/data/parser/parseAlterUser5.out +++ b/tests/data/parser/parseAlterUser5.out @@ -2,7 +2,7 @@ "query": "ALTER USER 'user' PASSWORD EXPIRE NEVER", "lexer": { "@type": "PhpMyAdmin\\SqlParser\\Lexer", - "PARSER_METHODS": [ + "parserMethods": [ "parseDelimiter", "parseWhitespace", "parseNumber", @@ -133,7 +133,7 @@ "count": 12, "idx": 12 }, - "DEFAULT_DELIMITER": ";", + "defaultDelimiter": ";", "delimiter": ";", "delimiterLen": 1, "strict": false, @@ -141,7 +141,7 @@ }, "parser": { "@type": "PhpMyAdmin\\SqlParser\\Parser", - "STATEMENT_PARSERS": { + "statementParsers": { "DESCRIBE": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", "DESC": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", "EXPLAIN": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", @@ -186,7 +186,7 @@ "LOCK": "PhpMyAdmin\\SqlParser\\Statements\\LockStatement", "UNLOCK": "PhpMyAdmin\\SqlParser\\Statements\\LockStatement" }, - "KEYWORD_PARSERS": { + "keywordParsers": { "PARTITION BY": [], "SUBPARTITION BY": [], "_OPTIONS": { @@ -195,7 +195,7 @@ }, "_END_OPTIONS": { "class": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", - "field": "end_options" + "field": "endOptions" }, "INTERSECT": { "class": "PhpMyAdmin\\SqlParser\\Components\\UnionKeyword", @@ -445,7 +445,7 @@ "@type": "PhpMyAdmin\\SqlParser\\Statements\\AlterStatement", "table": { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -470,7 +470,7 @@ "altered": [ { "@type": "PhpMyAdmin\\SqlParser\\Components\\AlterOperation", - "DB_OPTIONS": { + "databaseOptions": { "CHARACTER SET": [ 1, "var" @@ -500,7 +500,7 @@ "var" ] }, - "TABLE_OPTIONS": { + "tableOptions": { "ENGINE": [ 1, "var=" @@ -565,7 +565,7 @@ "INDEX": 2, "CHARACTER SET": 3 }, - "USER_OPTIONS": { + "userOptions": { "ATTRIBUTE": [ 1, "var" @@ -596,7 +596,7 @@ "UNLOCK": 2, "IDENTIFIED": 3 }, - "VIEW_OPTIONS": { + "viewOptions": { "AS": 1 }, "options": { @@ -612,7 +612,7 @@ }, "field": { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -637,7 +637,7 @@ "unknown": [] } ], - "OPTIONS": { + "statementOptions": { "ONLINE": 1, "OFFLINE": 1, "IGNORE": 2, @@ -651,8 +651,8 @@ "USER": 3, "VIEW": 3 }, - "CLAUSES": [], - "END_OPTIONS": [], + "clauses": [], + "statementEndOptions": [], "options": { "@type": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", "options": { diff --git a/tests/data/parser/parseAlterUser6.out b/tests/data/parser/parseAlterUser6.out index f1ff382ac..9be2daab4 100644 --- a/tests/data/parser/parseAlterUser6.out +++ b/tests/data/parser/parseAlterUser6.out @@ -2,7 +2,7 @@ "query": "ALTER USER 'user' ATTRIBUTE '{\"baz\": \"faz\", \"foo\": \"moo\"}';", "lexer": { "@type": "PhpMyAdmin\\SqlParser\\Lexer", - "PARSER_METHODS": [ + "parserMethods": [ "parseDelimiter", "parseWhitespace", "parseNumber", @@ -124,7 +124,7 @@ "count": 11, "idx": 11 }, - "DEFAULT_DELIMITER": ";", + "defaultDelimiter": ";", "delimiter": ";", "delimiterLen": 1, "strict": false, @@ -132,7 +132,7 @@ }, "parser": { "@type": "PhpMyAdmin\\SqlParser\\Parser", - "STATEMENT_PARSERS": { + "statementParsers": { "DESCRIBE": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", "DESC": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", "EXPLAIN": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", @@ -177,7 +177,7 @@ "LOCK": "PhpMyAdmin\\SqlParser\\Statements\\LockStatement", "UNLOCK": "PhpMyAdmin\\SqlParser\\Statements\\LockStatement" }, - "KEYWORD_PARSERS": { + "keywordParsers": { "PARTITION BY": [], "SUBPARTITION BY": [], "_OPTIONS": { @@ -186,7 +186,7 @@ }, "_END_OPTIONS": { "class": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", - "field": "end_options" + "field": "endOptions" }, "INTERSECT": { "class": "PhpMyAdmin\\SqlParser\\Components\\UnionKeyword", @@ -436,7 +436,7 @@ "@type": "PhpMyAdmin\\SqlParser\\Statements\\AlterStatement", "table": { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -461,7 +461,7 @@ "altered": [ { "@type": "PhpMyAdmin\\SqlParser\\Components\\AlterOperation", - "DB_OPTIONS": { + "databaseOptions": { "CHARACTER SET": [ 1, "var" @@ -491,7 +491,7 @@ "var" ] }, - "TABLE_OPTIONS": { + "tableOptions": { "ENGINE": [ 1, "var=" @@ -556,7 +556,7 @@ "INDEX": 2, "CHARACTER SET": 3 }, - "USER_OPTIONS": { + "userOptions": { "ATTRIBUTE": [ 1, "var" @@ -587,7 +587,7 @@ "UNLOCK": 2, "IDENTIFIED": 3 }, - "VIEW_OPTIONS": { + "viewOptions": { "AS": 1 }, "options": { @@ -605,7 +605,7 @@ "unknown": [] } ], - "OPTIONS": { + "statementOptions": { "ONLINE": 1, "OFFLINE": 1, "IGNORE": 2, @@ -619,8 +619,8 @@ "USER": 3, "VIEW": 3 }, - "CLAUSES": [], - "END_OPTIONS": [], + "clauses": [], + "statementEndOptions": [], "options": { "@type": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", "options": { diff --git a/tests/data/parser/parseAlterUser7.out b/tests/data/parser/parseAlterUser7.out index db99f1611..8b490f3db 100644 --- a/tests/data/parser/parseAlterUser7.out +++ b/tests/data/parser/parseAlterUser7.out @@ -2,7 +2,7 @@ "query": "ALTER USER 'user' PASSWORD EXPIRE INTERVAL 180 DAY;", "lexer": { "@type": "PhpMyAdmin\\SqlParser\\Lexer", - "PARSER_METHODS": [ + "parserMethods": [ "parseDelimiter", "parseWhitespace", "parseNumber", @@ -178,7 +178,7 @@ "count": 17, "idx": 17 }, - "DEFAULT_DELIMITER": ";", + "defaultDelimiter": ";", "delimiter": ";", "delimiterLen": 1, "strict": false, @@ -186,7 +186,7 @@ }, "parser": { "@type": "PhpMyAdmin\\SqlParser\\Parser", - "STATEMENT_PARSERS": { + "statementParsers": { "DESCRIBE": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", "DESC": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", "EXPLAIN": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", @@ -231,7 +231,7 @@ "LOCK": "PhpMyAdmin\\SqlParser\\Statements\\LockStatement", "UNLOCK": "PhpMyAdmin\\SqlParser\\Statements\\LockStatement" }, - "KEYWORD_PARSERS": { + "keywordParsers": { "PARTITION BY": [], "SUBPARTITION BY": [], "_OPTIONS": { @@ -240,7 +240,7 @@ }, "_END_OPTIONS": { "class": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", - "field": "end_options" + "field": "endOptions" }, "INTERSECT": { "class": "PhpMyAdmin\\SqlParser\\Components\\UnionKeyword", @@ -490,7 +490,7 @@ "@type": "PhpMyAdmin\\SqlParser\\Statements\\AlterStatement", "table": { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -515,7 +515,7 @@ "altered": [ { "@type": "PhpMyAdmin\\SqlParser\\Components\\AlterOperation", - "DB_OPTIONS": { + "databaseOptions": { "CHARACTER SET": [ 1, "var" @@ -545,7 +545,7 @@ "var" ] }, - "TABLE_OPTIONS": { + "tableOptions": { "ENGINE": [ 1, "var=" @@ -610,7 +610,7 @@ "INDEX": 2, "CHARACTER SET": 3 }, - "USER_OPTIONS": { + "userOptions": { "ATTRIBUTE": [ 1, "var" @@ -641,7 +641,7 @@ "UNLOCK": 2, "IDENTIFIED": 3 }, - "VIEW_OPTIONS": { + "viewOptions": { "AS": 1 }, "options": { @@ -675,7 +675,7 @@ ] } ], - "OPTIONS": { + "statementOptions": { "ONLINE": 1, "OFFLINE": 1, "IGNORE": 2, @@ -689,8 +689,8 @@ "USER": 3, "VIEW": 3 }, - "CLAUSES": [], - "END_OPTIONS": [], + "clauses": [], + "statementEndOptions": [], "options": { "@type": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", "options": { diff --git a/tests/data/parser/parseAlterUser8.out b/tests/data/parser/parseAlterUser8.out index cb7856b29..8d9970101 100644 --- a/tests/data/parser/parseAlterUser8.out +++ b/tests/data/parser/parseAlterUser8.out @@ -2,7 +2,7 @@ "query": "ALTER USER 'user' COMMENT ''", "lexer": { "@type": "PhpMyAdmin\\SqlParser\\Lexer", - "PARSER_METHODS": [ + "parserMethods": [ "parseDelimiter", "parseWhitespace", "parseNumber", @@ -115,7 +115,7 @@ "count": 10, "idx": 10 }, - "DEFAULT_DELIMITER": ";", + "defaultDelimiter": ";", "delimiter": ";", "delimiterLen": 1, "strict": false, @@ -123,7 +123,7 @@ }, "parser": { "@type": "PhpMyAdmin\\SqlParser\\Parser", - "STATEMENT_PARSERS": { + "statementParsers": { "DESCRIBE": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", "DESC": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", "EXPLAIN": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", @@ -168,7 +168,7 @@ "LOCK": "PhpMyAdmin\\SqlParser\\Statements\\LockStatement", "UNLOCK": "PhpMyAdmin\\SqlParser\\Statements\\LockStatement" }, - "KEYWORD_PARSERS": { + "keywordParsers": { "PARTITION BY": [], "SUBPARTITION BY": [], "_OPTIONS": { @@ -177,7 +177,7 @@ }, "_END_OPTIONS": { "class": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", - "field": "end_options" + "field": "endOptions" }, "INTERSECT": { "class": "PhpMyAdmin\\SqlParser\\Components\\UnionKeyword", @@ -427,7 +427,7 @@ "@type": "PhpMyAdmin\\SqlParser\\Statements\\AlterStatement", "table": { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -452,7 +452,7 @@ "altered": [ { "@type": "PhpMyAdmin\\SqlParser\\Components\\AlterOperation", - "DB_OPTIONS": { + "databaseOptions": { "CHARACTER SET": [ 1, "var" @@ -482,7 +482,7 @@ "var" ] }, - "TABLE_OPTIONS": { + "tableOptions": { "ENGINE": [ 1, "var=" @@ -547,7 +547,7 @@ "INDEX": 2, "CHARACTER SET": 3 }, - "USER_OPTIONS": { + "userOptions": { "ATTRIBUTE": [ 1, "var" @@ -578,7 +578,7 @@ "UNLOCK": 2, "IDENTIFIED": 3 }, - "VIEW_OPTIONS": { + "viewOptions": { "AS": 1 }, "options": { @@ -596,7 +596,7 @@ "unknown": [] } ], - "OPTIONS": { + "statementOptions": { "ONLINE": 1, "OFFLINE": 1, "IGNORE": 2, @@ -610,8 +610,8 @@ "USER": 3, "VIEW": 3 }, - "CLAUSES": [], - "END_OPTIONS": [], + "clauses": [], + "statementEndOptions": [], "options": { "@type": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", "options": { diff --git a/tests/data/parser/parseAlterWithInvisible.out b/tests/data/parser/parseAlterWithInvisible.out index c0754ef87..912a62e70 100644 --- a/tests/data/parser/parseAlterWithInvisible.out +++ b/tests/data/parser/parseAlterWithInvisible.out @@ -2,7 +2,7 @@ "query": "ALTER TABLE t MODIFY x INT INVISIBLE, MODIFY y INT, MODIFY z INT NOT NULL DEFAULT 4;\n", "lexer": { "@type": "PhpMyAdmin\\SqlParser\\Lexer", - "PARSER_METHODS": [ + "parserMethods": [ "parseDelimiter", "parseWhitespace", "parseNumber", @@ -349,7 +349,7 @@ "count": 36, "idx": 36 }, - "DEFAULT_DELIMITER": ";", + "defaultDelimiter": ";", "delimiter": ";", "delimiterLen": 1, "strict": false, @@ -357,7 +357,7 @@ }, "parser": { "@type": "PhpMyAdmin\\SqlParser\\Parser", - "STATEMENT_PARSERS": { + "statementParsers": { "DESCRIBE": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", "DESC": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", "EXPLAIN": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", @@ -402,7 +402,7 @@ "LOCK": "PhpMyAdmin\\SqlParser\\Statements\\LockStatement", "UNLOCK": "PhpMyAdmin\\SqlParser\\Statements\\LockStatement" }, - "KEYWORD_PARSERS": { + "keywordParsers": { "PARTITION BY": [], "SUBPARTITION BY": [], "_OPTIONS": { @@ -411,7 +411,7 @@ }, "_END_OPTIONS": { "class": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", - "field": "end_options" + "field": "endOptions" }, "INTERSECT": { "class": "PhpMyAdmin\\SqlParser\\Components\\UnionKeyword", @@ -661,7 +661,7 @@ "@type": "PhpMyAdmin\\SqlParser\\Statements\\AlterStatement", "table": { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -686,7 +686,7 @@ "altered": [ { "@type": "PhpMyAdmin\\SqlParser\\Components\\AlterOperation", - "DB_OPTIONS": { + "databaseOptions": { "CHARACTER SET": [ 1, "var" @@ -716,7 +716,7 @@ "var" ] }, - "TABLE_OPTIONS": { + "tableOptions": { "ENGINE": [ 1, "var=" @@ -781,7 +781,7 @@ "INDEX": 2, "CHARACTER SET": 3 }, - "USER_OPTIONS": { + "userOptions": { "ATTRIBUTE": [ 1, "var" @@ -812,7 +812,7 @@ "UNLOCK": 2, "IDENTIFIED": 3 }, - "VIEW_OPTIONS": { + "viewOptions": { "AS": 1 }, "options": { @@ -823,7 +823,7 @@ }, "field": { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -859,7 +859,7 @@ }, { "@type": "PhpMyAdmin\\SqlParser\\Components\\AlterOperation", - "DB_OPTIONS": { + "databaseOptions": { "CHARACTER SET": [ 1, "var" @@ -889,7 +889,7 @@ "var" ] }, - "TABLE_OPTIONS": { + "tableOptions": { "ENGINE": [ 1, "var=" @@ -954,7 +954,7 @@ "INDEX": 2, "CHARACTER SET": 3 }, - "USER_OPTIONS": { + "userOptions": { "ATTRIBUTE": [ 1, "var" @@ -985,7 +985,7 @@ "UNLOCK": 2, "IDENTIFIED": 3 }, - "VIEW_OPTIONS": { + "viewOptions": { "AS": 1 }, "options": { @@ -996,7 +996,7 @@ }, "field": { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -1026,7 +1026,7 @@ }, { "@type": "PhpMyAdmin\\SqlParser\\Components\\AlterOperation", - "DB_OPTIONS": { + "databaseOptions": { "CHARACTER SET": [ 1, "var" @@ -1056,7 +1056,7 @@ "var" ] }, - "TABLE_OPTIONS": { + "tableOptions": { "ENGINE": [ 1, "var=" @@ -1121,7 +1121,7 @@ "INDEX": 2, "CHARACTER SET": 3 }, - "USER_OPTIONS": { + "userOptions": { "ATTRIBUTE": [ 1, "var" @@ -1152,7 +1152,7 @@ "UNLOCK": 2, "IDENTIFIED": 3 }, - "VIEW_OPTIONS": { + "viewOptions": { "AS": 1 }, "options": { @@ -1163,7 +1163,7 @@ }, "field": { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -1210,7 +1210,7 @@ ] } ], - "OPTIONS": { + "statementOptions": { "ONLINE": 1, "OFFLINE": 1, "IGNORE": 2, @@ -1224,8 +1224,8 @@ "USER": 3, "VIEW": 3 }, - "CLAUSES": [], - "END_OPTIONS": [], + "clauses": [], + "statementEndOptions": [], "options": { "@type": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", "options": { diff --git a/tests/data/parser/parseArrayErr1.out b/tests/data/parser/parseArrayErr1.out index 8f93a6db1..63fc6a3de 100644 --- a/tests/data/parser/parseArrayErr1.out +++ b/tests/data/parser/parseArrayErr1.out @@ -2,7 +2,7 @@ "query": "SELECT * FROM foo PARTITION bar, baz);", "lexer": { "@type": "PhpMyAdmin\\SqlParser\\Lexer", - "PARSER_METHODS": [ + "parserMethods": [ "parseDelimiter", "parseWhitespace", "parseNumber", @@ -178,7 +178,7 @@ "count": 17, "idx": 17 }, - "DEFAULT_DELIMITER": ";", + "defaultDelimiter": ";", "delimiter": ";", "delimiterLen": 1, "strict": false, @@ -186,7 +186,7 @@ }, "parser": { "@type": "PhpMyAdmin\\SqlParser\\Parser", - "STATEMENT_PARSERS": { + "statementParsers": { "DESCRIBE": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", "DESC": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", "EXPLAIN": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", @@ -231,7 +231,7 @@ "LOCK": "PhpMyAdmin\\SqlParser\\Statements\\LockStatement", "UNLOCK": "PhpMyAdmin\\SqlParser\\Statements\\LockStatement" }, - "KEYWORD_PARSERS": { + "keywordParsers": { "PARTITION BY": [], "SUBPARTITION BY": [], "_OPTIONS": { @@ -240,7 +240,7 @@ }, "_END_OPTIONS": { "class": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", - "field": "end_options" + "field": "endOptions" }, "INTERSECT": { "class": "PhpMyAdmin\\SqlParser\\Components\\UnionKeyword", @@ -488,7 +488,7 @@ "statements": [ { "@type": "PhpMyAdmin\\SqlParser\\Statements\\SelectStatement", - "OPTIONS": { + "statementOptions": { "ALL": 1, "DISTINCT": 1, "DISTINCTROW": 1, @@ -505,11 +505,11 @@ "SQL_NO_CACHE": 8, "SQL_CALC_FOUND_ROWS": 9 }, - "END_OPTIONS": { + "statementEndOptions": { "FOR UPDATE": 1, "LOCK IN SHARE MODE": 1 }, - "CLAUSES": { + "clauses": { "SELECT": [ "SELECT", 2 @@ -638,7 +638,7 @@ "expr": [ { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -664,7 +664,7 @@ "from": [ { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -687,7 +687,7 @@ "subquery": null } ], - "index_hints": null, + "indexHints": null, "partition": { "@type": "PhpMyAdmin\\SqlParser\\Components\\ArrayObj", "raw": [], @@ -702,7 +702,7 @@ "into": null, "join": null, "union": [], - "end_options": null, + "endOptions": null, "options": { "@type": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", "options": [] diff --git a/tests/data/parser/parseArrayErr3.out b/tests/data/parser/parseArrayErr3.out index 5f9021f09..d83b83ec2 100644 --- a/tests/data/parser/parseArrayErr3.out +++ b/tests/data/parser/parseArrayErr3.out @@ -2,7 +2,7 @@ "query": "SELECT * FROM foo PARTITION (bar, baz;", "lexer": { "@type": "PhpMyAdmin\\SqlParser\\Lexer", - "PARSER_METHODS": [ + "parserMethods": [ "parseDelimiter", "parseWhitespace", "parseNumber", @@ -178,7 +178,7 @@ "count": 17, "idx": 17 }, - "DEFAULT_DELIMITER": ";", + "defaultDelimiter": ";", "delimiter": ";", "delimiterLen": 1, "strict": false, @@ -186,7 +186,7 @@ }, "parser": { "@type": "PhpMyAdmin\\SqlParser\\Parser", - "STATEMENT_PARSERS": { + "statementParsers": { "DESCRIBE": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", "DESC": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", "EXPLAIN": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", @@ -231,7 +231,7 @@ "LOCK": "PhpMyAdmin\\SqlParser\\Statements\\LockStatement", "UNLOCK": "PhpMyAdmin\\SqlParser\\Statements\\LockStatement" }, - "KEYWORD_PARSERS": { + "keywordParsers": { "PARTITION BY": [], "SUBPARTITION BY": [], "_OPTIONS": { @@ -240,7 +240,7 @@ }, "_END_OPTIONS": { "class": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", - "field": "end_options" + "field": "endOptions" }, "INTERSECT": { "class": "PhpMyAdmin\\SqlParser\\Components\\UnionKeyword", @@ -488,7 +488,7 @@ "statements": [ { "@type": "PhpMyAdmin\\SqlParser\\Statements\\SelectStatement", - "OPTIONS": { + "statementOptions": { "ALL": 1, "DISTINCT": 1, "DISTINCTROW": 1, @@ -505,11 +505,11 @@ "SQL_NO_CACHE": 8, "SQL_CALC_FOUND_ROWS": 9 }, - "END_OPTIONS": { + "statementEndOptions": { "FOR UPDATE": 1, "LOCK IN SHARE MODE": 1 }, - "CLAUSES": { + "clauses": { "SELECT": [ "SELECT", 2 @@ -638,7 +638,7 @@ "expr": [ { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -664,7 +664,7 @@ "from": [ { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -687,7 +687,7 @@ "subquery": null } ], - "index_hints": null, + "indexHints": null, "partition": { "@type": "PhpMyAdmin\\SqlParser\\Components\\ArrayObj", "raw": [ @@ -708,7 +708,7 @@ "into": null, "join": null, "union": [], - "end_options": null, + "endOptions": null, "options": { "@type": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", "options": [] diff --git a/tests/data/parser/parseCall.out b/tests/data/parser/parseCall.out index 410246c7e..936e68e07 100644 --- a/tests/data/parser/parseCall.out +++ b/tests/data/parser/parseCall.out @@ -2,7 +2,7 @@ "query": "CALL foo();", "lexer": { "@type": "PhpMyAdmin\\SqlParser\\Lexer", - "PARSER_METHODS": [ + "parserMethods": [ "parseDelimiter", "parseWhitespace", "parseNumber", @@ -88,7 +88,7 @@ "count": 7, "idx": 7 }, - "DEFAULT_DELIMITER": ";", + "defaultDelimiter": ";", "delimiter": ";", "delimiterLen": 1, "strict": false, @@ -96,7 +96,7 @@ }, "parser": { "@type": "PhpMyAdmin\\SqlParser\\Parser", - "STATEMENT_PARSERS": { + "statementParsers": { "DESCRIBE": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", "DESC": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", "EXPLAIN": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", @@ -141,7 +141,7 @@ "LOCK": "PhpMyAdmin\\SqlParser\\Statements\\LockStatement", "UNLOCK": "PhpMyAdmin\\SqlParser\\Statements\\LockStatement" }, - "KEYWORD_PARSERS": { + "keywordParsers": { "PARTITION BY": [], "SUBPARTITION BY": [], "_OPTIONS": { @@ -150,7 +150,7 @@ }, "_END_OPTIONS": { "class": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", - "field": "end_options" + "field": "endOptions" }, "INTERSECT": { "class": "PhpMyAdmin\\SqlParser\\Components\\UnionKeyword", @@ -407,9 +407,9 @@ "values": [] } }, - "OPTIONS": [], - "CLAUSES": [], - "END_OPTIONS": [], + "statementOptions": [], + "clauses": [], + "statementEndOptions": [], "options": null, "first": 0, "last": 4 diff --git a/tests/data/parser/parseCall2.out b/tests/data/parser/parseCall2.out index 56bb9704b..6b31e8fb8 100644 --- a/tests/data/parser/parseCall2.out +++ b/tests/data/parser/parseCall2.out @@ -2,7 +2,7 @@ "query": "CALL foo(@bar, @baz);", "lexer": { "@type": "PhpMyAdmin\\SqlParser\\Lexer", - "PARSER_METHODS": [ + "parserMethods": [ "parseDelimiter", "parseWhitespace", "parseNumber", @@ -124,7 +124,7 @@ "count": 11, "idx": 11 }, - "DEFAULT_DELIMITER": ";", + "defaultDelimiter": ";", "delimiter": ";", "delimiterLen": 1, "strict": false, @@ -132,7 +132,7 @@ }, "parser": { "@type": "PhpMyAdmin\\SqlParser\\Parser", - "STATEMENT_PARSERS": { + "statementParsers": { "DESCRIBE": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", "DESC": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", "EXPLAIN": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", @@ -177,7 +177,7 @@ "LOCK": "PhpMyAdmin\\SqlParser\\Statements\\LockStatement", "UNLOCK": "PhpMyAdmin\\SqlParser\\Statements\\LockStatement" }, - "KEYWORD_PARSERS": { + "keywordParsers": { "PARTITION BY": [], "SUBPARTITION BY": [], "_OPTIONS": { @@ -186,7 +186,7 @@ }, "_END_OPTIONS": { "class": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", - "field": "end_options" + "field": "endOptions" }, "INTERSECT": { "class": "PhpMyAdmin\\SqlParser\\Components\\UnionKeyword", @@ -449,9 +449,9 @@ ] } }, - "OPTIONS": [], - "CLAUSES": [], - "END_OPTIONS": [], + "statementOptions": [], + "clauses": [], + "statementEndOptions": [], "options": null, "first": 0, "last": 8 diff --git a/tests/data/parser/parseCall3.out b/tests/data/parser/parseCall3.out index 61d475e24..95d61dde2 100644 --- a/tests/data/parser/parseCall3.out +++ b/tests/data/parser/parseCall3.out @@ -2,7 +2,7 @@ "query": "CALL foo;", "lexer": { "@type": "PhpMyAdmin\\SqlParser\\Lexer", - "PARSER_METHODS": [ + "parserMethods": [ "parseDelimiter", "parseWhitespace", "parseNumber", @@ -70,7 +70,7 @@ "count": 5, "idx": 5 }, - "DEFAULT_DELIMITER": ";", + "defaultDelimiter": ";", "delimiter": ";", "delimiterLen": 1, "strict": false, @@ -78,7 +78,7 @@ }, "parser": { "@type": "PhpMyAdmin\\SqlParser\\Parser", - "STATEMENT_PARSERS": { + "statementParsers": { "DESCRIBE": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", "DESC": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", "EXPLAIN": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", @@ -123,7 +123,7 @@ "LOCK": "PhpMyAdmin\\SqlParser\\Statements\\LockStatement", "UNLOCK": "PhpMyAdmin\\SqlParser\\Statements\\LockStatement" }, - "KEYWORD_PARSERS": { + "keywordParsers": { "PARTITION BY": [], "SUBPARTITION BY": [], "_OPTIONS": { @@ -132,7 +132,7 @@ }, "_END_OPTIONS": { "class": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", - "field": "end_options" + "field": "endOptions" }, "INTERSECT": { "class": "PhpMyAdmin\\SqlParser\\Components\\UnionKeyword", @@ -385,9 +385,9 @@ "name": "foo", "parameters": null }, - "OPTIONS": [], - "CLAUSES": [], - "END_OPTIONS": [], + "statementOptions": [], + "clauses": [], + "statementEndOptions": [], "options": null, "first": 0, "last": 2 diff --git a/tests/data/parser/parseCreateDatabase.out b/tests/data/parser/parseCreateDatabase.out index f83a5a044..7b473220b 100644 --- a/tests/data/parser/parseCreateDatabase.out +++ b/tests/data/parser/parseCreateDatabase.out @@ -2,7 +2,7 @@ "query": "CREATE DATABASE IF NOT EXISTS pma DEFAULT CHARSET 'utf8';", "lexer": { "@type": "PhpMyAdmin\\SqlParser\\Lexer", - "PARSER_METHODS": [ + "parserMethods": [ "parseDelimiter", "parseWhitespace", "parseNumber", @@ -142,7 +142,7 @@ "count": 13, "idx": 13 }, - "DEFAULT_DELIMITER": ";", + "defaultDelimiter": ";", "delimiter": ";", "delimiterLen": 1, "strict": false, @@ -150,7 +150,7 @@ }, "parser": { "@type": "PhpMyAdmin\\SqlParser\\Parser", - "STATEMENT_PARSERS": { + "statementParsers": { "DESCRIBE": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", "DESC": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", "EXPLAIN": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", @@ -195,7 +195,7 @@ "LOCK": "PhpMyAdmin\\SqlParser\\Statements\\LockStatement", "UNLOCK": "PhpMyAdmin\\SqlParser\\Statements\\LockStatement" }, - "KEYWORD_PARSERS": { + "keywordParsers": { "PARTITION BY": [], "SUBPARTITION BY": [], "_OPTIONS": { @@ -204,7 +204,7 @@ }, "_END_OPTIONS": { "class": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", - "field": "end_options" + "field": "endOptions" }, "INTERSECT": { "class": "PhpMyAdmin\\SqlParser\\Components\\UnionKeyword", @@ -452,7 +452,7 @@ "statements": [ { "@type": "PhpMyAdmin\\SqlParser\\Statements\\CreateStatement", - "OPTIONS": { + "statementOptions": { "TEMPORARY": 1, "OR REPLACE": 2, "ALGORITHM": [ @@ -484,7 +484,7 @@ "SCHEMA": 6, "IF NOT EXISTS": 7 }, - "DB_OPTIONS": { + "databaseOptions": { "CHARACTER SET": [ 1, "var=" @@ -510,7 +510,7 @@ "var=" ] }, - "TABLE_OPTIONS": { + "tableOptions": { "ENGINE": [ 1, "var=" @@ -612,7 +612,7 @@ "var" ] }, - "FUNC_OPTIONS": { + "functionOptions": { "NOT": [ 2, "var" @@ -657,7 +657,7 @@ "DETERMINISTIC": 2, "DATA": 5 }, - "TRIGGER_OPTIONS": { + "triggerOptions": { "BEFORE": 1, "AFTER": 1, "INSERT": 2, @@ -666,7 +666,7 @@ }, "name": { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -712,8 +712,8 @@ "return": null, "parameters": null, "body": [], - "CLAUSES": [], - "END_OPTIONS": [], + "clauses": [], + "statementEndOptions": [], "options": { "@type": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", "options": { diff --git a/tests/data/parser/parseCreateDatabaseErr.out b/tests/data/parser/parseCreateDatabaseErr.out index eacf91cea..72bad0b51 100644 --- a/tests/data/parser/parseCreateDatabaseErr.out +++ b/tests/data/parser/parseCreateDatabaseErr.out @@ -2,7 +2,7 @@ "query": "CREATE DATABASE IF NOT EXISTS pma ENGINE='InnoDB' DEFAULT CHARSET 'utf8'", "lexer": { "@type": "PhpMyAdmin\\SqlParser\\Lexer", - "PARSER_METHODS": [ + "parserMethods": [ "parseDelimiter", "parseWhitespace", "parseNumber", @@ -169,7 +169,7 @@ "count": 16, "idx": 17 }, - "DEFAULT_DELIMITER": ";", + "defaultDelimiter": ";", "delimiter": ";", "delimiterLen": 1, "strict": false, @@ -177,7 +177,7 @@ }, "parser": { "@type": "PhpMyAdmin\\SqlParser\\Parser", - "STATEMENT_PARSERS": { + "statementParsers": { "DESCRIBE": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", "DESC": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", "EXPLAIN": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", @@ -222,7 +222,7 @@ "LOCK": "PhpMyAdmin\\SqlParser\\Statements\\LockStatement", "UNLOCK": "PhpMyAdmin\\SqlParser\\Statements\\LockStatement" }, - "KEYWORD_PARSERS": { + "keywordParsers": { "PARTITION BY": [], "SUBPARTITION BY": [], "_OPTIONS": { @@ -231,7 +231,7 @@ }, "_END_OPTIONS": { "class": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", - "field": "end_options" + "field": "endOptions" }, "INTERSECT": { "class": "PhpMyAdmin\\SqlParser\\Components\\UnionKeyword", @@ -479,7 +479,7 @@ "statements": [ { "@type": "PhpMyAdmin\\SqlParser\\Statements\\CreateStatement", - "OPTIONS": { + "statementOptions": { "TEMPORARY": 1, "OR REPLACE": 2, "ALGORITHM": [ @@ -511,7 +511,7 @@ "SCHEMA": 6, "IF NOT EXISTS": 7 }, - "DB_OPTIONS": { + "databaseOptions": { "CHARACTER SET": [ 1, "var=" @@ -537,7 +537,7 @@ "var=" ] }, - "TABLE_OPTIONS": { + "tableOptions": { "ENGINE": [ 1, "var=" @@ -639,7 +639,7 @@ "var" ] }, - "FUNC_OPTIONS": { + "functionOptions": { "NOT": [ 2, "var" @@ -684,7 +684,7 @@ "DETERMINISTIC": 2, "DATA": 5 }, - "TRIGGER_OPTIONS": { + "triggerOptions": { "BEFORE": 1, "AFTER": 1, "INSERT": 2, @@ -693,7 +693,7 @@ }, "name": { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -732,8 +732,8 @@ "return": null, "parameters": null, "body": [], - "CLAUSES": [], - "END_OPTIONS": [], + "clauses": [], + "statementEndOptions": [], "options": { "@type": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", "options": { diff --git a/tests/data/parser/parseCreateFunction.out b/tests/data/parser/parseCreateFunction.out index 6ea8b2f56..ed752159a 100644 --- a/tests/data/parser/parseCreateFunction.out +++ b/tests/data/parser/parseCreateFunction.out @@ -2,7 +2,7 @@ "query": "CREATE FUNCTION F_TEST(uid INT) RETURNS VARCHAR\nBEGIN\n DECLARE username VARCHAR DEFAULT \"\";\n SELECT username INTO username FROM users WHERE ID = uid;\n RETURN username;\nEND", "lexer": { "@type": "PhpMyAdmin\\SqlParser\\Lexer", - "PARSER_METHODS": [ + "parserMethods": [ "parseDelimiter", "parseWhitespace", "parseNumber", @@ -529,7 +529,7 @@ "count": 56, "idx": 57 }, - "DEFAULT_DELIMITER": ";", + "defaultDelimiter": ";", "delimiter": ";", "delimiterLen": 1, "strict": false, @@ -537,7 +537,7 @@ }, "parser": { "@type": "PhpMyAdmin\\SqlParser\\Parser", - "STATEMENT_PARSERS": { + "statementParsers": { "DESCRIBE": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", "DESC": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", "EXPLAIN": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", @@ -582,7 +582,7 @@ "LOCK": "PhpMyAdmin\\SqlParser\\Statements\\LockStatement", "UNLOCK": "PhpMyAdmin\\SqlParser\\Statements\\LockStatement" }, - "KEYWORD_PARSERS": { + "keywordParsers": { "PARTITION BY": [], "SUBPARTITION BY": [], "_OPTIONS": { @@ -591,7 +591,7 @@ }, "_END_OPTIONS": { "class": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", - "field": "end_options" + "field": "endOptions" }, "INTERSECT": { "class": "PhpMyAdmin\\SqlParser\\Components\\UnionKeyword", @@ -839,7 +839,7 @@ "statements": [ { "@type": "PhpMyAdmin\\SqlParser\\Statements\\CreateStatement", - "OPTIONS": { + "statementOptions": { "TEMPORARY": 1, "OR REPLACE": 2, "ALGORITHM": [ @@ -871,7 +871,7 @@ "SCHEMA": 6, "IF NOT EXISTS": 7 }, - "DB_OPTIONS": { + "databaseOptions": { "CHARACTER SET": [ 1, "var=" @@ -897,7 +897,7 @@ "var=" ] }, - "TABLE_OPTIONS": { + "tableOptions": { "ENGINE": [ 1, "var=" @@ -999,7 +999,7 @@ "var" ] }, - "FUNC_OPTIONS": { + "functionOptions": { "NOT": [ 2, "var" @@ -1044,7 +1044,7 @@ "DETERMINISTIC": 2, "DATA": 5 }, - "TRIGGER_OPTIONS": { + "triggerOptions": { "BEFORE": 1, "AFTER": 1, "INSERT": 2, @@ -1053,7 +1053,7 @@ }, "name": { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -1091,7 +1091,7 @@ "table": null, "return": { "@type": "PhpMyAdmin\\SqlParser\\Components\\DataType", - "DATA_TYPE_OPTIONS": { + "dataTypeOptions": { "BINARY": 1, "CHARACTER SET": [ 2, @@ -1122,7 +1122,7 @@ "inOut": null, "type": { "@type": "PhpMyAdmin\\SqlParser\\Components\\DataType", - "DATA_TYPE_OPTIONS": { + "dataTypeOptions": { "BINARY": 1, "CHARACTER SET": [ 2, @@ -1273,8 +1273,8 @@ "@type": "@57" } ], - "CLAUSES": [], - "END_OPTIONS": [], + "clauses": [], + "statementEndOptions": [], "options": { "@type": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", "options": { diff --git a/tests/data/parser/parseCreateFunctionErr1.out b/tests/data/parser/parseCreateFunctionErr1.out index 03263edee..3bc560de3 100644 --- a/tests/data/parser/parseCreateFunctionErr1.out +++ b/tests/data/parser/parseCreateFunctionErr1.out @@ -2,7 +2,7 @@ "query": "CREATE FUNCTION F_TEST(uid INT)\nBEGIN\n DECLARE username VARCHAR DEFAULT \"\";\n SELECT username INTO username FROM users WHERE ID = uid;\n RETURN username;\nEND", "lexer": { "@type": "PhpMyAdmin\\SqlParser\\Lexer", - "PARSER_METHODS": [ + "parserMethods": [ "parseDelimiter", "parseWhitespace", "parseNumber", @@ -493,7 +493,7 @@ "count": 52, "idx": 53 }, - "DEFAULT_DELIMITER": ";", + "defaultDelimiter": ";", "delimiter": ";", "delimiterLen": 1, "strict": false, @@ -501,7 +501,7 @@ }, "parser": { "@type": "PhpMyAdmin\\SqlParser\\Parser", - "STATEMENT_PARSERS": { + "statementParsers": { "DESCRIBE": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", "DESC": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", "EXPLAIN": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", @@ -546,7 +546,7 @@ "LOCK": "PhpMyAdmin\\SqlParser\\Statements\\LockStatement", "UNLOCK": "PhpMyAdmin\\SqlParser\\Statements\\LockStatement" }, - "KEYWORD_PARSERS": { + "keywordParsers": { "PARTITION BY": [], "SUBPARTITION BY": [], "_OPTIONS": { @@ -555,7 +555,7 @@ }, "_END_OPTIONS": { "class": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", - "field": "end_options" + "field": "endOptions" }, "INTERSECT": { "class": "PhpMyAdmin\\SqlParser\\Components\\UnionKeyword", @@ -803,7 +803,7 @@ "statements": [ { "@type": "PhpMyAdmin\\SqlParser\\Statements\\CreateStatement", - "OPTIONS": { + "statementOptions": { "TEMPORARY": 1, "OR REPLACE": 2, "ALGORITHM": [ @@ -835,7 +835,7 @@ "SCHEMA": 6, "IF NOT EXISTS": 7 }, - "DB_OPTIONS": { + "databaseOptions": { "CHARACTER SET": [ 1, "var=" @@ -861,7 +861,7 @@ "var=" ] }, - "TABLE_OPTIONS": { + "tableOptions": { "ENGINE": [ 1, "var=" @@ -963,7 +963,7 @@ "var" ] }, - "FUNC_OPTIONS": { + "functionOptions": { "NOT": [ 2, "var" @@ -1008,7 +1008,7 @@ "DETERMINISTIC": 2, "DATA": 5 }, - "TRIGGER_OPTIONS": { + "triggerOptions": { "BEFORE": 1, "AFTER": 1, "INSERT": 2, @@ -1017,7 +1017,7 @@ }, "name": { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -1061,7 +1061,7 @@ "inOut": null, "type": { "@type": "PhpMyAdmin\\SqlParser\\Components\\DataType", - "DATA_TYPE_OPTIONS": { + "dataTypeOptions": { "BINARY": 1, "CHARACTER SET": [ 2, @@ -1206,8 +1206,8 @@ "@type": "@53" } ], - "CLAUSES": [], - "END_OPTIONS": [], + "clauses": [], + "statementEndOptions": [], "options": { "@type": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", "options": { diff --git a/tests/data/parser/parseCreateFunctionErr2.out b/tests/data/parser/parseCreateFunctionErr2.out index 786242cd9..fa9f42921 100644 --- a/tests/data/parser/parseCreateFunctionErr2.out +++ b/tests/data/parser/parseCreateFunctionErr2.out @@ -2,7 +2,7 @@ "query": "CREATE FUNCTION test() RETURNS", "lexer": { "@type": "PhpMyAdmin\\SqlParser\\Lexer", - "PARSER_METHODS": [ + "parserMethods": [ "parseDelimiter", "parseWhitespace", "parseNumber", @@ -115,7 +115,7 @@ "count": 10, "idx": 12 }, - "DEFAULT_DELIMITER": ";", + "defaultDelimiter": ";", "delimiter": ";", "delimiterLen": 1, "strict": false, @@ -123,7 +123,7 @@ }, "parser": { "@type": "PhpMyAdmin\\SqlParser\\Parser", - "STATEMENT_PARSERS": { + "statementParsers": { "DESCRIBE": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", "DESC": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", "EXPLAIN": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", @@ -168,7 +168,7 @@ "LOCK": "PhpMyAdmin\\SqlParser\\Statements\\LockStatement", "UNLOCK": "PhpMyAdmin\\SqlParser\\Statements\\LockStatement" }, - "KEYWORD_PARSERS": { + "keywordParsers": { "PARTITION BY": [], "SUBPARTITION BY": [], "_OPTIONS": { @@ -177,7 +177,7 @@ }, "_END_OPTIONS": { "class": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", - "field": "end_options" + "field": "endOptions" }, "INTERSECT": { "class": "PhpMyAdmin\\SqlParser\\Components\\UnionKeyword", @@ -425,7 +425,7 @@ "statements": [ { "@type": "PhpMyAdmin\\SqlParser\\Statements\\CreateStatement", - "OPTIONS": { + "statementOptions": { "TEMPORARY": 1, "OR REPLACE": 2, "ALGORITHM": [ @@ -457,7 +457,7 @@ "SCHEMA": 6, "IF NOT EXISTS": 7 }, - "DB_OPTIONS": { + "databaseOptions": { "CHARACTER SET": [ 1, "var=" @@ -483,7 +483,7 @@ "var=" ] }, - "TABLE_OPTIONS": { + "tableOptions": { "ENGINE": [ 1, "var=" @@ -585,7 +585,7 @@ "var" ] }, - "FUNC_OPTIONS": { + "functionOptions": { "NOT": [ 2, "var" @@ -630,7 +630,7 @@ "DETERMINISTIC": 2, "DATA": 5 }, - "TRIGGER_OPTIONS": { + "triggerOptions": { "BEFORE": 1, "AFTER": 1, "INSERT": 2, @@ -639,7 +639,7 @@ }, "name": { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -678,8 +678,8 @@ "return": null, "parameters": [], "body": [], - "CLAUSES": [], - "END_OPTIONS": [], + "clauses": [], + "statementEndOptions": [], "options": { "@type": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", "options": { diff --git a/tests/data/parser/parseCreateFunctionErr3.out b/tests/data/parser/parseCreateFunctionErr3.out index 527a427bd..7d5c3ed50 100644 --- a/tests/data/parser/parseCreateFunctionErr3.out +++ b/tests/data/parser/parseCreateFunctionErr3.out @@ -2,7 +2,7 @@ "query": "DELIMITER $$\nCREATE FUNCTION coincide\nEND;$$\n", "lexer": { "@type": "PhpMyAdmin\\SqlParser\\Lexer", - "PARSER_METHODS": [ + "parserMethods": [ "parseDelimiter", "parseWhitespace", "parseNumber", @@ -160,7 +160,7 @@ "count": 15, "idx": 17 }, - "DEFAULT_DELIMITER": ";", + "defaultDelimiter": ";", "delimiter": "$$", "delimiterLen": 2, "strict": false, @@ -168,7 +168,7 @@ }, "parser": { "@type": "PhpMyAdmin\\SqlParser\\Parser", - "STATEMENT_PARSERS": { + "statementParsers": { "DESCRIBE": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", "DESC": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", "EXPLAIN": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", @@ -213,7 +213,7 @@ "LOCK": "PhpMyAdmin\\SqlParser\\Statements\\LockStatement", "UNLOCK": "PhpMyAdmin\\SqlParser\\Statements\\LockStatement" }, - "KEYWORD_PARSERS": { + "keywordParsers": { "PARTITION BY": [], "SUBPARTITION BY": [], "_OPTIONS": { @@ -222,7 +222,7 @@ }, "_END_OPTIONS": { "class": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", - "field": "end_options" + "field": "endOptions" }, "INTERSECT": { "class": "PhpMyAdmin\\SqlParser\\Components\\UnionKeyword", @@ -470,7 +470,7 @@ "statements": [ { "@type": "PhpMyAdmin\\SqlParser\\Statements\\CreateStatement", - "OPTIONS": { + "statementOptions": { "TEMPORARY": 1, "OR REPLACE": 2, "ALGORITHM": [ @@ -502,7 +502,7 @@ "SCHEMA": 6, "IF NOT EXISTS": 7 }, - "DB_OPTIONS": { + "databaseOptions": { "CHARACTER SET": [ 1, "var=" @@ -528,7 +528,7 @@ "var=" ] }, - "TABLE_OPTIONS": { + "tableOptions": { "ENGINE": [ 1, "var=" @@ -630,7 +630,7 @@ "var" ] }, - "FUNC_OPTIONS": { + "functionOptions": { "NOT": [ 2, "var" @@ -675,7 +675,7 @@ "DETERMINISTIC": 2, "DATA": 5 }, - "TRIGGER_OPTIONS": { + "triggerOptions": { "BEFORE": 1, "AFTER": 1, "INSERT": 2, @@ -684,7 +684,7 @@ }, "name": { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -723,8 +723,8 @@ "return": null, "parameters": [], "body": [], - "CLAUSES": [], - "END_OPTIONS": [], + "clauses": [], + "statementEndOptions": [], "options": { "@type": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", "options": { diff --git a/tests/data/parser/parseCreateProcedure.out b/tests/data/parser/parseCreateProcedure.out index 05624b3c1..4c825c381 100644 --- a/tests/data/parser/parseCreateProcedure.out +++ b/tests/data/parser/parseCreateProcedure.out @@ -2,7 +2,7 @@ "query": "CREATE PROCEDURE P_TEST(uid INT)\nBEGIN\n SELECT username FROM users WHERE ID = uid;\nEND", "lexer": { "@type": "PhpMyAdmin\\SqlParser\\Lexer", - "PARSER_METHODS": [ + "parserMethods": [ "parseDelimiter", "parseWhitespace", "parseNumber", @@ -313,7 +313,7 @@ "count": 32, "idx": 33 }, - "DEFAULT_DELIMITER": ";", + "defaultDelimiter": ";", "delimiter": ";", "delimiterLen": 1, "strict": false, @@ -321,7 +321,7 @@ }, "parser": { "@type": "PhpMyAdmin\\SqlParser\\Parser", - "STATEMENT_PARSERS": { + "statementParsers": { "DESCRIBE": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", "DESC": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", "EXPLAIN": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", @@ -366,7 +366,7 @@ "LOCK": "PhpMyAdmin\\SqlParser\\Statements\\LockStatement", "UNLOCK": "PhpMyAdmin\\SqlParser\\Statements\\LockStatement" }, - "KEYWORD_PARSERS": { + "keywordParsers": { "PARTITION BY": [], "SUBPARTITION BY": [], "_OPTIONS": { @@ -375,7 +375,7 @@ }, "_END_OPTIONS": { "class": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", - "field": "end_options" + "field": "endOptions" }, "INTERSECT": { "class": "PhpMyAdmin\\SqlParser\\Components\\UnionKeyword", @@ -623,7 +623,7 @@ "statements": [ { "@type": "PhpMyAdmin\\SqlParser\\Statements\\CreateStatement", - "OPTIONS": { + "statementOptions": { "TEMPORARY": 1, "OR REPLACE": 2, "ALGORITHM": [ @@ -655,7 +655,7 @@ "SCHEMA": 6, "IF NOT EXISTS": 7 }, - "DB_OPTIONS": { + "databaseOptions": { "CHARACTER SET": [ 1, "var=" @@ -681,7 +681,7 @@ "var=" ] }, - "TABLE_OPTIONS": { + "tableOptions": { "ENGINE": [ 1, "var=" @@ -783,7 +783,7 @@ "var" ] }, - "FUNC_OPTIONS": { + "functionOptions": { "NOT": [ 2, "var" @@ -828,7 +828,7 @@ "DETERMINISTIC": 2, "DATA": 5 }, - "TRIGGER_OPTIONS": { + "triggerOptions": { "BEFORE": 1, "AFTER": 1, "INSERT": 2, @@ -837,7 +837,7 @@ }, "name": { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -881,7 +881,7 @@ "inOut": null, "type": { "@type": "PhpMyAdmin\\SqlParser\\Components\\DataType", - "DATA_TYPE_OPTIONS": { + "dataTypeOptions": { "BINARY": 1, "CHARACTER SET": [ 2, @@ -972,8 +972,8 @@ "@type": "@33" } ], - "CLAUSES": [], - "END_OPTIONS": [], + "clauses": [], + "statementEndOptions": [], "options": { "@type": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", "options": { diff --git a/tests/data/parser/parseCreateProcedure1.out b/tests/data/parser/parseCreateProcedure1.out index a1389f23a..fb54acabe 100644 --- a/tests/data/parser/parseCreateProcedure1.out +++ b/tests/data/parser/parseCreateProcedure1.out @@ -2,7 +2,7 @@ "query": "CREATE DEFINER=`root`@`%` PROCEDURE `test2`(IN `_var` INT) NOT DETERMINISTIC NO SQL SQL SECURITY INVOKER SELECT _var", "lexer": { "@type": "PhpMyAdmin\\SqlParser\\Lexer", - "PARSER_METHODS": [ + "parserMethods": [ "parseDelimiter", "parseWhitespace", "parseNumber", @@ -322,7 +322,7 @@ "count": 33, "idx": 34 }, - "DEFAULT_DELIMITER": ";", + "defaultDelimiter": ";", "delimiter": ";", "delimiterLen": 1, "strict": false, @@ -330,7 +330,7 @@ }, "parser": { "@type": "PhpMyAdmin\\SqlParser\\Parser", - "STATEMENT_PARSERS": { + "statementParsers": { "DESCRIBE": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", "DESC": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", "EXPLAIN": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", @@ -375,7 +375,7 @@ "LOCK": "PhpMyAdmin\\SqlParser\\Statements\\LockStatement", "UNLOCK": "PhpMyAdmin\\SqlParser\\Statements\\LockStatement" }, - "KEYWORD_PARSERS": { + "keywordParsers": { "PARTITION BY": [], "SUBPARTITION BY": [], "_OPTIONS": { @@ -384,7 +384,7 @@ }, "_END_OPTIONS": { "class": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", - "field": "end_options" + "field": "endOptions" }, "INTERSECT": { "class": "PhpMyAdmin\\SqlParser\\Components\\UnionKeyword", @@ -632,7 +632,7 @@ "statements": [ { "@type": "PhpMyAdmin\\SqlParser\\Statements\\CreateStatement", - "OPTIONS": { + "statementOptions": { "TEMPORARY": 1, "OR REPLACE": 2, "ALGORITHM": [ @@ -664,7 +664,7 @@ "SCHEMA": 6, "IF NOT EXISTS": 7 }, - "DB_OPTIONS": { + "databaseOptions": { "CHARACTER SET": [ 1, "var=" @@ -690,7 +690,7 @@ "var=" ] }, - "TABLE_OPTIONS": { + "tableOptions": { "ENGINE": [ 1, "var=" @@ -792,7 +792,7 @@ "var" ] }, - "FUNC_OPTIONS": { + "functionOptions": { "NOT": [ 2, "var" @@ -837,7 +837,7 @@ "DETERMINISTIC": 2, "DATA": 5 }, - "TRIGGER_OPTIONS": { + "triggerOptions": { "BEFORE": 1, "AFTER": 1, "INSERT": 2, @@ -846,7 +846,7 @@ }, "name": { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -909,7 +909,7 @@ "inOut": "IN", "type": { "@type": "PhpMyAdmin\\SqlParser\\Components\\DataType", - "DATA_TYPE_OPTIONS": { + "dataTypeOptions": { "BINARY": 1, "CHARACTER SET": [ 2, @@ -949,8 +949,8 @@ "@type": "@34" } ], - "CLAUSES": [], - "END_OPTIONS": [], + "clauses": [], + "statementEndOptions": [], "options": { "@type": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", "options": { @@ -959,7 +959,7 @@ "equals": true, "expr": { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, diff --git a/tests/data/parser/parseCreateProcedure2.out b/tests/data/parser/parseCreateProcedure2.out index 1de1e5b64..cd56d62ca 100644 --- a/tests/data/parser/parseCreateProcedure2.out +++ b/tests/data/parser/parseCreateProcedure2.out @@ -2,7 +2,7 @@ "query": "CREATE PROCEDURE P_TEST(IN uid INT, IN unused VARCHAR)\nBEGIN\n SELECT username FROM users WHERE ID = uid;\nEND", "lexer": { "@type": "PhpMyAdmin\\SqlParser\\Lexer", - "PARSER_METHODS": [ + "parserMethods": [ "parseDelimiter", "parseWhitespace", "parseNumber", @@ -394,7 +394,7 @@ "count": 41, "idx": 42 }, - "DEFAULT_DELIMITER": ";", + "defaultDelimiter": ";", "delimiter": ";", "delimiterLen": 1, "strict": false, @@ -402,7 +402,7 @@ }, "parser": { "@type": "PhpMyAdmin\\SqlParser\\Parser", - "STATEMENT_PARSERS": { + "statementParsers": { "DESCRIBE": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", "DESC": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", "EXPLAIN": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", @@ -447,7 +447,7 @@ "LOCK": "PhpMyAdmin\\SqlParser\\Statements\\LockStatement", "UNLOCK": "PhpMyAdmin\\SqlParser\\Statements\\LockStatement" }, - "KEYWORD_PARSERS": { + "keywordParsers": { "PARTITION BY": [], "SUBPARTITION BY": [], "_OPTIONS": { @@ -456,7 +456,7 @@ }, "_END_OPTIONS": { "class": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", - "field": "end_options" + "field": "endOptions" }, "INTERSECT": { "class": "PhpMyAdmin\\SqlParser\\Components\\UnionKeyword", @@ -704,7 +704,7 @@ "statements": [ { "@type": "PhpMyAdmin\\SqlParser\\Statements\\CreateStatement", - "OPTIONS": { + "statementOptions": { "TEMPORARY": 1, "OR REPLACE": 2, "ALGORITHM": [ @@ -736,7 +736,7 @@ "SCHEMA": 6, "IF NOT EXISTS": 7 }, - "DB_OPTIONS": { + "databaseOptions": { "CHARACTER SET": [ 1, "var=" @@ -762,7 +762,7 @@ "var=" ] }, - "TABLE_OPTIONS": { + "tableOptions": { "ENGINE": [ 1, "var=" @@ -864,7 +864,7 @@ "var" ] }, - "FUNC_OPTIONS": { + "functionOptions": { "NOT": [ 2, "var" @@ -909,7 +909,7 @@ "DETERMINISTIC": 2, "DATA": 5 }, - "TRIGGER_OPTIONS": { + "triggerOptions": { "BEFORE": 1, "AFTER": 1, "INSERT": 2, @@ -918,7 +918,7 @@ }, "name": { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -962,7 +962,7 @@ "inOut": "IN", "type": { "@type": "PhpMyAdmin\\SqlParser\\Components\\DataType", - "DATA_TYPE_OPTIONS": { + "dataTypeOptions": { "BINARY": 1, "CHARACTER SET": [ 2, @@ -993,7 +993,7 @@ "inOut": "IN", "type": { "@type": "PhpMyAdmin\\SqlParser\\Components\\DataType", - "DATA_TYPE_OPTIONS": { + "dataTypeOptions": { "BINARY": 1, "CHARACTER SET": [ 2, @@ -1084,8 +1084,8 @@ "@type": "@42" } ], - "CLAUSES": [], - "END_OPTIONS": [], + "clauses": [], + "statementEndOptions": [], "options": { "@type": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", "options": { diff --git a/tests/data/parser/parseCreateSchema.out b/tests/data/parser/parseCreateSchema.out index f83a5a044..7b473220b 100644 --- a/tests/data/parser/parseCreateSchema.out +++ b/tests/data/parser/parseCreateSchema.out @@ -2,7 +2,7 @@ "query": "CREATE DATABASE IF NOT EXISTS pma DEFAULT CHARSET 'utf8';", "lexer": { "@type": "PhpMyAdmin\\SqlParser\\Lexer", - "PARSER_METHODS": [ + "parserMethods": [ "parseDelimiter", "parseWhitespace", "parseNumber", @@ -142,7 +142,7 @@ "count": 13, "idx": 13 }, - "DEFAULT_DELIMITER": ";", + "defaultDelimiter": ";", "delimiter": ";", "delimiterLen": 1, "strict": false, @@ -150,7 +150,7 @@ }, "parser": { "@type": "PhpMyAdmin\\SqlParser\\Parser", - "STATEMENT_PARSERS": { + "statementParsers": { "DESCRIBE": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", "DESC": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", "EXPLAIN": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", @@ -195,7 +195,7 @@ "LOCK": "PhpMyAdmin\\SqlParser\\Statements\\LockStatement", "UNLOCK": "PhpMyAdmin\\SqlParser\\Statements\\LockStatement" }, - "KEYWORD_PARSERS": { + "keywordParsers": { "PARTITION BY": [], "SUBPARTITION BY": [], "_OPTIONS": { @@ -204,7 +204,7 @@ }, "_END_OPTIONS": { "class": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", - "field": "end_options" + "field": "endOptions" }, "INTERSECT": { "class": "PhpMyAdmin\\SqlParser\\Components\\UnionKeyword", @@ -452,7 +452,7 @@ "statements": [ { "@type": "PhpMyAdmin\\SqlParser\\Statements\\CreateStatement", - "OPTIONS": { + "statementOptions": { "TEMPORARY": 1, "OR REPLACE": 2, "ALGORITHM": [ @@ -484,7 +484,7 @@ "SCHEMA": 6, "IF NOT EXISTS": 7 }, - "DB_OPTIONS": { + "databaseOptions": { "CHARACTER SET": [ 1, "var=" @@ -510,7 +510,7 @@ "var=" ] }, - "TABLE_OPTIONS": { + "tableOptions": { "ENGINE": [ 1, "var=" @@ -612,7 +612,7 @@ "var" ] }, - "FUNC_OPTIONS": { + "functionOptions": { "NOT": [ 2, "var" @@ -657,7 +657,7 @@ "DETERMINISTIC": 2, "DATA": 5 }, - "TRIGGER_OPTIONS": { + "triggerOptions": { "BEFORE": 1, "AFTER": 1, "INSERT": 2, @@ -666,7 +666,7 @@ }, "name": { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -712,8 +712,8 @@ "return": null, "parameters": null, "body": [], - "CLAUSES": [], - "END_OPTIONS": [], + "clauses": [], + "statementEndOptions": [], "options": { "@type": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", "options": { diff --git a/tests/data/parser/parseCreateSchemaErr.out b/tests/data/parser/parseCreateSchemaErr.out index 0ba95123d..5b54b4daa 100644 --- a/tests/data/parser/parseCreateSchemaErr.out +++ b/tests/data/parser/parseCreateSchemaErr.out @@ -2,7 +2,7 @@ "query": "CREATE SCHEMA IF NOT EXISTS pma ENGINE='InnoDB' DEFAULT CHARSET 'utf8'", "lexer": { "@type": "PhpMyAdmin\\SqlParser\\Lexer", - "PARSER_METHODS": [ + "parserMethods": [ "parseDelimiter", "parseWhitespace", "parseNumber", @@ -169,7 +169,7 @@ "count": 16, "idx": 17 }, - "DEFAULT_DELIMITER": ";", + "defaultDelimiter": ";", "delimiter": ";", "delimiterLen": 1, "strict": false, @@ -177,7 +177,7 @@ }, "parser": { "@type": "PhpMyAdmin\\SqlParser\\Parser", - "STATEMENT_PARSERS": { + "statementParsers": { "DESCRIBE": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", "DESC": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", "EXPLAIN": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", @@ -222,7 +222,7 @@ "LOCK": "PhpMyAdmin\\SqlParser\\Statements\\LockStatement", "UNLOCK": "PhpMyAdmin\\SqlParser\\Statements\\LockStatement" }, - "KEYWORD_PARSERS": { + "keywordParsers": { "PARTITION BY": [], "SUBPARTITION BY": [], "_OPTIONS": { @@ -231,7 +231,7 @@ }, "_END_OPTIONS": { "class": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", - "field": "end_options" + "field": "endOptions" }, "INTERSECT": { "class": "PhpMyAdmin\\SqlParser\\Components\\UnionKeyword", @@ -479,7 +479,7 @@ "statements": [ { "@type": "PhpMyAdmin\\SqlParser\\Statements\\CreateStatement", - "OPTIONS": { + "statementOptions": { "TEMPORARY": 1, "OR REPLACE": 2, "ALGORITHM": [ @@ -511,7 +511,7 @@ "SCHEMA": 6, "IF NOT EXISTS": 7 }, - "DB_OPTIONS": { + "databaseOptions": { "CHARACTER SET": [ 1, "var=" @@ -537,7 +537,7 @@ "var=" ] }, - "TABLE_OPTIONS": { + "tableOptions": { "ENGINE": [ 1, "var=" @@ -639,7 +639,7 @@ "var" ] }, - "FUNC_OPTIONS": { + "functionOptions": { "NOT": [ 2, "var" @@ -684,7 +684,7 @@ "DETERMINISTIC": 2, "DATA": 5 }, - "TRIGGER_OPTIONS": { + "triggerOptions": { "BEFORE": 1, "AFTER": 1, "INSERT": 2, @@ -693,7 +693,7 @@ }, "name": { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -732,8 +732,8 @@ "return": null, "parameters": null, "body": [], - "CLAUSES": [], - "END_OPTIONS": [], + "clauses": [], + "statementEndOptions": [], "options": { "@type": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", "options": { diff --git a/tests/data/parser/parseCreateTable.out b/tests/data/parser/parseCreateTable.out index 58bcffcb5..805e3ab21 100644 --- a/tests/data/parser/parseCreateTable.out +++ b/tests/data/parser/parseCreateTable.out @@ -2,7 +2,7 @@ "query": "CREATE TABLE IF NOT EXISTS users (\n `id` INT NOT NULL AUTO_INCREMENT,\n username VARCHAR(64) NULL,\n `password` VARCHAR(256) DEFAULT '123456',\n CONSTRAINT pk_id PRIMARY KEY (`id`),\n UNIQUE (username)\n) ENGINE=InnoDB;", "lexer": { "@type": "PhpMyAdmin\\SqlParser\\Lexer", - "PARSER_METHODS": [ + "parserMethods": [ "parseDelimiter", "parseWhitespace", "parseNumber", @@ -610,7 +610,7 @@ "count": 65, "idx": 65 }, - "DEFAULT_DELIMITER": ";", + "defaultDelimiter": ";", "delimiter": ";", "delimiterLen": 1, "strict": false, @@ -618,7 +618,7 @@ }, "parser": { "@type": "PhpMyAdmin\\SqlParser\\Parser", - "STATEMENT_PARSERS": { + "statementParsers": { "DESCRIBE": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", "DESC": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", "EXPLAIN": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", @@ -663,7 +663,7 @@ "LOCK": "PhpMyAdmin\\SqlParser\\Statements\\LockStatement", "UNLOCK": "PhpMyAdmin\\SqlParser\\Statements\\LockStatement" }, - "KEYWORD_PARSERS": { + "keywordParsers": { "PARTITION BY": [], "SUBPARTITION BY": [], "_OPTIONS": { @@ -672,7 +672,7 @@ }, "_END_OPTIONS": { "class": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", - "field": "end_options" + "field": "endOptions" }, "INTERSECT": { "class": "PhpMyAdmin\\SqlParser\\Components\\UnionKeyword", @@ -920,7 +920,7 @@ "statements": [ { "@type": "PhpMyAdmin\\SqlParser\\Statements\\CreateStatement", - "OPTIONS": { + "statementOptions": { "TEMPORARY": 1, "OR REPLACE": 2, "ALGORITHM": [ @@ -952,7 +952,7 @@ "SCHEMA": 6, "IF NOT EXISTS": 7 }, - "DB_OPTIONS": { + "databaseOptions": { "CHARACTER SET": [ 1, "var=" @@ -978,7 +978,7 @@ "var=" ] }, - "TABLE_OPTIONS": { + "tableOptions": { "ENGINE": [ 1, "var=" @@ -1080,7 +1080,7 @@ "var" ] }, - "FUNC_OPTIONS": { + "functionOptions": { "NOT": [ 2, "var" @@ -1125,7 +1125,7 @@ "DETERMINISTIC": 2, "DATA": 5 }, - "TRIGGER_OPTIONS": { + "triggerOptions": { "BEFORE": 1, "AFTER": 1, "INSERT": 2, @@ -1134,7 +1134,7 @@ }, "name": { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -1170,7 +1170,7 @@ "fields": [ { "@type": "PhpMyAdmin\\SqlParser\\Components\\CreateDefinition", - "FIELD_OPTIONS": { + "fieldOptions": { "_UNSORTED": true, "NOT NULL": 1, "NULL": 1, @@ -1232,7 +1232,7 @@ "isConstraint": null, "type": { "@type": "PhpMyAdmin\\SqlParser\\Components\\DataType", - "DATA_TYPE_OPTIONS": { + "dataTypeOptions": { "BINARY": 1, "CHARACTER SET": [ 2, @@ -1268,7 +1268,7 @@ }, { "@type": "PhpMyAdmin\\SqlParser\\Components\\CreateDefinition", - "FIELD_OPTIONS": { + "fieldOptions": { "_UNSORTED": true, "NOT NULL": 1, "NULL": 1, @@ -1330,7 +1330,7 @@ "isConstraint": null, "type": { "@type": "PhpMyAdmin\\SqlParser\\Components\\DataType", - "DATA_TYPE_OPTIONS": { + "dataTypeOptions": { "BINARY": 1, "CHARACTER SET": [ 2, @@ -1367,7 +1367,7 @@ }, { "@type": "PhpMyAdmin\\SqlParser\\Components\\CreateDefinition", - "FIELD_OPTIONS": { + "fieldOptions": { "_UNSORTED": true, "NOT NULL": 1, "NULL": 1, @@ -1429,7 +1429,7 @@ "isConstraint": null, "type": { "@type": "PhpMyAdmin\\SqlParser\\Components\\DataType", - "DATA_TYPE_OPTIONS": { + "dataTypeOptions": { "BINARY": 1, "CHARACTER SET": [ 2, @@ -1465,7 +1465,7 @@ "equals": false, "expr": { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -1494,7 +1494,7 @@ }, { "@type": "PhpMyAdmin\\SqlParser\\Components\\CreateDefinition", - "FIELD_OPTIONS": { + "fieldOptions": { "_UNSORTED": true, "NOT NULL": 1, "NULL": 1, @@ -1557,7 +1557,7 @@ "type": null, "key": { "@type": "PhpMyAdmin\\SqlParser\\Components\\Key", - "KEY_OPTIONS": { + "keyOptions": { "KEY_BLOCK_SIZE": [ 1, "var=" @@ -1609,7 +1609,7 @@ }, { "@type": "PhpMyAdmin\\SqlParser\\Components\\CreateDefinition", - "FIELD_OPTIONS": { + "fieldOptions": { "_UNSORTED": true, "NOT NULL": 1, "NULL": 1, @@ -1672,7 +1672,7 @@ "type": null, "key": { "@type": "PhpMyAdmin\\SqlParser\\Components\\Key", - "KEY_OPTIONS": { + "keyOptions": { "KEY_BLOCK_SIZE": [ 1, "var=" @@ -1735,8 +1735,8 @@ "return": null, "parameters": null, "body": [], - "CLAUSES": [], - "END_OPTIONS": [], + "clauses": [], + "statementEndOptions": [], "options": { "@type": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", "options": { diff --git a/tests/data/parser/parseCreateTable2.out b/tests/data/parser/parseCreateTable2.out index 9618d85e9..480168e00 100644 --- a/tests/data/parser/parseCreateTable2.out +++ b/tests/data/parser/parseCreateTable2.out @@ -2,7 +2,7 @@ "query": "CREATE TABLE `payment` (\n `payment_id` smallint(5) unsigned NOT NULL AUTO_INCREMENT,\n `customer_id` smallint(5) unsigned NOT NULL,\n `staff_id` tinyint(3) unsigned NOT NULL,\n `rental_id` int(11) DEFAULT NULL,\n `amount` decimal(5,2) NOT NULL,\n `payment_date` datetime NOT NULL,\n `last_update` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,\n PRIMARY KEY (`payment_id`),\n KEY `idx_fk_staff_id` (`staff_id`),\n KEY `idx_fk_customer_id` (`customer_id`),\n KEY `fk_payment_rental` (`rental_id`),\n CONSTRAINT `fk_payment_customer` FOREIGN KEY (`customer_id`) REFERENCES `customer` (`customer_id`) ON UPDATE CASCADE,\n CONSTRAINT `fk_payment_rental` FOREIGN KEY (`rental_id`) REFERENCES `rental` (`rental_id`) ON DELETE SET NULL ON UPDATE CASCADE,\n CONSTRAINT `fk_payment_staff` FOREIGN KEY (`staff_id`) REFERENCES `staff` (`staff_id`) ON UPDATE CASCADE\n) ENGINE=InnoDB AUTO_INCREMENT=16050 DEFAULT CHARSET=utf8", "lexer": { "@type": "PhpMyAdmin\\SqlParser\\Lexer", - "PARSER_METHODS": [ + "parserMethods": [ "parseDelimiter", "parseWhitespace", "parseNumber", @@ -1933,7 +1933,7 @@ "count": 212, "idx": 212 }, - "DEFAULT_DELIMITER": ";", + "defaultDelimiter": ";", "delimiter": ";", "delimiterLen": 1, "strict": false, @@ -1941,7 +1941,7 @@ }, "parser": { "@type": "PhpMyAdmin\\SqlParser\\Parser", - "STATEMENT_PARSERS": { + "statementParsers": { "DESCRIBE": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", "DESC": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", "EXPLAIN": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", @@ -1986,7 +1986,7 @@ "LOCK": "PhpMyAdmin\\SqlParser\\Statements\\LockStatement", "UNLOCK": "PhpMyAdmin\\SqlParser\\Statements\\LockStatement" }, - "KEYWORD_PARSERS": { + "keywordParsers": { "PARTITION BY": [], "SUBPARTITION BY": [], "_OPTIONS": { @@ -1995,7 +1995,7 @@ }, "_END_OPTIONS": { "class": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", - "field": "end_options" + "field": "endOptions" }, "INTERSECT": { "class": "PhpMyAdmin\\SqlParser\\Components\\UnionKeyword", @@ -2243,7 +2243,7 @@ "statements": [ { "@type": "PhpMyAdmin\\SqlParser\\Statements\\CreateStatement", - "OPTIONS": { + "statementOptions": { "TEMPORARY": 1, "OR REPLACE": 2, "ALGORITHM": [ @@ -2275,7 +2275,7 @@ "SCHEMA": 6, "IF NOT EXISTS": 7 }, - "DB_OPTIONS": { + "databaseOptions": { "CHARACTER SET": [ 1, "var=" @@ -2301,7 +2301,7 @@ "var=" ] }, - "TABLE_OPTIONS": { + "tableOptions": { "ENGINE": [ 1, "var=" @@ -2403,7 +2403,7 @@ "var" ] }, - "FUNC_OPTIONS": { + "functionOptions": { "NOT": [ 2, "var" @@ -2448,7 +2448,7 @@ "DETERMINISTIC": 2, "DATA": 5 }, - "TRIGGER_OPTIONS": { + "triggerOptions": { "BEFORE": 1, "AFTER": 1, "INSERT": 2, @@ -2457,7 +2457,7 @@ }, "name": { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -2505,7 +2505,7 @@ "fields": [ { "@type": "PhpMyAdmin\\SqlParser\\Components\\CreateDefinition", - "FIELD_OPTIONS": { + "fieldOptions": { "_UNSORTED": true, "NOT NULL": 1, "NULL": 1, @@ -2567,7 +2567,7 @@ "isConstraint": null, "type": { "@type": "PhpMyAdmin\\SqlParser\\Components\\DataType", - "DATA_TYPE_OPTIONS": { + "dataTypeOptions": { "BINARY": 1, "CHARACTER SET": [ 2, @@ -2607,7 +2607,7 @@ }, { "@type": "PhpMyAdmin\\SqlParser\\Components\\CreateDefinition", - "FIELD_OPTIONS": { + "fieldOptions": { "_UNSORTED": true, "NOT NULL": 1, "NULL": 1, @@ -2669,7 +2669,7 @@ "isConstraint": null, "type": { "@type": "PhpMyAdmin\\SqlParser\\Components\\DataType", - "DATA_TYPE_OPTIONS": { + "dataTypeOptions": { "BINARY": 1, "CHARACTER SET": [ 2, @@ -2708,7 +2708,7 @@ }, { "@type": "PhpMyAdmin\\SqlParser\\Components\\CreateDefinition", - "FIELD_OPTIONS": { + "fieldOptions": { "_UNSORTED": true, "NOT NULL": 1, "NULL": 1, @@ -2770,7 +2770,7 @@ "isConstraint": null, "type": { "@type": "PhpMyAdmin\\SqlParser\\Components\\DataType", - "DATA_TYPE_OPTIONS": { + "dataTypeOptions": { "BINARY": 1, "CHARACTER SET": [ 2, @@ -2809,7 +2809,7 @@ }, { "@type": "PhpMyAdmin\\SqlParser\\Components\\CreateDefinition", - "FIELD_OPTIONS": { + "fieldOptions": { "_UNSORTED": true, "NOT NULL": 1, "NULL": 1, @@ -2871,7 +2871,7 @@ "isConstraint": null, "type": { "@type": "PhpMyAdmin\\SqlParser\\Components\\DataType", - "DATA_TYPE_OPTIONS": { + "dataTypeOptions": { "BINARY": 1, "CHARACTER SET": [ 2, @@ -2907,7 +2907,7 @@ "equals": false, "expr": { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -2936,7 +2936,7 @@ }, { "@type": "PhpMyAdmin\\SqlParser\\Components\\CreateDefinition", - "FIELD_OPTIONS": { + "fieldOptions": { "_UNSORTED": true, "NOT NULL": 1, "NULL": 1, @@ -2998,7 +2998,7 @@ "isConstraint": null, "type": { "@type": "PhpMyAdmin\\SqlParser\\Components\\DataType", - "DATA_TYPE_OPTIONS": { + "dataTypeOptions": { "BINARY": 1, "CHARACTER SET": [ 2, @@ -3036,7 +3036,7 @@ }, { "@type": "PhpMyAdmin\\SqlParser\\Components\\CreateDefinition", - "FIELD_OPTIONS": { + "fieldOptions": { "_UNSORTED": true, "NOT NULL": 1, "NULL": 1, @@ -3098,7 +3098,7 @@ "isConstraint": null, "type": { "@type": "PhpMyAdmin\\SqlParser\\Components\\DataType", - "DATA_TYPE_OPTIONS": { + "dataTypeOptions": { "BINARY": 1, "CHARACTER SET": [ 2, @@ -3133,7 +3133,7 @@ }, { "@type": "PhpMyAdmin\\SqlParser\\Components\\CreateDefinition", - "FIELD_OPTIONS": { + "fieldOptions": { "_UNSORTED": true, "NOT NULL": 1, "NULL": 1, @@ -3195,7 +3195,7 @@ "isConstraint": null, "type": { "@type": "PhpMyAdmin\\SqlParser\\Components\\DataType", - "DATA_TYPE_OPTIONS": { + "dataTypeOptions": { "BINARY": 1, "CHARACTER SET": [ 2, @@ -3230,7 +3230,7 @@ "equals": false, "expr": { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -3259,7 +3259,7 @@ "equals": false, "expr": { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -3288,7 +3288,7 @@ }, { "@type": "PhpMyAdmin\\SqlParser\\Components\\CreateDefinition", - "FIELD_OPTIONS": { + "fieldOptions": { "_UNSORTED": true, "NOT NULL": 1, "NULL": 1, @@ -3351,7 +3351,7 @@ "type": null, "key": { "@type": "PhpMyAdmin\\SqlParser\\Components\\Key", - "KEY_OPTIONS": { + "keyOptions": { "KEY_BLOCK_SIZE": [ 1, "var=" @@ -3403,7 +3403,7 @@ }, { "@type": "PhpMyAdmin\\SqlParser\\Components\\CreateDefinition", - "FIELD_OPTIONS": { + "fieldOptions": { "_UNSORTED": true, "NOT NULL": 1, "NULL": 1, @@ -3466,7 +3466,7 @@ "type": null, "key": { "@type": "PhpMyAdmin\\SqlParser\\Components\\Key", - "KEY_OPTIONS": { + "keyOptions": { "KEY_BLOCK_SIZE": [ 1, "var=" @@ -3518,7 +3518,7 @@ }, { "@type": "PhpMyAdmin\\SqlParser\\Components\\CreateDefinition", - "FIELD_OPTIONS": { + "fieldOptions": { "_UNSORTED": true, "NOT NULL": 1, "NULL": 1, @@ -3581,7 +3581,7 @@ "type": null, "key": { "@type": "PhpMyAdmin\\SqlParser\\Components\\Key", - "KEY_OPTIONS": { + "keyOptions": { "KEY_BLOCK_SIZE": [ 1, "var=" @@ -3633,7 +3633,7 @@ }, { "@type": "PhpMyAdmin\\SqlParser\\Components\\CreateDefinition", - "FIELD_OPTIONS": { + "fieldOptions": { "_UNSORTED": true, "NOT NULL": 1, "NULL": 1, @@ -3696,7 +3696,7 @@ "type": null, "key": { "@type": "PhpMyAdmin\\SqlParser\\Components\\Key", - "KEY_OPTIONS": { + "keyOptions": { "KEY_BLOCK_SIZE": [ 1, "var=" @@ -3748,7 +3748,7 @@ }, { "@type": "PhpMyAdmin\\SqlParser\\Components\\CreateDefinition", - "FIELD_OPTIONS": { + "fieldOptions": { "_UNSORTED": true, "NOT NULL": 1, "NULL": 1, @@ -3811,7 +3811,7 @@ "type": null, "key": { "@type": "PhpMyAdmin\\SqlParser\\Components\\Key", - "KEY_OPTIONS": { + "keyOptions": { "KEY_BLOCK_SIZE": [ 1, "var=" @@ -3860,7 +3860,7 @@ }, "references": { "@type": "PhpMyAdmin\\SqlParser\\Components\\Reference", - "REFERENCES_OPTIONS": { + "referencesOptions": { "MATCH": [ 1, "var" @@ -3876,7 +3876,7 @@ }, "table": { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -3917,7 +3917,7 @@ }, { "@type": "PhpMyAdmin\\SqlParser\\Components\\CreateDefinition", - "FIELD_OPTIONS": { + "fieldOptions": { "_UNSORTED": true, "NOT NULL": 1, "NULL": 1, @@ -3980,7 +3980,7 @@ "type": null, "key": { "@type": "PhpMyAdmin\\SqlParser\\Components\\Key", - "KEY_OPTIONS": { + "keyOptions": { "KEY_BLOCK_SIZE": [ 1, "var=" @@ -4029,7 +4029,7 @@ }, "references": { "@type": "PhpMyAdmin\\SqlParser\\Components\\Reference", - "REFERENCES_OPTIONS": { + "referencesOptions": { "MATCH": [ 1, "var" @@ -4045,7 +4045,7 @@ }, "table": { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -4092,7 +4092,7 @@ }, { "@type": "PhpMyAdmin\\SqlParser\\Components\\CreateDefinition", - "FIELD_OPTIONS": { + "fieldOptions": { "_UNSORTED": true, "NOT NULL": 1, "NULL": 1, @@ -4155,7 +4155,7 @@ "type": null, "key": { "@type": "PhpMyAdmin\\SqlParser\\Components\\Key", - "KEY_OPTIONS": { + "keyOptions": { "KEY_BLOCK_SIZE": [ 1, "var=" @@ -4204,7 +4204,7 @@ }, "references": { "@type": "PhpMyAdmin\\SqlParser\\Components\\Reference", - "REFERENCES_OPTIONS": { + "referencesOptions": { "MATCH": [ 1, "var" @@ -4220,7 +4220,7 @@ }, "table": { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -4272,8 +4272,8 @@ "return": null, "parameters": null, "body": [], - "CLAUSES": [], - "END_OPTIONS": [], + "clauses": [], + "statementEndOptions": [], "options": { "@type": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", "options": { diff --git a/tests/data/parser/parseCreateTable3.out b/tests/data/parser/parseCreateTable3.out index 2b67044b5..952377d8e 100644 --- a/tests/data/parser/parseCreateTable3.out +++ b/tests/data/parser/parseCreateTable3.out @@ -2,7 +2,7 @@ "query": "CREATE TABLE table1 (\n a INT NOT NULL,\n b VARCHAR(32),\n c INT AS (a mod 10) VIRTUAL,\n d VARCHAR(5) AS (left(b,5)) PERSISTENT\n);", "lexer": { "@type": "PhpMyAdmin\\SqlParser\\Lexer", - "PARSER_METHODS": [ + "parserMethods": [ "parseDelimiter", "parseWhitespace", "parseNumber", @@ -592,7 +592,7 @@ "count": 63, "idx": 63 }, - "DEFAULT_DELIMITER": ";", + "defaultDelimiter": ";", "delimiter": ";", "delimiterLen": 1, "strict": false, @@ -600,7 +600,7 @@ }, "parser": { "@type": "PhpMyAdmin\\SqlParser\\Parser", - "STATEMENT_PARSERS": { + "statementParsers": { "DESCRIBE": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", "DESC": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", "EXPLAIN": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", @@ -645,7 +645,7 @@ "LOCK": "PhpMyAdmin\\SqlParser\\Statements\\LockStatement", "UNLOCK": "PhpMyAdmin\\SqlParser\\Statements\\LockStatement" }, - "KEYWORD_PARSERS": { + "keywordParsers": { "PARTITION BY": [], "SUBPARTITION BY": [], "_OPTIONS": { @@ -654,7 +654,7 @@ }, "_END_OPTIONS": { "class": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", - "field": "end_options" + "field": "endOptions" }, "INTERSECT": { "class": "PhpMyAdmin\\SqlParser\\Components\\UnionKeyword", @@ -902,7 +902,7 @@ "statements": [ { "@type": "PhpMyAdmin\\SqlParser\\Statements\\CreateStatement", - "OPTIONS": { + "statementOptions": { "TEMPORARY": 1, "OR REPLACE": 2, "ALGORITHM": [ @@ -934,7 +934,7 @@ "SCHEMA": 6, "IF NOT EXISTS": 7 }, - "DB_OPTIONS": { + "databaseOptions": { "CHARACTER SET": [ 1, "var=" @@ -960,7 +960,7 @@ "var=" ] }, - "TABLE_OPTIONS": { + "tableOptions": { "ENGINE": [ 1, "var=" @@ -1062,7 +1062,7 @@ "var" ] }, - "FUNC_OPTIONS": { + "functionOptions": { "NOT": [ 2, "var" @@ -1107,7 +1107,7 @@ "DETERMINISTIC": 2, "DATA": 5 }, - "TRIGGER_OPTIONS": { + "triggerOptions": { "BEFORE": 1, "AFTER": 1, "INSERT": 2, @@ -1116,7 +1116,7 @@ }, "name": { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -1145,7 +1145,7 @@ "fields": [ { "@type": "PhpMyAdmin\\SqlParser\\Components\\CreateDefinition", - "FIELD_OPTIONS": { + "fieldOptions": { "_UNSORTED": true, "NOT NULL": 1, "NULL": 1, @@ -1207,7 +1207,7 @@ "isConstraint": null, "type": { "@type": "PhpMyAdmin\\SqlParser\\Components\\DataType", - "DATA_TYPE_OPTIONS": { + "dataTypeOptions": { "BINARY": 1, "CHARACTER SET": [ 2, @@ -1242,7 +1242,7 @@ }, { "@type": "PhpMyAdmin\\SqlParser\\Components\\CreateDefinition", - "FIELD_OPTIONS": { + "fieldOptions": { "_UNSORTED": true, "NOT NULL": 1, "NULL": 1, @@ -1304,7 +1304,7 @@ "isConstraint": null, "type": { "@type": "PhpMyAdmin\\SqlParser\\Components\\DataType", - "DATA_TYPE_OPTIONS": { + "dataTypeOptions": { "BINARY": 1, "CHARACTER SET": [ 2, @@ -1339,7 +1339,7 @@ }, { "@type": "PhpMyAdmin\\SqlParser\\Components\\CreateDefinition", - "FIELD_OPTIONS": { + "fieldOptions": { "_UNSORTED": true, "NOT NULL": 1, "NULL": 1, @@ -1401,7 +1401,7 @@ "isConstraint": null, "type": { "@type": "PhpMyAdmin\\SqlParser\\Components\\DataType", - "DATA_TYPE_OPTIONS": { + "dataTypeOptions": { "BINARY": 1, "CHARACTER SET": [ 2, @@ -1435,7 +1435,7 @@ "equals": false, "expr": { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -1465,7 +1465,7 @@ }, { "@type": "PhpMyAdmin\\SqlParser\\Components\\CreateDefinition", - "FIELD_OPTIONS": { + "fieldOptions": { "_UNSORTED": true, "NOT NULL": 1, "NULL": 1, @@ -1527,7 +1527,7 @@ "isConstraint": null, "type": { "@type": "PhpMyAdmin\\SqlParser\\Components\\DataType", - "DATA_TYPE_OPTIONS": { + "dataTypeOptions": { "BINARY": 1, "CHARACTER SET": [ 2, @@ -1563,7 +1563,7 @@ "equals": false, "expr": { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -1604,8 +1604,8 @@ "return": null, "parameters": null, "body": [], - "CLAUSES": [], - "END_OPTIONS": [], + "clauses": [], + "statementEndOptions": [], "options": { "@type": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", "options": { diff --git a/tests/data/parser/parseCreateTable4.out b/tests/data/parser/parseCreateTable4.out index 2a97700c9..c912ffa6f 100644 --- a/tests/data/parser/parseCreateTable4.out +++ b/tests/data/parser/parseCreateTable4.out @@ -2,7 +2,7 @@ "query": "CREATE TABLE ts(id INT, purchased DATE)\nPARTITION BY \/* comment *\/ RANGE(YEAR(purchased))\nPARTITIONS 3\nSUBPARTITION BY HASH(TO_DAYS(purchased))\nSUBPARTITIONS 2(\nPARTITION p0\nVALUES LESS THAN(1990)(\n SUBPARTITION s0,\n SUBPARTITION s1\n),\nPARTITION p1\nVALUES LESS THAN(2000)(\n SUBPARTITION s2,\n SUBPARTITION s3\n),\nPARTITION p2\nVALUES LESS THAN MAXVALUE(\n SUBPARTITION s4,\n SUBPARTITION s5\n)\n);", "lexer": { "@type": "PhpMyAdmin\\SqlParser\\Lexer", - "PARSER_METHODS": [ + "parserMethods": [ "parseDelimiter", "parseWhitespace", "parseNumber", @@ -1105,7 +1105,7 @@ "count": 120, "idx": 120 }, - "DEFAULT_DELIMITER": ";", + "defaultDelimiter": ";", "delimiter": ";", "delimiterLen": 1, "strict": false, @@ -1113,7 +1113,7 @@ }, "parser": { "@type": "PhpMyAdmin\\SqlParser\\Parser", - "STATEMENT_PARSERS": { + "statementParsers": { "DESCRIBE": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", "DESC": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", "EXPLAIN": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", @@ -1158,7 +1158,7 @@ "LOCK": "PhpMyAdmin\\SqlParser\\Statements\\LockStatement", "UNLOCK": "PhpMyAdmin\\SqlParser\\Statements\\LockStatement" }, - "KEYWORD_PARSERS": { + "keywordParsers": { "PARTITION BY": [], "SUBPARTITION BY": [], "_OPTIONS": { @@ -1167,7 +1167,7 @@ }, "_END_OPTIONS": { "class": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", - "field": "end_options" + "field": "endOptions" }, "INTERSECT": { "class": "PhpMyAdmin\\SqlParser\\Components\\UnionKeyword", @@ -1415,7 +1415,7 @@ "statements": [ { "@type": "PhpMyAdmin\\SqlParser\\Statements\\CreateStatement", - "OPTIONS": { + "statementOptions": { "TEMPORARY": 1, "OR REPLACE": 2, "ALGORITHM": [ @@ -1447,7 +1447,7 @@ "SCHEMA": 6, "IF NOT EXISTS": 7 }, - "DB_OPTIONS": { + "databaseOptions": { "CHARACTER SET": [ 1, "var=" @@ -1473,7 +1473,7 @@ "var=" ] }, - "TABLE_OPTIONS": { + "tableOptions": { "ENGINE": [ 1, "var=" @@ -1575,7 +1575,7 @@ "var" ] }, - "FUNC_OPTIONS": { + "functionOptions": { "NOT": [ 2, "var" @@ -1620,7 +1620,7 @@ "DETERMINISTIC": 2, "DATA": 5 }, - "TRIGGER_OPTIONS": { + "triggerOptions": { "BEFORE": 1, "AFTER": 1, "INSERT": 2, @@ -1629,7 +1629,7 @@ }, "name": { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -1658,7 +1658,7 @@ "fields": [ { "@type": "PhpMyAdmin\\SqlParser\\Components\\CreateDefinition", - "FIELD_OPTIONS": { + "fieldOptions": { "_UNSORTED": true, "NOT NULL": 1, "NULL": 1, @@ -1720,7 +1720,7 @@ "isConstraint": null, "type": { "@type": "PhpMyAdmin\\SqlParser\\Components\\DataType", - "DATA_TYPE_OPTIONS": { + "dataTypeOptions": { "BINARY": 1, "CHARACTER SET": [ 2, @@ -1753,7 +1753,7 @@ }, { "@type": "PhpMyAdmin\\SqlParser\\Components\\CreateDefinition", - "FIELD_OPTIONS": { + "fieldOptions": { "_UNSORTED": true, "NOT NULL": 1, "NULL": 1, @@ -1815,7 +1815,7 @@ "isConstraint": null, "type": { "@type": "PhpMyAdmin\\SqlParser\\Components\\DataType", - "DATA_TYPE_OPTIONS": { + "dataTypeOptions": { "BINARY": 1, "CHARACTER SET": [ 2, @@ -1857,7 +1857,7 @@ "partitions": [ { "@type": "PhpMyAdmin\\SqlParser\\Components\\PartitionDefinition", - "OPTIONS": { + "partitionOptions": { "STORAGE ENGINE": [ 1, "var" @@ -1900,7 +1900,7 @@ "type": "LESS THAN", "expr": { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -1925,7 +1925,7 @@ "subpartitions": [ { "@type": "PhpMyAdmin\\SqlParser\\Components\\PartitionDefinition", - "OPTIONS": { + "partitionOptions": { "STORAGE ENGINE": [ 1, "var" @@ -1975,7 +1975,7 @@ }, { "@type": "PhpMyAdmin\\SqlParser\\Components\\PartitionDefinition", - "OPTIONS": { + "partitionOptions": { "STORAGE ENGINE": [ 1, "var" @@ -2031,7 +2031,7 @@ }, { "@type": "PhpMyAdmin\\SqlParser\\Components\\PartitionDefinition", - "OPTIONS": { + "partitionOptions": { "STORAGE ENGINE": [ 1, "var" @@ -2074,7 +2074,7 @@ "type": "LESS THAN", "expr": { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -2099,7 +2099,7 @@ "subpartitions": [ { "@type": "PhpMyAdmin\\SqlParser\\Components\\PartitionDefinition", - "OPTIONS": { + "partitionOptions": { "STORAGE ENGINE": [ 1, "var" @@ -2149,7 +2149,7 @@ }, { "@type": "PhpMyAdmin\\SqlParser\\Components\\PartitionDefinition", - "OPTIONS": { + "partitionOptions": { "STORAGE ENGINE": [ 1, "var" @@ -2205,7 +2205,7 @@ }, { "@type": "PhpMyAdmin\\SqlParser\\Components\\PartitionDefinition", - "OPTIONS": { + "partitionOptions": { "STORAGE ENGINE": [ 1, "var" @@ -2250,7 +2250,7 @@ "subpartitions": [ { "@type": "PhpMyAdmin\\SqlParser\\Components\\PartitionDefinition", - "OPTIONS": { + "partitionOptions": { "STORAGE ENGINE": [ 1, "var" @@ -2300,7 +2300,7 @@ }, { "@type": "PhpMyAdmin\\SqlParser\\Components\\PartitionDefinition", - "OPTIONS": { + "partitionOptions": { "STORAGE ENGINE": [ 1, "var" @@ -2359,8 +2359,8 @@ "return": null, "parameters": null, "body": [], - "CLAUSES": [], - "END_OPTIONS": [], + "clauses": [], + "statementEndOptions": [], "options": { "@type": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", "options": { diff --git a/tests/data/parser/parseCreateTable5.out b/tests/data/parser/parseCreateTable5.out index 4bbb9f293..55bf5c9c9 100644 --- a/tests/data/parser/parseCreateTable5.out +++ b/tests/data/parser/parseCreateTable5.out @@ -2,7 +2,7 @@ "query": "CREATE TABLE new_table (`INT` VARCHAR(50) DEFAULT NULL);", "lexer": { "@type": "PhpMyAdmin\\SqlParser\\Lexer", - "PARSER_METHODS": [ + "parserMethods": [ "parseDelimiter", "parseWhitespace", "parseNumber", @@ -205,7 +205,7 @@ "count": 20, "idx": 20 }, - "DEFAULT_DELIMITER": ";", + "defaultDelimiter": ";", "delimiter": ";", "delimiterLen": 1, "strict": false, @@ -213,7 +213,7 @@ }, "parser": { "@type": "PhpMyAdmin\\SqlParser\\Parser", - "STATEMENT_PARSERS": { + "statementParsers": { "DESCRIBE": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", "DESC": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", "EXPLAIN": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", @@ -258,7 +258,7 @@ "LOCK": "PhpMyAdmin\\SqlParser\\Statements\\LockStatement", "UNLOCK": "PhpMyAdmin\\SqlParser\\Statements\\LockStatement" }, - "KEYWORD_PARSERS": { + "keywordParsers": { "PARTITION BY": [], "SUBPARTITION BY": [], "_OPTIONS": { @@ -267,7 +267,7 @@ }, "_END_OPTIONS": { "class": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", - "field": "end_options" + "field": "endOptions" }, "INTERSECT": { "class": "PhpMyAdmin\\SqlParser\\Components\\UnionKeyword", @@ -515,7 +515,7 @@ "statements": [ { "@type": "PhpMyAdmin\\SqlParser\\Statements\\CreateStatement", - "OPTIONS": { + "statementOptions": { "TEMPORARY": 1, "OR REPLACE": 2, "ALGORITHM": [ @@ -547,7 +547,7 @@ "SCHEMA": 6, "IF NOT EXISTS": 7 }, - "DB_OPTIONS": { + "databaseOptions": { "CHARACTER SET": [ 1, "var=" @@ -573,7 +573,7 @@ "var=" ] }, - "TABLE_OPTIONS": { + "tableOptions": { "ENGINE": [ 1, "var=" @@ -675,7 +675,7 @@ "var" ] }, - "FUNC_OPTIONS": { + "functionOptions": { "NOT": [ 2, "var" @@ -720,7 +720,7 @@ "DETERMINISTIC": 2, "DATA": 5 }, - "TRIGGER_OPTIONS": { + "triggerOptions": { "BEFORE": 1, "AFTER": 1, "INSERT": 2, @@ -729,7 +729,7 @@ }, "name": { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -758,7 +758,7 @@ "fields": [ { "@type": "PhpMyAdmin\\SqlParser\\Components\\CreateDefinition", - "FIELD_OPTIONS": { + "fieldOptions": { "_UNSORTED": true, "NOT NULL": 1, "NULL": 1, @@ -820,7 +820,7 @@ "isConstraint": null, "type": { "@type": "PhpMyAdmin\\SqlParser\\Components\\DataType", - "DATA_TYPE_OPTIONS": { + "dataTypeOptions": { "BINARY": 1, "CHARACTER SET": [ 2, @@ -856,7 +856,7 @@ "equals": false, "expr": { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -896,8 +896,8 @@ "return": null, "parameters": null, "body": [], - "CLAUSES": [], - "END_OPTIONS": [], + "clauses": [], + "statementEndOptions": [], "options": { "@type": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", "options": { diff --git a/tests/data/parser/parseCreateTable6.out b/tests/data/parser/parseCreateTable6.out index 11a3b4909..15e422c87 100644 --- a/tests/data/parser/parseCreateTable6.out +++ b/tests/data/parser/parseCreateTable6.out @@ -2,7 +2,7 @@ "query": "CREATE TABLE new_table (ACTION VARCHAR(50) DEFAULT NULL);\n", "lexer": { "@type": "PhpMyAdmin\\SqlParser\\Lexer", - "PARSER_METHODS": [ + "parserMethods": [ "parseDelimiter", "parseWhitespace", "parseNumber", @@ -214,7 +214,7 @@ "count": 21, "idx": 21 }, - "DEFAULT_DELIMITER": ";", + "defaultDelimiter": ";", "delimiter": ";", "delimiterLen": 1, "strict": false, @@ -222,7 +222,7 @@ }, "parser": { "@type": "PhpMyAdmin\\SqlParser\\Parser", - "STATEMENT_PARSERS": { + "statementParsers": { "DESCRIBE": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", "DESC": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", "EXPLAIN": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", @@ -267,7 +267,7 @@ "LOCK": "PhpMyAdmin\\SqlParser\\Statements\\LockStatement", "UNLOCK": "PhpMyAdmin\\SqlParser\\Statements\\LockStatement" }, - "KEYWORD_PARSERS": { + "keywordParsers": { "PARTITION BY": [], "SUBPARTITION BY": [], "_OPTIONS": { @@ -276,7 +276,7 @@ }, "_END_OPTIONS": { "class": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", - "field": "end_options" + "field": "endOptions" }, "INTERSECT": { "class": "PhpMyAdmin\\SqlParser\\Components\\UnionKeyword", @@ -524,7 +524,7 @@ "statements": [ { "@type": "PhpMyAdmin\\SqlParser\\Statements\\CreateStatement", - "OPTIONS": { + "statementOptions": { "TEMPORARY": 1, "OR REPLACE": 2, "ALGORITHM": [ @@ -556,7 +556,7 @@ "SCHEMA": 6, "IF NOT EXISTS": 7 }, - "DB_OPTIONS": { + "databaseOptions": { "CHARACTER SET": [ 1, "var=" @@ -582,7 +582,7 @@ "var=" ] }, - "TABLE_OPTIONS": { + "tableOptions": { "ENGINE": [ 1, "var=" @@ -684,7 +684,7 @@ "var" ] }, - "FUNC_OPTIONS": { + "functionOptions": { "NOT": [ 2, "var" @@ -729,7 +729,7 @@ "DETERMINISTIC": 2, "DATA": 5 }, - "TRIGGER_OPTIONS": { + "triggerOptions": { "BEFORE": 1, "AFTER": 1, "INSERT": 2, @@ -738,7 +738,7 @@ }, "name": { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -767,7 +767,7 @@ "fields": [ { "@type": "PhpMyAdmin\\SqlParser\\Components\\CreateDefinition", - "FIELD_OPTIONS": { + "fieldOptions": { "_UNSORTED": true, "NOT NULL": 1, "NULL": 1, @@ -829,7 +829,7 @@ "isConstraint": null, "type": { "@type": "PhpMyAdmin\\SqlParser\\Components\\DataType", - "DATA_TYPE_OPTIONS": { + "dataTypeOptions": { "BINARY": 1, "CHARACTER SET": [ 2, @@ -865,7 +865,7 @@ "equals": false, "expr": { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -905,8 +905,8 @@ "return": null, "parameters": null, "body": [], - "CLAUSES": [], - "END_OPTIONS": [], + "clauses": [], + "statementEndOptions": [], "options": { "@type": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", "options": { diff --git a/tests/data/parser/parseCreateTable7.out b/tests/data/parser/parseCreateTable7.out index d63225ec7..b32ce168b 100644 --- a/tests/data/parser/parseCreateTable7.out +++ b/tests/data/parser/parseCreateTable7.out @@ -2,7 +2,7 @@ "query": "CREATE TABLE `ts` (\n `id` int(11) DEFAULT NULL,\n `purchased` date DEFAULT NULL\n) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4\nPARTITION BY RANGE (YEAR(purchased))\nSUBPARTITION BY HASH (TO_DAYS(purchased))\n(\nPARTITION p0 VALUES LESS THAN (1990) (\nSUBPARTITION s0 ENGINE=InnoDB,\nSUBPARTITION s1 ENGINE=InnoDB\n),\nPARTITION p1 VALUES LESS THAN (2000) (\nSUBPARTITION s2 ENGINE=InnoDB,\nSUBPARTITION s3 ENGINE=InnoDB\n),\nPARTITION p2 VALUES LESS THAN MAXVALUE (\nSUBPARTITION s4 ENGINE=InnoDB,\nSUBPARTITION s5 ENGINE=InnoDB\n)\n);\n", "lexer": { "@type": "PhpMyAdmin\\SqlParser\\Lexer", - "PARSER_METHODS": [ + "parserMethods": [ "parseDelimiter", "parseWhitespace", "parseNumber", @@ -1510,7 +1510,7 @@ "count": 165, "idx": 165 }, - "DEFAULT_DELIMITER": ";", + "defaultDelimiter": ";", "delimiter": ";", "delimiterLen": 1, "strict": false, @@ -1518,7 +1518,7 @@ }, "parser": { "@type": "PhpMyAdmin\\SqlParser\\Parser", - "STATEMENT_PARSERS": { + "statementParsers": { "DESCRIBE": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", "DESC": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", "EXPLAIN": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", @@ -1563,7 +1563,7 @@ "LOCK": "PhpMyAdmin\\SqlParser\\Statements\\LockStatement", "UNLOCK": "PhpMyAdmin\\SqlParser\\Statements\\LockStatement" }, - "KEYWORD_PARSERS": { + "keywordParsers": { "PARTITION BY": [], "SUBPARTITION BY": [], "_OPTIONS": { @@ -1572,7 +1572,7 @@ }, "_END_OPTIONS": { "class": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", - "field": "end_options" + "field": "endOptions" }, "INTERSECT": { "class": "PhpMyAdmin\\SqlParser\\Components\\UnionKeyword", @@ -1820,7 +1820,7 @@ "statements": [ { "@type": "PhpMyAdmin\\SqlParser\\Statements\\CreateStatement", - "OPTIONS": { + "statementOptions": { "TEMPORARY": 1, "OR REPLACE": 2, "ALGORITHM": [ @@ -1852,7 +1852,7 @@ "SCHEMA": 6, "IF NOT EXISTS": 7 }, - "DB_OPTIONS": { + "databaseOptions": { "CHARACTER SET": [ 1, "var=" @@ -1878,7 +1878,7 @@ "var=" ] }, - "TABLE_OPTIONS": { + "tableOptions": { "ENGINE": [ 1, "var=" @@ -1980,7 +1980,7 @@ "var" ] }, - "FUNC_OPTIONS": { + "functionOptions": { "NOT": [ 2, "var" @@ -2025,7 +2025,7 @@ "DETERMINISTIC": 2, "DATA": 5 }, - "TRIGGER_OPTIONS": { + "triggerOptions": { "BEFORE": 1, "AFTER": 1, "INSERT": 2, @@ -2034,7 +2034,7 @@ }, "name": { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -2076,7 +2076,7 @@ "fields": [ { "@type": "PhpMyAdmin\\SqlParser\\Components\\CreateDefinition", - "FIELD_OPTIONS": { + "fieldOptions": { "_UNSORTED": true, "NOT NULL": 1, "NULL": 1, @@ -2138,7 +2138,7 @@ "isConstraint": null, "type": { "@type": "PhpMyAdmin\\SqlParser\\Components\\DataType", - "DATA_TYPE_OPTIONS": { + "dataTypeOptions": { "BINARY": 1, "CHARACTER SET": [ 2, @@ -2174,7 +2174,7 @@ "equals": false, "expr": { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -2203,7 +2203,7 @@ }, { "@type": "PhpMyAdmin\\SqlParser\\Components\\CreateDefinition", - "FIELD_OPTIONS": { + "fieldOptions": { "_UNSORTED": true, "NOT NULL": 1, "NULL": 1, @@ -2265,7 +2265,7 @@ "isConstraint": null, "type": { "@type": "PhpMyAdmin\\SqlParser\\Components\\DataType", - "DATA_TYPE_OPTIONS": { + "dataTypeOptions": { "BINARY": 1, "CHARACTER SET": [ 2, @@ -2299,7 +2299,7 @@ "equals": false, "expr": { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -2337,7 +2337,7 @@ "partitions": [ { "@type": "PhpMyAdmin\\SqlParser\\Components\\PartitionDefinition", - "OPTIONS": { + "partitionOptions": { "STORAGE ENGINE": [ 1, "var" @@ -2380,7 +2380,7 @@ "type": "LESS THAN", "expr": { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -2405,7 +2405,7 @@ "subpartitions": [ { "@type": "PhpMyAdmin\\SqlParser\\Components\\PartitionDefinition", - "OPTIONS": { + "partitionOptions": { "STORAGE ENGINE": [ 1, "var" @@ -2462,7 +2462,7 @@ }, { "@type": "PhpMyAdmin\\SqlParser\\Components\\PartitionDefinition", - "OPTIONS": { + "partitionOptions": { "STORAGE ENGINE": [ 1, "var" @@ -2525,7 +2525,7 @@ }, { "@type": "PhpMyAdmin\\SqlParser\\Components\\PartitionDefinition", - "OPTIONS": { + "partitionOptions": { "STORAGE ENGINE": [ 1, "var" @@ -2568,7 +2568,7 @@ "type": "LESS THAN", "expr": { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -2593,7 +2593,7 @@ "subpartitions": [ { "@type": "PhpMyAdmin\\SqlParser\\Components\\PartitionDefinition", - "OPTIONS": { + "partitionOptions": { "STORAGE ENGINE": [ 1, "var" @@ -2650,7 +2650,7 @@ }, { "@type": "PhpMyAdmin\\SqlParser\\Components\\PartitionDefinition", - "OPTIONS": { + "partitionOptions": { "STORAGE ENGINE": [ 1, "var" @@ -2713,7 +2713,7 @@ }, { "@type": "PhpMyAdmin\\SqlParser\\Components\\PartitionDefinition", - "OPTIONS": { + "partitionOptions": { "STORAGE ENGINE": [ 1, "var" @@ -2758,7 +2758,7 @@ "subpartitions": [ { "@type": "PhpMyAdmin\\SqlParser\\Components\\PartitionDefinition", - "OPTIONS": { + "partitionOptions": { "STORAGE ENGINE": [ 1, "var" @@ -2815,7 +2815,7 @@ }, { "@type": "PhpMyAdmin\\SqlParser\\Components\\PartitionDefinition", - "OPTIONS": { + "partitionOptions": { "STORAGE ENGINE": [ 1, "var" @@ -2881,8 +2881,8 @@ "return": null, "parameters": null, "body": [], - "CLAUSES": [], - "END_OPTIONS": [], + "clauses": [], + "statementEndOptions": [], "options": { "@type": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", "options": { diff --git a/tests/data/parser/parseCreateTableAsSelect.out b/tests/data/parser/parseCreateTableAsSelect.out index 48cf438ec..f83b5392c 100644 --- a/tests/data/parser/parseCreateTableAsSelect.out +++ b/tests/data/parser/parseCreateTableAsSelect.out @@ -2,7 +2,7 @@ "query": "CREATE TABLE new_tbl AS SELECT * FROM orig_tbl\n", "lexer": { "@type": "PhpMyAdmin\\SqlParser\\Lexer", - "PARSER_METHODS": [ + "parserMethods": [ "parseDelimiter", "parseWhitespace", "parseNumber", @@ -178,7 +178,7 @@ "count": 17, "idx": 17 }, - "DEFAULT_DELIMITER": ";", + "defaultDelimiter": ";", "delimiter": ";", "delimiterLen": 1, "strict": false, @@ -186,7 +186,7 @@ }, "parser": { "@type": "PhpMyAdmin\\SqlParser\\Parser", - "STATEMENT_PARSERS": { + "statementParsers": { "DESCRIBE": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", "DESC": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", "EXPLAIN": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", @@ -231,7 +231,7 @@ "LOCK": "PhpMyAdmin\\SqlParser\\Statements\\LockStatement", "UNLOCK": "PhpMyAdmin\\SqlParser\\Statements\\LockStatement" }, - "KEYWORD_PARSERS": { + "keywordParsers": { "PARTITION BY": [], "SUBPARTITION BY": [], "_OPTIONS": { @@ -240,7 +240,7 @@ }, "_END_OPTIONS": { "class": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", - "field": "end_options" + "field": "endOptions" }, "INTERSECT": { "class": "PhpMyAdmin\\SqlParser\\Components\\UnionKeyword", @@ -488,7 +488,7 @@ "statements": [ { "@type": "PhpMyAdmin\\SqlParser\\Statements\\CreateStatement", - "OPTIONS": { + "statementOptions": { "TEMPORARY": 1, "OR REPLACE": 2, "ALGORITHM": [ @@ -520,7 +520,7 @@ "SCHEMA": 6, "IF NOT EXISTS": 7 }, - "DB_OPTIONS": { + "databaseOptions": { "CHARACTER SET": [ 1, "var=" @@ -546,7 +546,7 @@ "var=" ] }, - "TABLE_OPTIONS": { + "tableOptions": { "ENGINE": [ 1, "var=" @@ -648,7 +648,7 @@ "var" ] }, - "FUNC_OPTIONS": { + "functionOptions": { "NOT": [ 2, "var" @@ -693,7 +693,7 @@ "DETERMINISTIC": 2, "DATA": 5 }, - "TRIGGER_OPTIONS": { + "triggerOptions": { "BEFORE": 1, "AFTER": 1, "INSERT": 2, @@ -702,7 +702,7 @@ }, "name": { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -729,7 +729,7 @@ "with": null, "select": { "@type": "PhpMyAdmin\\SqlParser\\Statements\\SelectStatement", - "OPTIONS": { + "statementOptions": { "ALL": 1, "DISTINCT": 1, "DISTINCTROW": 1, @@ -746,11 +746,11 @@ "SQL_NO_CACHE": 8, "SQL_CALC_FOUND_ROWS": 9 }, - "END_OPTIONS": { + "statementEndOptions": { "FOR UPDATE": 1, "LOCK IN SHARE MODE": 1 }, - "CLAUSES": { + "clauses": { "SELECT": [ "SELECT", 2 @@ -879,7 +879,7 @@ "expr": [ { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -905,7 +905,7 @@ "from": [ { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -928,7 +928,7 @@ "subquery": null } ], - "index_hints": null, + "indexHints": null, "partition": null, "where": null, "group": null, @@ -939,7 +939,7 @@ "into": null, "join": null, "union": [], - "end_options": null, + "endOptions": null, "options": { "@type": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", "options": [] @@ -957,8 +957,8 @@ "return": null, "parameters": null, "body": [], - "CLAUSES": [], - "END_OPTIONS": [], + "clauses": [], + "statementEndOptions": [], "options": { "@type": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", "options": { diff --git a/tests/data/parser/parseCreateTableEnforcedCheck.out b/tests/data/parser/parseCreateTableEnforcedCheck.out index b0d871b19..8628083d8 100644 --- a/tests/data/parser/parseCreateTableEnforcedCheck.out +++ b/tests/data/parser/parseCreateTableEnforcedCheck.out @@ -2,7 +2,7 @@ "query": "CREATE TABLE IF NOT EXISTS employees_check (FirstName varchar(30) CHECK (FirstName REGEXP '^T' AND FirstName REGEXP 'r$') ENFORCED);", "lexer": { "@type": "PhpMyAdmin\\SqlParser\\Lexer", - "PARSER_METHODS": [ + "parserMethods": [ "parseDelimiter", "parseWhitespace", "parseNumber", @@ -367,7 +367,7 @@ "count": 38, "idx": 38 }, - "DEFAULT_DELIMITER": ";", + "defaultDelimiter": ";", "delimiter": ";", "delimiterLen": 1, "strict": false, @@ -375,7 +375,7 @@ }, "parser": { "@type": "PhpMyAdmin\\SqlParser\\Parser", - "STATEMENT_PARSERS": { + "statementParsers": { "DESCRIBE": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", "DESC": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", "EXPLAIN": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", @@ -420,7 +420,7 @@ "LOCK": "PhpMyAdmin\\SqlParser\\Statements\\LockStatement", "UNLOCK": "PhpMyAdmin\\SqlParser\\Statements\\LockStatement" }, - "KEYWORD_PARSERS": { + "keywordParsers": { "PARTITION BY": [], "SUBPARTITION BY": [], "_OPTIONS": { @@ -429,7 +429,7 @@ }, "_END_OPTIONS": { "class": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", - "field": "end_options" + "field": "endOptions" }, "INTERSECT": { "class": "PhpMyAdmin\\SqlParser\\Components\\UnionKeyword", @@ -677,7 +677,7 @@ "statements": [ { "@type": "PhpMyAdmin\\SqlParser\\Statements\\CreateStatement", - "OPTIONS": { + "statementOptions": { "TEMPORARY": 1, "OR REPLACE": 2, "ALGORITHM": [ @@ -709,7 +709,7 @@ "SCHEMA": 6, "IF NOT EXISTS": 7 }, - "DB_OPTIONS": { + "databaseOptions": { "CHARACTER SET": [ 1, "var=" @@ -735,7 +735,7 @@ "var=" ] }, - "TABLE_OPTIONS": { + "tableOptions": { "ENGINE": [ 1, "var=" @@ -837,7 +837,7 @@ "var" ] }, - "FUNC_OPTIONS": { + "functionOptions": { "NOT": [ 2, "var" @@ -882,7 +882,7 @@ "DETERMINISTIC": 2, "DATA": 5 }, - "TRIGGER_OPTIONS": { + "triggerOptions": { "BEFORE": 1, "AFTER": 1, "INSERT": 2, @@ -891,7 +891,7 @@ }, "name": { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -920,7 +920,7 @@ "fields": [ { "@type": "PhpMyAdmin\\SqlParser\\Components\\CreateDefinition", - "FIELD_OPTIONS": { + "fieldOptions": { "_UNSORTED": true, "NOT NULL": 1, "NULL": 1, @@ -982,7 +982,7 @@ "isConstraint": null, "type": { "@type": "PhpMyAdmin\\SqlParser\\Components\\DataType", - "DATA_TYPE_OPTIONS": { + "dataTypeOptions": { "BINARY": 1, "CHARACTER SET": [ 2, @@ -1018,7 +1018,7 @@ "equals": false, "expr": { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -1059,8 +1059,8 @@ "return": null, "parameters": null, "body": [], - "CLAUSES": [], - "END_OPTIONS": [], + "clauses": [], + "statementEndOptions": [], "options": { "@type": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", "options": { diff --git a/tests/data/parser/parseCreateTableErr1.out b/tests/data/parser/parseCreateTableErr1.out index 6e6447210..41a8e83e4 100644 --- a/tests/data/parser/parseCreateTableErr1.out +++ b/tests/data/parser/parseCreateTableErr1.out @@ -2,7 +2,7 @@ "query": "CREATE TABLE IF NOT EXISTS users (\n `id` UNKNOWN\n) ENGINE=InnoDB;", "lexer": { "@type": "PhpMyAdmin\\SqlParser\\Lexer", - "PARSER_METHODS": [ + "parserMethods": [ "parseDelimiter", "parseWhitespace", "parseNumber", @@ -214,7 +214,7 @@ "count": 21, "idx": 21 }, - "DEFAULT_DELIMITER": ";", + "defaultDelimiter": ";", "delimiter": ";", "delimiterLen": 1, "strict": false, @@ -222,7 +222,7 @@ }, "parser": { "@type": "PhpMyAdmin\\SqlParser\\Parser", - "STATEMENT_PARSERS": { + "statementParsers": { "DESCRIBE": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", "DESC": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", "EXPLAIN": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", @@ -267,7 +267,7 @@ "LOCK": "PhpMyAdmin\\SqlParser\\Statements\\LockStatement", "UNLOCK": "PhpMyAdmin\\SqlParser\\Statements\\LockStatement" }, - "KEYWORD_PARSERS": { + "keywordParsers": { "PARTITION BY": [], "SUBPARTITION BY": [], "_OPTIONS": { @@ -276,7 +276,7 @@ }, "_END_OPTIONS": { "class": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", - "field": "end_options" + "field": "endOptions" }, "INTERSECT": { "class": "PhpMyAdmin\\SqlParser\\Components\\UnionKeyword", @@ -524,7 +524,7 @@ "statements": [ { "@type": "PhpMyAdmin\\SqlParser\\Statements\\CreateStatement", - "OPTIONS": { + "statementOptions": { "TEMPORARY": 1, "OR REPLACE": 2, "ALGORITHM": [ @@ -556,7 +556,7 @@ "SCHEMA": 6, "IF NOT EXISTS": 7 }, - "DB_OPTIONS": { + "databaseOptions": { "CHARACTER SET": [ 1, "var=" @@ -582,7 +582,7 @@ "var=" ] }, - "TABLE_OPTIONS": { + "tableOptions": { "ENGINE": [ 1, "var=" @@ -684,7 +684,7 @@ "var" ] }, - "FUNC_OPTIONS": { + "functionOptions": { "NOT": [ 2, "var" @@ -729,7 +729,7 @@ "DETERMINISTIC": 2, "DATA": 5 }, - "TRIGGER_OPTIONS": { + "triggerOptions": { "BEFORE": 1, "AFTER": 1, "INSERT": 2, @@ -738,7 +738,7 @@ }, "name": { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -774,7 +774,7 @@ "fields": [ { "@type": "PhpMyAdmin\\SqlParser\\Components\\CreateDefinition", - "FIELD_OPTIONS": { + "fieldOptions": { "_UNSORTED": true, "NOT NULL": 1, "NULL": 1, @@ -836,7 +836,7 @@ "isConstraint": null, "type": { "@type": "PhpMyAdmin\\SqlParser\\Components\\DataType", - "DATA_TYPE_OPTIONS": { + "dataTypeOptions": { "BINARY": 1, "CHARACTER SET": [ 2, @@ -880,8 +880,8 @@ "return": null, "parameters": null, "body": [], - "CLAUSES": [], - "END_OPTIONS": [], + "clauses": [], + "statementEndOptions": [], "options": { "@type": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", "options": { diff --git a/tests/data/parser/parseCreateTableErr2.out b/tests/data/parser/parseCreateTableErr2.out index 0fafe7e13..f474db5d6 100644 --- a/tests/data/parser/parseCreateTableErr2.out +++ b/tests/data/parser/parseCreateTableErr2.out @@ -2,7 +2,7 @@ "query": "CREATE TABLE", "lexer": { "@type": "PhpMyAdmin\\SqlParser\\Lexer", - "PARSER_METHODS": [ + "parserMethods": [ "parseDelimiter", "parseWhitespace", "parseNumber", @@ -61,7 +61,7 @@ "count": 4, "idx": 4 }, - "DEFAULT_DELIMITER": ";", + "defaultDelimiter": ";", "delimiter": ";", "delimiterLen": 1, "strict": false, @@ -69,7 +69,7 @@ }, "parser": { "@type": "PhpMyAdmin\\SqlParser\\Parser", - "STATEMENT_PARSERS": { + "statementParsers": { "DESCRIBE": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", "DESC": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", "EXPLAIN": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", @@ -114,7 +114,7 @@ "LOCK": "PhpMyAdmin\\SqlParser\\Statements\\LockStatement", "UNLOCK": "PhpMyAdmin\\SqlParser\\Statements\\LockStatement" }, - "KEYWORD_PARSERS": { + "keywordParsers": { "PARTITION BY": [], "SUBPARTITION BY": [], "_OPTIONS": { @@ -123,7 +123,7 @@ }, "_END_OPTIONS": { "class": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", - "field": "end_options" + "field": "endOptions" }, "INTERSECT": { "class": "PhpMyAdmin\\SqlParser\\Components\\UnionKeyword", @@ -371,7 +371,7 @@ "statements": [ { "@type": "PhpMyAdmin\\SqlParser\\Statements\\CreateStatement", - "OPTIONS": { + "statementOptions": { "TEMPORARY": 1, "OR REPLACE": 2, "ALGORITHM": [ @@ -403,7 +403,7 @@ "SCHEMA": 6, "IF NOT EXISTS": 7 }, - "DB_OPTIONS": { + "databaseOptions": { "CHARACTER SET": [ 1, "var=" @@ -429,7 +429,7 @@ "var=" ] }, - "TABLE_OPTIONS": { + "tableOptions": { "ENGINE": [ 1, "var=" @@ -531,7 +531,7 @@ "var" ] }, - "FUNC_OPTIONS": { + "functionOptions": { "NOT": [ 2, "var" @@ -576,7 +576,7 @@ "DETERMINISTIC": 2, "DATA": 5 }, - "TRIGGER_OPTIONS": { + "triggerOptions": { "BEFORE": 1, "AFTER": 1, "INSERT": 2, @@ -601,8 +601,8 @@ "return": null, "parameters": null, "body": [], - "CLAUSES": [], - "END_OPTIONS": [], + "clauses": [], + "statementEndOptions": [], "options": { "@type": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", "options": { diff --git a/tests/data/parser/parseCreateTableErr3.out b/tests/data/parser/parseCreateTableErr3.out index 05831504d..0596b0009 100644 --- a/tests/data/parser/parseCreateTableErr3.out +++ b/tests/data/parser/parseCreateTableErr3.out @@ -2,7 +2,7 @@ "query": "CREATE TABLE `table_copy` LIKE ;", "lexer": { "@type": "PhpMyAdmin\\SqlParser\\Lexer", - "PARSER_METHODS": [ + "parserMethods": [ "parseDelimiter", "parseWhitespace", "parseNumber", @@ -115,7 +115,7 @@ "count": 10, "idx": 10 }, - "DEFAULT_DELIMITER": ";", + "defaultDelimiter": ";", "delimiter": ";", "delimiterLen": 1, "strict": false, @@ -123,7 +123,7 @@ }, "parser": { "@type": "PhpMyAdmin\\SqlParser\\Parser", - "STATEMENT_PARSERS": { + "statementParsers": { "DESCRIBE": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", "DESC": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", "EXPLAIN": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", @@ -168,7 +168,7 @@ "LOCK": "PhpMyAdmin\\SqlParser\\Statements\\LockStatement", "UNLOCK": "PhpMyAdmin\\SqlParser\\Statements\\LockStatement" }, - "KEYWORD_PARSERS": { + "keywordParsers": { "PARTITION BY": [], "SUBPARTITION BY": [], "_OPTIONS": { @@ -177,7 +177,7 @@ }, "_END_OPTIONS": { "class": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", - "field": "end_options" + "field": "endOptions" }, "INTERSECT": { "class": "PhpMyAdmin\\SqlParser\\Components\\UnionKeyword", @@ -425,7 +425,7 @@ "statements": [ { "@type": "PhpMyAdmin\\SqlParser\\Statements\\CreateStatement", - "OPTIONS": { + "statementOptions": { "TEMPORARY": 1, "OR REPLACE": 2, "ALGORITHM": [ @@ -457,7 +457,7 @@ "SCHEMA": 6, "IF NOT EXISTS": 7 }, - "DB_OPTIONS": { + "databaseOptions": { "CHARACTER SET": [ 1, "var=" @@ -483,7 +483,7 @@ "var=" ] }, - "TABLE_OPTIONS": { + "tableOptions": { "ENGINE": [ 1, "var=" @@ -585,7 +585,7 @@ "var" ] }, - "FUNC_OPTIONS": { + "functionOptions": { "NOT": [ 2, "var" @@ -630,7 +630,7 @@ "DETERMINISTIC": 2, "DATA": 5 }, - "TRIGGER_OPTIONS": { + "triggerOptions": { "BEFORE": 1, "AFTER": 1, "INSERT": 2, @@ -639,7 +639,7 @@ }, "name": { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -675,8 +675,8 @@ "return": null, "parameters": null, "body": [], - "CLAUSES": [], - "END_OPTIONS": [], + "clauses": [], + "statementEndOptions": [], "options": { "@type": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", "options": { diff --git a/tests/data/parser/parseCreateTableErr4.out b/tests/data/parser/parseCreateTableErr4.out index 1a98323e6..ccf51b0e4 100644 --- a/tests/data/parser/parseCreateTableErr4.out +++ b/tests/data/parser/parseCreateTableErr4.out @@ -2,7 +2,7 @@ "query": "CREATE TABLE new_table (INT VARCHAR(50) DEFAULT NULL);", "lexer": { "@type": "PhpMyAdmin\\SqlParser\\Lexer", - "PARSER_METHODS": [ + "parserMethods": [ "parseDelimiter", "parseWhitespace", "parseNumber", @@ -205,7 +205,7 @@ "count": 20, "idx": 20 }, - "DEFAULT_DELIMITER": ";", + "defaultDelimiter": ";", "delimiter": ";", "delimiterLen": 1, "strict": false, @@ -213,7 +213,7 @@ }, "parser": { "@type": "PhpMyAdmin\\SqlParser\\Parser", - "STATEMENT_PARSERS": { + "statementParsers": { "DESCRIBE": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", "DESC": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", "EXPLAIN": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", @@ -258,7 +258,7 @@ "LOCK": "PhpMyAdmin\\SqlParser\\Statements\\LockStatement", "UNLOCK": "PhpMyAdmin\\SqlParser\\Statements\\LockStatement" }, - "KEYWORD_PARSERS": { + "keywordParsers": { "PARTITION BY": [], "SUBPARTITION BY": [], "_OPTIONS": { @@ -267,7 +267,7 @@ }, "_END_OPTIONS": { "class": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", - "field": "end_options" + "field": "endOptions" }, "INTERSECT": { "class": "PhpMyAdmin\\SqlParser\\Components\\UnionKeyword", @@ -515,7 +515,7 @@ "statements": [ { "@type": "PhpMyAdmin\\SqlParser\\Statements\\CreateStatement", - "OPTIONS": { + "statementOptions": { "TEMPORARY": 1, "OR REPLACE": 2, "ALGORITHM": [ @@ -547,7 +547,7 @@ "SCHEMA": 6, "IF NOT EXISTS": 7 }, - "DB_OPTIONS": { + "databaseOptions": { "CHARACTER SET": [ 1, "var=" @@ -573,7 +573,7 @@ "var=" ] }, - "TABLE_OPTIONS": { + "tableOptions": { "ENGINE": [ 1, "var=" @@ -675,7 +675,7 @@ "var" ] }, - "FUNC_OPTIONS": { + "functionOptions": { "NOT": [ 2, "var" @@ -720,7 +720,7 @@ "DETERMINISTIC": 2, "DATA": 5 }, - "TRIGGER_OPTIONS": { + "triggerOptions": { "BEFORE": 1, "AFTER": 1, "INSERT": 2, @@ -729,7 +729,7 @@ }, "name": { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -768,8 +768,8 @@ "return": null, "parameters": null, "body": [], - "CLAUSES": [], - "END_OPTIONS": [], + "clauses": [], + "statementEndOptions": [], "options": { "@type": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", "options": { diff --git a/tests/data/parser/parseCreateTableErr5.out b/tests/data/parser/parseCreateTableErr5.out index 2f9af3c47..0c7fd90ce 100644 --- a/tests/data/parser/parseCreateTableErr5.out +++ b/tests/data/parser/parseCreateTableErr5.out @@ -2,7 +2,7 @@ "query": "CREATE TABLE new_table (666 VARCHAR(50) DEFAULT NULL);\n", "lexer": { "@type": "PhpMyAdmin\\SqlParser\\Lexer", - "PARSER_METHODS": [ + "parserMethods": [ "parseDelimiter", "parseWhitespace", "parseNumber", @@ -214,7 +214,7 @@ "count": 21, "idx": 21 }, - "DEFAULT_DELIMITER": ";", + "defaultDelimiter": ";", "delimiter": ";", "delimiterLen": 1, "strict": false, @@ -222,7 +222,7 @@ }, "parser": { "@type": "PhpMyAdmin\\SqlParser\\Parser", - "STATEMENT_PARSERS": { + "statementParsers": { "DESCRIBE": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", "DESC": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", "EXPLAIN": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", @@ -267,7 +267,7 @@ "LOCK": "PhpMyAdmin\\SqlParser\\Statements\\LockStatement", "UNLOCK": "PhpMyAdmin\\SqlParser\\Statements\\LockStatement" }, - "KEYWORD_PARSERS": { + "keywordParsers": { "PARTITION BY": [], "SUBPARTITION BY": [], "_OPTIONS": { @@ -276,7 +276,7 @@ }, "_END_OPTIONS": { "class": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", - "field": "end_options" + "field": "endOptions" }, "INTERSECT": { "class": "PhpMyAdmin\\SqlParser\\Components\\UnionKeyword", @@ -524,7 +524,7 @@ "statements": [ { "@type": "PhpMyAdmin\\SqlParser\\Statements\\CreateStatement", - "OPTIONS": { + "statementOptions": { "TEMPORARY": 1, "OR REPLACE": 2, "ALGORITHM": [ @@ -556,7 +556,7 @@ "SCHEMA": 6, "IF NOT EXISTS": 7 }, - "DB_OPTIONS": { + "databaseOptions": { "CHARACTER SET": [ 1, "var=" @@ -582,7 +582,7 @@ "var=" ] }, - "TABLE_OPTIONS": { + "tableOptions": { "ENGINE": [ 1, "var=" @@ -684,7 +684,7 @@ "var" ] }, - "FUNC_OPTIONS": { + "functionOptions": { "NOT": [ 2, "var" @@ -729,7 +729,7 @@ "DETERMINISTIC": 2, "DATA": 5 }, - "TRIGGER_OPTIONS": { + "triggerOptions": { "BEFORE": 1, "AFTER": 1, "INSERT": 2, @@ -738,7 +738,7 @@ }, "name": { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -777,8 +777,8 @@ "return": null, "parameters": null, "body": [], - "CLAUSES": [], - "END_OPTIONS": [], + "clauses": [], + "statementEndOptions": [], "options": { "@type": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", "options": { diff --git a/tests/data/parser/parseCreateTableLike.out b/tests/data/parser/parseCreateTableLike.out index 40395e6af..7e652114f 100644 --- a/tests/data/parser/parseCreateTableLike.out +++ b/tests/data/parser/parseCreateTableLike.out @@ -2,7 +2,7 @@ "query": "CREATE TABLE `table_copy` LIKE `old_table`;", "lexer": { "@type": "PhpMyAdmin\\SqlParser\\Lexer", - "PARSER_METHODS": [ + "parserMethods": [ "parseDelimiter", "parseWhitespace", "parseNumber", @@ -124,7 +124,7 @@ "count": 11, "idx": 11 }, - "DEFAULT_DELIMITER": ";", + "defaultDelimiter": ";", "delimiter": ";", "delimiterLen": 1, "strict": false, @@ -132,7 +132,7 @@ }, "parser": { "@type": "PhpMyAdmin\\SqlParser\\Parser", - "STATEMENT_PARSERS": { + "statementParsers": { "DESCRIBE": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", "DESC": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", "EXPLAIN": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", @@ -177,7 +177,7 @@ "LOCK": "PhpMyAdmin\\SqlParser\\Statements\\LockStatement", "UNLOCK": "PhpMyAdmin\\SqlParser\\Statements\\LockStatement" }, - "KEYWORD_PARSERS": { + "keywordParsers": { "PARTITION BY": [], "SUBPARTITION BY": [], "_OPTIONS": { @@ -186,7 +186,7 @@ }, "_END_OPTIONS": { "class": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", - "field": "end_options" + "field": "endOptions" }, "INTERSECT": { "class": "PhpMyAdmin\\SqlParser\\Components\\UnionKeyword", @@ -434,7 +434,7 @@ "statements": [ { "@type": "PhpMyAdmin\\SqlParser\\Statements\\CreateStatement", - "OPTIONS": { + "statementOptions": { "TEMPORARY": 1, "OR REPLACE": 2, "ALGORITHM": [ @@ -466,7 +466,7 @@ "SCHEMA": 6, "IF NOT EXISTS": 7 }, - "DB_OPTIONS": { + "databaseOptions": { "CHARACTER SET": [ 1, "var=" @@ -492,7 +492,7 @@ "var=" ] }, - "TABLE_OPTIONS": { + "tableOptions": { "ENGINE": [ 1, "var=" @@ -594,7 +594,7 @@ "var" ] }, - "FUNC_OPTIONS": { + "functionOptions": { "NOT": [ 2, "var" @@ -639,7 +639,7 @@ "DETERMINISTIC": 2, "DATA": 5 }, - "TRIGGER_OPTIONS": { + "triggerOptions": { "BEFORE": 1, "AFTER": 1, "INSERT": 2, @@ -648,7 +648,7 @@ }, "name": { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -676,7 +676,7 @@ "select": null, "like": { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -707,8 +707,8 @@ "return": null, "parameters": null, "body": [], - "CLAUSES": [], - "END_OPTIONS": [], + "clauses": [], + "statementEndOptions": [], "options": { "@type": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", "options": { diff --git a/tests/data/parser/parseCreateTableNotEnforcedCheck.out b/tests/data/parser/parseCreateTableNotEnforcedCheck.out index 18e34b515..cb39caa50 100644 --- a/tests/data/parser/parseCreateTableNotEnforcedCheck.out +++ b/tests/data/parser/parseCreateTableNotEnforcedCheck.out @@ -2,7 +2,7 @@ "query": "CREATE TABLE IF NOT EXISTS employees_check (FirstName varchar(30) CHECK (FirstName REGEXP '^T' AND FirstName REGEXP 'r$') NOT ENFORCED);", "lexer": { "@type": "PhpMyAdmin\\SqlParser\\Lexer", - "PARSER_METHODS": [ + "parserMethods": [ "parseDelimiter", "parseWhitespace", "parseNumber", @@ -385,7 +385,7 @@ "count": 40, "idx": 40 }, - "DEFAULT_DELIMITER": ";", + "defaultDelimiter": ";", "delimiter": ";", "delimiterLen": 1, "strict": false, @@ -393,7 +393,7 @@ }, "parser": { "@type": "PhpMyAdmin\\SqlParser\\Parser", - "STATEMENT_PARSERS": { + "statementParsers": { "DESCRIBE": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", "DESC": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", "EXPLAIN": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", @@ -438,7 +438,7 @@ "LOCK": "PhpMyAdmin\\SqlParser\\Statements\\LockStatement", "UNLOCK": "PhpMyAdmin\\SqlParser\\Statements\\LockStatement" }, - "KEYWORD_PARSERS": { + "keywordParsers": { "PARTITION BY": [], "SUBPARTITION BY": [], "_OPTIONS": { @@ -447,7 +447,7 @@ }, "_END_OPTIONS": { "class": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", - "field": "end_options" + "field": "endOptions" }, "INTERSECT": { "class": "PhpMyAdmin\\SqlParser\\Components\\UnionKeyword", @@ -695,7 +695,7 @@ "statements": [ { "@type": "PhpMyAdmin\\SqlParser\\Statements\\CreateStatement", - "OPTIONS": { + "statementOptions": { "TEMPORARY": 1, "OR REPLACE": 2, "ALGORITHM": [ @@ -727,7 +727,7 @@ "SCHEMA": 6, "IF NOT EXISTS": 7 }, - "DB_OPTIONS": { + "databaseOptions": { "CHARACTER SET": [ 1, "var=" @@ -753,7 +753,7 @@ "var=" ] }, - "TABLE_OPTIONS": { + "tableOptions": { "ENGINE": [ 1, "var=" @@ -855,7 +855,7 @@ "var" ] }, - "FUNC_OPTIONS": { + "functionOptions": { "NOT": [ 2, "var" @@ -900,7 +900,7 @@ "DETERMINISTIC": 2, "DATA": 5 }, - "TRIGGER_OPTIONS": { + "triggerOptions": { "BEFORE": 1, "AFTER": 1, "INSERT": 2, @@ -909,7 +909,7 @@ }, "name": { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -938,7 +938,7 @@ "fields": [ { "@type": "PhpMyAdmin\\SqlParser\\Components\\CreateDefinition", - "FIELD_OPTIONS": { + "fieldOptions": { "_UNSORTED": true, "NOT NULL": 1, "NULL": 1, @@ -1000,7 +1000,7 @@ "isConstraint": null, "type": { "@type": "PhpMyAdmin\\SqlParser\\Components\\DataType", - "DATA_TYPE_OPTIONS": { + "dataTypeOptions": { "BINARY": 1, "CHARACTER SET": [ 2, @@ -1036,7 +1036,7 @@ "equals": false, "expr": { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -1078,8 +1078,8 @@ "return": null, "parameters": null, "body": [], - "CLAUSES": [], - "END_OPTIONS": [], + "clauses": [], + "statementEndOptions": [], "options": { "@type": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", "options": { diff --git a/tests/data/parser/parseCreateTableSelect.out b/tests/data/parser/parseCreateTableSelect.out index 53c72a862..c03a6f90d 100644 --- a/tests/data/parser/parseCreateTableSelect.out +++ b/tests/data/parser/parseCreateTableSelect.out @@ -2,7 +2,7 @@ "query": "CREATE TABLE new_tbl SELECT * FROM orig_tbl\n", "lexer": { "@type": "PhpMyAdmin\\SqlParser\\Lexer", - "PARSER_METHODS": [ + "parserMethods": [ "parseDelimiter", "parseWhitespace", "parseNumber", @@ -160,7 +160,7 @@ "count": 15, "idx": 15 }, - "DEFAULT_DELIMITER": ";", + "defaultDelimiter": ";", "delimiter": ";", "delimiterLen": 1, "strict": false, @@ -168,7 +168,7 @@ }, "parser": { "@type": "PhpMyAdmin\\SqlParser\\Parser", - "STATEMENT_PARSERS": { + "statementParsers": { "DESCRIBE": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", "DESC": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", "EXPLAIN": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", @@ -213,7 +213,7 @@ "LOCK": "PhpMyAdmin\\SqlParser\\Statements\\LockStatement", "UNLOCK": "PhpMyAdmin\\SqlParser\\Statements\\LockStatement" }, - "KEYWORD_PARSERS": { + "keywordParsers": { "PARTITION BY": [], "SUBPARTITION BY": [], "_OPTIONS": { @@ -222,7 +222,7 @@ }, "_END_OPTIONS": { "class": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", - "field": "end_options" + "field": "endOptions" }, "INTERSECT": { "class": "PhpMyAdmin\\SqlParser\\Components\\UnionKeyword", @@ -470,7 +470,7 @@ "statements": [ { "@type": "PhpMyAdmin\\SqlParser\\Statements\\CreateStatement", - "OPTIONS": { + "statementOptions": { "TEMPORARY": 1, "OR REPLACE": 2, "ALGORITHM": [ @@ -502,7 +502,7 @@ "SCHEMA": 6, "IF NOT EXISTS": 7 }, - "DB_OPTIONS": { + "databaseOptions": { "CHARACTER SET": [ 1, "var=" @@ -528,7 +528,7 @@ "var=" ] }, - "TABLE_OPTIONS": { + "tableOptions": { "ENGINE": [ 1, "var=" @@ -630,7 +630,7 @@ "var" ] }, - "FUNC_OPTIONS": { + "functionOptions": { "NOT": [ 2, "var" @@ -675,7 +675,7 @@ "DETERMINISTIC": 2, "DATA": 5 }, - "TRIGGER_OPTIONS": { + "triggerOptions": { "BEFORE": 1, "AFTER": 1, "INSERT": 2, @@ -684,7 +684,7 @@ }, "name": { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -711,7 +711,7 @@ "with": null, "select": { "@type": "PhpMyAdmin\\SqlParser\\Statements\\SelectStatement", - "OPTIONS": { + "statementOptions": { "ALL": 1, "DISTINCT": 1, "DISTINCTROW": 1, @@ -728,11 +728,11 @@ "SQL_NO_CACHE": 8, "SQL_CALC_FOUND_ROWS": 9 }, - "END_OPTIONS": { + "statementEndOptions": { "FOR UPDATE": 1, "LOCK IN SHARE MODE": 1 }, - "CLAUSES": { + "clauses": { "SELECT": [ "SELECT", 2 @@ -861,7 +861,7 @@ "expr": [ { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -887,7 +887,7 @@ "from": [ { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -910,7 +910,7 @@ "subquery": null } ], - "index_hints": null, + "indexHints": null, "partition": null, "where": null, "group": null, @@ -921,7 +921,7 @@ "into": null, "join": null, "union": [], - "end_options": null, + "endOptions": null, "options": { "@type": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", "options": [] @@ -939,8 +939,8 @@ "return": null, "parameters": null, "body": [], - "CLAUSES": [], - "END_OPTIONS": [], + "clauses": [], + "statementEndOptions": [], "options": { "@type": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", "options": { diff --git a/tests/data/parser/parseCreateTableSpatial.out b/tests/data/parser/parseCreateTableSpatial.out index 5555ef39a..ed98b6df5 100644 --- a/tests/data/parser/parseCreateTableSpatial.out +++ b/tests/data/parser/parseCreateTableSpatial.out @@ -2,7 +2,7 @@ "query": "CREATE TABLE `xss`.`gis` ( `x` POINT NOT NULL ) ENGINE = InnoDB;", "lexer": { "@type": "PhpMyAdmin\\SqlParser\\Lexer", - "PARSER_METHODS": [ + "parserMethods": [ "parseDelimiter", "parseWhitespace", "parseNumber", @@ -250,7 +250,7 @@ "count": 25, "idx": 25 }, - "DEFAULT_DELIMITER": ";", + "defaultDelimiter": ";", "delimiter": ";", "delimiterLen": 1, "strict": false, @@ -258,7 +258,7 @@ }, "parser": { "@type": "PhpMyAdmin\\SqlParser\\Parser", - "STATEMENT_PARSERS": { + "statementParsers": { "DESCRIBE": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", "DESC": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", "EXPLAIN": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", @@ -303,7 +303,7 @@ "LOCK": "PhpMyAdmin\\SqlParser\\Statements\\LockStatement", "UNLOCK": "PhpMyAdmin\\SqlParser\\Statements\\LockStatement" }, - "KEYWORD_PARSERS": { + "keywordParsers": { "PARTITION BY": [], "SUBPARTITION BY": [], "_OPTIONS": { @@ -312,7 +312,7 @@ }, "_END_OPTIONS": { "class": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", - "field": "end_options" + "field": "endOptions" }, "INTERSECT": { "class": "PhpMyAdmin\\SqlParser\\Components\\UnionKeyword", @@ -560,7 +560,7 @@ "statements": [ { "@type": "PhpMyAdmin\\SqlParser\\Statements\\CreateStatement", - "OPTIONS": { + "statementOptions": { "TEMPORARY": 1, "OR REPLACE": 2, "ALGORITHM": [ @@ -592,7 +592,7 @@ "SCHEMA": 6, "IF NOT EXISTS": 7 }, - "DB_OPTIONS": { + "databaseOptions": { "CHARACTER SET": [ 1, "var=" @@ -618,7 +618,7 @@ "var=" ] }, - "TABLE_OPTIONS": { + "tableOptions": { "ENGINE": [ 1, "var=" @@ -720,7 +720,7 @@ "var" ] }, - "FUNC_OPTIONS": { + "functionOptions": { "NOT": [ 2, "var" @@ -765,7 +765,7 @@ "DETERMINISTIC": 2, "DATA": 5 }, - "TRIGGER_OPTIONS": { + "triggerOptions": { "BEFORE": 1, "AFTER": 1, "INSERT": 2, @@ -774,7 +774,7 @@ }, "name": { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -810,7 +810,7 @@ "fields": [ { "@type": "PhpMyAdmin\\SqlParser\\Components\\CreateDefinition", - "FIELD_OPTIONS": { + "fieldOptions": { "_UNSORTED": true, "NOT NULL": 1, "NULL": 1, @@ -872,7 +872,7 @@ "isConstraint": null, "type": { "@type": "PhpMyAdmin\\SqlParser\\Components\\DataType", - "DATA_TYPE_OPTIONS": { + "dataTypeOptions": { "BINARY": 1, "CHARACTER SET": [ 2, @@ -918,8 +918,8 @@ "return": null, "parameters": null, "body": [], - "CLAUSES": [], - "END_OPTIONS": [], + "clauses": [], + "statementEndOptions": [], "options": { "@type": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", "options": { diff --git a/tests/data/parser/parseCreateTableTimestampWithPrecision.out b/tests/data/parser/parseCreateTableTimestampWithPrecision.out index 6709c717e..954fc015a 100644 --- a/tests/data/parser/parseCreateTableTimestampWithPrecision.out +++ b/tests/data/parser/parseCreateTableTimestampWithPrecision.out @@ -2,7 +2,7 @@ "query": "CREATE TABLE `aa` (\n `id` int(11) NOT NULL,\n `rTime` timestamp(3) NOT NULL DEFAULT '0000-00-00 00:00:00.000' ON UPDATE CURRENT_TIMESTAMP(3),\n PRIMARY KEY (`id`)\n) ENGINE=InnoDB DEFAULT CHARSET=latin1;", "lexer": { "@type": "PhpMyAdmin\\SqlParser\\Lexer", - "PARSER_METHODS": [ + "parserMethods": [ "parseDelimiter", "parseWhitespace", "parseNumber", @@ -529,7 +529,7 @@ "count": 56, "idx": 56 }, - "DEFAULT_DELIMITER": ";", + "defaultDelimiter": ";", "delimiter": ";", "delimiterLen": 1, "strict": false, @@ -537,7 +537,7 @@ }, "parser": { "@type": "PhpMyAdmin\\SqlParser\\Parser", - "STATEMENT_PARSERS": { + "statementParsers": { "DESCRIBE": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", "DESC": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", "EXPLAIN": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", @@ -582,7 +582,7 @@ "LOCK": "PhpMyAdmin\\SqlParser\\Statements\\LockStatement", "UNLOCK": "PhpMyAdmin\\SqlParser\\Statements\\LockStatement" }, - "KEYWORD_PARSERS": { + "keywordParsers": { "PARTITION BY": [], "SUBPARTITION BY": [], "_OPTIONS": { @@ -591,7 +591,7 @@ }, "_END_OPTIONS": { "class": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", - "field": "end_options" + "field": "endOptions" }, "INTERSECT": { "class": "PhpMyAdmin\\SqlParser\\Components\\UnionKeyword", @@ -839,7 +839,7 @@ "statements": [ { "@type": "PhpMyAdmin\\SqlParser\\Statements\\CreateStatement", - "OPTIONS": { + "statementOptions": { "TEMPORARY": 1, "OR REPLACE": 2, "ALGORITHM": [ @@ -871,7 +871,7 @@ "SCHEMA": 6, "IF NOT EXISTS": 7 }, - "DB_OPTIONS": { + "databaseOptions": { "CHARACTER SET": [ 1, "var=" @@ -897,7 +897,7 @@ "var=" ] }, - "TABLE_OPTIONS": { + "tableOptions": { "ENGINE": [ 1, "var=" @@ -999,7 +999,7 @@ "var" ] }, - "FUNC_OPTIONS": { + "functionOptions": { "NOT": [ 2, "var" @@ -1044,7 +1044,7 @@ "DETERMINISTIC": 2, "DATA": 5 }, - "TRIGGER_OPTIONS": { + "triggerOptions": { "BEFORE": 1, "AFTER": 1, "INSERT": 2, @@ -1053,7 +1053,7 @@ }, "name": { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -1095,7 +1095,7 @@ "fields": [ { "@type": "PhpMyAdmin\\SqlParser\\Components\\CreateDefinition", - "FIELD_OPTIONS": { + "fieldOptions": { "_UNSORTED": true, "NOT NULL": 1, "NULL": 1, @@ -1157,7 +1157,7 @@ "isConstraint": null, "type": { "@type": "PhpMyAdmin\\SqlParser\\Components\\DataType", - "DATA_TYPE_OPTIONS": { + "dataTypeOptions": { "BINARY": 1, "CHARACTER SET": [ 2, @@ -1194,7 +1194,7 @@ }, { "@type": "PhpMyAdmin\\SqlParser\\Components\\CreateDefinition", - "FIELD_OPTIONS": { + "fieldOptions": { "_UNSORTED": true, "NOT NULL": 1, "NULL": 1, @@ -1256,7 +1256,7 @@ "isConstraint": null, "type": { "@type": "PhpMyAdmin\\SqlParser\\Components\\DataType", - "DATA_TYPE_OPTIONS": { + "dataTypeOptions": { "BINARY": 1, "CHARACTER SET": [ 2, @@ -1293,7 +1293,7 @@ "equals": false, "expr": { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -1322,7 +1322,7 @@ "equals": false, "expr": { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -1351,7 +1351,7 @@ }, { "@type": "PhpMyAdmin\\SqlParser\\Components\\CreateDefinition", - "FIELD_OPTIONS": { + "fieldOptions": { "_UNSORTED": true, "NOT NULL": 1, "NULL": 1, @@ -1414,7 +1414,7 @@ "type": null, "key": { "@type": "PhpMyAdmin\\SqlParser\\Components\\Key", - "KEY_OPTIONS": { + "keyOptions": { "KEY_BLOCK_SIZE": [ 1, "var=" @@ -1477,8 +1477,8 @@ "return": null, "parameters": null, "body": [], - "CLAUSES": [], - "END_OPTIONS": [], + "clauses": [], + "statementEndOptions": [], "options": { "@type": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", "options": { diff --git a/tests/data/parser/parseCreateTableWithInvisibleKey.out b/tests/data/parser/parseCreateTableWithInvisibleKey.out index aac5f1473..a1dd6c49e 100644 --- a/tests/data/parser/parseCreateTableWithInvisibleKey.out +++ b/tests/data/parser/parseCreateTableWithInvisibleKey.out @@ -2,7 +2,7 @@ "query": "CREATE TABLE `animes_comments` (\n `anime_comment_id` bigint unsigned NOT NULL AUTO_INCREMENT,\n `anime_id` bigint unsigned NOT NULL,\n `user_id` bigint unsigned NOT NULL,\n `comment_text` varchar(500) COLLATE utf8mb4_general_ci DEFAULT NULL,\n `comment_at` datetime DEFAULT NULL,\n PRIMARY KEY (`anime_comment_id`),\n KEY `animes_comments_animes_fk` (`anime_id`) invisible,\n KEY `animes_comments_users_fk` (`user_id`),\n KEY `comment_at_idx` (`comment_at`) ,\n CONSTRAINT `animes_comments_animes_fk` FOREIGN KEY (`anime_id`) REFERENCES `animes` (`anime_id`) ON DELETE CASCADE ON UPDATE RESTRICT,\n CONSTRAINT `animes_comments_users_fk` FOREIGN KEY (`user_id`) REFERENCES `users` (`user_id`) ON DELETE CASCADE ON UPDATE RESTRICT)", "lexer": { "@type": "PhpMyAdmin\\SqlParser\\Lexer", - "PARSER_METHODS": [ + "parserMethods": [ "parseDelimiter", "parseWhitespace", "parseNumber", @@ -1402,7 +1402,7 @@ "count": 153, "idx": 153 }, - "DEFAULT_DELIMITER": ";", + "defaultDelimiter": ";", "delimiter": ";", "delimiterLen": 1, "strict": false, @@ -1410,7 +1410,7 @@ }, "parser": { "@type": "PhpMyAdmin\\SqlParser\\Parser", - "STATEMENT_PARSERS": { + "statementParsers": { "DESCRIBE": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", "DESC": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", "EXPLAIN": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", @@ -1455,7 +1455,7 @@ "LOCK": "PhpMyAdmin\\SqlParser\\Statements\\LockStatement", "UNLOCK": "PhpMyAdmin\\SqlParser\\Statements\\LockStatement" }, - "KEYWORD_PARSERS": { + "keywordParsers": { "PARTITION BY": [], "SUBPARTITION BY": [], "_OPTIONS": { @@ -1464,7 +1464,7 @@ }, "_END_OPTIONS": { "class": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", - "field": "end_options" + "field": "endOptions" }, "INTERSECT": { "class": "PhpMyAdmin\\SqlParser\\Components\\UnionKeyword", @@ -1712,7 +1712,7 @@ "statements": [ { "@type": "PhpMyAdmin\\SqlParser\\Statements\\CreateStatement", - "OPTIONS": { + "statementOptions": { "TEMPORARY": 1, "OR REPLACE": 2, "ALGORITHM": [ @@ -1744,7 +1744,7 @@ "SCHEMA": 6, "IF NOT EXISTS": 7 }, - "DB_OPTIONS": { + "databaseOptions": { "CHARACTER SET": [ 1, "var=" @@ -1770,7 +1770,7 @@ "var=" ] }, - "TABLE_OPTIONS": { + "tableOptions": { "ENGINE": [ 1, "var=" @@ -1872,7 +1872,7 @@ "var" ] }, - "FUNC_OPTIONS": { + "functionOptions": { "NOT": [ 2, "var" @@ -1917,7 +1917,7 @@ "DETERMINISTIC": 2, "DATA": 5 }, - "TRIGGER_OPTIONS": { + "triggerOptions": { "BEFORE": 1, "AFTER": 1, "INSERT": 2, @@ -1926,7 +1926,7 @@ }, "name": { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -1955,7 +1955,7 @@ "fields": [ { "@type": "PhpMyAdmin\\SqlParser\\Components\\CreateDefinition", - "FIELD_OPTIONS": { + "fieldOptions": { "_UNSORTED": true, "NOT NULL": 1, "NULL": 1, @@ -2017,7 +2017,7 @@ "isConstraint": null, "type": { "@type": "PhpMyAdmin\\SqlParser\\Components\\DataType", - "DATA_TYPE_OPTIONS": { + "dataTypeOptions": { "BINARY": 1, "CHARACTER SET": [ 2, @@ -2055,7 +2055,7 @@ }, { "@type": "PhpMyAdmin\\SqlParser\\Components\\CreateDefinition", - "FIELD_OPTIONS": { + "fieldOptions": { "_UNSORTED": true, "NOT NULL": 1, "NULL": 1, @@ -2117,7 +2117,7 @@ "isConstraint": null, "type": { "@type": "PhpMyAdmin\\SqlParser\\Components\\DataType", - "DATA_TYPE_OPTIONS": { + "dataTypeOptions": { "BINARY": 1, "CHARACTER SET": [ 2, @@ -2154,7 +2154,7 @@ }, { "@type": "PhpMyAdmin\\SqlParser\\Components\\CreateDefinition", - "FIELD_OPTIONS": { + "fieldOptions": { "_UNSORTED": true, "NOT NULL": 1, "NULL": 1, @@ -2216,7 +2216,7 @@ "isConstraint": null, "type": { "@type": "PhpMyAdmin\\SqlParser\\Components\\DataType", - "DATA_TYPE_OPTIONS": { + "dataTypeOptions": { "BINARY": 1, "CHARACTER SET": [ 2, @@ -2253,7 +2253,7 @@ }, { "@type": "PhpMyAdmin\\SqlParser\\Components\\CreateDefinition", - "FIELD_OPTIONS": { + "fieldOptions": { "_UNSORTED": true, "NOT NULL": 1, "NULL": 1, @@ -2315,7 +2315,7 @@ "isConstraint": null, "type": { "@type": "PhpMyAdmin\\SqlParser\\Components\\DataType", - "DATA_TYPE_OPTIONS": { + "dataTypeOptions": { "BINARY": 1, "CHARACTER SET": [ 2, @@ -2358,7 +2358,7 @@ "equals": false, "expr": { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -2387,7 +2387,7 @@ }, { "@type": "PhpMyAdmin\\SqlParser\\Components\\CreateDefinition", - "FIELD_OPTIONS": { + "fieldOptions": { "_UNSORTED": true, "NOT NULL": 1, "NULL": 1, @@ -2449,7 +2449,7 @@ "isConstraint": null, "type": { "@type": "PhpMyAdmin\\SqlParser\\Components\\DataType", - "DATA_TYPE_OPTIONS": { + "dataTypeOptions": { "BINARY": 1, "CHARACTER SET": [ 2, @@ -2483,7 +2483,7 @@ "equals": false, "expr": { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -2512,7 +2512,7 @@ }, { "@type": "PhpMyAdmin\\SqlParser\\Components\\CreateDefinition", - "FIELD_OPTIONS": { + "fieldOptions": { "_UNSORTED": true, "NOT NULL": 1, "NULL": 1, @@ -2575,7 +2575,7 @@ "type": null, "key": { "@type": "PhpMyAdmin\\SqlParser\\Components\\Key", - "KEY_OPTIONS": { + "keyOptions": { "KEY_BLOCK_SIZE": [ 1, "var=" @@ -2627,7 +2627,7 @@ }, { "@type": "PhpMyAdmin\\SqlParser\\Components\\CreateDefinition", - "FIELD_OPTIONS": { + "fieldOptions": { "_UNSORTED": true, "NOT NULL": 1, "NULL": 1, @@ -2690,7 +2690,7 @@ "type": null, "key": { "@type": "PhpMyAdmin\\SqlParser\\Components\\Key", - "KEY_OPTIONS": { + "keyOptions": { "KEY_BLOCK_SIZE": [ 1, "var=" @@ -2744,7 +2744,7 @@ }, { "@type": "PhpMyAdmin\\SqlParser\\Components\\CreateDefinition", - "FIELD_OPTIONS": { + "fieldOptions": { "_UNSORTED": true, "NOT NULL": 1, "NULL": 1, @@ -2807,7 +2807,7 @@ "type": null, "key": { "@type": "PhpMyAdmin\\SqlParser\\Components\\Key", - "KEY_OPTIONS": { + "keyOptions": { "KEY_BLOCK_SIZE": [ 1, "var=" @@ -2859,7 +2859,7 @@ }, { "@type": "PhpMyAdmin\\SqlParser\\Components\\CreateDefinition", - "FIELD_OPTIONS": { + "fieldOptions": { "_UNSORTED": true, "NOT NULL": 1, "NULL": 1, @@ -2922,7 +2922,7 @@ "type": null, "key": { "@type": "PhpMyAdmin\\SqlParser\\Components\\Key", - "KEY_OPTIONS": { + "keyOptions": { "KEY_BLOCK_SIZE": [ 1, "var=" @@ -2974,7 +2974,7 @@ }, { "@type": "PhpMyAdmin\\SqlParser\\Components\\CreateDefinition", - "FIELD_OPTIONS": { + "fieldOptions": { "_UNSORTED": true, "NOT NULL": 1, "NULL": 1, @@ -3037,7 +3037,7 @@ "type": null, "key": { "@type": "PhpMyAdmin\\SqlParser\\Components\\Key", - "KEY_OPTIONS": { + "keyOptions": { "KEY_BLOCK_SIZE": [ 1, "var=" @@ -3086,7 +3086,7 @@ }, "references": { "@type": "PhpMyAdmin\\SqlParser\\Components\\Reference", - "REFERENCES_OPTIONS": { + "referencesOptions": { "MATCH": [ 1, "var" @@ -3102,7 +3102,7 @@ }, "table": { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -3149,7 +3149,7 @@ }, { "@type": "PhpMyAdmin\\SqlParser\\Components\\CreateDefinition", - "FIELD_OPTIONS": { + "fieldOptions": { "_UNSORTED": true, "NOT NULL": 1, "NULL": 1, @@ -3212,7 +3212,7 @@ "type": null, "key": { "@type": "PhpMyAdmin\\SqlParser\\Components\\Key", - "KEY_OPTIONS": { + "keyOptions": { "KEY_BLOCK_SIZE": [ 1, "var=" @@ -3261,7 +3261,7 @@ }, "references": { "@type": "PhpMyAdmin\\SqlParser\\Components\\Reference", - "REFERENCES_OPTIONS": { + "referencesOptions": { "MATCH": [ 1, "var" @@ -3277,7 +3277,7 @@ }, "table": { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -3335,8 +3335,8 @@ "return": null, "parameters": null, "body": [], - "CLAUSES": [], - "END_OPTIONS": [], + "clauses": [], + "statementEndOptions": [], "options": { "@type": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", "options": { diff --git a/tests/data/parser/parseCreateTrigger.out b/tests/data/parser/parseCreateTrigger.out index 950f53679..11f7cf0e8 100644 --- a/tests/data/parser/parseCreateTrigger.out +++ b/tests/data/parser/parseCreateTrigger.out @@ -2,7 +2,7 @@ "query": "CREATE TRIGGER ins_sum BEFORE INSERT ON account\nFOR EACH ROW BEGIN SET @sum = @sum + NEW.amount END", "lexer": { "@type": "PhpMyAdmin\\SqlParser\\Lexer", - "PARSER_METHODS": [ + "parserMethods": [ "parseDelimiter", "parseWhitespace", "parseNumber", @@ -331,7 +331,7 @@ "count": 34, "idx": 35 }, - "DEFAULT_DELIMITER": ";", + "defaultDelimiter": ";", "delimiter": ";", "delimiterLen": 1, "strict": false, @@ -339,7 +339,7 @@ }, "parser": { "@type": "PhpMyAdmin\\SqlParser\\Parser", - "STATEMENT_PARSERS": { + "statementParsers": { "DESCRIBE": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", "DESC": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", "EXPLAIN": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", @@ -384,7 +384,7 @@ "LOCK": "PhpMyAdmin\\SqlParser\\Statements\\LockStatement", "UNLOCK": "PhpMyAdmin\\SqlParser\\Statements\\LockStatement" }, - "KEYWORD_PARSERS": { + "keywordParsers": { "PARTITION BY": [], "SUBPARTITION BY": [], "_OPTIONS": { @@ -393,7 +393,7 @@ }, "_END_OPTIONS": { "class": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", - "field": "end_options" + "field": "endOptions" }, "INTERSECT": { "class": "PhpMyAdmin\\SqlParser\\Components\\UnionKeyword", @@ -641,7 +641,7 @@ "statements": [ { "@type": "PhpMyAdmin\\SqlParser\\Statements\\CreateStatement", - "OPTIONS": { + "statementOptions": { "TEMPORARY": 1, "OR REPLACE": 2, "ALGORITHM": [ @@ -673,7 +673,7 @@ "SCHEMA": 6, "IF NOT EXISTS": 7 }, - "DB_OPTIONS": { + "databaseOptions": { "CHARACTER SET": [ 1, "var=" @@ -699,7 +699,7 @@ "var=" ] }, - "TABLE_OPTIONS": { + "tableOptions": { "ENGINE": [ 1, "var=" @@ -801,7 +801,7 @@ "var" ] }, - "FUNC_OPTIONS": { + "functionOptions": { "NOT": [ 2, "var" @@ -846,7 +846,7 @@ "DETERMINISTIC": 2, "DATA": 5 }, - "TRIGGER_OPTIONS": { + "triggerOptions": { "BEFORE": 1, "AFTER": 1, "INSERT": 2, @@ -855,7 +855,7 @@ }, "name": { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -895,7 +895,7 @@ "partitions": null, "table": { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -975,8 +975,8 @@ "@type": "@35" } ], - "CLAUSES": [], - "END_OPTIONS": [], + "clauses": [], + "statementEndOptions": [], "options": { "@type": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", "options": { diff --git a/tests/data/parser/parseCreateUser.out b/tests/data/parser/parseCreateUser.out index 3325b4abf..e175d9a5d 100644 --- a/tests/data/parser/parseCreateUser.out +++ b/tests/data/parser/parseCreateUser.out @@ -2,7 +2,7 @@ "query": "CREATE USER test", "lexer": { "@type": "PhpMyAdmin\\SqlParser\\Lexer", - "PARSER_METHODS": [ + "parserMethods": [ "parseDelimiter", "parseWhitespace", "parseNumber", @@ -79,7 +79,7 @@ "count": 6, "idx": 6 }, - "DEFAULT_DELIMITER": ";", + "defaultDelimiter": ";", "delimiter": ";", "delimiterLen": 1, "strict": false, @@ -87,7 +87,7 @@ }, "parser": { "@type": "PhpMyAdmin\\SqlParser\\Parser", - "STATEMENT_PARSERS": { + "statementParsers": { "DESCRIBE": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", "DESC": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", "EXPLAIN": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", @@ -132,7 +132,7 @@ "LOCK": "PhpMyAdmin\\SqlParser\\Statements\\LockStatement", "UNLOCK": "PhpMyAdmin\\SqlParser\\Statements\\LockStatement" }, - "KEYWORD_PARSERS": { + "keywordParsers": { "PARTITION BY": [], "SUBPARTITION BY": [], "_OPTIONS": { @@ -141,7 +141,7 @@ }, "_END_OPTIONS": { "class": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", - "field": "end_options" + "field": "endOptions" }, "INTERSECT": { "class": "PhpMyAdmin\\SqlParser\\Components\\UnionKeyword", @@ -389,7 +389,7 @@ "statements": [ { "@type": "PhpMyAdmin\\SqlParser\\Statements\\CreateStatement", - "OPTIONS": { + "statementOptions": { "TEMPORARY": 1, "OR REPLACE": 2, "ALGORITHM": [ @@ -421,7 +421,7 @@ "SCHEMA": 6, "IF NOT EXISTS": 7 }, - "DB_OPTIONS": { + "databaseOptions": { "CHARACTER SET": [ 1, "var=" @@ -447,7 +447,7 @@ "var=" ] }, - "TABLE_OPTIONS": { + "tableOptions": { "ENGINE": [ 1, "var=" @@ -549,7 +549,7 @@ "var" ] }, - "FUNC_OPTIONS": { + "functionOptions": { "NOT": [ 2, "var" @@ -594,7 +594,7 @@ "DETERMINISTIC": 2, "DATA": 5 }, - "TRIGGER_OPTIONS": { + "triggerOptions": { "BEFORE": 1, "AFTER": 1, "INSERT": 2, @@ -603,7 +603,7 @@ }, "name": { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -639,8 +639,8 @@ "return": null, "parameters": null, "body": [], - "CLAUSES": [], - "END_OPTIONS": [], + "clauses": [], + "statementEndOptions": [], "options": { "@type": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", "options": { diff --git a/tests/data/parser/parseCreateView.out b/tests/data/parser/parseCreateView.out index 49f04ab38..89bac09e8 100644 --- a/tests/data/parser/parseCreateView.out +++ b/tests/data/parser/parseCreateView.out @@ -2,7 +2,7 @@ "query": "CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY INVOKER VIEW `sakila`.`actor_info` AS select `a`.`actor_id` AS `actor_id`,`a`.`first_name` AS `first_name`,`a`.`last_name` AS `last_name`,group_concat(distinct concat(`c`.`name`,': ',(select group_concat(`f`.`title` order by `f`.`title` ASC separator ', ') from ((`sakila`.`film` `f` join `sakila`.`film_category` `fc` on((`f`.`film_id` = `fc`.`film_id`))) join `sakila`.`film_actor` `fa` on((`f`.`film_id` = `fa`.`film_id`))) where ((`fc`.`category_id` = `c`.`category_id`) and (`fa`.`actor_id` = `a`.`actor_id`)))) order by `c`.`name` ASC separator '; ') AS `film_info` from (((`sakila`.`actor` `a` left join `sakila`.`film_actor` `fa` on((`a`.`actor_id` = `fa`.`actor_id`))) left join `sakila`.`film_category` `fc` on((`fa`.`film_id` = `fc`.`film_id`))) left join `sakila`.`category` `c` on((`fc`.`category_id` = `c`.`category_id`))) group by `a`.`actor_id`,`a`.`first_name`,`a`.`last_name`", "lexer": { "@type": "PhpMyAdmin\\SqlParser\\Lexer", - "PARSER_METHODS": [ + "parserMethods": [ "parseDelimiter", "parseWhitespace", "parseNumber", @@ -2599,7 +2599,7 @@ "count": 286, "idx": 286 }, - "DEFAULT_DELIMITER": ";", + "defaultDelimiter": ";", "delimiter": ";", "delimiterLen": 1, "strict": false, @@ -2607,7 +2607,7 @@ }, "parser": { "@type": "PhpMyAdmin\\SqlParser\\Parser", - "STATEMENT_PARSERS": { + "statementParsers": { "DESCRIBE": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", "DESC": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", "EXPLAIN": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", @@ -2652,7 +2652,7 @@ "LOCK": "PhpMyAdmin\\SqlParser\\Statements\\LockStatement", "UNLOCK": "PhpMyAdmin\\SqlParser\\Statements\\LockStatement" }, - "KEYWORD_PARSERS": { + "keywordParsers": { "PARTITION BY": [], "SUBPARTITION BY": [], "_OPTIONS": { @@ -2661,7 +2661,7 @@ }, "_END_OPTIONS": { "class": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", - "field": "end_options" + "field": "endOptions" }, "INTERSECT": { "class": "PhpMyAdmin\\SqlParser\\Components\\UnionKeyword", @@ -2909,7 +2909,7 @@ "statements": [ { "@type": "PhpMyAdmin\\SqlParser\\Statements\\CreateStatement", - "OPTIONS": { + "statementOptions": { "TEMPORARY": 1, "OR REPLACE": 2, "ALGORITHM": [ @@ -2941,7 +2941,7 @@ "SCHEMA": 6, "IF NOT EXISTS": 7 }, - "DB_OPTIONS": { + "databaseOptions": { "CHARACTER SET": [ 1, "var=" @@ -2967,7 +2967,7 @@ "var=" ] }, - "TABLE_OPTIONS": { + "tableOptions": { "ENGINE": [ 1, "var=" @@ -3069,7 +3069,7 @@ "var" ] }, - "FUNC_OPTIONS": { + "functionOptions": { "NOT": [ 2, "var" @@ -3114,7 +3114,7 @@ "DETERMINISTIC": 2, "DATA": 5 }, - "TRIGGER_OPTIONS": { + "triggerOptions": { "BEFORE": 1, "AFTER": 1, "INSERT": 2, @@ -3123,7 +3123,7 @@ }, "name": { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -3150,7 +3150,7 @@ "with": null, "select": { "@type": "PhpMyAdmin\\SqlParser\\Statements\\SelectStatement", - "OPTIONS": { + "statementOptions": { "ALL": 1, "DISTINCT": 1, "DISTINCTROW": 1, @@ -3167,11 +3167,11 @@ "SQL_NO_CACHE": 8, "SQL_CALC_FOUND_ROWS": 9 }, - "END_OPTIONS": { + "statementEndOptions": { "FOR UPDATE": 1, "LOCK IN SHARE MODE": 1 }, - "CLAUSES": { + "clauses": { "SELECT": [ "SELECT", 2 @@ -3300,7 +3300,7 @@ "expr": [ { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -3324,7 +3324,7 @@ }, { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -3348,7 +3348,7 @@ }, { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -3372,7 +3372,7 @@ }, { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -3398,7 +3398,7 @@ "from": [ { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -3421,7 +3421,7 @@ "subquery": null } ], - "index_hints": null, + "indexHints": null, "partition": null, "where": null, "group": [ @@ -3430,7 +3430,7 @@ "type": null, "expr": { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -3458,7 +3458,7 @@ "type": null, "expr": { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -3486,7 +3486,7 @@ "type": null, "expr": { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -3517,7 +3517,7 @@ "into": null, "join": null, "union": [], - "end_options": null, + "endOptions": null, "options": { "@type": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", "options": [] @@ -3539,8 +3539,8 @@ "@type": "@286" } ], - "CLAUSES": [], - "END_OPTIONS": [], + "clauses": [], + "statementEndOptions": [], "options": { "@type": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", "options": { @@ -3555,7 +3555,7 @@ "equals": true, "expr": { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, diff --git a/tests/data/parser/parseCreateView2.out b/tests/data/parser/parseCreateView2.out index 265d97524..b340ea0d1 100644 --- a/tests/data/parser/parseCreateView2.out +++ b/tests/data/parser/parseCreateView2.out @@ -2,7 +2,7 @@ "query": "CREATE VIEW myView (vid, vfirstname) AS\nSELECT id, first_name FROM employee WHERE id = 1;", "lexer": { "@type": "PhpMyAdmin\\SqlParser\\Lexer", - "PARSER_METHODS": [ + "parserMethods": [ "parseDelimiter", "parseWhitespace", "parseNumber", @@ -340,7 +340,7 @@ "count": 35, "idx": 35 }, - "DEFAULT_DELIMITER": ";", + "defaultDelimiter": ";", "delimiter": ";", "delimiterLen": 1, "strict": false, @@ -348,7 +348,7 @@ }, "parser": { "@type": "PhpMyAdmin\\SqlParser\\Parser", - "STATEMENT_PARSERS": { + "statementParsers": { "DESCRIBE": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", "DESC": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", "EXPLAIN": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", @@ -393,7 +393,7 @@ "LOCK": "PhpMyAdmin\\SqlParser\\Statements\\LockStatement", "UNLOCK": "PhpMyAdmin\\SqlParser\\Statements\\LockStatement" }, - "KEYWORD_PARSERS": { + "keywordParsers": { "PARTITION BY": [], "SUBPARTITION BY": [], "_OPTIONS": { @@ -402,7 +402,7 @@ }, "_END_OPTIONS": { "class": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", - "field": "end_options" + "field": "endOptions" }, "INTERSECT": { "class": "PhpMyAdmin\\SqlParser\\Components\\UnionKeyword", @@ -650,7 +650,7 @@ "statements": [ { "@type": "PhpMyAdmin\\SqlParser\\Statements\\CreateStatement", - "OPTIONS": { + "statementOptions": { "TEMPORARY": 1, "OR REPLACE": 2, "ALGORITHM": [ @@ -682,7 +682,7 @@ "SCHEMA": 6, "IF NOT EXISTS": 7 }, - "DB_OPTIONS": { + "databaseOptions": { "CHARACTER SET": [ 1, "var=" @@ -708,7 +708,7 @@ "var=" ] }, - "TABLE_OPTIONS": { + "tableOptions": { "ENGINE": [ 1, "var=" @@ -810,7 +810,7 @@ "var" ] }, - "FUNC_OPTIONS": { + "functionOptions": { "NOT": [ 2, "var" @@ -855,7 +855,7 @@ "DETERMINISTIC": 2, "DATA": 5 }, - "TRIGGER_OPTIONS": { + "triggerOptions": { "BEFORE": 1, "AFTER": 1, "INSERT": 2, @@ -864,7 +864,7 @@ }, "name": { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -968,8 +968,8 @@ "@type": "@34" } ], - "CLAUSES": [], - "END_OPTIONS": [], + "clauses": [], + "statementEndOptions": [], "options": { "@type": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", "options": { diff --git a/tests/data/parser/parseCreateView3.out b/tests/data/parser/parseCreateView3.out index d977f6710..db3d52edf 100644 --- a/tests/data/parser/parseCreateView3.out +++ b/tests/data/parser/parseCreateView3.out @@ -2,7 +2,7 @@ "query": "CREATE VIEW GoodStudent AS\n SELECT `one space`, `two spaces`\n FROM `Une table espace`\n WHERE `one space` > 3.0\n WITH CHECK OPTION\n", "lexer": { "@type": "PhpMyAdmin\\SqlParser\\Lexer", - "PARSER_METHODS": [ + "parserMethods": [ "parseDelimiter", "parseWhitespace", "parseNumber", @@ -331,7 +331,7 @@ "count": 34, "idx": 34 }, - "DEFAULT_DELIMITER": ";", + "defaultDelimiter": ";", "delimiter": ";", "delimiterLen": 1, "strict": false, @@ -339,7 +339,7 @@ }, "parser": { "@type": "PhpMyAdmin\\SqlParser\\Parser", - "STATEMENT_PARSERS": { + "statementParsers": { "DESCRIBE": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", "DESC": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", "EXPLAIN": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", @@ -384,7 +384,7 @@ "LOCK": "PhpMyAdmin\\SqlParser\\Statements\\LockStatement", "UNLOCK": "PhpMyAdmin\\SqlParser\\Statements\\LockStatement" }, - "KEYWORD_PARSERS": { + "keywordParsers": { "PARTITION BY": [], "SUBPARTITION BY": [], "_OPTIONS": { @@ -393,7 +393,7 @@ }, "_END_OPTIONS": { "class": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", - "field": "end_options" + "field": "endOptions" }, "INTERSECT": { "class": "PhpMyAdmin\\SqlParser\\Components\\UnionKeyword", @@ -641,7 +641,7 @@ "statements": [ { "@type": "PhpMyAdmin\\SqlParser\\Statements\\CreateStatement", - "OPTIONS": { + "statementOptions": { "TEMPORARY": 1, "OR REPLACE": 2, "ALGORITHM": [ @@ -673,7 +673,7 @@ "SCHEMA": 6, "IF NOT EXISTS": 7 }, - "DB_OPTIONS": { + "databaseOptions": { "CHARACTER SET": [ 1, "var=" @@ -699,7 +699,7 @@ "var=" ] }, - "TABLE_OPTIONS": { + "tableOptions": { "ENGINE": [ 1, "var=" @@ -801,7 +801,7 @@ "var" ] }, - "FUNC_OPTIONS": { + "functionOptions": { "NOT": [ 2, "var" @@ -846,7 +846,7 @@ "DETERMINISTIC": 2, "DATA": 5 }, - "TRIGGER_OPTIONS": { + "triggerOptions": { "BEFORE": 1, "AFTER": 1, "INSERT": 2, @@ -855,7 +855,7 @@ }, "name": { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -882,7 +882,7 @@ "with": null, "select": { "@type": "PhpMyAdmin\\SqlParser\\Statements\\SelectStatement", - "OPTIONS": { + "statementOptions": { "ALL": 1, "DISTINCT": 1, "DISTINCTROW": 1, @@ -899,11 +899,11 @@ "SQL_NO_CACHE": 8, "SQL_CALC_FOUND_ROWS": 9 }, - "END_OPTIONS": { + "statementEndOptions": { "FOR UPDATE": 1, "LOCK IN SHARE MODE": 1 }, - "CLAUSES": { + "clauses": { "SELECT": [ "SELECT", 2 @@ -1032,7 +1032,7 @@ "expr": [ { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -1056,7 +1056,7 @@ }, { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -1082,7 +1082,7 @@ "from": [ { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -1105,19 +1105,19 @@ "subquery": null } ], - "index_hints": null, + "indexHints": null, "partition": null, "where": [ { "@type": "PhpMyAdmin\\SqlParser\\Components\\Condition", - "DELIMITERS": [ + "delimiters": [ "&&", "||", "AND", "OR", "XOR" ], - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "ALL": 1, "AND": 1, "BETWEEN": 1, @@ -1153,7 +1153,7 @@ "into": null, "join": null, "union": [], - "end_options": null, + "endOptions": null, "options": { "@type": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", "options": [] @@ -1193,8 +1193,8 @@ "@type": "@34" } ], - "CLAUSES": [], - "END_OPTIONS": [], + "clauses": [], + "statementEndOptions": [], "options": { "@type": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", "options": { diff --git a/tests/data/parser/parseCreateView4.out b/tests/data/parser/parseCreateView4.out index 9bc648716..095f3c0dc 100644 --- a/tests/data/parser/parseCreateView4.out +++ b/tests/data/parser/parseCreateView4.out @@ -2,7 +2,7 @@ "query": "CREATE VIEW v (mycol) AS SELECT 'abc';\n", "lexer": { "@type": "PhpMyAdmin\\SqlParser\\Lexer", - "PARSER_METHODS": [ + "parserMethods": [ "parseDelimiter", "parseWhitespace", "parseNumber", @@ -187,7 +187,7 @@ "count": 18, "idx": 18 }, - "DEFAULT_DELIMITER": ";", + "defaultDelimiter": ";", "delimiter": ";", "delimiterLen": 1, "strict": false, @@ -195,7 +195,7 @@ }, "parser": { "@type": "PhpMyAdmin\\SqlParser\\Parser", - "STATEMENT_PARSERS": { + "statementParsers": { "DESCRIBE": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", "DESC": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", "EXPLAIN": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", @@ -240,7 +240,7 @@ "LOCK": "PhpMyAdmin\\SqlParser\\Statements\\LockStatement", "UNLOCK": "PhpMyAdmin\\SqlParser\\Statements\\LockStatement" }, - "KEYWORD_PARSERS": { + "keywordParsers": { "PARTITION BY": [], "SUBPARTITION BY": [], "_OPTIONS": { @@ -249,7 +249,7 @@ }, "_END_OPTIONS": { "class": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", - "field": "end_options" + "field": "endOptions" }, "INTERSECT": { "class": "PhpMyAdmin\\SqlParser\\Components\\UnionKeyword", @@ -497,7 +497,7 @@ "statements": [ { "@type": "PhpMyAdmin\\SqlParser\\Statements\\CreateStatement", - "OPTIONS": { + "statementOptions": { "TEMPORARY": 1, "OR REPLACE": 2, "ALGORITHM": [ @@ -529,7 +529,7 @@ "SCHEMA": 6, "IF NOT EXISTS": 7 }, - "DB_OPTIONS": { + "databaseOptions": { "CHARACTER SET": [ 1, "var=" @@ -555,7 +555,7 @@ "var=" ] }, - "TABLE_OPTIONS": { + "tableOptions": { "ENGINE": [ 1, "var=" @@ -657,7 +657,7 @@ "var" ] }, - "FUNC_OPTIONS": { + "functionOptions": { "NOT": [ 2, "var" @@ -702,7 +702,7 @@ "DETERMINISTIC": 2, "DATA": 5 }, - "TRIGGER_OPTIONS": { + "triggerOptions": { "BEFORE": 1, "AFTER": 1, "INSERT": 2, @@ -711,7 +711,7 @@ }, "name": { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -768,8 +768,8 @@ "@type": "@16" } ], - "CLAUSES": [], - "END_OPTIONS": [], + "clauses": [], + "statementEndOptions": [], "options": { "@type": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", "options": { diff --git a/tests/data/parser/parseCreateViewAsWithAs.out b/tests/data/parser/parseCreateViewAsWithAs.out index a3243fadb..90a8eae81 100644 --- a/tests/data/parser/parseCreateViewAsWithAs.out +++ b/tests/data/parser/parseCreateViewAsWithAs.out @@ -2,7 +2,7 @@ "query": "-- create first view\nCREATE VIEW withclause AS\n\nWITH cte AS (\n SELECT p.name, p.shape\n FROM gis_all as p\n)\n\nSELECT cte.*\nFROM cte\nCROSS JOIN gis_all;\n-- create second view\nCREATE VIEW withclause2 AS\n\nWITH cte AS (\n SELECT p.name, p.shape\n FROM gis_all as p\n), cte2 AS (\n SELECT p.name as n2, p.shape as sh2\n FROM gis_all as p\n)\n\nSELECT cte.*,cte2.*\nFROM cte,cte2\nCROSS JOIN gis_all;", "lexer": { "@type": "PhpMyAdmin\\SqlParser\\Lexer", - "PARSER_METHODS": [ + "parserMethods": [ "parseDelimiter", "parseWhitespace", "parseNumber", @@ -1375,7 +1375,7 @@ "count": 150, "idx": 150 }, - "DEFAULT_DELIMITER": ";", + "defaultDelimiter": ";", "delimiter": ";", "delimiterLen": 1, "strict": false, @@ -1383,7 +1383,7 @@ }, "parser": { "@type": "PhpMyAdmin\\SqlParser\\Parser", - "STATEMENT_PARSERS": { + "statementParsers": { "DESCRIBE": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", "DESC": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", "EXPLAIN": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", @@ -1428,7 +1428,7 @@ "LOCK": "PhpMyAdmin\\SqlParser\\Statements\\LockStatement", "UNLOCK": "PhpMyAdmin\\SqlParser\\Statements\\LockStatement" }, - "KEYWORD_PARSERS": { + "keywordParsers": { "PARTITION BY": [], "SUBPARTITION BY": [], "_OPTIONS": { @@ -1437,7 +1437,7 @@ }, "_END_OPTIONS": { "class": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", - "field": "end_options" + "field": "endOptions" }, "INTERSECT": { "class": "PhpMyAdmin\\SqlParser\\Components\\UnionKeyword", @@ -1685,7 +1685,7 @@ "statements": [ { "@type": "PhpMyAdmin\\SqlParser\\Statements\\CreateStatement", - "OPTIONS": { + "statementOptions": { "TEMPORARY": 1, "OR REPLACE": 2, "ALGORITHM": [ @@ -1717,7 +1717,7 @@ "SCHEMA": 6, "IF NOT EXISTS": 7 }, - "DB_OPTIONS": { + "databaseOptions": { "CHARACTER SET": [ 1, "var=" @@ -1743,7 +1743,7 @@ "var=" ] }, - "TABLE_OPTIONS": { + "tableOptions": { "ENGINE": [ 1, "var=" @@ -1845,7 +1845,7 @@ "var" ] }, - "FUNC_OPTIONS": { + "functionOptions": { "NOT": [ 2, "var" @@ -1890,7 +1890,7 @@ "DETERMINISTIC": 2, "DATA": 5 }, - "TRIGGER_OPTIONS": { + "triggerOptions": { "BEFORE": 1, "AFTER": 1, "INSERT": 2, @@ -1899,7 +1899,7 @@ }, "name": { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -1925,10 +1925,10 @@ "fields": null, "with": { "@type": "PhpMyAdmin\\SqlParser\\Statements\\WithStatement", - "OPTIONS": { + "statementOptions": { "RECURSIVE": 1 }, - "CLAUSES": { + "clauses": { "WITH": [ "WITH", 2 @@ -1949,7 +1949,7 @@ "columns": [], "statement": { "@type": "PhpMyAdmin\\SqlParser\\Parser", - "STATEMENT_PARSERS": { + "statementParsers": { "DESCRIBE": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", "DESC": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", "EXPLAIN": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", @@ -1994,7 +1994,7 @@ "LOCK": "PhpMyAdmin\\SqlParser\\Statements\\LockStatement", "UNLOCK": "PhpMyAdmin\\SqlParser\\Statements\\LockStatement" }, - "KEYWORD_PARSERS": { + "keywordParsers": { "PARTITION BY": [], "SUBPARTITION BY": [], "_OPTIONS": { @@ -2003,7 +2003,7 @@ }, "_END_OPTIONS": { "class": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", - "field": "end_options" + "field": "endOptions" }, "INTERSECT": { "class": "PhpMyAdmin\\SqlParser\\Components\\UnionKeyword", @@ -2315,7 +2315,7 @@ "statements": [ { "@type": "PhpMyAdmin\\SqlParser\\Statements\\SelectStatement", - "OPTIONS": { + "statementOptions": { "ALL": 1, "DISTINCT": 1, "DISTINCTROW": 1, @@ -2332,11 +2332,11 @@ "SQL_NO_CACHE": 8, "SQL_CALC_FOUND_ROWS": 9 }, - "END_OPTIONS": { + "statementEndOptions": { "FOR UPDATE": 1, "LOCK IN SHARE MODE": 1 }, - "CLAUSES": { + "clauses": { "SELECT": [ "SELECT", 2 @@ -2465,7 +2465,7 @@ "expr": [ { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -2489,7 +2489,7 @@ }, { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -2515,7 +2515,7 @@ "from": [ { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -2538,7 +2538,7 @@ "subquery": null } ], - "index_hints": null, + "indexHints": null, "partition": null, "where": null, "group": null, @@ -2549,7 +2549,7 @@ "into": null, "join": null, "union": [], - "end_options": null, + "endOptions": null, "options": { "@type": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", "options": [] @@ -2566,7 +2566,7 @@ }, "cteStatementParser": { "@type": "PhpMyAdmin\\SqlParser\\Parser", - "STATEMENT_PARSERS": { + "statementParsers": { "DESCRIBE": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", "DESC": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", "EXPLAIN": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", @@ -2611,7 +2611,7 @@ "LOCK": "PhpMyAdmin\\SqlParser\\Statements\\LockStatement", "UNLOCK": "PhpMyAdmin\\SqlParser\\Statements\\LockStatement" }, - "KEYWORD_PARSERS": { + "keywordParsers": { "PARTITION BY": [], "SUBPARTITION BY": [], "_OPTIONS": { @@ -2620,7 +2620,7 @@ }, "_END_OPTIONS": { "class": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", - "field": "end_options" + "field": "endOptions" }, "INTERSECT": { "class": "PhpMyAdmin\\SqlParser\\Components\\UnionKeyword", @@ -3205,7 +3205,7 @@ "statements": [ { "@type": "PhpMyAdmin\\SqlParser\\Statements\\SelectStatement", - "OPTIONS": { + "statementOptions": { "ALL": 1, "DISTINCT": 1, "DISTINCTROW": 1, @@ -3222,11 +3222,11 @@ "SQL_NO_CACHE": 8, "SQL_CALC_FOUND_ROWS": 9 }, - "END_OPTIONS": { + "statementEndOptions": { "FOR UPDATE": 1, "LOCK IN SHARE MODE": 1 }, - "CLAUSES": { + "clauses": { "SELECT": [ "SELECT", 2 @@ -3355,7 +3355,7 @@ "expr": [ { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -3381,7 +3381,7 @@ "from": [ { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -3404,7 +3404,7 @@ "subquery": null } ], - "index_hints": null, + "indexHints": null, "partition": null, "where": null, "group": null, @@ -3416,7 +3416,7 @@ "join": [ { "@type": "PhpMyAdmin\\SqlParser\\Components\\JoinKeyword", - "JOINS": { + "joins": { "CROSS JOIN": "CROSS", "FULL JOIN": "FULL", "FULL OUTER JOIN": "FULL", @@ -3436,7 +3436,7 @@ "type": "CROSS", "expr": { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -3463,7 +3463,7 @@ } ], "union": [], - "end_options": null, + "endOptions": null, "options": { "@type": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", "options": [] @@ -3473,7 +3473,7 @@ }, { "@type": "PhpMyAdmin\\SqlParser\\Statements\\CreateStatement", - "OPTIONS": { + "statementOptions": { "TEMPORARY": 1, "OR REPLACE": 2, "ALGORITHM": [ @@ -3505,7 +3505,7 @@ "SCHEMA": 6, "IF NOT EXISTS": 7 }, - "DB_OPTIONS": { + "databaseOptions": { "CHARACTER SET": [ 1, "var=" @@ -3531,7 +3531,7 @@ "var=" ] }, - "TABLE_OPTIONS": { + "tableOptions": { "ENGINE": [ 1, "var=" @@ -3633,7 +3633,7 @@ "var" ] }, - "FUNC_OPTIONS": { + "functionOptions": { "NOT": [ 2, "var" @@ -3678,7 +3678,7 @@ "DETERMINISTIC": 2, "DATA": 5 }, - "TRIGGER_OPTIONS": { + "triggerOptions": { "BEFORE": 1, "AFTER": 1, "INSERT": 2, @@ -3687,7 +3687,7 @@ }, "name": { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -3713,10 +3713,10 @@ "fields": null, "with": { "@type": "PhpMyAdmin\\SqlParser\\Statements\\WithStatement", - "OPTIONS": { + "statementOptions": { "RECURSIVE": 1 }, - "CLAUSES": { + "clauses": { "WITH": [ "WITH", 2 @@ -3737,7 +3737,7 @@ "columns": [], "statement": { "@type": "PhpMyAdmin\\SqlParser\\Parser", - "STATEMENT_PARSERS": { + "statementParsers": { "DESCRIBE": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", "DESC": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", "EXPLAIN": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", @@ -3782,7 +3782,7 @@ "LOCK": "PhpMyAdmin\\SqlParser\\Statements\\LockStatement", "UNLOCK": "PhpMyAdmin\\SqlParser\\Statements\\LockStatement" }, - "KEYWORD_PARSERS": { + "keywordParsers": { "PARTITION BY": [], "SUBPARTITION BY": [], "_OPTIONS": { @@ -3791,7 +3791,7 @@ }, "_END_OPTIONS": { "class": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", - "field": "end_options" + "field": "endOptions" }, "INTERSECT": { "class": "PhpMyAdmin\\SqlParser\\Components\\UnionKeyword", @@ -4103,7 +4103,7 @@ "statements": [ { "@type": "PhpMyAdmin\\SqlParser\\Statements\\SelectStatement", - "OPTIONS": { + "statementOptions": { "ALL": 1, "DISTINCT": 1, "DISTINCTROW": 1, @@ -4120,11 +4120,11 @@ "SQL_NO_CACHE": 8, "SQL_CALC_FOUND_ROWS": 9 }, - "END_OPTIONS": { + "statementEndOptions": { "FOR UPDATE": 1, "LOCK IN SHARE MODE": 1 }, - "CLAUSES": { + "clauses": { "SELECT": [ "SELECT", 2 @@ -4253,7 +4253,7 @@ "expr": [ { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -4277,7 +4277,7 @@ }, { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -4303,7 +4303,7 @@ "from": [ { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -4326,7 +4326,7 @@ "subquery": null } ], - "index_hints": null, + "indexHints": null, "partition": null, "where": null, "group": null, @@ -4337,7 +4337,7 @@ "into": null, "join": null, "union": [], - "end_options": null, + "endOptions": null, "options": { "@type": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", "options": [] @@ -4357,7 +4357,7 @@ "columns": [], "statement": { "@type": "PhpMyAdmin\\SqlParser\\Parser", - "STATEMENT_PARSERS": { + "statementParsers": { "DESCRIBE": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", "DESC": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", "EXPLAIN": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", @@ -4402,7 +4402,7 @@ "LOCK": "PhpMyAdmin\\SqlParser\\Statements\\LockStatement", "UNLOCK": "PhpMyAdmin\\SqlParser\\Statements\\LockStatement" }, - "KEYWORD_PARSERS": { + "keywordParsers": { "PARTITION BY": [], "SUBPARTITION BY": [], "_OPTIONS": { @@ -4411,7 +4411,7 @@ }, "_END_OPTIONS": { "class": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", - "field": "end_options" + "field": "endOptions" }, "INTERSECT": { "class": "PhpMyAdmin\\SqlParser\\Components\\UnionKeyword", @@ -4747,7 +4747,7 @@ "statements": [ { "@type": "PhpMyAdmin\\SqlParser\\Statements\\SelectStatement", - "OPTIONS": { + "statementOptions": { "ALL": 1, "DISTINCT": 1, "DISTINCTROW": 1, @@ -4764,11 +4764,11 @@ "SQL_NO_CACHE": 8, "SQL_CALC_FOUND_ROWS": 9 }, - "END_OPTIONS": { + "statementEndOptions": { "FOR UPDATE": 1, "LOCK IN SHARE MODE": 1 }, - "CLAUSES": { + "clauses": { "SELECT": [ "SELECT", 2 @@ -4897,7 +4897,7 @@ "expr": [ { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -4921,7 +4921,7 @@ }, { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -4947,7 +4947,7 @@ "from": [ { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -4970,7 +4970,7 @@ "subquery": null } ], - "index_hints": null, + "indexHints": null, "partition": null, "where": null, "group": null, @@ -4981,7 +4981,7 @@ "into": null, "join": null, "union": [], - "end_options": null, + "endOptions": null, "options": { "@type": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", "options": [] @@ -4998,7 +4998,7 @@ }, "cteStatementParser": { "@type": "PhpMyAdmin\\SqlParser\\Parser", - "STATEMENT_PARSERS": { + "statementParsers": { "DESCRIBE": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", "DESC": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", "EXPLAIN": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", @@ -5043,7 +5043,7 @@ "LOCK": "PhpMyAdmin\\SqlParser\\Statements\\LockStatement", "UNLOCK": "PhpMyAdmin\\SqlParser\\Statements\\LockStatement" }, - "KEYWORD_PARSERS": { + "keywordParsers": { "PARTITION BY": [], "SUBPARTITION BY": [], "_OPTIONS": { @@ -5052,7 +5052,7 @@ }, "_END_OPTIONS": { "class": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", - "field": "end_options" + "field": "endOptions" }, "INTERSECT": { "class": "PhpMyAdmin\\SqlParser\\Components\\UnionKeyword", @@ -5367,7 +5367,7 @@ "statements": [ { "@type": "PhpMyAdmin\\SqlParser\\Statements\\SelectStatement", - "OPTIONS": { + "statementOptions": { "ALL": 1, "DISTINCT": 1, "DISTINCTROW": 1, @@ -5384,11 +5384,11 @@ "SQL_NO_CACHE": 8, "SQL_CALC_FOUND_ROWS": 9 }, - "END_OPTIONS": { + "statementEndOptions": { "FOR UPDATE": 1, "LOCK IN SHARE MODE": 1 }, - "CLAUSES": { + "clauses": { "SELECT": [ "SELECT", 2 @@ -5517,7 +5517,7 @@ "expr": [ { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -5541,7 +5541,7 @@ }, { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -5567,7 +5567,7 @@ "from": [ { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -5591,7 +5591,7 @@ }, { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -5614,7 +5614,7 @@ "subquery": null } ], - "index_hints": null, + "indexHints": null, "partition": null, "where": null, "group": null, @@ -5626,7 +5626,7 @@ "join": [ { "@type": "PhpMyAdmin\\SqlParser\\Components\\JoinKeyword", - "JOINS": { + "joins": { "CROSS JOIN": "CROSS", "FULL JOIN": "FULL", "FULL OUTER JOIN": "FULL", @@ -5646,7 +5646,7 @@ "type": "CROSS", "expr": { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -5673,7 +5673,7 @@ } ], "union": [], - "end_options": null, + "endOptions": null, "options": { "@type": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", "options": [] @@ -5686,7 +5686,7 @@ "strict": false, "errors": [] }, - "END_OPTIONS": [], + "statementEndOptions": [], "options": { "@type": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", "options": [] @@ -5705,8 +5705,8 @@ "return": null, "parameters": null, "body": [], - "CLAUSES": [], - "END_OPTIONS": [], + "clauses": [], + "statementEndOptions": [], "options": { "@type": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", "options": { @@ -5721,7 +5721,7 @@ "strict": false, "errors": [] }, - "END_OPTIONS": [], + "statementEndOptions": [], "options": { "@type": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", "options": [] @@ -5740,8 +5740,8 @@ "return": null, "parameters": null, "body": [], - "CLAUSES": [], - "END_OPTIONS": [], + "clauses": [], + "statementEndOptions": [], "options": { "@type": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", "options": { diff --git a/tests/data/parser/parseCreateViewMultiple.out b/tests/data/parser/parseCreateViewMultiple.out index 7b8a3b247..aa77eef5e 100644 --- a/tests/data/parser/parseCreateViewMultiple.out +++ b/tests/data/parser/parseCreateViewMultiple.out @@ -2,7 +2,7 @@ "query": "CREATE TABLE T1 (COL1 CHAR(10))\n\nCREATE VIEW V1 AS SELECT COL1\n FROM T1 WHERE COL1 LIKE 'A%'\n\nCREATE VIEW V2 AS SELECT COL1\n FROM V1 WHERE COL1 LIKE '%Z'\n WITH LOCAL CHECK OPTION\n\nCREATE VIEW V3 AS SELECT COL1\n FROM V2 WHERE COL1 LIKE 'AB%'\n\nCREATE VIEW V4 AS SELECT COL1\n FROM V3 WHERE COL1 LIKE '%YZ'\n WITH CASCADED CHECK OPTION\n\nCREATE VIEW V5 AS SELECT COL1\n FROM V4 WHERE COL1 LIKE 'ABC%'\n", "lexer": { "@type": "PhpMyAdmin\\SqlParser\\Lexer", - "PARSER_METHODS": [ + "parserMethods": [ "parseDelimiter", "parseWhitespace", "parseNumber", @@ -1393,7 +1393,7 @@ "count": 152, "idx": 152 }, - "DEFAULT_DELIMITER": ";", + "defaultDelimiter": ";", "delimiter": ";", "delimiterLen": 1, "strict": false, @@ -1401,7 +1401,7 @@ }, "parser": { "@type": "PhpMyAdmin\\SqlParser\\Parser", - "STATEMENT_PARSERS": { + "statementParsers": { "DESCRIBE": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", "DESC": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", "EXPLAIN": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", @@ -1446,7 +1446,7 @@ "LOCK": "PhpMyAdmin\\SqlParser\\Statements\\LockStatement", "UNLOCK": "PhpMyAdmin\\SqlParser\\Statements\\LockStatement" }, - "KEYWORD_PARSERS": { + "keywordParsers": { "PARTITION BY": [], "SUBPARTITION BY": [], "_OPTIONS": { @@ -1455,7 +1455,7 @@ }, "_END_OPTIONS": { "class": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", - "field": "end_options" + "field": "endOptions" }, "INTERSECT": { "class": "PhpMyAdmin\\SqlParser\\Components\\UnionKeyword", @@ -1703,7 +1703,7 @@ "statements": [ { "@type": "PhpMyAdmin\\SqlParser\\Statements\\CreateStatement", - "OPTIONS": { + "statementOptions": { "TEMPORARY": 1, "OR REPLACE": 2, "ALGORITHM": [ @@ -1735,7 +1735,7 @@ "SCHEMA": 6, "IF NOT EXISTS": 7 }, - "DB_OPTIONS": { + "databaseOptions": { "CHARACTER SET": [ 1, "var=" @@ -1761,7 +1761,7 @@ "var=" ] }, - "TABLE_OPTIONS": { + "tableOptions": { "ENGINE": [ 1, "var=" @@ -1863,7 +1863,7 @@ "var" ] }, - "FUNC_OPTIONS": { + "functionOptions": { "NOT": [ 2, "var" @@ -1908,7 +1908,7 @@ "DETERMINISTIC": 2, "DATA": 5 }, - "TRIGGER_OPTIONS": { + "triggerOptions": { "BEFORE": 1, "AFTER": 1, "INSERT": 2, @@ -1917,7 +1917,7 @@ }, "name": { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -1946,7 +1946,7 @@ "fields": [ { "@type": "PhpMyAdmin\\SqlParser\\Components\\CreateDefinition", - "FIELD_OPTIONS": { + "fieldOptions": { "_UNSORTED": true, "NOT NULL": 1, "NULL": 1, @@ -2008,7 +2008,7 @@ "isConstraint": null, "type": { "@type": "PhpMyAdmin\\SqlParser\\Components\\DataType", - "DATA_TYPE_OPTIONS": { + "dataTypeOptions": { "BINARY": 1, "CHARACTER SET": [ 2, @@ -2054,8 +2054,8 @@ "return": null, "parameters": null, "body": [], - "CLAUSES": [], - "END_OPTIONS": [], + "clauses": [], + "statementEndOptions": [], "options": { "@type": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", "options": { diff --git a/tests/data/parser/parseCreateViewWithQuotes.out b/tests/data/parser/parseCreateViewWithQuotes.out index 86c12e688..8e0767f3f 100644 --- a/tests/data/parser/parseCreateViewWithQuotes.out +++ b/tests/data/parser/parseCreateViewWithQuotes.out @@ -2,7 +2,7 @@ "query": "CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost`\nSQL SECURITY DEFINER VIEW `test_view` AS\nselect `email_content`.`content_id` AS `content_id`,\n`email_content`.`brand_id` AS `brand_id` from `email_content`;", "lexer": { "@type": "PhpMyAdmin\\SqlParser\\Lexer", - "PARSER_METHODS": [ + "parserMethods": [ "parseDelimiter", "parseWhitespace", "parseNumber", @@ -421,7 +421,7 @@ "count": 44, "idx": 44 }, - "DEFAULT_DELIMITER": ";", + "defaultDelimiter": ";", "delimiter": ";", "delimiterLen": 1, "strict": false, @@ -429,7 +429,7 @@ }, "parser": { "@type": "PhpMyAdmin\\SqlParser\\Parser", - "STATEMENT_PARSERS": { + "statementParsers": { "DESCRIBE": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", "DESC": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", "EXPLAIN": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", @@ -474,7 +474,7 @@ "LOCK": "PhpMyAdmin\\SqlParser\\Statements\\LockStatement", "UNLOCK": "PhpMyAdmin\\SqlParser\\Statements\\LockStatement" }, - "KEYWORD_PARSERS": { + "keywordParsers": { "PARTITION BY": [], "SUBPARTITION BY": [], "_OPTIONS": { @@ -483,7 +483,7 @@ }, "_END_OPTIONS": { "class": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", - "field": "end_options" + "field": "endOptions" }, "INTERSECT": { "class": "PhpMyAdmin\\SqlParser\\Components\\UnionKeyword", @@ -731,7 +731,7 @@ "statements": [ { "@type": "PhpMyAdmin\\SqlParser\\Statements\\CreateStatement", - "OPTIONS": { + "statementOptions": { "TEMPORARY": 1, "OR REPLACE": 2, "ALGORITHM": [ @@ -763,7 +763,7 @@ "SCHEMA": 6, "IF NOT EXISTS": 7 }, - "DB_OPTIONS": { + "databaseOptions": { "CHARACTER SET": [ 1, "var=" @@ -789,7 +789,7 @@ "var=" ] }, - "TABLE_OPTIONS": { + "tableOptions": { "ENGINE": [ 1, "var=" @@ -891,7 +891,7 @@ "var" ] }, - "FUNC_OPTIONS": { + "functionOptions": { "NOT": [ 2, "var" @@ -936,7 +936,7 @@ "DETERMINISTIC": 2, "DATA": 5 }, - "TRIGGER_OPTIONS": { + "triggerOptions": { "BEFORE": 1, "AFTER": 1, "INSERT": 2, @@ -945,7 +945,7 @@ }, "name": { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -972,7 +972,7 @@ "with": null, "select": { "@type": "PhpMyAdmin\\SqlParser\\Statements\\SelectStatement", - "OPTIONS": { + "statementOptions": { "ALL": 1, "DISTINCT": 1, "DISTINCTROW": 1, @@ -989,11 +989,11 @@ "SQL_NO_CACHE": 8, "SQL_CALC_FOUND_ROWS": 9 }, - "END_OPTIONS": { + "statementEndOptions": { "FOR UPDATE": 1, "LOCK IN SHARE MODE": 1 }, - "CLAUSES": { + "clauses": { "SELECT": [ "SELECT", 2 @@ -1122,7 +1122,7 @@ "expr": [ { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -1146,7 +1146,7 @@ }, { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -1172,7 +1172,7 @@ "from": [ { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -1195,7 +1195,7 @@ "subquery": null } ], - "index_hints": null, + "indexHints": null, "partition": null, "where": null, "group": null, @@ -1206,7 +1206,7 @@ "into": null, "join": null, "union": [], - "end_options": null, + "endOptions": null, "options": { "@type": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", "options": [] @@ -1228,8 +1228,8 @@ "@type": "@43" } ], - "CLAUSES": [], - "END_OPTIONS": [], + "clauses": [], + "statementEndOptions": [], "options": { "@type": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", "options": { @@ -1244,7 +1244,7 @@ "equals": true, "expr": { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, diff --git a/tests/data/parser/parseCreateViewWithUnion.out b/tests/data/parser/parseCreateViewWithUnion.out index d122d3b42..b0451082d 100644 --- a/tests/data/parser/parseCreateViewWithUnion.out +++ b/tests/data/parser/parseCreateViewWithUnion.out @@ -2,7 +2,7 @@ "query": "CREATE VIEW `employees_view` AS\nSELECT *\nFROM\n `employees`\nWHERE\n `employees`.`gender` = 'M'\nUNION\nSELECT *\nFROM\n `employees`\nWHERE\n `employees`.`gender` = 'F';", "lexer": { "@type": "PhpMyAdmin\\SqlParser\\Lexer", - "PARSER_METHODS": [ + "parserMethods": [ "parseDelimiter", "parseWhitespace", "parseNumber", @@ -448,7 +448,7 @@ "count": 47, "idx": 47 }, - "DEFAULT_DELIMITER": ";", + "defaultDelimiter": ";", "delimiter": ";", "delimiterLen": 1, "strict": false, @@ -456,7 +456,7 @@ }, "parser": { "@type": "PhpMyAdmin\\SqlParser\\Parser", - "STATEMENT_PARSERS": { + "statementParsers": { "DESCRIBE": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", "DESC": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", "EXPLAIN": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", @@ -501,7 +501,7 @@ "LOCK": "PhpMyAdmin\\SqlParser\\Statements\\LockStatement", "UNLOCK": "PhpMyAdmin\\SqlParser\\Statements\\LockStatement" }, - "KEYWORD_PARSERS": { + "keywordParsers": { "PARTITION BY": [], "SUBPARTITION BY": [], "_OPTIONS": { @@ -510,7 +510,7 @@ }, "_END_OPTIONS": { "class": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", - "field": "end_options" + "field": "endOptions" }, "INTERSECT": { "class": "PhpMyAdmin\\SqlParser\\Components\\UnionKeyword", @@ -758,7 +758,7 @@ "statements": [ { "@type": "PhpMyAdmin\\SqlParser\\Statements\\CreateStatement", - "OPTIONS": { + "statementOptions": { "TEMPORARY": 1, "OR REPLACE": 2, "ALGORITHM": [ @@ -790,7 +790,7 @@ "SCHEMA": 6, "IF NOT EXISTS": 7 }, - "DB_OPTIONS": { + "databaseOptions": { "CHARACTER SET": [ 1, "var=" @@ -816,7 +816,7 @@ "var=" ] }, - "TABLE_OPTIONS": { + "tableOptions": { "ENGINE": [ 1, "var=" @@ -918,7 +918,7 @@ "var" ] }, - "FUNC_OPTIONS": { + "functionOptions": { "NOT": [ 2, "var" @@ -963,7 +963,7 @@ "DETERMINISTIC": 2, "DATA": 5 }, - "TRIGGER_OPTIONS": { + "triggerOptions": { "BEFORE": 1, "AFTER": 1, "INSERT": 2, @@ -972,7 +972,7 @@ }, "name": { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -999,7 +999,7 @@ "with": null, "select": { "@type": "PhpMyAdmin\\SqlParser\\Statements\\SelectStatement", - "OPTIONS": { + "statementOptions": { "ALL": 1, "DISTINCT": 1, "DISTINCTROW": 1, @@ -1016,11 +1016,11 @@ "SQL_NO_CACHE": 8, "SQL_CALC_FOUND_ROWS": 9 }, - "END_OPTIONS": { + "statementEndOptions": { "FOR UPDATE": 1, "LOCK IN SHARE MODE": 1 }, - "CLAUSES": { + "clauses": { "SELECT": [ "SELECT", 2 @@ -1149,7 +1149,7 @@ "expr": [ { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -1175,7 +1175,7 @@ "from": [ { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -1198,19 +1198,19 @@ "subquery": null } ], - "index_hints": null, + "indexHints": null, "partition": null, "where": [ { "@type": "PhpMyAdmin\\SqlParser\\Components\\Condition", - "DELIMITERS": [ + "delimiters": [ "&&", "||", "AND", "OR", "XOR" ], - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "ALL": 1, "AND": 1, "BETWEEN": 1, @@ -1248,7 +1248,7 @@ "into": null, "join": null, "union": [], - "end_options": null, + "endOptions": null, "options": { "@type": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", "options": [] @@ -1327,8 +1327,8 @@ "@type": "@46" } ], - "CLAUSES": [], - "END_OPTIONS": [], + "clauses": [], + "statementEndOptions": [], "options": { "@type": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", "options": { diff --git a/tests/data/parser/parseCreateViewWithWrongSyntax.out b/tests/data/parser/parseCreateViewWithWrongSyntax.out index 2a306e1cd..80e847b47 100644 --- a/tests/data/parser/parseCreateViewWithWrongSyntax.out +++ b/tests/data/parser/parseCreateViewWithWrongSyntax.out @@ -2,7 +2,7 @@ "query": "CREATE VIEW abc AS SELECT a, b, FROM a", "lexer": { "@type": "PhpMyAdmin\\SqlParser\\Lexer", - "PARSER_METHODS": [ + "parserMethods": [ "parseDelimiter", "parseWhitespace", "parseNumber", @@ -205,7 +205,7 @@ "count": 20, "idx": 20 }, - "DEFAULT_DELIMITER": ";", + "defaultDelimiter": ";", "delimiter": ";", "delimiterLen": 1, "strict": false, @@ -213,7 +213,7 @@ }, "parser": { "@type": "PhpMyAdmin\\SqlParser\\Parser", - "STATEMENT_PARSERS": { + "statementParsers": { "DESCRIBE": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", "DESC": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", "EXPLAIN": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", @@ -258,7 +258,7 @@ "LOCK": "PhpMyAdmin\\SqlParser\\Statements\\LockStatement", "UNLOCK": "PhpMyAdmin\\SqlParser\\Statements\\LockStatement" }, - "KEYWORD_PARSERS": { + "keywordParsers": { "PARTITION BY": [], "SUBPARTITION BY": [], "_OPTIONS": { @@ -267,7 +267,7 @@ }, "_END_OPTIONS": { "class": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", - "field": "end_options" + "field": "endOptions" }, "INTERSECT": { "class": "PhpMyAdmin\\SqlParser\\Components\\UnionKeyword", @@ -515,7 +515,7 @@ "statements": [ { "@type": "PhpMyAdmin\\SqlParser\\Statements\\CreateStatement", - "OPTIONS": { + "statementOptions": { "TEMPORARY": 1, "OR REPLACE": 2, "ALGORITHM": [ @@ -547,7 +547,7 @@ "SCHEMA": 6, "IF NOT EXISTS": 7 }, - "DB_OPTIONS": { + "databaseOptions": { "CHARACTER SET": [ 1, "var=" @@ -573,7 +573,7 @@ "var=" ] }, - "TABLE_OPTIONS": { + "tableOptions": { "ENGINE": [ 1, "var=" @@ -675,7 +675,7 @@ "var" ] }, - "FUNC_OPTIONS": { + "functionOptions": { "NOT": [ 2, "var" @@ -720,7 +720,7 @@ "DETERMINISTIC": 2, "DATA": 5 }, - "TRIGGER_OPTIONS": { + "triggerOptions": { "BEFORE": 1, "AFTER": 1, "INSERT": 2, @@ -729,7 +729,7 @@ }, "name": { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -756,7 +756,7 @@ "with": null, "select": { "@type": "PhpMyAdmin\\SqlParser\\Statements\\SelectStatement", - "OPTIONS": { + "statementOptions": { "ALL": 1, "DISTINCT": 1, "DISTINCTROW": 1, @@ -773,11 +773,11 @@ "SQL_NO_CACHE": 8, "SQL_CALC_FOUND_ROWS": 9 }, - "END_OPTIONS": { + "statementEndOptions": { "FOR UPDATE": 1, "LOCK IN SHARE MODE": 1 }, - "CLAUSES": { + "clauses": { "SELECT": [ "SELECT", 2 @@ -906,7 +906,7 @@ "expr": [ { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -930,7 +930,7 @@ }, { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -956,7 +956,7 @@ "from": [ { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -979,7 +979,7 @@ "subquery": null } ], - "index_hints": null, + "indexHints": null, "partition": null, "where": null, "group": null, @@ -990,7 +990,7 @@ "into": null, "join": null, "union": [], - "end_options": null, + "endOptions": null, "options": { "@type": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", "options": [] @@ -1012,8 +1012,8 @@ "@type": "@20" } ], - "CLAUSES": [], - "END_OPTIONS": [], + "clauses": [], + "statementEndOptions": [], "options": { "@type": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", "options": { diff --git a/tests/data/parser/parseCreateViewWithoutQuotes.out b/tests/data/parser/parseCreateViewWithoutQuotes.out index 1e6c43351..25d7b9ac1 100644 --- a/tests/data/parser/parseCreateViewWithoutQuotes.out +++ b/tests/data/parser/parseCreateViewWithoutQuotes.out @@ -2,7 +2,7 @@ "query": "CREATE ALGORITHM=UNDEFINED DEFINER=root@localhost\nSQL SECURITY DEFINER VIEW `test_view` AS\nselect `email_content`.`content_id` AS `content_id`,\n`email_content`.`brand_id` AS `brand_id` from `email_content`;", "lexer": { "@type": "PhpMyAdmin\\SqlParser\\Lexer", - "PARSER_METHODS": [ + "parserMethods": [ "parseDelimiter", "parseWhitespace", "parseNumber", @@ -430,7 +430,7 @@ "count": 45, "idx": 45 }, - "DEFAULT_DELIMITER": ";", + "defaultDelimiter": ";", "delimiter": ";", "delimiterLen": 1, "strict": false, @@ -438,7 +438,7 @@ }, "parser": { "@type": "PhpMyAdmin\\SqlParser\\Parser", - "STATEMENT_PARSERS": { + "statementParsers": { "DESCRIBE": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", "DESC": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", "EXPLAIN": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", @@ -483,7 +483,7 @@ "LOCK": "PhpMyAdmin\\SqlParser\\Statements\\LockStatement", "UNLOCK": "PhpMyAdmin\\SqlParser\\Statements\\LockStatement" }, - "KEYWORD_PARSERS": { + "keywordParsers": { "PARTITION BY": [], "SUBPARTITION BY": [], "_OPTIONS": { @@ -492,7 +492,7 @@ }, "_END_OPTIONS": { "class": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", - "field": "end_options" + "field": "endOptions" }, "INTERSECT": { "class": "PhpMyAdmin\\SqlParser\\Components\\UnionKeyword", @@ -740,7 +740,7 @@ "statements": [ { "@type": "PhpMyAdmin\\SqlParser\\Statements\\CreateStatement", - "OPTIONS": { + "statementOptions": { "TEMPORARY": 1, "OR REPLACE": 2, "ALGORITHM": [ @@ -772,7 +772,7 @@ "SCHEMA": 6, "IF NOT EXISTS": 7 }, - "DB_OPTIONS": { + "databaseOptions": { "CHARACTER SET": [ 1, "var=" @@ -798,7 +798,7 @@ "var=" ] }, - "TABLE_OPTIONS": { + "tableOptions": { "ENGINE": [ 1, "var=" @@ -900,7 +900,7 @@ "var" ] }, - "FUNC_OPTIONS": { + "functionOptions": { "NOT": [ 2, "var" @@ -945,7 +945,7 @@ "DETERMINISTIC": 2, "DATA": 5 }, - "TRIGGER_OPTIONS": { + "triggerOptions": { "BEFORE": 1, "AFTER": 1, "INSERT": 2, @@ -954,7 +954,7 @@ }, "name": { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -981,7 +981,7 @@ "with": null, "select": { "@type": "PhpMyAdmin\\SqlParser\\Statements\\SelectStatement", - "OPTIONS": { + "statementOptions": { "ALL": 1, "DISTINCT": 1, "DISTINCTROW": 1, @@ -998,11 +998,11 @@ "SQL_NO_CACHE": 8, "SQL_CALC_FOUND_ROWS": 9 }, - "END_OPTIONS": { + "statementEndOptions": { "FOR UPDATE": 1, "LOCK IN SHARE MODE": 1 }, - "CLAUSES": { + "clauses": { "SELECT": [ "SELECT", 2 @@ -1131,7 +1131,7 @@ "expr": [ { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -1155,7 +1155,7 @@ }, { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -1181,7 +1181,7 @@ "from": [ { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -1204,7 +1204,7 @@ "subquery": null } ], - "index_hints": null, + "indexHints": null, "partition": null, "where": null, "group": null, @@ -1215,7 +1215,7 @@ "into": null, "join": null, "union": [], - "end_options": null, + "endOptions": null, "options": { "@type": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", "options": [] @@ -1237,8 +1237,8 @@ "@type": "@44" } ], - "CLAUSES": [], - "END_OPTIONS": [], + "clauses": [], + "statementEndOptions": [], "options": { "@type": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", "options": { @@ -1253,7 +1253,7 @@ "equals": true, "expr": { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, diff --git a/tests/data/parser/parseDelete.out b/tests/data/parser/parseDelete.out index c91c5bde8..77cd4f502 100644 --- a/tests/data/parser/parseDelete.out +++ b/tests/data/parser/parseDelete.out @@ -2,7 +2,7 @@ "query": "DELETE LOW_PRIORITY\n\/* *\/\nFROM\n `test`.users\nWHERE\n `id`<3 AND (username=\"Dan\" or username=\"Paul\")\nORDER BY\n id\n;", "lexer": { "@type": "PhpMyAdmin\\SqlParser\\Lexer", - "PARSER_METHODS": [ + "parserMethods": [ "parseDelimiter", "parseWhitespace", "parseNumber", @@ -367,7 +367,7 @@ "count": 38, "idx": 38 }, - "DEFAULT_DELIMITER": ";", + "defaultDelimiter": ";", "delimiter": ";", "delimiterLen": 1, "strict": false, @@ -375,7 +375,7 @@ }, "parser": { "@type": "PhpMyAdmin\\SqlParser\\Parser", - "STATEMENT_PARSERS": { + "statementParsers": { "DESCRIBE": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", "DESC": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", "EXPLAIN": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", @@ -420,7 +420,7 @@ "LOCK": "PhpMyAdmin\\SqlParser\\Statements\\LockStatement", "UNLOCK": "PhpMyAdmin\\SqlParser\\Statements\\LockStatement" }, - "KEYWORD_PARSERS": { + "keywordParsers": { "PARTITION BY": [], "SUBPARTITION BY": [], "_OPTIONS": { @@ -429,7 +429,7 @@ }, "_END_OPTIONS": { "class": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", - "field": "end_options" + "field": "endOptions" }, "INTERSECT": { "class": "PhpMyAdmin\\SqlParser\\Components\\UnionKeyword", @@ -677,12 +677,12 @@ "statements": [ { "@type": "PhpMyAdmin\\SqlParser\\Statements\\DeleteStatement", - "OPTIONS": { + "statementOptions": { "LOW_PRIORITY": 1, "QUICK": 2, "IGNORE": 3 }, - "CLAUSES": { + "clauses": { "DELETE": [ "DELETE", 2 @@ -719,7 +719,7 @@ "from": [ { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -749,14 +749,14 @@ "where": [ { "@type": "PhpMyAdmin\\SqlParser\\Components\\Condition", - "DELIMITERS": [ + "delimiters": [ "&&", "||", "AND", "OR", "XOR" ], - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "ALL": 1, "AND": 1, "BETWEEN": 1, @@ -785,14 +785,14 @@ }, { "@type": "PhpMyAdmin\\SqlParser\\Components\\Condition", - "DELIMITERS": [ + "delimiters": [ "&&", "||", "AND", "OR", "XOR" ], - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "ALL": 1, "AND": 1, "BETWEEN": 1, @@ -819,14 +819,14 @@ }, { "@type": "PhpMyAdmin\\SqlParser\\Components\\Condition", - "DELIMITERS": [ + "delimiters": [ "&&", "||", "AND", "OR", "XOR" ], - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "ALL": 1, "AND": 1, "BETWEEN": 1, @@ -856,14 +856,14 @@ }, { "@type": "PhpMyAdmin\\SqlParser\\Components\\Condition", - "DELIMITERS": [ + "delimiters": [ "&&", "||", "AND", "OR", "XOR" ], - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "ALL": 1, "AND": 1, "BETWEEN": 1, @@ -890,14 +890,14 @@ }, { "@type": "PhpMyAdmin\\SqlParser\\Components\\Condition", - "DELIMITERS": [ + "delimiters": [ "&&", "||", "AND", "OR", "XOR" ], - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "ALL": 1, "AND": 1, "BETWEEN": 1, @@ -931,7 +931,7 @@ "@type": "PhpMyAdmin\\SqlParser\\Components\\OrderKeyword", "expr": { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -957,7 +957,7 @@ } ], "limit": null, - "END_OPTIONS": [], + "statementEndOptions": [], "options": { "@type": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", "options": { diff --git a/tests/data/parser/parseDelete10.out b/tests/data/parser/parseDelete10.out index 74c2add46..21790b452 100644 --- a/tests/data/parser/parseDelete10.out +++ b/tests/data/parser/parseDelete10.out @@ -2,7 +2,7 @@ "query": "DELETE QUICK table1, table2.* FROM table1 as t1, table2 as t2 WHERE 1=1", "lexer": { "@type": "PhpMyAdmin\\SqlParser\\Lexer", - "PARSER_METHODS": [ + "parserMethods": [ "parseDelimiter", "parseWhitespace", "parseNumber", @@ -313,7 +313,7 @@ "count": 32, "idx": 32 }, - "DEFAULT_DELIMITER": ";", + "defaultDelimiter": ";", "delimiter": ";", "delimiterLen": 1, "strict": false, @@ -321,7 +321,7 @@ }, "parser": { "@type": "PhpMyAdmin\\SqlParser\\Parser", - "STATEMENT_PARSERS": { + "statementParsers": { "DESCRIBE": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", "DESC": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", "EXPLAIN": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", @@ -366,7 +366,7 @@ "LOCK": "PhpMyAdmin\\SqlParser\\Statements\\LockStatement", "UNLOCK": "PhpMyAdmin\\SqlParser\\Statements\\LockStatement" }, - "KEYWORD_PARSERS": { + "keywordParsers": { "PARTITION BY": [], "SUBPARTITION BY": [], "_OPTIONS": { @@ -375,7 +375,7 @@ }, "_END_OPTIONS": { "class": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", - "field": "end_options" + "field": "endOptions" }, "INTERSECT": { "class": "PhpMyAdmin\\SqlParser\\Components\\UnionKeyword", @@ -623,12 +623,12 @@ "statements": [ { "@type": "PhpMyAdmin\\SqlParser\\Statements\\DeleteStatement", - "OPTIONS": { + "statementOptions": { "LOW_PRIORITY": 1, "QUICK": 2, "IGNORE": 3 }, - "CLAUSES": { + "clauses": { "DELETE": [ "DELETE", 2 @@ -665,7 +665,7 @@ "from": [ { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -689,7 +689,7 @@ }, { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -717,7 +717,7 @@ "columns": [ { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -741,7 +741,7 @@ }, { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -768,14 +768,14 @@ "where": [ { "@type": "PhpMyAdmin\\SqlParser\\Components\\Condition", - "DELIMITERS": [ + "delimiters": [ "&&", "||", "AND", "OR", "XOR" ], - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "ALL": 1, "AND": 1, "BETWEEN": 1, @@ -803,7 +803,7 @@ ], "order": null, "limit": null, - "END_OPTIONS": [], + "statementEndOptions": [], "options": { "@type": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", "options": { diff --git a/tests/data/parser/parseDelete11.out b/tests/data/parser/parseDelete11.out index 0939aeafd..56045be7a 100644 --- a/tests/data/parser/parseDelete11.out +++ b/tests/data/parser/parseDelete11.out @@ -2,7 +2,7 @@ "query": "DELETE QUICK FROM table1, table2.* USING table1 AS `t1`, table2 AS `t2` WHERE 1=1", "lexer": { "@type": "PhpMyAdmin\\SqlParser\\Lexer", - "PARSER_METHODS": [ + "parserMethods": [ "parseDelimiter", "parseWhitespace", "parseNumber", @@ -331,7 +331,7 @@ "count": 34, "idx": 34 }, - "DEFAULT_DELIMITER": ";", + "defaultDelimiter": ";", "delimiter": ";", "delimiterLen": 1, "strict": false, @@ -339,7 +339,7 @@ }, "parser": { "@type": "PhpMyAdmin\\SqlParser\\Parser", - "STATEMENT_PARSERS": { + "statementParsers": { "DESCRIBE": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", "DESC": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", "EXPLAIN": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", @@ -384,7 +384,7 @@ "LOCK": "PhpMyAdmin\\SqlParser\\Statements\\LockStatement", "UNLOCK": "PhpMyAdmin\\SqlParser\\Statements\\LockStatement" }, - "KEYWORD_PARSERS": { + "keywordParsers": { "PARTITION BY": [], "SUBPARTITION BY": [], "_OPTIONS": { @@ -393,7 +393,7 @@ }, "_END_OPTIONS": { "class": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", - "field": "end_options" + "field": "endOptions" }, "INTERSECT": { "class": "PhpMyAdmin\\SqlParser\\Components\\UnionKeyword", @@ -641,12 +641,12 @@ "statements": [ { "@type": "PhpMyAdmin\\SqlParser\\Statements\\DeleteStatement", - "OPTIONS": { + "statementOptions": { "LOW_PRIORITY": 1, "QUICK": 2, "IGNORE": 3 }, - "CLAUSES": { + "clauses": { "DELETE": [ "DELETE", 2 @@ -683,7 +683,7 @@ "from": [ { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -707,7 +707,7 @@ }, { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -734,7 +734,7 @@ "using": [ { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -758,7 +758,7 @@ }, { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -786,14 +786,14 @@ "where": [ { "@type": "PhpMyAdmin\\SqlParser\\Components\\Condition", - "DELIMITERS": [ + "delimiters": [ "&&", "||", "AND", "OR", "XOR" ], - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "ALL": 1, "AND": 1, "BETWEEN": 1, @@ -821,7 +821,7 @@ ], "order": null, "limit": null, - "END_OPTIONS": [], + "statementEndOptions": [], "options": { "@type": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", "options": { diff --git a/tests/data/parser/parseDelete12.out b/tests/data/parser/parseDelete12.out index bb2b549ba..70a9324e6 100644 --- a/tests/data/parser/parseDelete12.out +++ b/tests/data/parser/parseDelete12.out @@ -2,7 +2,7 @@ "query": "DELETE QUICK FROM table1 WHERE 1=1 LIMIT 0, 25", "lexer": { "@type": "PhpMyAdmin\\SqlParser\\Lexer", - "PARSER_METHODS": [ + "parserMethods": [ "parseDelimiter", "parseWhitespace", "parseNumber", @@ -214,7 +214,7 @@ "count": 21, "idx": 21 }, - "DEFAULT_DELIMITER": ";", + "defaultDelimiter": ";", "delimiter": ";", "delimiterLen": 1, "strict": false, @@ -222,7 +222,7 @@ }, "parser": { "@type": "PhpMyAdmin\\SqlParser\\Parser", - "STATEMENT_PARSERS": { + "statementParsers": { "DESCRIBE": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", "DESC": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", "EXPLAIN": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", @@ -267,7 +267,7 @@ "LOCK": "PhpMyAdmin\\SqlParser\\Statements\\LockStatement", "UNLOCK": "PhpMyAdmin\\SqlParser\\Statements\\LockStatement" }, - "KEYWORD_PARSERS": { + "keywordParsers": { "PARTITION BY": [], "SUBPARTITION BY": [], "_OPTIONS": { @@ -276,7 +276,7 @@ }, "_END_OPTIONS": { "class": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", - "field": "end_options" + "field": "endOptions" }, "INTERSECT": { "class": "PhpMyAdmin\\SqlParser\\Components\\UnionKeyword", @@ -524,12 +524,12 @@ "statements": [ { "@type": "PhpMyAdmin\\SqlParser\\Statements\\DeleteStatement", - "OPTIONS": { + "statementOptions": { "LOW_PRIORITY": 1, "QUICK": 2, "IGNORE": 3 }, - "CLAUSES": { + "clauses": { "DELETE": [ "DELETE", 2 @@ -566,7 +566,7 @@ "from": [ { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -596,14 +596,14 @@ "where": [ { "@type": "PhpMyAdmin\\SqlParser\\Components\\Condition", - "DELIMITERS": [ + "delimiters": [ "&&", "||", "AND", "OR", "XOR" ], - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "ALL": 1, "AND": 1, "BETWEEN": 1, @@ -635,7 +635,7 @@ "offset": 0, "rowCount": 25 }, - "END_OPTIONS": [], + "statementEndOptions": [], "options": { "@type": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", "options": { diff --git a/tests/data/parser/parseDelete2.out b/tests/data/parser/parseDelete2.out index dc0f870a1..e59389852 100644 --- a/tests/data/parser/parseDelete2.out +++ b/tests/data/parser/parseDelete2.out @@ -2,7 +2,7 @@ "query": "DELETE IGNORE FROM t1", "lexer": { "@type": "PhpMyAdmin\\SqlParser\\Lexer", - "PARSER_METHODS": [ + "parserMethods": [ "parseDelimiter", "parseWhitespace", "parseNumber", @@ -97,7 +97,7 @@ "count": 8, "idx": 8 }, - "DEFAULT_DELIMITER": ";", + "defaultDelimiter": ";", "delimiter": ";", "delimiterLen": 1, "strict": false, @@ -105,7 +105,7 @@ }, "parser": { "@type": "PhpMyAdmin\\SqlParser\\Parser", - "STATEMENT_PARSERS": { + "statementParsers": { "DESCRIBE": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", "DESC": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", "EXPLAIN": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", @@ -150,7 +150,7 @@ "LOCK": "PhpMyAdmin\\SqlParser\\Statements\\LockStatement", "UNLOCK": "PhpMyAdmin\\SqlParser\\Statements\\LockStatement" }, - "KEYWORD_PARSERS": { + "keywordParsers": { "PARTITION BY": [], "SUBPARTITION BY": [], "_OPTIONS": { @@ -159,7 +159,7 @@ }, "_END_OPTIONS": { "class": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", - "field": "end_options" + "field": "endOptions" }, "INTERSECT": { "class": "PhpMyAdmin\\SqlParser\\Components\\UnionKeyword", @@ -407,12 +407,12 @@ "statements": [ { "@type": "PhpMyAdmin\\SqlParser\\Statements\\DeleteStatement", - "OPTIONS": { + "statementOptions": { "LOW_PRIORITY": 1, "QUICK": 2, "IGNORE": 3 }, - "CLAUSES": { + "clauses": { "DELETE": [ "DELETE", 2 @@ -449,7 +449,7 @@ "from": [ { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -479,7 +479,7 @@ "where": null, "order": null, "limit": null, - "END_OPTIONS": [], + "statementEndOptions": [], "options": { "@type": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", "options": { diff --git a/tests/data/parser/parseDelete3.out b/tests/data/parser/parseDelete3.out index 659d9b439..097fbb5c4 100644 --- a/tests/data/parser/parseDelete3.out +++ b/tests/data/parser/parseDelete3.out @@ -2,7 +2,7 @@ "query": "DELETE IGNORE FROM t1 WHERE 1=1", "lexer": { "@type": "PhpMyAdmin\\SqlParser\\Lexer", - "PARSER_METHODS": [ + "parserMethods": [ "parseDelimiter", "parseWhitespace", "parseNumber", @@ -151,7 +151,7 @@ "count": 14, "idx": 14 }, - "DEFAULT_DELIMITER": ";", + "defaultDelimiter": ";", "delimiter": ";", "delimiterLen": 1, "strict": false, @@ -159,7 +159,7 @@ }, "parser": { "@type": "PhpMyAdmin\\SqlParser\\Parser", - "STATEMENT_PARSERS": { + "statementParsers": { "DESCRIBE": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", "DESC": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", "EXPLAIN": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", @@ -204,7 +204,7 @@ "LOCK": "PhpMyAdmin\\SqlParser\\Statements\\LockStatement", "UNLOCK": "PhpMyAdmin\\SqlParser\\Statements\\LockStatement" }, - "KEYWORD_PARSERS": { + "keywordParsers": { "PARTITION BY": [], "SUBPARTITION BY": [], "_OPTIONS": { @@ -213,7 +213,7 @@ }, "_END_OPTIONS": { "class": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", - "field": "end_options" + "field": "endOptions" }, "INTERSECT": { "class": "PhpMyAdmin\\SqlParser\\Components\\UnionKeyword", @@ -461,12 +461,12 @@ "statements": [ { "@type": "PhpMyAdmin\\SqlParser\\Statements\\DeleteStatement", - "OPTIONS": { + "statementOptions": { "LOW_PRIORITY": 1, "QUICK": 2, "IGNORE": 3 }, - "CLAUSES": { + "clauses": { "DELETE": [ "DELETE", 2 @@ -503,7 +503,7 @@ "from": [ { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -533,14 +533,14 @@ "where": [ { "@type": "PhpMyAdmin\\SqlParser\\Components\\Condition", - "DELIMITERS": [ + "delimiters": [ "&&", "||", "AND", "OR", "XOR" ], - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "ALL": 1, "AND": 1, "BETWEEN": 1, @@ -568,7 +568,7 @@ ], "order": null, "limit": null, - "END_OPTIONS": [], + "statementEndOptions": [], "options": { "@type": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", "options": { diff --git a/tests/data/parser/parseDelete4.out b/tests/data/parser/parseDelete4.out index f34d51297..08f882e85 100644 --- a/tests/data/parser/parseDelete4.out +++ b/tests/data/parser/parseDelete4.out @@ -2,7 +2,7 @@ "query": "DELETE IGNORE FROM t1 WHERE 1=1 ORDER BY id", "lexer": { "@type": "PhpMyAdmin\\SqlParser\\Lexer", - "PARSER_METHODS": [ + "parserMethods": [ "parseDelimiter", "parseWhitespace", "parseNumber", @@ -187,7 +187,7 @@ "count": 18, "idx": 18 }, - "DEFAULT_DELIMITER": ";", + "defaultDelimiter": ";", "delimiter": ";", "delimiterLen": 1, "strict": false, @@ -195,7 +195,7 @@ }, "parser": { "@type": "PhpMyAdmin\\SqlParser\\Parser", - "STATEMENT_PARSERS": { + "statementParsers": { "DESCRIBE": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", "DESC": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", "EXPLAIN": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", @@ -240,7 +240,7 @@ "LOCK": "PhpMyAdmin\\SqlParser\\Statements\\LockStatement", "UNLOCK": "PhpMyAdmin\\SqlParser\\Statements\\LockStatement" }, - "KEYWORD_PARSERS": { + "keywordParsers": { "PARTITION BY": [], "SUBPARTITION BY": [], "_OPTIONS": { @@ -249,7 +249,7 @@ }, "_END_OPTIONS": { "class": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", - "field": "end_options" + "field": "endOptions" }, "INTERSECT": { "class": "PhpMyAdmin\\SqlParser\\Components\\UnionKeyword", @@ -497,12 +497,12 @@ "statements": [ { "@type": "PhpMyAdmin\\SqlParser\\Statements\\DeleteStatement", - "OPTIONS": { + "statementOptions": { "LOW_PRIORITY": 1, "QUICK": 2, "IGNORE": 3 }, - "CLAUSES": { + "clauses": { "DELETE": [ "DELETE", 2 @@ -539,7 +539,7 @@ "from": [ { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -569,14 +569,14 @@ "where": [ { "@type": "PhpMyAdmin\\SqlParser\\Components\\Condition", - "DELIMITERS": [ + "delimiters": [ "&&", "||", "AND", "OR", "XOR" ], - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "ALL": 1, "AND": 1, "BETWEEN": 1, @@ -607,7 +607,7 @@ "@type": "PhpMyAdmin\\SqlParser\\Components\\OrderKeyword", "expr": { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -633,7 +633,7 @@ } ], "limit": null, - "END_OPTIONS": [], + "statementEndOptions": [], "options": { "@type": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", "options": { diff --git a/tests/data/parser/parseDelete5.out b/tests/data/parser/parseDelete5.out index 78e1bfbe3..f1b36c4ae 100644 --- a/tests/data/parser/parseDelete5.out +++ b/tests/data/parser/parseDelete5.out @@ -2,7 +2,7 @@ "query": "DELETE IGNORE FROM t1 WHERE 1=1 ORDER BY id LIMIT 0,25", "lexer": { "@type": "PhpMyAdmin\\SqlParser\\Lexer", - "PARSER_METHODS": [ + "parserMethods": [ "parseDelimiter", "parseWhitespace", "parseNumber", @@ -241,7 +241,7 @@ "count": 24, "idx": 24 }, - "DEFAULT_DELIMITER": ";", + "defaultDelimiter": ";", "delimiter": ";", "delimiterLen": 1, "strict": false, @@ -249,7 +249,7 @@ }, "parser": { "@type": "PhpMyAdmin\\SqlParser\\Parser", - "STATEMENT_PARSERS": { + "statementParsers": { "DESCRIBE": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", "DESC": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", "EXPLAIN": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", @@ -294,7 +294,7 @@ "LOCK": "PhpMyAdmin\\SqlParser\\Statements\\LockStatement", "UNLOCK": "PhpMyAdmin\\SqlParser\\Statements\\LockStatement" }, - "KEYWORD_PARSERS": { + "keywordParsers": { "PARTITION BY": [], "SUBPARTITION BY": [], "_OPTIONS": { @@ -303,7 +303,7 @@ }, "_END_OPTIONS": { "class": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", - "field": "end_options" + "field": "endOptions" }, "INTERSECT": { "class": "PhpMyAdmin\\SqlParser\\Components\\UnionKeyword", @@ -551,12 +551,12 @@ "statements": [ { "@type": "PhpMyAdmin\\SqlParser\\Statements\\DeleteStatement", - "OPTIONS": { + "statementOptions": { "LOW_PRIORITY": 1, "QUICK": 2, "IGNORE": 3 }, - "CLAUSES": { + "clauses": { "DELETE": [ "DELETE", 2 @@ -593,7 +593,7 @@ "from": [ { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -623,14 +623,14 @@ "where": [ { "@type": "PhpMyAdmin\\SqlParser\\Components\\Condition", - "DELIMITERS": [ + "delimiters": [ "&&", "||", "AND", "OR", "XOR" ], - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "ALL": 1, "AND": 1, "BETWEEN": 1, @@ -661,7 +661,7 @@ "@type": "PhpMyAdmin\\SqlParser\\Components\\OrderKeyword", "expr": { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -691,7 +691,7 @@ "offset": 0, "rowCount": 25 }, - "END_OPTIONS": [], + "statementEndOptions": [], "options": { "@type": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", "options": { diff --git a/tests/data/parser/parseDelete6.out b/tests/data/parser/parseDelete6.out index 5695cec8c..bf4eaba3a 100644 --- a/tests/data/parser/parseDelete6.out +++ b/tests/data/parser/parseDelete6.out @@ -2,7 +2,7 @@ "query": "DELETE IGNORE FROM t1 ORDER BY id", "lexer": { "@type": "PhpMyAdmin\\SqlParser\\Lexer", - "PARSER_METHODS": [ + "parserMethods": [ "parseDelimiter", "parseWhitespace", "parseNumber", @@ -133,7 +133,7 @@ "count": 12, "idx": 12 }, - "DEFAULT_DELIMITER": ";", + "defaultDelimiter": ";", "delimiter": ";", "delimiterLen": 1, "strict": false, @@ -141,7 +141,7 @@ }, "parser": { "@type": "PhpMyAdmin\\SqlParser\\Parser", - "STATEMENT_PARSERS": { + "statementParsers": { "DESCRIBE": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", "DESC": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", "EXPLAIN": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", @@ -186,7 +186,7 @@ "LOCK": "PhpMyAdmin\\SqlParser\\Statements\\LockStatement", "UNLOCK": "PhpMyAdmin\\SqlParser\\Statements\\LockStatement" }, - "KEYWORD_PARSERS": { + "keywordParsers": { "PARTITION BY": [], "SUBPARTITION BY": [], "_OPTIONS": { @@ -195,7 +195,7 @@ }, "_END_OPTIONS": { "class": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", - "field": "end_options" + "field": "endOptions" }, "INTERSECT": { "class": "PhpMyAdmin\\SqlParser\\Components\\UnionKeyword", @@ -443,12 +443,12 @@ "statements": [ { "@type": "PhpMyAdmin\\SqlParser\\Statements\\DeleteStatement", - "OPTIONS": { + "statementOptions": { "LOW_PRIORITY": 1, "QUICK": 2, "IGNORE": 3 }, - "CLAUSES": { + "clauses": { "DELETE": [ "DELETE", 2 @@ -485,7 +485,7 @@ "from": [ { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -518,7 +518,7 @@ "@type": "PhpMyAdmin\\SqlParser\\Components\\OrderKeyword", "expr": { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -544,7 +544,7 @@ } ], "limit": null, - "END_OPTIONS": [], + "statementEndOptions": [], "options": { "@type": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", "options": { diff --git a/tests/data/parser/parseDelete7.out b/tests/data/parser/parseDelete7.out index 30f57a608..5306e2557 100644 --- a/tests/data/parser/parseDelete7.out +++ b/tests/data/parser/parseDelete7.out @@ -2,7 +2,7 @@ "query": "DELETE IGNORE FROM t1 ORDER BY id LIMIT 0,25", "lexer": { "@type": "PhpMyAdmin\\SqlParser\\Lexer", - "PARSER_METHODS": [ + "parserMethods": [ "parseDelimiter", "parseWhitespace", "parseNumber", @@ -187,7 +187,7 @@ "count": 18, "idx": 18 }, - "DEFAULT_DELIMITER": ";", + "defaultDelimiter": ";", "delimiter": ";", "delimiterLen": 1, "strict": false, @@ -195,7 +195,7 @@ }, "parser": { "@type": "PhpMyAdmin\\SqlParser\\Parser", - "STATEMENT_PARSERS": { + "statementParsers": { "DESCRIBE": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", "DESC": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", "EXPLAIN": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", @@ -240,7 +240,7 @@ "LOCK": "PhpMyAdmin\\SqlParser\\Statements\\LockStatement", "UNLOCK": "PhpMyAdmin\\SqlParser\\Statements\\LockStatement" }, - "KEYWORD_PARSERS": { + "keywordParsers": { "PARTITION BY": [], "SUBPARTITION BY": [], "_OPTIONS": { @@ -249,7 +249,7 @@ }, "_END_OPTIONS": { "class": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", - "field": "end_options" + "field": "endOptions" }, "INTERSECT": { "class": "PhpMyAdmin\\SqlParser\\Components\\UnionKeyword", @@ -497,12 +497,12 @@ "statements": [ { "@type": "PhpMyAdmin\\SqlParser\\Statements\\DeleteStatement", - "OPTIONS": { + "statementOptions": { "LOW_PRIORITY": 1, "QUICK": 2, "IGNORE": 3 }, - "CLAUSES": { + "clauses": { "DELETE": [ "DELETE", 2 @@ -539,7 +539,7 @@ "from": [ { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -572,7 +572,7 @@ "@type": "PhpMyAdmin\\SqlParser\\Components\\OrderKeyword", "expr": { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -602,7 +602,7 @@ "offset": 0, "rowCount": 25 }, - "END_OPTIONS": [], + "statementEndOptions": [], "options": { "@type": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", "options": { diff --git a/tests/data/parser/parseDelete8.out b/tests/data/parser/parseDelete8.out index 3d4dbec82..621248e33 100644 --- a/tests/data/parser/parseDelete8.out +++ b/tests/data/parser/parseDelete8.out @@ -2,7 +2,7 @@ "query": "DELETE IGNORE FROM t1 LIMIT 0, 25", "lexer": { "@type": "PhpMyAdmin\\SqlParser\\Lexer", - "PARSER_METHODS": [ + "parserMethods": [ "parseDelimiter", "parseWhitespace", "parseNumber", @@ -160,7 +160,7 @@ "count": 15, "idx": 15 }, - "DEFAULT_DELIMITER": ";", + "defaultDelimiter": ";", "delimiter": ";", "delimiterLen": 1, "strict": false, @@ -168,7 +168,7 @@ }, "parser": { "@type": "PhpMyAdmin\\SqlParser\\Parser", - "STATEMENT_PARSERS": { + "statementParsers": { "DESCRIBE": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", "DESC": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", "EXPLAIN": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", @@ -213,7 +213,7 @@ "LOCK": "PhpMyAdmin\\SqlParser\\Statements\\LockStatement", "UNLOCK": "PhpMyAdmin\\SqlParser\\Statements\\LockStatement" }, - "KEYWORD_PARSERS": { + "keywordParsers": { "PARTITION BY": [], "SUBPARTITION BY": [], "_OPTIONS": { @@ -222,7 +222,7 @@ }, "_END_OPTIONS": { "class": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", - "field": "end_options" + "field": "endOptions" }, "INTERSECT": { "class": "PhpMyAdmin\\SqlParser\\Components\\UnionKeyword", @@ -470,12 +470,12 @@ "statements": [ { "@type": "PhpMyAdmin\\SqlParser\\Statements\\DeleteStatement", - "OPTIONS": { + "statementOptions": { "LOW_PRIORITY": 1, "QUICK": 2, "IGNORE": 3 }, - "CLAUSES": { + "clauses": { "DELETE": [ "DELETE", 2 @@ -512,7 +512,7 @@ "from": [ { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -546,7 +546,7 @@ "offset": 0, "rowCount": 25 }, - "END_OPTIONS": [], + "statementEndOptions": [], "options": { "@type": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", "options": { diff --git a/tests/data/parser/parseDelete9.out b/tests/data/parser/parseDelete9.out index 0c5fbadcb..6a1eadf17 100644 --- a/tests/data/parser/parseDelete9.out +++ b/tests/data/parser/parseDelete9.out @@ -2,7 +2,7 @@ "query": "DELETE QUICK table1, table2.* FROM table1 as t1, table2 as t2", "lexer": { "@type": "PhpMyAdmin\\SqlParser\\Lexer", - "PARSER_METHODS": [ + "parserMethods": [ "parseDelimiter", "parseWhitespace", "parseNumber", @@ -259,7 +259,7 @@ "count": 26, "idx": 26 }, - "DEFAULT_DELIMITER": ";", + "defaultDelimiter": ";", "delimiter": ";", "delimiterLen": 1, "strict": false, @@ -267,7 +267,7 @@ }, "parser": { "@type": "PhpMyAdmin\\SqlParser\\Parser", - "STATEMENT_PARSERS": { + "statementParsers": { "DESCRIBE": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", "DESC": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", "EXPLAIN": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", @@ -312,7 +312,7 @@ "LOCK": "PhpMyAdmin\\SqlParser\\Statements\\LockStatement", "UNLOCK": "PhpMyAdmin\\SqlParser\\Statements\\LockStatement" }, - "KEYWORD_PARSERS": { + "keywordParsers": { "PARTITION BY": [], "SUBPARTITION BY": [], "_OPTIONS": { @@ -321,7 +321,7 @@ }, "_END_OPTIONS": { "class": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", - "field": "end_options" + "field": "endOptions" }, "INTERSECT": { "class": "PhpMyAdmin\\SqlParser\\Components\\UnionKeyword", @@ -569,12 +569,12 @@ "statements": [ { "@type": "PhpMyAdmin\\SqlParser\\Statements\\DeleteStatement", - "OPTIONS": { + "statementOptions": { "LOW_PRIORITY": 1, "QUICK": 2, "IGNORE": 3 }, - "CLAUSES": { + "clauses": { "DELETE": [ "DELETE", 2 @@ -611,7 +611,7 @@ "from": [ { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -635,7 +635,7 @@ }, { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -663,7 +663,7 @@ "columns": [ { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -687,7 +687,7 @@ }, { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -714,7 +714,7 @@ "where": null, "order": null, "limit": null, - "END_OPTIONS": [], + "statementEndOptions": [], "options": { "@type": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", "options": { diff --git a/tests/data/parser/parseDeleteErr1.out b/tests/data/parser/parseDeleteErr1.out index ba2f34513..4c88564a9 100644 --- a/tests/data/parser/parseDeleteErr1.out +++ b/tests/data/parser/parseDeleteErr1.out @@ -2,7 +2,7 @@ "query": "DELETE QUICK USING table1, table2.*", "lexer": { "@type": "PhpMyAdmin\\SqlParser\\Lexer", - "PARSER_METHODS": [ + "parserMethods": [ "parseDelimiter", "parseWhitespace", "parseNumber", @@ -142,7 +142,7 @@ "count": 13, "idx": 14 }, - "DEFAULT_DELIMITER": ";", + "defaultDelimiter": ";", "delimiter": ";", "delimiterLen": 1, "strict": false, @@ -150,7 +150,7 @@ }, "parser": { "@type": "PhpMyAdmin\\SqlParser\\Parser", - "STATEMENT_PARSERS": { + "statementParsers": { "DESCRIBE": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", "DESC": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", "EXPLAIN": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", @@ -195,7 +195,7 @@ "LOCK": "PhpMyAdmin\\SqlParser\\Statements\\LockStatement", "UNLOCK": "PhpMyAdmin\\SqlParser\\Statements\\LockStatement" }, - "KEYWORD_PARSERS": { + "keywordParsers": { "PARTITION BY": [], "SUBPARTITION BY": [], "_OPTIONS": { @@ -204,7 +204,7 @@ }, "_END_OPTIONS": { "class": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", - "field": "end_options" + "field": "endOptions" }, "INTERSECT": { "class": "PhpMyAdmin\\SqlParser\\Components\\UnionKeyword", @@ -452,12 +452,12 @@ "statements": [ { "@type": "PhpMyAdmin\\SqlParser\\Statements\\DeleteStatement", - "OPTIONS": { + "statementOptions": { "LOW_PRIORITY": 1, "QUICK": 2, "IGNORE": 3 }, - "CLAUSES": { + "clauses": { "DELETE": [ "DELETE", 2 @@ -499,7 +499,7 @@ "where": null, "order": null, "limit": null, - "END_OPTIONS": [], + "statementEndOptions": [], "options": { "@type": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", "options": { diff --git a/tests/data/parser/parseDeleteErr10.out b/tests/data/parser/parseDeleteErr10.out index a23f4f546..0873d5a23 100644 --- a/tests/data/parser/parseDeleteErr10.out +++ b/tests/data/parser/parseDeleteErr10.out @@ -2,7 +2,7 @@ "query": "DELETE QUICK FROM table1, table2 USING t1 as t,t2 as tt ASC a =1;", "lexer": { "@type": "PhpMyAdmin\\SqlParser\\Lexer", - "PARSER_METHODS": [ + "parserMethods": [ "parseDelimiter", "parseWhitespace", "parseNumber", @@ -322,7 +322,7 @@ "count": 33, "idx": 33 }, - "DEFAULT_DELIMITER": ";", + "defaultDelimiter": ";", "delimiter": ";", "delimiterLen": 1, "strict": false, @@ -330,7 +330,7 @@ }, "parser": { "@type": "PhpMyAdmin\\SqlParser\\Parser", - "STATEMENT_PARSERS": { + "statementParsers": { "DESCRIBE": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", "DESC": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", "EXPLAIN": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", @@ -375,7 +375,7 @@ "LOCK": "PhpMyAdmin\\SqlParser\\Statements\\LockStatement", "UNLOCK": "PhpMyAdmin\\SqlParser\\Statements\\LockStatement" }, - "KEYWORD_PARSERS": { + "keywordParsers": { "PARTITION BY": [], "SUBPARTITION BY": [], "_OPTIONS": { @@ -384,7 +384,7 @@ }, "_END_OPTIONS": { "class": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", - "field": "end_options" + "field": "endOptions" }, "INTERSECT": { "class": "PhpMyAdmin\\SqlParser\\Components\\UnionKeyword", @@ -632,12 +632,12 @@ "statements": [ { "@type": "PhpMyAdmin\\SqlParser\\Statements\\DeleteStatement", - "OPTIONS": { + "statementOptions": { "LOW_PRIORITY": 1, "QUICK": 2, "IGNORE": 3 }, - "CLAUSES": { + "clauses": { "DELETE": [ "DELETE", 2 @@ -674,7 +674,7 @@ "from": [ { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -698,7 +698,7 @@ }, { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -725,7 +725,7 @@ "using": [ { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -749,7 +749,7 @@ }, { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -777,7 +777,7 @@ "where": null, "order": null, "limit": null, - "END_OPTIONS": [], + "statementEndOptions": [], "options": { "@type": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", "options": { diff --git a/tests/data/parser/parseDeleteErr11.out b/tests/data/parser/parseDeleteErr11.out index f4d338787..2d0dcf859 100644 --- a/tests/data/parser/parseDeleteErr11.out +++ b/tests/data/parser/parseDeleteErr11.out @@ -2,7 +2,7 @@ "query": "DELETE QUICK FROM table1 WHERE a = 1 ASC", "lexer": { "@type": "PhpMyAdmin\\SqlParser\\Lexer", - "PARSER_METHODS": [ + "parserMethods": [ "parseDelimiter", "parseWhitespace", "parseNumber", @@ -187,7 +187,7 @@ "count": 18, "idx": 19 }, - "DEFAULT_DELIMITER": ";", + "defaultDelimiter": ";", "delimiter": ";", "delimiterLen": 1, "strict": false, @@ -195,7 +195,7 @@ }, "parser": { "@type": "PhpMyAdmin\\SqlParser\\Parser", - "STATEMENT_PARSERS": { + "statementParsers": { "DESCRIBE": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", "DESC": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", "EXPLAIN": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", @@ -240,7 +240,7 @@ "LOCK": "PhpMyAdmin\\SqlParser\\Statements\\LockStatement", "UNLOCK": "PhpMyAdmin\\SqlParser\\Statements\\LockStatement" }, - "KEYWORD_PARSERS": { + "keywordParsers": { "PARTITION BY": [], "SUBPARTITION BY": [], "_OPTIONS": { @@ -249,7 +249,7 @@ }, "_END_OPTIONS": { "class": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", - "field": "end_options" + "field": "endOptions" }, "INTERSECT": { "class": "PhpMyAdmin\\SqlParser\\Components\\UnionKeyword", @@ -497,12 +497,12 @@ "statements": [ { "@type": "PhpMyAdmin\\SqlParser\\Statements\\DeleteStatement", - "OPTIONS": { + "statementOptions": { "LOW_PRIORITY": 1, "QUICK": 2, "IGNORE": 3 }, - "CLAUSES": { + "clauses": { "DELETE": [ "DELETE", 2 @@ -539,7 +539,7 @@ "from": [ { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -569,14 +569,14 @@ "where": [ { "@type": "PhpMyAdmin\\SqlParser\\Components\\Condition", - "DELIMITERS": [ + "delimiters": [ "&&", "||", "AND", "OR", "XOR" ], - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "ALL": 1, "AND": 1, "BETWEEN": 1, @@ -606,7 +606,7 @@ ], "order": null, "limit": null, - "END_OPTIONS": [], + "statementEndOptions": [], "options": { "@type": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", "options": { diff --git a/tests/data/parser/parseDeleteErr12.out b/tests/data/parser/parseDeleteErr12.out index 828b4c2c8..fae766b19 100644 --- a/tests/data/parser/parseDeleteErr12.out +++ b/tests/data/parser/parseDeleteErr12.out @@ -2,7 +2,7 @@ "query": "DELETE QUICK FROM table1, table2 USING t1 as t,t2 as tt as ttt WHEE a =1;\n", "lexer": { "@type": "PhpMyAdmin\\SqlParser\\Lexer", - "PARSER_METHODS": [ + "parserMethods": [ "parseDelimiter", "parseWhitespace", "parseNumber", @@ -367,7 +367,7 @@ "count": 38, "idx": 38 }, - "DEFAULT_DELIMITER": ";", + "defaultDelimiter": ";", "delimiter": ";", "delimiterLen": 1, "strict": false, @@ -375,7 +375,7 @@ }, "parser": { "@type": "PhpMyAdmin\\SqlParser\\Parser", - "STATEMENT_PARSERS": { + "statementParsers": { "DESCRIBE": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", "DESC": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", "EXPLAIN": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", @@ -420,7 +420,7 @@ "LOCK": "PhpMyAdmin\\SqlParser\\Statements\\LockStatement", "UNLOCK": "PhpMyAdmin\\SqlParser\\Statements\\LockStatement" }, - "KEYWORD_PARSERS": { + "keywordParsers": { "PARTITION BY": [], "SUBPARTITION BY": [], "_OPTIONS": { @@ -429,7 +429,7 @@ }, "_END_OPTIONS": { "class": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", - "field": "end_options" + "field": "endOptions" }, "INTERSECT": { "class": "PhpMyAdmin\\SqlParser\\Components\\UnionKeyword", @@ -677,12 +677,12 @@ "statements": [ { "@type": "PhpMyAdmin\\SqlParser\\Statements\\DeleteStatement", - "OPTIONS": { + "statementOptions": { "LOW_PRIORITY": 1, "QUICK": 2, "IGNORE": 3 }, - "CLAUSES": { + "clauses": { "DELETE": [ "DELETE", 2 @@ -719,7 +719,7 @@ "from": [ { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -743,7 +743,7 @@ }, { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -770,7 +770,7 @@ "using": [ { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -794,7 +794,7 @@ }, { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -822,7 +822,7 @@ "where": null, "order": null, "limit": null, - "END_OPTIONS": [], + "statementEndOptions": [], "options": { "@type": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", "options": { diff --git a/tests/data/parser/parseDeleteErr2.out b/tests/data/parser/parseDeleteErr2.out index 9368eda6c..6f7b58282 100644 --- a/tests/data/parser/parseDeleteErr2.out +++ b/tests/data/parser/parseDeleteErr2.out @@ -2,7 +2,7 @@ "query": "DELETE QUICK table1, table2.* USING table1 AS `t1`, table2 AS `t2` WHERE 1=1", "lexer": { "@type": "PhpMyAdmin\\SqlParser\\Lexer", - "PARSER_METHODS": [ + "parserMethods": [ "parseDelimiter", "parseWhitespace", "parseNumber", @@ -313,7 +313,7 @@ "count": 32, "idx": 33 }, - "DEFAULT_DELIMITER": ";", + "defaultDelimiter": ";", "delimiter": ";", "delimiterLen": 1, "strict": false, @@ -321,7 +321,7 @@ }, "parser": { "@type": "PhpMyAdmin\\SqlParser\\Parser", - "STATEMENT_PARSERS": { + "statementParsers": { "DESCRIBE": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", "DESC": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", "EXPLAIN": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", @@ -366,7 +366,7 @@ "LOCK": "PhpMyAdmin\\SqlParser\\Statements\\LockStatement", "UNLOCK": "PhpMyAdmin\\SqlParser\\Statements\\LockStatement" }, - "KEYWORD_PARSERS": { + "keywordParsers": { "PARTITION BY": [], "SUBPARTITION BY": [], "_OPTIONS": { @@ -375,7 +375,7 @@ }, "_END_OPTIONS": { "class": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", - "field": "end_options" + "field": "endOptions" }, "INTERSECT": { "class": "PhpMyAdmin\\SqlParser\\Components\\UnionKeyword", @@ -623,12 +623,12 @@ "statements": [ { "@type": "PhpMyAdmin\\SqlParser\\Statements\\DeleteStatement", - "OPTIONS": { + "statementOptions": { "LOW_PRIORITY": 1, "QUICK": 2, "IGNORE": 3 }, - "CLAUSES": { + "clauses": { "DELETE": [ "DELETE", 2 @@ -668,7 +668,7 @@ "columns": [ { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -692,7 +692,7 @@ }, { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -719,7 +719,7 @@ "where": null, "order": null, "limit": null, - "END_OPTIONS": [], + "statementEndOptions": [], "options": { "@type": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", "options": { diff --git a/tests/data/parser/parseDeleteErr3.out b/tests/data/parser/parseDeleteErr3.out index 08f778174..79c69a143 100644 --- a/tests/data/parser/parseDeleteErr3.out +++ b/tests/data/parser/parseDeleteErr3.out @@ -2,7 +2,7 @@ "query": "DELETE QUICK table1, table2.* table1 AS `t1` table2 AS `t2` WHERE 1=1", "lexer": { "@type": "PhpMyAdmin\\SqlParser\\Lexer", - "PARSER_METHODS": [ + "parserMethods": [ "parseDelimiter", "parseWhitespace", "parseNumber", @@ -286,7 +286,7 @@ "count": 29, "idx": 30 }, - "DEFAULT_DELIMITER": ";", + "defaultDelimiter": ";", "delimiter": ";", "delimiterLen": 1, "strict": false, @@ -294,7 +294,7 @@ }, "parser": { "@type": "PhpMyAdmin\\SqlParser\\Parser", - "STATEMENT_PARSERS": { + "statementParsers": { "DESCRIBE": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", "DESC": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", "EXPLAIN": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", @@ -339,7 +339,7 @@ "LOCK": "PhpMyAdmin\\SqlParser\\Statements\\LockStatement", "UNLOCK": "PhpMyAdmin\\SqlParser\\Statements\\LockStatement" }, - "KEYWORD_PARSERS": { + "keywordParsers": { "PARTITION BY": [], "SUBPARTITION BY": [], "_OPTIONS": { @@ -348,7 +348,7 @@ }, "_END_OPTIONS": { "class": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", - "field": "end_options" + "field": "endOptions" }, "INTERSECT": { "class": "PhpMyAdmin\\SqlParser\\Components\\UnionKeyword", @@ -596,12 +596,12 @@ "statements": [ { "@type": "PhpMyAdmin\\SqlParser\\Statements\\DeleteStatement", - "OPTIONS": { + "statementOptions": { "LOW_PRIORITY": 1, "QUICK": 2, "IGNORE": 3 }, - "CLAUSES": { + "clauses": { "DELETE": [ "DELETE", 2 @@ -641,7 +641,7 @@ "columns": [ { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -665,7 +665,7 @@ }, { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -692,7 +692,7 @@ "where": null, "order": null, "limit": null, - "END_OPTIONS": [], + "statementEndOptions": [], "options": { "@type": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", "options": { diff --git a/tests/data/parser/parseDeleteErr4.out b/tests/data/parser/parseDeleteErr4.out index 69f688e65..36236a5f3 100644 --- a/tests/data/parser/parseDeleteErr4.out +++ b/tests/data/parser/parseDeleteErr4.out @@ -2,7 +2,7 @@ "query": "DELETE QUICK FROM table1, table2.* table1 AS `t1` USING table2 AS `t2` WHERE 1=1 ORDER BY id ASC", "lexer": { "@type": "PhpMyAdmin\\SqlParser\\Lexer", - "PARSER_METHODS": [ + "parserMethods": [ "parseDelimiter", "parseWhitespace", "parseNumber", @@ -376,7 +376,7 @@ "count": 39, "idx": 40 }, - "DEFAULT_DELIMITER": ";", + "defaultDelimiter": ";", "delimiter": ";", "delimiterLen": 1, "strict": false, @@ -384,7 +384,7 @@ }, "parser": { "@type": "PhpMyAdmin\\SqlParser\\Parser", - "STATEMENT_PARSERS": { + "statementParsers": { "DESCRIBE": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", "DESC": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", "EXPLAIN": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", @@ -429,7 +429,7 @@ "LOCK": "PhpMyAdmin\\SqlParser\\Statements\\LockStatement", "UNLOCK": "PhpMyAdmin\\SqlParser\\Statements\\LockStatement" }, - "KEYWORD_PARSERS": { + "keywordParsers": { "PARTITION BY": [], "SUBPARTITION BY": [], "_OPTIONS": { @@ -438,7 +438,7 @@ }, "_END_OPTIONS": { "class": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", - "field": "end_options" + "field": "endOptions" }, "INTERSECT": { "class": "PhpMyAdmin\\SqlParser\\Components\\UnionKeyword", @@ -686,12 +686,12 @@ "statements": [ { "@type": "PhpMyAdmin\\SqlParser\\Statements\\DeleteStatement", - "OPTIONS": { + "statementOptions": { "LOW_PRIORITY": 1, "QUICK": 2, "IGNORE": 3 }, - "CLAUSES": { + "clauses": { "DELETE": [ "DELETE", 2 @@ -728,7 +728,7 @@ "from": [ { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -752,7 +752,7 @@ }, { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -779,7 +779,7 @@ "using": [ { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -807,14 +807,14 @@ "where": [ { "@type": "PhpMyAdmin\\SqlParser\\Components\\Condition", - "DELIMITERS": [ + "delimiters": [ "&&", "||", "AND", "OR", "XOR" ], - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "ALL": 1, "AND": 1, "BETWEEN": 1, @@ -842,7 +842,7 @@ ], "order": null, "limit": null, - "END_OPTIONS": [], + "statementEndOptions": [], "options": { "@type": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", "options": { diff --git a/tests/data/parser/parseDeleteErr5.out b/tests/data/parser/parseDeleteErr5.out index 99e201bb1..6aaa420ee 100644 --- a/tests/data/parser/parseDeleteErr5.out +++ b/tests/data/parser/parseDeleteErr5.out @@ -2,7 +2,7 @@ "query": "DELETE QUICK FROM table1 WHERE 1=1 ORDER BY id ASC WHERE 1=1", "lexer": { "@type": "PhpMyAdmin\\SqlParser\\Lexer", - "PARSER_METHODS": [ + "parserMethods": [ "parseDelimiter", "parseWhitespace", "parseNumber", @@ -259,7 +259,7 @@ "count": 26, "idx": 27 }, - "DEFAULT_DELIMITER": ";", + "defaultDelimiter": ";", "delimiter": ";", "delimiterLen": 1, "strict": false, @@ -267,7 +267,7 @@ }, "parser": { "@type": "PhpMyAdmin\\SqlParser\\Parser", - "STATEMENT_PARSERS": { + "statementParsers": { "DESCRIBE": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", "DESC": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", "EXPLAIN": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", @@ -312,7 +312,7 @@ "LOCK": "PhpMyAdmin\\SqlParser\\Statements\\LockStatement", "UNLOCK": "PhpMyAdmin\\SqlParser\\Statements\\LockStatement" }, - "KEYWORD_PARSERS": { + "keywordParsers": { "PARTITION BY": [], "SUBPARTITION BY": [], "_OPTIONS": { @@ -321,7 +321,7 @@ }, "_END_OPTIONS": { "class": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", - "field": "end_options" + "field": "endOptions" }, "INTERSECT": { "class": "PhpMyAdmin\\SqlParser\\Components\\UnionKeyword", @@ -569,12 +569,12 @@ "statements": [ { "@type": "PhpMyAdmin\\SqlParser\\Statements\\DeleteStatement", - "OPTIONS": { + "statementOptions": { "LOW_PRIORITY": 1, "QUICK": 2, "IGNORE": 3 }, - "CLAUSES": { + "clauses": { "DELETE": [ "DELETE", 2 @@ -611,7 +611,7 @@ "from": [ { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -641,14 +641,14 @@ "where": [ { "@type": "PhpMyAdmin\\SqlParser\\Components\\Condition", - "DELIMITERS": [ + "delimiters": [ "&&", "||", "AND", "OR", "XOR" ], - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "ALL": 1, "AND": 1, "BETWEEN": 1, @@ -679,7 +679,7 @@ "@type": "PhpMyAdmin\\SqlParser\\Components\\OrderKeyword", "expr": { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -705,7 +705,7 @@ } ], "limit": null, - "END_OPTIONS": [], + "statementEndOptions": [], "options": { "@type": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", "options": { diff --git a/tests/data/parser/parseDeleteErr6.out b/tests/data/parser/parseDeleteErr6.out index bee0d409c..6b40ca9de 100644 --- a/tests/data/parser/parseDeleteErr6.out +++ b/tests/data/parser/parseDeleteErr6.out @@ -2,7 +2,7 @@ "query": "DELETE QUICK FROM table1, table2.* table1 AS `t1` USING table2 AS `t2` WHERE 1=1 LIMIT 0, 25", "lexer": { "@type": "PhpMyAdmin\\SqlParser\\Lexer", - "PARSER_METHODS": [ + "parserMethods": [ "parseDelimiter", "parseWhitespace", "parseNumber", @@ -385,7 +385,7 @@ "count": 40, "idx": 41 }, - "DEFAULT_DELIMITER": ";", + "defaultDelimiter": ";", "delimiter": ";", "delimiterLen": 1, "strict": false, @@ -393,7 +393,7 @@ }, "parser": { "@type": "PhpMyAdmin\\SqlParser\\Parser", - "STATEMENT_PARSERS": { + "statementParsers": { "DESCRIBE": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", "DESC": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", "EXPLAIN": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", @@ -438,7 +438,7 @@ "LOCK": "PhpMyAdmin\\SqlParser\\Statements\\LockStatement", "UNLOCK": "PhpMyAdmin\\SqlParser\\Statements\\LockStatement" }, - "KEYWORD_PARSERS": { + "keywordParsers": { "PARTITION BY": [], "SUBPARTITION BY": [], "_OPTIONS": { @@ -447,7 +447,7 @@ }, "_END_OPTIONS": { "class": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", - "field": "end_options" + "field": "endOptions" }, "INTERSECT": { "class": "PhpMyAdmin\\SqlParser\\Components\\UnionKeyword", @@ -695,12 +695,12 @@ "statements": [ { "@type": "PhpMyAdmin\\SqlParser\\Statements\\DeleteStatement", - "OPTIONS": { + "statementOptions": { "LOW_PRIORITY": 1, "QUICK": 2, "IGNORE": 3 }, - "CLAUSES": { + "clauses": { "DELETE": [ "DELETE", 2 @@ -737,7 +737,7 @@ "from": [ { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -761,7 +761,7 @@ }, { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -788,7 +788,7 @@ "using": [ { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -816,14 +816,14 @@ "where": [ { "@type": "PhpMyAdmin\\SqlParser\\Components\\Condition", - "DELIMITERS": [ + "delimiters": [ "&&", "||", "AND", "OR", "XOR" ], - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "ALL": 1, "AND": 1, "BETWEEN": 1, @@ -851,7 +851,7 @@ ], "order": null, "limit": null, - "END_OPTIONS": [], + "statementEndOptions": [], "options": { "@type": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", "options": { diff --git a/tests/data/parser/parseDeleteErr7.out b/tests/data/parser/parseDeleteErr7.out index a2aeb5e08..8e8a867a4 100644 --- a/tests/data/parser/parseDeleteErr7.out +++ b/tests/data/parser/parseDeleteErr7.out @@ -2,7 +2,7 @@ "query": "DELETE QUICK FROM table1 WHERE a = 1 ORDER BY id ASC WHERE", "lexer": { "@type": "PhpMyAdmin\\SqlParser\\Lexer", - "PARSER_METHODS": [ + "parserMethods": [ "parseDelimiter", "parseWhitespace", "parseNumber", @@ -241,7 +241,7 @@ "count": 24, "idx": 25 }, - "DEFAULT_DELIMITER": ";", + "defaultDelimiter": ";", "delimiter": ";", "delimiterLen": 1, "strict": false, @@ -249,7 +249,7 @@ }, "parser": { "@type": "PhpMyAdmin\\SqlParser\\Parser", - "STATEMENT_PARSERS": { + "statementParsers": { "DESCRIBE": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", "DESC": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", "EXPLAIN": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", @@ -294,7 +294,7 @@ "LOCK": "PhpMyAdmin\\SqlParser\\Statements\\LockStatement", "UNLOCK": "PhpMyAdmin\\SqlParser\\Statements\\LockStatement" }, - "KEYWORD_PARSERS": { + "keywordParsers": { "PARTITION BY": [], "SUBPARTITION BY": [], "_OPTIONS": { @@ -303,7 +303,7 @@ }, "_END_OPTIONS": { "class": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", - "field": "end_options" + "field": "endOptions" }, "INTERSECT": { "class": "PhpMyAdmin\\SqlParser\\Components\\UnionKeyword", @@ -551,12 +551,12 @@ "statements": [ { "@type": "PhpMyAdmin\\SqlParser\\Statements\\DeleteStatement", - "OPTIONS": { + "statementOptions": { "LOW_PRIORITY": 1, "QUICK": 2, "IGNORE": 3 }, - "CLAUSES": { + "clauses": { "DELETE": [ "DELETE", 2 @@ -593,7 +593,7 @@ "from": [ { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -623,14 +623,14 @@ "where": [ { "@type": "PhpMyAdmin\\SqlParser\\Components\\Condition", - "DELIMITERS": [ + "delimiters": [ "&&", "||", "AND", "OR", "XOR" ], - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "ALL": 1, "AND": 1, "BETWEEN": 1, @@ -663,7 +663,7 @@ "@type": "PhpMyAdmin\\SqlParser\\Components\\OrderKeyword", "expr": { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -689,7 +689,7 @@ } ], "limit": null, - "END_OPTIONS": [], + "statementEndOptions": [], "options": { "@type": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", "options": { diff --git a/tests/data/parser/parseDeleteErr8.out b/tests/data/parser/parseDeleteErr8.out index ea42eea5e..6bec75e87 100644 --- a/tests/data/parser/parseDeleteErr8.out +++ b/tests/data/parser/parseDeleteErr8.out @@ -2,7 +2,7 @@ "query": "DELETE QUICK FROM table1 ASC", "lexer": { "@type": "PhpMyAdmin\\SqlParser\\Lexer", - "PARSER_METHODS": [ + "parserMethods": [ "parseDelimiter", "parseWhitespace", "parseNumber", @@ -115,7 +115,7 @@ "count": 10, "idx": 11 }, - "DEFAULT_DELIMITER": ";", + "defaultDelimiter": ";", "delimiter": ";", "delimiterLen": 1, "strict": false, @@ -123,7 +123,7 @@ }, "parser": { "@type": "PhpMyAdmin\\SqlParser\\Parser", - "STATEMENT_PARSERS": { + "statementParsers": { "DESCRIBE": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", "DESC": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", "EXPLAIN": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", @@ -168,7 +168,7 @@ "LOCK": "PhpMyAdmin\\SqlParser\\Statements\\LockStatement", "UNLOCK": "PhpMyAdmin\\SqlParser\\Statements\\LockStatement" }, - "KEYWORD_PARSERS": { + "keywordParsers": { "PARTITION BY": [], "SUBPARTITION BY": [], "_OPTIONS": { @@ -177,7 +177,7 @@ }, "_END_OPTIONS": { "class": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", - "field": "end_options" + "field": "endOptions" }, "INTERSECT": { "class": "PhpMyAdmin\\SqlParser\\Components\\UnionKeyword", @@ -425,12 +425,12 @@ "statements": [ { "@type": "PhpMyAdmin\\SqlParser\\Statements\\DeleteStatement", - "OPTIONS": { + "statementOptions": { "LOW_PRIORITY": 1, "QUICK": 2, "IGNORE": 3 }, - "CLAUSES": { + "clauses": { "DELETE": [ "DELETE", 2 @@ -467,7 +467,7 @@ "from": [ { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -497,7 +497,7 @@ "where": null, "order": null, "limit": null, - "END_OPTIONS": [], + "statementEndOptions": [], "options": { "@type": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", "options": { diff --git a/tests/data/parser/parseDeleteErr9.out b/tests/data/parser/parseDeleteErr9.out index eaa7c15c5..9c7ae5f30 100644 --- a/tests/data/parser/parseDeleteErr9.out +++ b/tests/data/parser/parseDeleteErr9.out @@ -2,7 +2,7 @@ "query": "DELETE QUICK FROM table1, table2 USING t1 as t,t2 as tt WHEE a =1;", "lexer": { "@type": "PhpMyAdmin\\SqlParser\\Lexer", - "PARSER_METHODS": [ + "parserMethods": [ "parseDelimiter", "parseWhitespace", "parseNumber", @@ -322,7 +322,7 @@ "count": 33, "idx": 33 }, - "DEFAULT_DELIMITER": ";", + "defaultDelimiter": ";", "delimiter": ";", "delimiterLen": 1, "strict": false, @@ -330,7 +330,7 @@ }, "parser": { "@type": "PhpMyAdmin\\SqlParser\\Parser", - "STATEMENT_PARSERS": { + "statementParsers": { "DESCRIBE": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", "DESC": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", "EXPLAIN": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", @@ -375,7 +375,7 @@ "LOCK": "PhpMyAdmin\\SqlParser\\Statements\\LockStatement", "UNLOCK": "PhpMyAdmin\\SqlParser\\Statements\\LockStatement" }, - "KEYWORD_PARSERS": { + "keywordParsers": { "PARTITION BY": [], "SUBPARTITION BY": [], "_OPTIONS": { @@ -384,7 +384,7 @@ }, "_END_OPTIONS": { "class": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", - "field": "end_options" + "field": "endOptions" }, "INTERSECT": { "class": "PhpMyAdmin\\SqlParser\\Components\\UnionKeyword", @@ -632,12 +632,12 @@ "statements": [ { "@type": "PhpMyAdmin\\SqlParser\\Statements\\DeleteStatement", - "OPTIONS": { + "statementOptions": { "LOW_PRIORITY": 1, "QUICK": 2, "IGNORE": 3 }, - "CLAUSES": { + "clauses": { "DELETE": [ "DELETE", 2 @@ -674,7 +674,7 @@ "from": [ { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -698,7 +698,7 @@ }, { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -725,7 +725,7 @@ "using": [ { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -749,7 +749,7 @@ }, { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -777,7 +777,7 @@ "where": null, "order": null, "limit": null, - "END_OPTIONS": [], + "statementEndOptions": [], "options": { "@type": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", "options": { diff --git a/tests/data/parser/parseDeleteJoin.out b/tests/data/parser/parseDeleteJoin.out index 2807adef3..402bf08a7 100644 --- a/tests/data/parser/parseDeleteJoin.out +++ b/tests/data/parser/parseDeleteJoin.out @@ -2,7 +2,7 @@ "query": "DELETE t1, t2 FROM t1 INNER JOIN t2 INNER JOIN t3 WHERE t1.id=t2.id AND t2.id=t3.id", "lexer": { "@type": "PhpMyAdmin\\SqlParser\\Lexer", - "PARSER_METHODS": [ + "parserMethods": [ "parseDelimiter", "parseWhitespace", "parseNumber", @@ -376,7 +376,7 @@ "count": 39, "idx": 39 }, - "DEFAULT_DELIMITER": ";", + "defaultDelimiter": ";", "delimiter": ";", "delimiterLen": 1, "strict": false, @@ -384,7 +384,7 @@ }, "parser": { "@type": "PhpMyAdmin\\SqlParser\\Parser", - "STATEMENT_PARSERS": { + "statementParsers": { "DESCRIBE": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", "DESC": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", "EXPLAIN": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", @@ -429,7 +429,7 @@ "LOCK": "PhpMyAdmin\\SqlParser\\Statements\\LockStatement", "UNLOCK": "PhpMyAdmin\\SqlParser\\Statements\\LockStatement" }, - "KEYWORD_PARSERS": { + "keywordParsers": { "PARTITION BY": [], "SUBPARTITION BY": [], "_OPTIONS": { @@ -438,7 +438,7 @@ }, "_END_OPTIONS": { "class": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", - "field": "end_options" + "field": "endOptions" }, "INTERSECT": { "class": "PhpMyAdmin\\SqlParser\\Components\\UnionKeyword", @@ -686,12 +686,12 @@ "statements": [ { "@type": "PhpMyAdmin\\SqlParser\\Statements\\DeleteStatement", - "OPTIONS": { + "statementOptions": { "LOW_PRIORITY": 1, "QUICK": 2, "IGNORE": 3 }, - "CLAUSES": { + "clauses": { "DELETE": [ "DELETE", 2 @@ -728,7 +728,7 @@ "from": [ { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -754,7 +754,7 @@ "join": [ { "@type": "PhpMyAdmin\\SqlParser\\Components\\JoinKeyword", - "JOINS": { + "joins": { "CROSS JOIN": "CROSS", "FULL JOIN": "FULL", "FULL OUTER JOIN": "FULL", @@ -774,7 +774,7 @@ "type": "INNER", "expr": { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -801,7 +801,7 @@ }, { "@type": "PhpMyAdmin\\SqlParser\\Components\\JoinKeyword", - "JOINS": { + "joins": { "CROSS JOIN": "CROSS", "FULL JOIN": "FULL", "FULL OUTER JOIN": "FULL", @@ -821,7 +821,7 @@ "type": "INNER", "expr": { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -851,7 +851,7 @@ "columns": [ { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -875,7 +875,7 @@ }, { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -902,14 +902,14 @@ "where": [ { "@type": "PhpMyAdmin\\SqlParser\\Components\\Condition", - "DELIMITERS": [ + "delimiters": [ "&&", "||", "AND", "OR", "XOR" ], - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "ALL": 1, "AND": 1, "BETWEEN": 1, @@ -940,14 +940,14 @@ }, { "@type": "PhpMyAdmin\\SqlParser\\Components\\Condition", - "DELIMITERS": [ + "delimiters": [ "&&", "||", "AND", "OR", "XOR" ], - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "ALL": 1, "AND": 1, "BETWEEN": 1, @@ -974,14 +974,14 @@ }, { "@type": "PhpMyAdmin\\SqlParser\\Components\\Condition", - "DELIMITERS": [ + "delimiters": [ "&&", "||", "AND", "OR", "XOR" ], - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "ALL": 1, "AND": 1, "BETWEEN": 1, @@ -1013,7 +1013,7 @@ ], "order": null, "limit": null, - "END_OPTIONS": [], + "statementEndOptions": [], "options": { "@type": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", "options": [] diff --git a/tests/data/parser/parseDelimiter.out b/tests/data/parser/parseDelimiter.out index dca84018e..50d29c24a 100644 --- a/tests/data/parser/parseDelimiter.out +++ b/tests/data/parser/parseDelimiter.out @@ -2,7 +2,7 @@ "query": "SELECT * FROM foo;\nDELIMITER $$\nSELECT * FROM bar$$\nDELIMITER ;\nSELECT * FROM baz;", "lexer": { "@type": "PhpMyAdmin\\SqlParser\\Lexer", - "PARSER_METHODS": [ + "parserMethods": [ "parseDelimiter", "parseWhitespace", "parseNumber", @@ -340,7 +340,7 @@ "count": 35, "idx": 35 }, - "DEFAULT_DELIMITER": ";", + "defaultDelimiter": ";", "delimiter": ";", "delimiterLen": 1, "strict": false, @@ -348,7 +348,7 @@ }, "parser": { "@type": "PhpMyAdmin\\SqlParser\\Parser", - "STATEMENT_PARSERS": { + "statementParsers": { "DESCRIBE": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", "DESC": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", "EXPLAIN": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", @@ -393,7 +393,7 @@ "LOCK": "PhpMyAdmin\\SqlParser\\Statements\\LockStatement", "UNLOCK": "PhpMyAdmin\\SqlParser\\Statements\\LockStatement" }, - "KEYWORD_PARSERS": { + "keywordParsers": { "PARTITION BY": [], "SUBPARTITION BY": [], "_OPTIONS": { @@ -402,7 +402,7 @@ }, "_END_OPTIONS": { "class": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", - "field": "end_options" + "field": "endOptions" }, "INTERSECT": { "class": "PhpMyAdmin\\SqlParser\\Components\\UnionKeyword", @@ -650,7 +650,7 @@ "statements": [ { "@type": "PhpMyAdmin\\SqlParser\\Statements\\SelectStatement", - "OPTIONS": { + "statementOptions": { "ALL": 1, "DISTINCT": 1, "DISTINCTROW": 1, @@ -667,11 +667,11 @@ "SQL_NO_CACHE": 8, "SQL_CALC_FOUND_ROWS": 9 }, - "END_OPTIONS": { + "statementEndOptions": { "FOR UPDATE": 1, "LOCK IN SHARE MODE": 1 }, - "CLAUSES": { + "clauses": { "SELECT": [ "SELECT", 2 @@ -800,7 +800,7 @@ "expr": [ { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -826,7 +826,7 @@ "from": [ { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -849,7 +849,7 @@ "subquery": null } ], - "index_hints": null, + "indexHints": null, "partition": null, "where": null, "group": null, @@ -860,7 +860,7 @@ "into": null, "join": null, "union": [], - "end_options": null, + "endOptions": null, "options": { "@type": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", "options": [] @@ -870,7 +870,7 @@ }, { "@type": "PhpMyAdmin\\SqlParser\\Statements\\SelectStatement", - "OPTIONS": { + "statementOptions": { "ALL": 1, "DISTINCT": 1, "DISTINCTROW": 1, @@ -887,11 +887,11 @@ "SQL_NO_CACHE": 8, "SQL_CALC_FOUND_ROWS": 9 }, - "END_OPTIONS": { + "statementEndOptions": { "FOR UPDATE": 1, "LOCK IN SHARE MODE": 1 }, - "CLAUSES": { + "clauses": { "SELECT": [ "SELECT", 2 @@ -1020,7 +1020,7 @@ "expr": [ { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -1046,7 +1046,7 @@ "from": [ { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -1069,7 +1069,7 @@ "subquery": null } ], - "index_hints": null, + "indexHints": null, "partition": null, "where": null, "group": null, @@ -1080,7 +1080,7 @@ "into": null, "join": null, "union": [], - "end_options": null, + "endOptions": null, "options": { "@type": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", "options": [] @@ -1090,7 +1090,7 @@ }, { "@type": "PhpMyAdmin\\SqlParser\\Statements\\SelectStatement", - "OPTIONS": { + "statementOptions": { "ALL": 1, "DISTINCT": 1, "DISTINCTROW": 1, @@ -1107,11 +1107,11 @@ "SQL_NO_CACHE": 8, "SQL_CALC_FOUND_ROWS": 9 }, - "END_OPTIONS": { + "statementEndOptions": { "FOR UPDATE": 1, "LOCK IN SHARE MODE": 1 }, - "CLAUSES": { + "clauses": { "SELECT": [ "SELECT", 2 @@ -1240,7 +1240,7 @@ "expr": [ { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -1266,7 +1266,7 @@ "from": [ { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -1289,7 +1289,7 @@ "subquery": null } ], - "index_hints": null, + "indexHints": null, "partition": null, "where": null, "group": null, @@ -1300,7 +1300,7 @@ "into": null, "join": null, "union": [], - "end_options": null, + "endOptions": null, "options": { "@type": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", "options": [] diff --git a/tests/data/parser/parseDrop.out b/tests/data/parser/parseDrop.out index bcfac9990..5a2b34539 100644 --- a/tests/data/parser/parseDrop.out +++ b/tests/data/parser/parseDrop.out @@ -2,7 +2,7 @@ "query": "DROP USER IF EXISTS 'testtest'@'%';", "lexer": { "@type": "PhpMyAdmin\\SqlParser\\Lexer", - "PARSER_METHODS": [ + "parserMethods": [ "parseDelimiter", "parseWhitespace", "parseNumber", @@ -106,7 +106,7 @@ "count": 9, "idx": 9 }, - "DEFAULT_DELIMITER": ";", + "defaultDelimiter": ";", "delimiter": ";", "delimiterLen": 1, "strict": false, @@ -114,7 +114,7 @@ }, "parser": { "@type": "PhpMyAdmin\\SqlParser\\Parser", - "STATEMENT_PARSERS": { + "statementParsers": { "DESCRIBE": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", "DESC": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", "EXPLAIN": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", @@ -159,7 +159,7 @@ "LOCK": "PhpMyAdmin\\SqlParser\\Statements\\LockStatement", "UNLOCK": "PhpMyAdmin\\SqlParser\\Statements\\LockStatement" }, - "KEYWORD_PARSERS": { + "keywordParsers": { "PARTITION BY": [], "SUBPARTITION BY": [], "_OPTIONS": { @@ -168,7 +168,7 @@ }, "_END_OPTIONS": { "class": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", - "field": "end_options" + "field": "endOptions" }, "INTERSECT": { "class": "PhpMyAdmin\\SqlParser\\Components\\UnionKeyword", @@ -416,7 +416,7 @@ "statements": [ { "@type": "PhpMyAdmin\\SqlParser\\Statements\\DropStatement", - "OPTIONS": { + "statementOptions": { "DATABASE": 1, "EVENT": 1, "FUNCTION": 1, @@ -433,7 +433,7 @@ "TEMPORARY": 2, "IF EXISTS": 3 }, - "CLAUSES": { + "clauses": { "DROP": [ "DROP", 2 @@ -454,7 +454,7 @@ "fields": [ { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -478,7 +478,7 @@ } ], "table": null, - "END_OPTIONS": [], + "statementEndOptions": [], "options": { "@type": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", "options": { diff --git a/tests/data/parser/parseDrop2.out b/tests/data/parser/parseDrop2.out index 6a83f766a..0164eb5da 100644 --- a/tests/data/parser/parseDrop2.out +++ b/tests/data/parser/parseDrop2.out @@ -2,7 +2,7 @@ "query": "DROP USER 'testtest'@'%';", "lexer": { "@type": "PhpMyAdmin\\SqlParser\\Lexer", - "PARSER_METHODS": [ + "parserMethods": [ "parseDelimiter", "parseWhitespace", "parseNumber", @@ -88,7 +88,7 @@ "count": 7, "idx": 7 }, - "DEFAULT_DELIMITER": ";", + "defaultDelimiter": ";", "delimiter": ";", "delimiterLen": 1, "strict": false, @@ -96,7 +96,7 @@ }, "parser": { "@type": "PhpMyAdmin\\SqlParser\\Parser", - "STATEMENT_PARSERS": { + "statementParsers": { "DESCRIBE": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", "DESC": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", "EXPLAIN": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", @@ -141,7 +141,7 @@ "LOCK": "PhpMyAdmin\\SqlParser\\Statements\\LockStatement", "UNLOCK": "PhpMyAdmin\\SqlParser\\Statements\\LockStatement" }, - "KEYWORD_PARSERS": { + "keywordParsers": { "PARTITION BY": [], "SUBPARTITION BY": [], "_OPTIONS": { @@ -150,7 +150,7 @@ }, "_END_OPTIONS": { "class": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", - "field": "end_options" + "field": "endOptions" }, "INTERSECT": { "class": "PhpMyAdmin\\SqlParser\\Components\\UnionKeyword", @@ -398,7 +398,7 @@ "statements": [ { "@type": "PhpMyAdmin\\SqlParser\\Statements\\DropStatement", - "OPTIONS": { + "statementOptions": { "DATABASE": 1, "EVENT": 1, "FUNCTION": 1, @@ -415,7 +415,7 @@ "TEMPORARY": 2, "IF EXISTS": 3 }, - "CLAUSES": { + "clauses": { "DROP": [ "DROP", 2 @@ -436,7 +436,7 @@ "fields": [ { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -460,7 +460,7 @@ } ], "table": null, - "END_OPTIONS": [], + "statementEndOptions": [], "options": { "@type": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", "options": { diff --git a/tests/data/parser/parseExplain.out b/tests/data/parser/parseExplain.out index 86e78cf57..515d8bf91 100644 --- a/tests/data/parser/parseExplain.out +++ b/tests/data/parser/parseExplain.out @@ -2,7 +2,7 @@ "query": "EXPLAIN SELECT * FROM test;", "lexer": { "@type": "PhpMyAdmin\\SqlParser\\Lexer", - "PARSER_METHODS": [ + "parserMethods": [ "parseDelimiter", "parseWhitespace", "parseNumber", @@ -124,7 +124,7 @@ "count": 11, "idx": 11 }, - "DEFAULT_DELIMITER": ";", + "defaultDelimiter": ";", "delimiter": ";", "delimiterLen": 1, "strict": false, @@ -132,7 +132,7 @@ }, "parser": { "@type": "PhpMyAdmin\\SqlParser\\Parser", - "STATEMENT_PARSERS": { + "statementParsers": { "DESCRIBE": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", "DESC": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", "EXPLAIN": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", @@ -177,7 +177,7 @@ "LOCK": "PhpMyAdmin\\SqlParser\\Statements\\LockStatement", "UNLOCK": "PhpMyAdmin\\SqlParser\\Statements\\LockStatement" }, - "KEYWORD_PARSERS": { + "keywordParsers": { "PARTITION BY": [], "SUBPARTITION BY": [], "_OPTIONS": { @@ -186,7 +186,7 @@ }, "_END_OPTIONS": { "class": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", - "field": "end_options" + "field": "endOptions" }, "INTERSECT": { "class": "PhpMyAdmin\\SqlParser\\Components\\UnionKeyword", @@ -463,9 +463,9 @@ "@type": "@10" } ], - "OPTIONS": [], - "CLAUSES": [], - "END_OPTIONS": [], + "statementOptions": [], + "clauses": [], + "statementEndOptions": [], "options": null, "first": 0, "last": 9 diff --git a/tests/data/parser/parseInsert.out b/tests/data/parser/parseInsert.out index 957648e53..ccda0274c 100644 --- a/tests/data/parser/parseInsert.out +++ b/tests/data/parser/parseInsert.out @@ -2,7 +2,7 @@ "query": "INSERT LOW_PRIORITY\nINTO\n users(`id`, `username`, `password`)\nVALUES\n (1, \"Dan\", \"5d41402abc4b2a76b9719d911017c592\"),\n (2, \"Paul\", \"7d793037a0760186574b0282f2f435e7\");", "lexer": { "@type": "PhpMyAdmin\\SqlParser\\Lexer", - "PARSER_METHODS": [ + "parserMethods": [ "parseDelimiter", "parseWhitespace", "parseNumber", @@ -394,7 +394,7 @@ "count": 41, "idx": 41 }, - "DEFAULT_DELIMITER": ";", + "defaultDelimiter": ";", "delimiter": ";", "delimiterLen": 1, "strict": false, @@ -402,7 +402,7 @@ }, "parser": { "@type": "PhpMyAdmin\\SqlParser\\Parser", - "STATEMENT_PARSERS": { + "statementParsers": { "DESCRIBE": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", "DESC": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", "EXPLAIN": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", @@ -447,7 +447,7 @@ "LOCK": "PhpMyAdmin\\SqlParser\\Statements\\LockStatement", "UNLOCK": "PhpMyAdmin\\SqlParser\\Statements\\LockStatement" }, - "KEYWORD_PARSERS": { + "keywordParsers": { "PARTITION BY": [], "SUBPARTITION BY": [], "_OPTIONS": { @@ -456,7 +456,7 @@ }, "_END_OPTIONS": { "class": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", - "field": "end_options" + "field": "endOptions" }, "INTERSECT": { "class": "PhpMyAdmin\\SqlParser\\Components\\UnionKeyword", @@ -704,7 +704,7 @@ "statements": [ { "@type": "PhpMyAdmin\\SqlParser\\Statements\\InsertStatement", - "OPTIONS": { + "statementOptions": { "LOW_PRIORITY": 1, "DELAYED": 2, "HIGH_PRIORITY": 3, @@ -712,7 +712,7 @@ }, "into": { "@type": "PhpMyAdmin\\SqlParser\\Components\\IntoKeyword", - "FIELDS_OPTIONS": { + "statementFieldsOptions": { "TERMINATED BY": [ 1, "expr" @@ -727,7 +727,7 @@ "expr" ] }, - "LINES_OPTIONS": { + "statementLinesOptions": { "STARTING BY": [ 1, "expr" @@ -740,7 +740,7 @@ "type": null, "dest": { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -768,9 +768,9 @@ "password" ], "values": null, - "fields_options": null, - "fields_keyword": null, - "lines_options": null + "fieldsOptions": null, + "fieldsKeyword": null, + "linesOptions": null }, "values": [ { @@ -804,8 +804,8 @@ "select": null, "with": null, "onDuplicateSet": null, - "CLAUSES": [], - "END_OPTIONS": [], + "clauses": [], + "statementEndOptions": [], "options": { "@type": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", "options": { diff --git a/tests/data/parser/parseInsertErr.out b/tests/data/parser/parseInsertErr.out index 127331de8..e42645d75 100644 --- a/tests/data/parser/parseInsertErr.out +++ b/tests/data/parser/parseInsertErr.out @@ -2,7 +2,7 @@ "query": "INSERT SELECT\n", "lexer": { "@type": "PhpMyAdmin\\SqlParser\\Lexer", - "PARSER_METHODS": [ + "parserMethods": [ "parseDelimiter", "parseWhitespace", "parseNumber", @@ -70,7 +70,7 @@ "count": 5, "idx": 5 }, - "DEFAULT_DELIMITER": ";", + "defaultDelimiter": ";", "delimiter": ";", "delimiterLen": 1, "strict": false, @@ -78,7 +78,7 @@ }, "parser": { "@type": "PhpMyAdmin\\SqlParser\\Parser", - "STATEMENT_PARSERS": { + "statementParsers": { "DESCRIBE": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", "DESC": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", "EXPLAIN": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", @@ -123,7 +123,7 @@ "LOCK": "PhpMyAdmin\\SqlParser\\Statements\\LockStatement", "UNLOCK": "PhpMyAdmin\\SqlParser\\Statements\\LockStatement" }, - "KEYWORD_PARSERS": { + "keywordParsers": { "PARTITION BY": [], "SUBPARTITION BY": [], "_OPTIONS": { @@ -132,7 +132,7 @@ }, "_END_OPTIONS": { "class": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", - "field": "end_options" + "field": "endOptions" }, "INTERSECT": { "class": "PhpMyAdmin\\SqlParser\\Components\\UnionKeyword", @@ -380,7 +380,7 @@ "statements": [ { "@type": "PhpMyAdmin\\SqlParser\\Statements\\InsertStatement", - "OPTIONS": { + "statementOptions": { "LOW_PRIORITY": 1, "DELAYED": 2, "HIGH_PRIORITY": 3, @@ -392,8 +392,8 @@ "select": null, "with": null, "onDuplicateSet": null, - "CLAUSES": [], - "END_OPTIONS": [], + "clauses": [], + "statementEndOptions": [], "options": { "@type": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", "options": [] @@ -403,7 +403,7 @@ }, { "@type": "PhpMyAdmin\\SqlParser\\Statements\\SelectStatement", - "OPTIONS": { + "statementOptions": { "ALL": 1, "DISTINCT": 1, "DISTINCTROW": 1, @@ -420,11 +420,11 @@ "SQL_NO_CACHE": 8, "SQL_CALC_FOUND_ROWS": 9 }, - "END_OPTIONS": { + "statementEndOptions": { "FOR UPDATE": 1, "LOCK IN SHARE MODE": 1 }, - "CLAUSES": { + "clauses": { "SELECT": [ "SELECT", 2 @@ -552,7 +552,7 @@ }, "expr": [], "from": [], - "index_hints": null, + "indexHints": null, "partition": null, "where": null, "group": null, @@ -563,7 +563,7 @@ "into": null, "join": null, "union": [], - "end_options": null, + "endOptions": null, "options": { "@type": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", "options": [] diff --git a/tests/data/parser/parseInsertErr2.out b/tests/data/parser/parseInsertErr2.out index 1b8071e72..b0208677c 100644 --- a/tests/data/parser/parseInsertErr2.out +++ b/tests/data/parser/parseInsertErr2.out @@ -2,7 +2,7 @@ "query": "INSERT INTO x \"string\"\n\n", "lexer": { "@type": "PhpMyAdmin\\SqlParser\\Lexer", - "PARSER_METHODS": [ + "parserMethods": [ "parseDelimiter", "parseWhitespace", "parseNumber", @@ -106,7 +106,7 @@ "count": 9, "idx": 9 }, - "DEFAULT_DELIMITER": ";", + "defaultDelimiter": ";", "delimiter": ";", "delimiterLen": 1, "strict": false, @@ -114,7 +114,7 @@ }, "parser": { "@type": "PhpMyAdmin\\SqlParser\\Parser", - "STATEMENT_PARSERS": { + "statementParsers": { "DESCRIBE": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", "DESC": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", "EXPLAIN": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", @@ -159,7 +159,7 @@ "LOCK": "PhpMyAdmin\\SqlParser\\Statements\\LockStatement", "UNLOCK": "PhpMyAdmin\\SqlParser\\Statements\\LockStatement" }, - "KEYWORD_PARSERS": { + "keywordParsers": { "PARTITION BY": [], "SUBPARTITION BY": [], "_OPTIONS": { @@ -168,7 +168,7 @@ }, "_END_OPTIONS": { "class": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", - "field": "end_options" + "field": "endOptions" }, "INTERSECT": { "class": "PhpMyAdmin\\SqlParser\\Components\\UnionKeyword", @@ -416,7 +416,7 @@ "statements": [ { "@type": "PhpMyAdmin\\SqlParser\\Statements\\InsertStatement", - "OPTIONS": { + "statementOptions": { "LOW_PRIORITY": 1, "DELAYED": 2, "HIGH_PRIORITY": 3, @@ -424,7 +424,7 @@ }, "into": { "@type": "PhpMyAdmin\\SqlParser\\Components\\IntoKeyword", - "FIELDS_OPTIONS": { + "statementFieldsOptions": { "TERMINATED BY": [ 1, "expr" @@ -439,7 +439,7 @@ "expr" ] }, - "LINES_OPTIONS": { + "statementLinesOptions": { "STARTING BY": [ 1, "expr" @@ -452,7 +452,7 @@ "type": null, "dest": { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -476,17 +476,17 @@ }, "columns": null, "values": null, - "fields_options": null, - "fields_keyword": null, - "lines_options": null + "fieldsOptions": null, + "fieldsKeyword": null, + "linesOptions": null }, "values": null, "set": null, "select": null, "with": null, "onDuplicateSet": null, - "CLAUSES": [], - "END_OPTIONS": [], + "clauses": [], + "statementEndOptions": [], "options": { "@type": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", "options": [] diff --git a/tests/data/parser/parseInsertIntoErr.out b/tests/data/parser/parseInsertIntoErr.out index 12d0527e6..de4259bd0 100644 --- a/tests/data/parser/parseInsertIntoErr.out +++ b/tests/data/parser/parseInsertIntoErr.out @@ -2,7 +2,7 @@ "query": "INSERT INTO x INSERT\n\n", "lexer": { "@type": "PhpMyAdmin\\SqlParser\\Lexer", - "PARSER_METHODS": [ + "parserMethods": [ "parseDelimiter", "parseWhitespace", "parseNumber", @@ -106,7 +106,7 @@ "count": 9, "idx": 9 }, - "DEFAULT_DELIMITER": ";", + "defaultDelimiter": ";", "delimiter": ";", "delimiterLen": 1, "strict": false, @@ -114,7 +114,7 @@ }, "parser": { "@type": "PhpMyAdmin\\SqlParser\\Parser", - "STATEMENT_PARSERS": { + "statementParsers": { "DESCRIBE": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", "DESC": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", "EXPLAIN": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", @@ -159,7 +159,7 @@ "LOCK": "PhpMyAdmin\\SqlParser\\Statements\\LockStatement", "UNLOCK": "PhpMyAdmin\\SqlParser\\Statements\\LockStatement" }, - "KEYWORD_PARSERS": { + "keywordParsers": { "PARTITION BY": [], "SUBPARTITION BY": [], "_OPTIONS": { @@ -168,7 +168,7 @@ }, "_END_OPTIONS": { "class": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", - "field": "end_options" + "field": "endOptions" }, "INTERSECT": { "class": "PhpMyAdmin\\SqlParser\\Components\\UnionKeyword", @@ -416,7 +416,7 @@ "statements": [ { "@type": "PhpMyAdmin\\SqlParser\\Statements\\InsertStatement", - "OPTIONS": { + "statementOptions": { "LOW_PRIORITY": 1, "DELAYED": 2, "HIGH_PRIORITY": 3, @@ -424,7 +424,7 @@ }, "into": { "@type": "PhpMyAdmin\\SqlParser\\Components\\IntoKeyword", - "FIELDS_OPTIONS": { + "statementFieldsOptions": { "TERMINATED BY": [ 1, "expr" @@ -439,7 +439,7 @@ "expr" ] }, - "LINES_OPTIONS": { + "statementLinesOptions": { "STARTING BY": [ 1, "expr" @@ -452,7 +452,7 @@ "type": null, "dest": { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -476,17 +476,17 @@ }, "columns": null, "values": null, - "fields_options": null, - "fields_keyword": null, - "lines_options": null + "fieldsOptions": null, + "fieldsKeyword": null, + "linesOptions": null }, "values": null, "set": null, "select": null, "with": null, "onDuplicateSet": null, - "CLAUSES": [], - "END_OPTIONS": [], + "clauses": [], + "statementEndOptions": [], "options": { "@type": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", "options": [] @@ -496,7 +496,7 @@ }, { "@type": "PhpMyAdmin\\SqlParser\\Statements\\InsertStatement", - "OPTIONS": { + "statementOptions": { "LOW_PRIORITY": 1, "DELAYED": 2, "HIGH_PRIORITY": 3, @@ -508,8 +508,8 @@ "select": null, "with": null, "onDuplicateSet": null, - "CLAUSES": [], - "END_OPTIONS": [], + "clauses": [], + "statementEndOptions": [], "options": { "@type": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", "options": [] diff --git a/tests/data/parser/parseInsertIntoSet.out b/tests/data/parser/parseInsertIntoSet.out index f9525b468..3172bdc4d 100644 --- a/tests/data/parser/parseInsertIntoSet.out +++ b/tests/data/parser/parseInsertIntoSet.out @@ -2,7 +2,7 @@ "query": "INSERT INTO aa SET = INET6_ATON('::ffff:8.8.8.8')", "lexer": { "@type": "PhpMyAdmin\\SqlParser\\Lexer", - "PARSER_METHODS": [ + "parserMethods": [ "parseDelimiter", "parseWhitespace", "parseNumber", @@ -160,7 +160,7 @@ "count": 15, "idx": 15 }, - "DEFAULT_DELIMITER": ";", + "defaultDelimiter": ";", "delimiter": ";", "delimiterLen": 1, "strict": false, @@ -168,7 +168,7 @@ }, "parser": { "@type": "PhpMyAdmin\\SqlParser\\Parser", - "STATEMENT_PARSERS": { + "statementParsers": { "DESCRIBE": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", "DESC": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", "EXPLAIN": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", @@ -213,7 +213,7 @@ "LOCK": "PhpMyAdmin\\SqlParser\\Statements\\LockStatement", "UNLOCK": "PhpMyAdmin\\SqlParser\\Statements\\LockStatement" }, - "KEYWORD_PARSERS": { + "keywordParsers": { "PARTITION BY": [], "SUBPARTITION BY": [], "_OPTIONS": { @@ -222,7 +222,7 @@ }, "_END_OPTIONS": { "class": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", - "field": "end_options" + "field": "endOptions" }, "INTERSECT": { "class": "PhpMyAdmin\\SqlParser\\Components\\UnionKeyword", @@ -470,7 +470,7 @@ "statements": [ { "@type": "PhpMyAdmin\\SqlParser\\Statements\\InsertStatement", - "OPTIONS": { + "statementOptions": { "LOW_PRIORITY": 1, "DELAYED": 2, "HIGH_PRIORITY": 3, @@ -478,7 +478,7 @@ }, "into": { "@type": "PhpMyAdmin\\SqlParser\\Components\\IntoKeyword", - "FIELDS_OPTIONS": { + "statementFieldsOptions": { "TERMINATED BY": [ 1, "expr" @@ -493,7 +493,7 @@ "expr" ] }, - "LINES_OPTIONS": { + "statementLinesOptions": { "STARTING BY": [ 1, "expr" @@ -506,7 +506,7 @@ "type": null, "dest": { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -530,9 +530,9 @@ }, "columns": null, "values": null, - "fields_options": null, - "fields_keyword": null, - "lines_options": null + "fieldsOptions": null, + "fieldsKeyword": null, + "linesOptions": null }, "values": null, "set": [ @@ -545,8 +545,8 @@ "select": null, "with": null, "onDuplicateSet": null, - "CLAUSES": [], - "END_OPTIONS": [], + "clauses": [], + "statementEndOptions": [], "options": { "@type": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", "options": [] diff --git a/tests/data/parser/parseInsertOnDuplicateKey.out b/tests/data/parser/parseInsertOnDuplicateKey.out index 18fdb4a73..974d155c7 100644 --- a/tests/data/parser/parseInsertOnDuplicateKey.out +++ b/tests/data/parser/parseInsertOnDuplicateKey.out @@ -2,7 +2,7 @@ "query": "INSERT INTO `champs` (`id`,`val`) VALUES (412,'Thresh')\nON DUPLICATE KEY UPDATE `id`=412,`val`='Thresh'", "lexer": { "@type": "PhpMyAdmin\\SqlParser\\Lexer", - "PARSER_METHODS": [ + "parserMethods": [ "parseDelimiter", "parseWhitespace", "parseNumber", @@ -349,7 +349,7 @@ "count": 36, "idx": 36 }, - "DEFAULT_DELIMITER": ";", + "defaultDelimiter": ";", "delimiter": ";", "delimiterLen": 1, "strict": false, @@ -357,7 +357,7 @@ }, "parser": { "@type": "PhpMyAdmin\\SqlParser\\Parser", - "STATEMENT_PARSERS": { + "statementParsers": { "DESCRIBE": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", "DESC": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", "EXPLAIN": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", @@ -402,7 +402,7 @@ "LOCK": "PhpMyAdmin\\SqlParser\\Statements\\LockStatement", "UNLOCK": "PhpMyAdmin\\SqlParser\\Statements\\LockStatement" }, - "KEYWORD_PARSERS": { + "keywordParsers": { "PARTITION BY": [], "SUBPARTITION BY": [], "_OPTIONS": { @@ -411,7 +411,7 @@ }, "_END_OPTIONS": { "class": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", - "field": "end_options" + "field": "endOptions" }, "INTERSECT": { "class": "PhpMyAdmin\\SqlParser\\Components\\UnionKeyword", @@ -659,7 +659,7 @@ "statements": [ { "@type": "PhpMyAdmin\\SqlParser\\Statements\\InsertStatement", - "OPTIONS": { + "statementOptions": { "LOW_PRIORITY": 1, "DELAYED": 2, "HIGH_PRIORITY": 3, @@ -667,7 +667,7 @@ }, "into": { "@type": "PhpMyAdmin\\SqlParser\\Components\\IntoKeyword", - "FIELDS_OPTIONS": { + "statementFieldsOptions": { "TERMINATED BY": [ 1, "expr" @@ -682,7 +682,7 @@ "expr" ] }, - "LINES_OPTIONS": { + "statementLinesOptions": { "STARTING BY": [ 1, "expr" @@ -695,7 +695,7 @@ "type": null, "dest": { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -722,9 +722,9 @@ "val" ], "values": null, - "fields_options": null, - "fields_keyword": null, - "lines_options": null + "fieldsOptions": null, + "fieldsKeyword": null, + "linesOptions": null }, "values": [ { @@ -754,8 +754,8 @@ "value": "'Thresh'" } ], - "CLAUSES": [], - "END_OPTIONS": [], + "clauses": [], + "statementEndOptions": [], "options": { "@type": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", "options": [] diff --git a/tests/data/parser/parseInsertOnDuplicateKeyErr.out b/tests/data/parser/parseInsertOnDuplicateKeyErr.out index 341079b83..709a19c39 100644 --- a/tests/data/parser/parseInsertOnDuplicateKeyErr.out +++ b/tests/data/parser/parseInsertOnDuplicateKeyErr.out @@ -2,7 +2,7 @@ "query": "INSERT INTO `champs` (`id`,`val`) VALUES (412,'Thresh')\nON DUPLICATE KEY `id`=412,`val`='Thresh'", "lexer": { "@type": "PhpMyAdmin\\SqlParser\\Lexer", - "PARSER_METHODS": [ + "parserMethods": [ "parseDelimiter", "parseWhitespace", "parseNumber", @@ -331,7 +331,7 @@ "count": 34, "idx": 34 }, - "DEFAULT_DELIMITER": ";", + "defaultDelimiter": ";", "delimiter": ";", "delimiterLen": 1, "strict": false, @@ -339,7 +339,7 @@ }, "parser": { "@type": "PhpMyAdmin\\SqlParser\\Parser", - "STATEMENT_PARSERS": { + "statementParsers": { "DESCRIBE": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", "DESC": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", "EXPLAIN": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", @@ -384,7 +384,7 @@ "LOCK": "PhpMyAdmin\\SqlParser\\Statements\\LockStatement", "UNLOCK": "PhpMyAdmin\\SqlParser\\Statements\\LockStatement" }, - "KEYWORD_PARSERS": { + "keywordParsers": { "PARTITION BY": [], "SUBPARTITION BY": [], "_OPTIONS": { @@ -393,7 +393,7 @@ }, "_END_OPTIONS": { "class": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", - "field": "end_options" + "field": "endOptions" }, "INTERSECT": { "class": "PhpMyAdmin\\SqlParser\\Components\\UnionKeyword", @@ -641,7 +641,7 @@ "statements": [ { "@type": "PhpMyAdmin\\SqlParser\\Statements\\InsertStatement", - "OPTIONS": { + "statementOptions": { "LOW_PRIORITY": 1, "DELAYED": 2, "HIGH_PRIORITY": 3, @@ -649,7 +649,7 @@ }, "into": { "@type": "PhpMyAdmin\\SqlParser\\Components\\IntoKeyword", - "FIELDS_OPTIONS": { + "statementFieldsOptions": { "TERMINATED BY": [ 1, "expr" @@ -664,7 +664,7 @@ "expr" ] }, - "LINES_OPTIONS": { + "statementLinesOptions": { "STARTING BY": [ 1, "expr" @@ -677,7 +677,7 @@ "type": null, "dest": { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -704,9 +704,9 @@ "val" ], "values": null, - "fields_options": null, - "fields_keyword": null, - "lines_options": null + "fieldsOptions": null, + "fieldsKeyword": null, + "linesOptions": null }, "values": [ { @@ -725,8 +725,8 @@ "select": null, "with": null, "onDuplicateSet": null, - "CLAUSES": [], - "END_OPTIONS": [], + "clauses": [], + "statementEndOptions": [], "options": { "@type": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", "options": [] diff --git a/tests/data/parser/parseInsertSelect.out b/tests/data/parser/parseInsertSelect.out index 0d94e306a..5f788e879 100644 --- a/tests/data/parser/parseInsertSelect.out +++ b/tests/data/parser/parseInsertSelect.out @@ -2,7 +2,7 @@ "query": "INSERT INTO `a` (`value`) SELECT `b`.`value` FROM `b`", "lexer": { "@type": "PhpMyAdmin\\SqlParser\\Lexer", - "PARSER_METHODS": [ + "parserMethods": [ "parseDelimiter", "parseWhitespace", "parseNumber", @@ -205,7 +205,7 @@ "count": 20, "idx": 20 }, - "DEFAULT_DELIMITER": ";", + "defaultDelimiter": ";", "delimiter": ";", "delimiterLen": 1, "strict": false, @@ -213,7 +213,7 @@ }, "parser": { "@type": "PhpMyAdmin\\SqlParser\\Parser", - "STATEMENT_PARSERS": { + "statementParsers": { "DESCRIBE": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", "DESC": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", "EXPLAIN": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", @@ -258,7 +258,7 @@ "LOCK": "PhpMyAdmin\\SqlParser\\Statements\\LockStatement", "UNLOCK": "PhpMyAdmin\\SqlParser\\Statements\\LockStatement" }, - "KEYWORD_PARSERS": { + "keywordParsers": { "PARTITION BY": [], "SUBPARTITION BY": [], "_OPTIONS": { @@ -267,7 +267,7 @@ }, "_END_OPTIONS": { "class": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", - "field": "end_options" + "field": "endOptions" }, "INTERSECT": { "class": "PhpMyAdmin\\SqlParser\\Components\\UnionKeyword", @@ -515,7 +515,7 @@ "statements": [ { "@type": "PhpMyAdmin\\SqlParser\\Statements\\InsertStatement", - "OPTIONS": { + "statementOptions": { "LOW_PRIORITY": 1, "DELAYED": 2, "HIGH_PRIORITY": 3, @@ -523,7 +523,7 @@ }, "into": { "@type": "PhpMyAdmin\\SqlParser\\Components\\IntoKeyword", - "FIELDS_OPTIONS": { + "statementFieldsOptions": { "TERMINATED BY": [ 1, "expr" @@ -538,7 +538,7 @@ "expr" ] }, - "LINES_OPTIONS": { + "statementLinesOptions": { "STARTING BY": [ 1, "expr" @@ -551,7 +551,7 @@ "type": null, "dest": { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -577,15 +577,15 @@ "value" ], "values": null, - "fields_options": null, - "fields_keyword": null, - "lines_options": null + "fieldsOptions": null, + "fieldsKeyword": null, + "linesOptions": null }, "values": null, "set": null, "select": { "@type": "PhpMyAdmin\\SqlParser\\Statements\\SelectStatement", - "OPTIONS": { + "statementOptions": { "ALL": 1, "DISTINCT": 1, "DISTINCTROW": 1, @@ -602,11 +602,11 @@ "SQL_NO_CACHE": 8, "SQL_CALC_FOUND_ROWS": 9 }, - "END_OPTIONS": { + "statementEndOptions": { "FOR UPDATE": 1, "LOCK IN SHARE MODE": 1 }, - "CLAUSES": { + "clauses": { "SELECT": [ "SELECT", 2 @@ -735,7 +735,7 @@ "expr": [ { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -761,7 +761,7 @@ "from": [ { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -784,7 +784,7 @@ "subquery": null } ], - "index_hints": null, + "indexHints": null, "partition": null, "where": null, "group": null, @@ -795,7 +795,7 @@ "into": null, "join": null, "union": [], - "end_options": null, + "endOptions": null, "options": { "@type": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", "options": [] @@ -805,8 +805,8 @@ }, "with": null, "onDuplicateSet": null, - "CLAUSES": [], - "END_OPTIONS": [], + "clauses": [], + "statementEndOptions": [], "options": { "@type": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", "options": [] diff --git a/tests/data/parser/parseInsertSelectOnDuplicateKey.out b/tests/data/parser/parseInsertSelectOnDuplicateKey.out index 169a5b11c..ad4157a2a 100644 --- a/tests/data/parser/parseInsertSelectOnDuplicateKey.out +++ b/tests/data/parser/parseInsertSelectOnDuplicateKey.out @@ -2,7 +2,7 @@ "query": "INSERT INTO tbl SELECT * FROM bar ON DUPLICATE KEY UPDATE baz = 1", "lexer": { "@type": "PhpMyAdmin\\SqlParser\\Lexer", - "PARSER_METHODS": [ + "parserMethods": [ "parseDelimiter", "parseWhitespace", "parseNumber", @@ -277,7 +277,7 @@ "count": 28, "idx": 28 }, - "DEFAULT_DELIMITER": ";", + "defaultDelimiter": ";", "delimiter": ";", "delimiterLen": 1, "strict": false, @@ -285,7 +285,7 @@ }, "parser": { "@type": "PhpMyAdmin\\SqlParser\\Parser", - "STATEMENT_PARSERS": { + "statementParsers": { "DESCRIBE": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", "DESC": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", "EXPLAIN": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", @@ -330,7 +330,7 @@ "LOCK": "PhpMyAdmin\\SqlParser\\Statements\\LockStatement", "UNLOCK": "PhpMyAdmin\\SqlParser\\Statements\\LockStatement" }, - "KEYWORD_PARSERS": { + "keywordParsers": { "PARTITION BY": [], "SUBPARTITION BY": [], "_OPTIONS": { @@ -339,7 +339,7 @@ }, "_END_OPTIONS": { "class": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", - "field": "end_options" + "field": "endOptions" }, "INTERSECT": { "class": "PhpMyAdmin\\SqlParser\\Components\\UnionKeyword", @@ -587,7 +587,7 @@ "statements": [ { "@type": "PhpMyAdmin\\SqlParser\\Statements\\InsertStatement", - "OPTIONS": { + "statementOptions": { "LOW_PRIORITY": 1, "DELAYED": 2, "HIGH_PRIORITY": 3, @@ -595,7 +595,7 @@ }, "into": { "@type": "PhpMyAdmin\\SqlParser\\Components\\IntoKeyword", - "FIELDS_OPTIONS": { + "statementFieldsOptions": { "TERMINATED BY": [ 1, "expr" @@ -610,7 +610,7 @@ "expr" ] }, - "LINES_OPTIONS": { + "statementLinesOptions": { "STARTING BY": [ 1, "expr" @@ -623,7 +623,7 @@ "type": null, "dest": { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -647,15 +647,15 @@ }, "columns": null, "values": null, - "fields_options": null, - "fields_keyword": null, - "lines_options": null + "fieldsOptions": null, + "fieldsKeyword": null, + "linesOptions": null }, "values": null, "set": null, "select": { "@type": "PhpMyAdmin\\SqlParser\\Statements\\SelectStatement", - "OPTIONS": { + "statementOptions": { "ALL": 1, "DISTINCT": 1, "DISTINCTROW": 1, @@ -672,11 +672,11 @@ "SQL_NO_CACHE": 8, "SQL_CALC_FOUND_ROWS": 9 }, - "END_OPTIONS": { + "statementEndOptions": { "FOR UPDATE": 1, "LOCK IN SHARE MODE": 1 }, - "CLAUSES": { + "clauses": { "SELECT": [ "SELECT", 2 @@ -805,7 +805,7 @@ "expr": [ { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -831,7 +831,7 @@ "from": [ { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -854,7 +854,7 @@ "subquery": null } ], - "index_hints": null, + "indexHints": null, "partition": null, "where": null, "group": null, @@ -865,7 +865,7 @@ "into": null, "join": null, "union": [], - "end_options": null, + "endOptions": null, "options": { "@type": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", "options": [] @@ -881,8 +881,8 @@ "value": "1" } ], - "CLAUSES": [], - "END_OPTIONS": [], + "clauses": [], + "statementEndOptions": [], "options": { "@type": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", "options": [] diff --git a/tests/data/parser/parseInsertSet.out b/tests/data/parser/parseInsertSet.out index c96dcf0cb..e1d6926dc 100644 --- a/tests/data/parser/parseInsertSet.out +++ b/tests/data/parser/parseInsertSet.out @@ -2,7 +2,7 @@ "query": "INSERT INTO `a` (`value`) SET `value` = '123'", "lexer": { "@type": "PhpMyAdmin\\SqlParser\\Lexer", - "PARSER_METHODS": [ + "parserMethods": [ "parseDelimiter", "parseWhitespace", "parseNumber", @@ -187,7 +187,7 @@ "count": 18, "idx": 18 }, - "DEFAULT_DELIMITER": ";", + "defaultDelimiter": ";", "delimiter": ";", "delimiterLen": 1, "strict": false, @@ -195,7 +195,7 @@ }, "parser": { "@type": "PhpMyAdmin\\SqlParser\\Parser", - "STATEMENT_PARSERS": { + "statementParsers": { "DESCRIBE": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", "DESC": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", "EXPLAIN": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", @@ -240,7 +240,7 @@ "LOCK": "PhpMyAdmin\\SqlParser\\Statements\\LockStatement", "UNLOCK": "PhpMyAdmin\\SqlParser\\Statements\\LockStatement" }, - "KEYWORD_PARSERS": { + "keywordParsers": { "PARTITION BY": [], "SUBPARTITION BY": [], "_OPTIONS": { @@ -249,7 +249,7 @@ }, "_END_OPTIONS": { "class": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", - "field": "end_options" + "field": "endOptions" }, "INTERSECT": { "class": "PhpMyAdmin\\SqlParser\\Components\\UnionKeyword", @@ -497,7 +497,7 @@ "statements": [ { "@type": "PhpMyAdmin\\SqlParser\\Statements\\InsertStatement", - "OPTIONS": { + "statementOptions": { "LOW_PRIORITY": 1, "DELAYED": 2, "HIGH_PRIORITY": 3, @@ -505,7 +505,7 @@ }, "into": { "@type": "PhpMyAdmin\\SqlParser\\Components\\IntoKeyword", - "FIELDS_OPTIONS": { + "statementFieldsOptions": { "TERMINATED BY": [ 1, "expr" @@ -520,7 +520,7 @@ "expr" ] }, - "LINES_OPTIONS": { + "statementLinesOptions": { "STARTING BY": [ 1, "expr" @@ -533,7 +533,7 @@ "type": null, "dest": { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -559,9 +559,9 @@ "value" ], "values": null, - "fields_options": null, - "fields_keyword": null, - "lines_options": null + "fieldsOptions": null, + "fieldsKeyword": null, + "linesOptions": null }, "values": null, "set": [ @@ -574,8 +574,8 @@ "select": null, "with": null, "onDuplicateSet": null, - "CLAUSES": [], - "END_OPTIONS": [], + "clauses": [], + "statementEndOptions": [], "options": { "@type": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", "options": [] diff --git a/tests/data/parser/parseInsertSetOnDuplicateKey.out b/tests/data/parser/parseInsertSetOnDuplicateKey.out index 88f902488..b03dba254 100644 --- a/tests/data/parser/parseInsertSetOnDuplicateKey.out +++ b/tests/data/parser/parseInsertSetOnDuplicateKey.out @@ -2,7 +2,7 @@ "query": "INSERT INTO `a` (`value`) SET `value` = '123' ON DUPLICATE KEY UPDATE `value` = '1234'", "lexer": { "@type": "PhpMyAdmin\\SqlParser\\Lexer", - "PARSER_METHODS": [ + "parserMethods": [ "parseDelimiter", "parseWhitespace", "parseNumber", @@ -313,7 +313,7 @@ "count": 32, "idx": 32 }, - "DEFAULT_DELIMITER": ";", + "defaultDelimiter": ";", "delimiter": ";", "delimiterLen": 1, "strict": false, @@ -321,7 +321,7 @@ }, "parser": { "@type": "PhpMyAdmin\\SqlParser\\Parser", - "STATEMENT_PARSERS": { + "statementParsers": { "DESCRIBE": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", "DESC": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", "EXPLAIN": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", @@ -366,7 +366,7 @@ "LOCK": "PhpMyAdmin\\SqlParser\\Statements\\LockStatement", "UNLOCK": "PhpMyAdmin\\SqlParser\\Statements\\LockStatement" }, - "KEYWORD_PARSERS": { + "keywordParsers": { "PARTITION BY": [], "SUBPARTITION BY": [], "_OPTIONS": { @@ -375,7 +375,7 @@ }, "_END_OPTIONS": { "class": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", - "field": "end_options" + "field": "endOptions" }, "INTERSECT": { "class": "PhpMyAdmin\\SqlParser\\Components\\UnionKeyword", @@ -623,7 +623,7 @@ "statements": [ { "@type": "PhpMyAdmin\\SqlParser\\Statements\\InsertStatement", - "OPTIONS": { + "statementOptions": { "LOW_PRIORITY": 1, "DELAYED": 2, "HIGH_PRIORITY": 3, @@ -631,7 +631,7 @@ }, "into": { "@type": "PhpMyAdmin\\SqlParser\\Components\\IntoKeyword", - "FIELDS_OPTIONS": { + "statementFieldsOptions": { "TERMINATED BY": [ 1, "expr" @@ -646,7 +646,7 @@ "expr" ] }, - "LINES_OPTIONS": { + "statementLinesOptions": { "STARTING BY": [ 1, "expr" @@ -659,7 +659,7 @@ "type": null, "dest": { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -685,9 +685,9 @@ "value" ], "values": null, - "fields_options": null, - "fields_keyword": null, - "lines_options": null + "fieldsOptions": null, + "fieldsKeyword": null, + "linesOptions": null }, "values": null, "set": [ @@ -706,8 +706,8 @@ "value": "'1234'" } ], - "CLAUSES": [], - "END_OPTIONS": [], + "clauses": [], + "statementEndOptions": [], "options": { "@type": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", "options": [] diff --git a/tests/data/parser/parseLimitErr1.out b/tests/data/parser/parseLimitErr1.out index 27737dbf5..a60347c50 100644 --- a/tests/data/parser/parseLimitErr1.out +++ b/tests/data/parser/parseLimitErr1.out @@ -2,7 +2,7 @@ "query": "SELECT * FROM test LIMIT 1 OFFSET OFFSET 2;", "lexer": { "@type": "PhpMyAdmin\\SqlParser\\Lexer", - "PARSER_METHODS": [ + "parserMethods": [ "parseDelimiter", "parseWhitespace", "parseNumber", @@ -196,7 +196,7 @@ "count": 19, "idx": 19 }, - "DEFAULT_DELIMITER": ";", + "defaultDelimiter": ";", "delimiter": ";", "delimiterLen": 1, "strict": false, @@ -204,7 +204,7 @@ }, "parser": { "@type": "PhpMyAdmin\\SqlParser\\Parser", - "STATEMENT_PARSERS": { + "statementParsers": { "DESCRIBE": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", "DESC": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", "EXPLAIN": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", @@ -249,7 +249,7 @@ "LOCK": "PhpMyAdmin\\SqlParser\\Statements\\LockStatement", "UNLOCK": "PhpMyAdmin\\SqlParser\\Statements\\LockStatement" }, - "KEYWORD_PARSERS": { + "keywordParsers": { "PARTITION BY": [], "SUBPARTITION BY": [], "_OPTIONS": { @@ -258,7 +258,7 @@ }, "_END_OPTIONS": { "class": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", - "field": "end_options" + "field": "endOptions" }, "INTERSECT": { "class": "PhpMyAdmin\\SqlParser\\Components\\UnionKeyword", @@ -506,7 +506,7 @@ "statements": [ { "@type": "PhpMyAdmin\\SqlParser\\Statements\\SelectStatement", - "OPTIONS": { + "statementOptions": { "ALL": 1, "DISTINCT": 1, "DISTINCTROW": 1, @@ -523,11 +523,11 @@ "SQL_NO_CACHE": 8, "SQL_CALC_FOUND_ROWS": 9 }, - "END_OPTIONS": { + "statementEndOptions": { "FOR UPDATE": 1, "LOCK IN SHARE MODE": 1 }, - "CLAUSES": { + "clauses": { "SELECT": [ "SELECT", 2 @@ -656,7 +656,7 @@ "expr": [ { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -682,7 +682,7 @@ "from": [ { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -705,7 +705,7 @@ "subquery": null } ], - "index_hints": null, + "indexHints": null, "partition": null, "where": null, "group": null, @@ -720,7 +720,7 @@ "into": null, "join": null, "union": [], - "end_options": null, + "endOptions": null, "options": { "@type": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", "options": [] diff --git a/tests/data/parser/parseLimitErr2.out b/tests/data/parser/parseLimitErr2.out index fab181995..562ede786 100644 --- a/tests/data/parser/parseLimitErr2.out +++ b/tests/data/parser/parseLimitErr2.out @@ -2,7 +2,7 @@ "query": "SELECT * FROM test LIMIT 1 OFFSET", "lexer": { "@type": "PhpMyAdmin\\SqlParser\\Lexer", - "PARSER_METHODS": [ + "parserMethods": [ "parseDelimiter", "parseWhitespace", "parseNumber", @@ -151,7 +151,7 @@ "count": 14, "idx": 14 }, - "DEFAULT_DELIMITER": ";", + "defaultDelimiter": ";", "delimiter": ";", "delimiterLen": 1, "strict": false, @@ -159,7 +159,7 @@ }, "parser": { "@type": "PhpMyAdmin\\SqlParser\\Parser", - "STATEMENT_PARSERS": { + "statementParsers": { "DESCRIBE": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", "DESC": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", "EXPLAIN": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", @@ -204,7 +204,7 @@ "LOCK": "PhpMyAdmin\\SqlParser\\Statements\\LockStatement", "UNLOCK": "PhpMyAdmin\\SqlParser\\Statements\\LockStatement" }, - "KEYWORD_PARSERS": { + "keywordParsers": { "PARTITION BY": [], "SUBPARTITION BY": [], "_OPTIONS": { @@ -213,7 +213,7 @@ }, "_END_OPTIONS": { "class": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", - "field": "end_options" + "field": "endOptions" }, "INTERSECT": { "class": "PhpMyAdmin\\SqlParser\\Components\\UnionKeyword", @@ -461,7 +461,7 @@ "statements": [ { "@type": "PhpMyAdmin\\SqlParser\\Statements\\SelectStatement", - "OPTIONS": { + "statementOptions": { "ALL": 1, "DISTINCT": 1, "DISTINCTROW": 1, @@ -478,11 +478,11 @@ "SQL_NO_CACHE": 8, "SQL_CALC_FOUND_ROWS": 9 }, - "END_OPTIONS": { + "statementEndOptions": { "FOR UPDATE": 1, "LOCK IN SHARE MODE": 1 }, - "CLAUSES": { + "clauses": { "SELECT": [ "SELECT", 2 @@ -611,7 +611,7 @@ "expr": [ { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -637,7 +637,7 @@ "from": [ { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -660,7 +660,7 @@ "subquery": null } ], - "index_hints": null, + "indexHints": null, "partition": null, "where": null, "group": null, @@ -675,7 +675,7 @@ "into": null, "join": null, "union": [], - "end_options": null, + "endOptions": null, "options": { "@type": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", "options": [] diff --git a/tests/data/parser/parseLoad1.out b/tests/data/parser/parseLoad1.out index 1b70a5fa7..a8758e27c 100644 --- a/tests/data/parser/parseLoad1.out +++ b/tests/data/parser/parseLoad1.out @@ -2,7 +2,7 @@ "query": "LOAD DATA CONCURRENT INFILE 'employee1.txt' INTO TABLE employee;", "lexer": { "@type": "PhpMyAdmin\\SqlParser\\Lexer", - "PARSER_METHODS": [ + "parserMethods": [ "parseDelimiter", "parseWhitespace", "parseNumber", @@ -160,7 +160,7 @@ "count": 15, "idx": 15 }, - "DEFAULT_DELIMITER": ";", + "defaultDelimiter": ";", "delimiter": ";", "delimiterLen": 1, "strict": false, @@ -168,7 +168,7 @@ }, "parser": { "@type": "PhpMyAdmin\\SqlParser\\Parser", - "STATEMENT_PARSERS": { + "statementParsers": { "DESCRIBE": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", "DESC": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", "EXPLAIN": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", @@ -213,7 +213,7 @@ "LOCK": "PhpMyAdmin\\SqlParser\\Statements\\LockStatement", "UNLOCK": "PhpMyAdmin\\SqlParser\\Statements\\LockStatement" }, - "KEYWORD_PARSERS": { + "keywordParsers": { "PARTITION BY": [], "SUBPARTITION BY": [], "_OPTIONS": { @@ -222,7 +222,7 @@ }, "_END_OPTIONS": { "class": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", - "field": "end_options" + "field": "endOptions" }, "INTERSECT": { "class": "PhpMyAdmin\\SqlParser\\Components\\UnionKeyword", @@ -470,12 +470,12 @@ "statements": [ { "@type": "PhpMyAdmin\\SqlParser\\Statements\\LoadStatement", - "OPTIONS": { + "statementOptions": { "LOW_PRIORITY": 1, "CONCURRENT": 1, "LOCAL": 2 }, - "FIELDS_OPTIONS": { + "statementFieldsOptions": { "TERMINATED BY": [ 1, "expr" @@ -490,7 +490,7 @@ "expr" ] }, - "LINES_OPTIONS": { + "statementLinesOptions": { "STARTING BY": [ 1, "expr" @@ -500,9 +500,9 @@ "expr" ] }, - "file_name": { + "fileName": { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -527,7 +527,7 @@ }, "table": { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -550,17 +550,17 @@ "subquery": null }, "partition": null, - "charset_name": null, - "fields_options": null, - "fields_keyword": null, - "lines_options": null, - "col_name_or_user_var": null, + "charsetName": null, + "fieldsOptions": null, + "fieldsKeyword": null, + "linesOptions": null, + "columnNamesOrUserVariables": null, "set": null, - "ignore_number": null, - "replace_ignore": null, - "lines_rows": null, - "CLAUSES": [], - "END_OPTIONS": [], + "ignoreNumber": null, + "replaceIgnore": null, + "linesRows": null, + "clauses": [], + "statementEndOptions": [], "options": { "@type": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", "options": { diff --git a/tests/data/parser/parseLoad2.out b/tests/data/parser/parseLoad2.out index a85cd4700..2c530b8af 100644 --- a/tests/data/parser/parseLoad2.out +++ b/tests/data/parser/parseLoad2.out @@ -2,7 +2,7 @@ "query": "LOAD DATA INFILE '\/tmp\/test.txt' INTO TABLE test FIELDS TERMINATED BY ',' IGNORE 1 LINES;", "lexer": { "@type": "PhpMyAdmin\\SqlParser\\Lexer", - "PARSER_METHODS": [ + "parserMethods": [ "parseDelimiter", "parseWhitespace", "parseNumber", @@ -250,7 +250,7 @@ "count": 25, "idx": 25 }, - "DEFAULT_DELIMITER": ";", + "defaultDelimiter": ";", "delimiter": ";", "delimiterLen": 1, "strict": false, @@ -258,7 +258,7 @@ }, "parser": { "@type": "PhpMyAdmin\\SqlParser\\Parser", - "STATEMENT_PARSERS": { + "statementParsers": { "DESCRIBE": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", "DESC": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", "EXPLAIN": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", @@ -303,7 +303,7 @@ "LOCK": "PhpMyAdmin\\SqlParser\\Statements\\LockStatement", "UNLOCK": "PhpMyAdmin\\SqlParser\\Statements\\LockStatement" }, - "KEYWORD_PARSERS": { + "keywordParsers": { "PARTITION BY": [], "SUBPARTITION BY": [], "_OPTIONS": { @@ -312,7 +312,7 @@ }, "_END_OPTIONS": { "class": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", - "field": "end_options" + "field": "endOptions" }, "INTERSECT": { "class": "PhpMyAdmin\\SqlParser\\Components\\UnionKeyword", @@ -560,12 +560,12 @@ "statements": [ { "@type": "PhpMyAdmin\\SqlParser\\Statements\\LoadStatement", - "OPTIONS": { + "statementOptions": { "LOW_PRIORITY": 1, "CONCURRENT": 1, "LOCAL": 2 }, - "FIELDS_OPTIONS": { + "statementFieldsOptions": { "TERMINATED BY": [ 1, "expr" @@ -580,7 +580,7 @@ "expr" ] }, - "LINES_OPTIONS": { + "statementLinesOptions": { "STARTING BY": [ 1, "expr" @@ -590,9 +590,9 @@ "expr" ] }, - "file_name": { + "fileName": { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -617,7 +617,7 @@ }, "table": { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -640,8 +640,8 @@ "subquery": null }, "partition": null, - "charset_name": null, - "fields_options": { + "charsetName": null, + "fieldsOptions": { "@type": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", "options": { "1": { @@ -649,7 +649,7 @@ "equals": false, "expr": { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -675,13 +675,13 @@ } } }, - "fields_keyword": "FIELDS", - "lines_options": null, - "col_name_or_user_var": null, + "fieldsKeyword": "FIELDS", + "linesOptions": null, + "columnNamesOrUserVariables": null, "set": null, - "ignore_number": { + "ignoreNumber": { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -703,10 +703,10 @@ "function": null, "subquery": null }, - "replace_ignore": null, - "lines_rows": "LINES", - "CLAUSES": [], - "END_OPTIONS": [], + "replaceIgnore": null, + "linesRows": "LINES", + "clauses": [], + "statementEndOptions": [], "options": { "@type": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", "options": [] diff --git a/tests/data/parser/parseLoad3.out b/tests/data/parser/parseLoad3.out index f1797b84c..c611a0a78 100644 --- a/tests/data/parser/parseLoad3.out +++ b/tests/data/parser/parseLoad3.out @@ -2,7 +2,7 @@ "query": "LOAD DATA INFILE 'employee3.txt' INTO TABLE employee FIELDS TERMINATED BY ',' ENCLOSED BY '\"';", "lexer": { "@type": "PhpMyAdmin\\SqlParser\\Lexer", - "PARSER_METHODS": [ + "parserMethods": [ "parseDelimiter", "parseWhitespace", "parseNumber", @@ -232,7 +232,7 @@ "count": 23, "idx": 23 }, - "DEFAULT_DELIMITER": ";", + "defaultDelimiter": ";", "delimiter": ";", "delimiterLen": 1, "strict": false, @@ -240,7 +240,7 @@ }, "parser": { "@type": "PhpMyAdmin\\SqlParser\\Parser", - "STATEMENT_PARSERS": { + "statementParsers": { "DESCRIBE": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", "DESC": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", "EXPLAIN": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", @@ -285,7 +285,7 @@ "LOCK": "PhpMyAdmin\\SqlParser\\Statements\\LockStatement", "UNLOCK": "PhpMyAdmin\\SqlParser\\Statements\\LockStatement" }, - "KEYWORD_PARSERS": { + "keywordParsers": { "PARTITION BY": [], "SUBPARTITION BY": [], "_OPTIONS": { @@ -294,7 +294,7 @@ }, "_END_OPTIONS": { "class": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", - "field": "end_options" + "field": "endOptions" }, "INTERSECT": { "class": "PhpMyAdmin\\SqlParser\\Components\\UnionKeyword", @@ -542,12 +542,12 @@ "statements": [ { "@type": "PhpMyAdmin\\SqlParser\\Statements\\LoadStatement", - "OPTIONS": { + "statementOptions": { "LOW_PRIORITY": 1, "CONCURRENT": 1, "LOCAL": 2 }, - "FIELDS_OPTIONS": { + "statementFieldsOptions": { "TERMINATED BY": [ 1, "expr" @@ -562,7 +562,7 @@ "expr" ] }, - "LINES_OPTIONS": { + "statementLinesOptions": { "STARTING BY": [ 1, "expr" @@ -572,9 +572,9 @@ "expr" ] }, - "file_name": { + "fileName": { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -599,7 +599,7 @@ }, "table": { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -622,8 +622,8 @@ "subquery": null }, "partition": null, - "charset_name": null, - "fields_options": { + "charsetName": null, + "fieldsOptions": { "@type": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", "options": { "1": { @@ -631,7 +631,7 @@ "equals": false, "expr": { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -660,7 +660,7 @@ "equals": false, "expr": { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -686,15 +686,15 @@ } } }, - "fields_keyword": "FIELDS", - "lines_options": null, - "col_name_or_user_var": null, + "fieldsKeyword": "FIELDS", + "linesOptions": null, + "columnNamesOrUserVariables": null, "set": null, - "ignore_number": null, - "replace_ignore": null, - "lines_rows": null, - "CLAUSES": [], - "END_OPTIONS": [], + "ignoreNumber": null, + "replaceIgnore": null, + "linesRows": null, + "clauses": [], + "statementEndOptions": [], "options": { "@type": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", "options": [] diff --git a/tests/data/parser/parseLoad4.out b/tests/data/parser/parseLoad4.out index 0b7aa15a5..d00fa9bb3 100644 --- a/tests/data/parser/parseLoad4.out +++ b/tests/data/parser/parseLoad4.out @@ -2,7 +2,7 @@ "query": "LOAD DATA INFILE '\/tmp\/test.txt' IGNORE\nINTO TABLE test\nCHARACTER SET 'utf8'\nCOLUMNS TERMINATED BY ','\nLINES TERMINATED BY ';'\nIGNORE 1 LINES\n(col1, col2)\nSET @a = 1;", "lexer": { "@type": "PhpMyAdmin\\SqlParser\\Lexer", - "PARSER_METHODS": [ + "parserMethods": [ "parseDelimiter", "parseWhitespace", "parseNumber", @@ -493,7 +493,7 @@ "count": 52, "idx": 52 }, - "DEFAULT_DELIMITER": ";", + "defaultDelimiter": ";", "delimiter": ";", "delimiterLen": 1, "strict": false, @@ -501,7 +501,7 @@ }, "parser": { "@type": "PhpMyAdmin\\SqlParser\\Parser", - "STATEMENT_PARSERS": { + "statementParsers": { "DESCRIBE": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", "DESC": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", "EXPLAIN": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", @@ -546,7 +546,7 @@ "LOCK": "PhpMyAdmin\\SqlParser\\Statements\\LockStatement", "UNLOCK": "PhpMyAdmin\\SqlParser\\Statements\\LockStatement" }, - "KEYWORD_PARSERS": { + "keywordParsers": { "PARTITION BY": [], "SUBPARTITION BY": [], "_OPTIONS": { @@ -555,7 +555,7 @@ }, "_END_OPTIONS": { "class": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", - "field": "end_options" + "field": "endOptions" }, "INTERSECT": { "class": "PhpMyAdmin\\SqlParser\\Components\\UnionKeyword", @@ -803,12 +803,12 @@ "statements": [ { "@type": "PhpMyAdmin\\SqlParser\\Statements\\LoadStatement", - "OPTIONS": { + "statementOptions": { "LOW_PRIORITY": 1, "CONCURRENT": 1, "LOCAL": 2 }, - "FIELDS_OPTIONS": { + "statementFieldsOptions": { "TERMINATED BY": [ 1, "expr" @@ -823,7 +823,7 @@ "expr" ] }, - "LINES_OPTIONS": { + "statementLinesOptions": { "STARTING BY": [ 1, "expr" @@ -833,9 +833,9 @@ "expr" ] }, - "file_name": { + "fileName": { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -860,7 +860,7 @@ }, "table": { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -883,9 +883,9 @@ "subquery": null }, "partition": null, - "charset_name": { + "charsetName": { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -907,7 +907,7 @@ "function": null, "subquery": null }, - "fields_options": { + "fieldsOptions": { "@type": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", "options": { "1": { @@ -915,7 +915,7 @@ "equals": false, "expr": { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -941,8 +941,8 @@ } } }, - "fields_keyword": "COLUMNS", - "lines_options": { + "fieldsKeyword": "COLUMNS", + "linesOptions": { "@type": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", "options": { "2": { @@ -950,7 +950,7 @@ "equals": false, "expr": { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -976,10 +976,10 @@ } } }, - "col_name_or_user_var": [ + "columnNamesOrUserVariables": [ { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -1009,9 +1009,9 @@ "value": "1" } ], - "ignore_number": { + "ignoreNumber": { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -1033,10 +1033,10 @@ "function": null, "subquery": null }, - "replace_ignore": "IGNORE", - "lines_rows": "LINES", - "CLAUSES": [], - "END_OPTIONS": [], + "replaceIgnore": "IGNORE", + "linesRows": "LINES", + "clauses": [], + "statementEndOptions": [], "options": { "@type": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", "options": [] diff --git a/tests/data/parser/parseLoad5.out b/tests/data/parser/parseLoad5.out index 5a7cebe0b..55bf55671 100644 --- a/tests/data/parser/parseLoad5.out +++ b/tests/data/parser/parseLoad5.out @@ -2,7 +2,7 @@ "query": "LOAD DATA INFILE '\/tmp\/test.txt' REPLACE INTO TABLE test COLUMNS TERMINATED BY ',' IGNORE 1 ROWS;", "lexer": { "@type": "PhpMyAdmin\\SqlParser\\Lexer", - "PARSER_METHODS": [ + "parserMethods": [ "parseDelimiter", "parseWhitespace", "parseNumber", @@ -268,7 +268,7 @@ "count": 27, "idx": 27 }, - "DEFAULT_DELIMITER": ";", + "defaultDelimiter": ";", "delimiter": ";", "delimiterLen": 1, "strict": false, @@ -276,7 +276,7 @@ }, "parser": { "@type": "PhpMyAdmin\\SqlParser\\Parser", - "STATEMENT_PARSERS": { + "statementParsers": { "DESCRIBE": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", "DESC": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", "EXPLAIN": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", @@ -321,7 +321,7 @@ "LOCK": "PhpMyAdmin\\SqlParser\\Statements\\LockStatement", "UNLOCK": "PhpMyAdmin\\SqlParser\\Statements\\LockStatement" }, - "KEYWORD_PARSERS": { + "keywordParsers": { "PARTITION BY": [], "SUBPARTITION BY": [], "_OPTIONS": { @@ -330,7 +330,7 @@ }, "_END_OPTIONS": { "class": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", - "field": "end_options" + "field": "endOptions" }, "INTERSECT": { "class": "PhpMyAdmin\\SqlParser\\Components\\UnionKeyword", @@ -578,12 +578,12 @@ "statements": [ { "@type": "PhpMyAdmin\\SqlParser\\Statements\\LoadStatement", - "OPTIONS": { + "statementOptions": { "LOW_PRIORITY": 1, "CONCURRENT": 1, "LOCAL": 2 }, - "FIELDS_OPTIONS": { + "statementFieldsOptions": { "TERMINATED BY": [ 1, "expr" @@ -598,7 +598,7 @@ "expr" ] }, - "LINES_OPTIONS": { + "statementLinesOptions": { "STARTING BY": [ 1, "expr" @@ -608,9 +608,9 @@ "expr" ] }, - "file_name": { + "fileName": { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -635,7 +635,7 @@ }, "table": { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -658,8 +658,8 @@ "subquery": null }, "partition": null, - "charset_name": null, - "fields_options": { + "charsetName": null, + "fieldsOptions": { "@type": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", "options": { "1": { @@ -667,7 +667,7 @@ "equals": false, "expr": { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -693,13 +693,13 @@ } } }, - "fields_keyword": "COLUMNS", - "lines_options": null, - "col_name_or_user_var": null, + "fieldsKeyword": "COLUMNS", + "linesOptions": null, + "columnNamesOrUserVariables": null, "set": null, - "ignore_number": { + "ignoreNumber": { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -721,10 +721,10 @@ "function": null, "subquery": null }, - "replace_ignore": "REPLACE", - "lines_rows": "ROWS", - "CLAUSES": [], - "END_OPTIONS": [], + "replaceIgnore": "REPLACE", + "linesRows": "ROWS", + "clauses": [], + "statementEndOptions": [], "options": { "@type": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", "options": [] diff --git a/tests/data/parser/parseLoad6.out b/tests/data/parser/parseLoad6.out index 1b7de97aa..dc25ecf60 100644 --- a/tests/data/parser/parseLoad6.out +++ b/tests/data/parser/parseLoad6.out @@ -2,7 +2,7 @@ "query": "LOAD DATA INFILE '\/tmp\/test.txt' IGNORE\nINTO TABLE test\nPARTITION (p0, p1, p2)\nCHARACTER SET 'utf8'\nCOLUMNS TERMINATED BY ','\nLINES TERMINATED BY ';'\nIGNORE 1 LINES\n(col1, col2)\nSET @a = 1;", "lexer": { "@type": "PhpMyAdmin\\SqlParser\\Lexer", - "PARSER_METHODS": [ + "parserMethods": [ "parseDelimiter", "parseWhitespace", "parseNumber", @@ -601,7 +601,7 @@ "count": 64, "idx": 64 }, - "DEFAULT_DELIMITER": ";", + "defaultDelimiter": ";", "delimiter": ";", "delimiterLen": 1, "strict": false, @@ -609,7 +609,7 @@ }, "parser": { "@type": "PhpMyAdmin\\SqlParser\\Parser", - "STATEMENT_PARSERS": { + "statementParsers": { "DESCRIBE": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", "DESC": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", "EXPLAIN": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", @@ -654,7 +654,7 @@ "LOCK": "PhpMyAdmin\\SqlParser\\Statements\\LockStatement", "UNLOCK": "PhpMyAdmin\\SqlParser\\Statements\\LockStatement" }, - "KEYWORD_PARSERS": { + "keywordParsers": { "PARTITION BY": [], "SUBPARTITION BY": [], "_OPTIONS": { @@ -663,7 +663,7 @@ }, "_END_OPTIONS": { "class": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", - "field": "end_options" + "field": "endOptions" }, "INTERSECT": { "class": "PhpMyAdmin\\SqlParser\\Components\\UnionKeyword", @@ -911,12 +911,12 @@ "statements": [ { "@type": "PhpMyAdmin\\SqlParser\\Statements\\LoadStatement", - "OPTIONS": { + "statementOptions": { "LOW_PRIORITY": 1, "CONCURRENT": 1, "LOCAL": 2 }, - "FIELDS_OPTIONS": { + "statementFieldsOptions": { "TERMINATED BY": [ 1, "expr" @@ -931,7 +931,7 @@ "expr" ] }, - "LINES_OPTIONS": { + "statementLinesOptions": { "STARTING BY": [ 1, "expr" @@ -941,9 +941,9 @@ "expr" ] }, - "file_name": { + "fileName": { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -968,7 +968,7 @@ }, "table": { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -1003,9 +1003,9 @@ "p2" ] }, - "charset_name": { + "charsetName": { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -1027,7 +1027,7 @@ "function": null, "subquery": null }, - "fields_options": { + "fieldsOptions": { "@type": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", "options": { "1": { @@ -1035,7 +1035,7 @@ "equals": false, "expr": { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -1061,8 +1061,8 @@ } } }, - "fields_keyword": "COLUMNS", - "lines_options": { + "fieldsKeyword": "COLUMNS", + "linesOptions": { "@type": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", "options": { "2": { @@ -1070,7 +1070,7 @@ "equals": false, "expr": { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -1096,10 +1096,10 @@ } } }, - "col_name_or_user_var": [ + "columnNamesOrUserVariables": [ { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -1129,9 +1129,9 @@ "value": "1" } ], - "ignore_number": { + "ignoreNumber": { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -1153,10 +1153,10 @@ "function": null, "subquery": null }, - "replace_ignore": "IGNORE", - "lines_rows": "LINES", - "CLAUSES": [], - "END_OPTIONS": [], + "replaceIgnore": "IGNORE", + "linesRows": "LINES", + "clauses": [], + "statementEndOptions": [], "options": { "@type": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", "options": [] diff --git a/tests/data/parser/parseLoadErr1.out b/tests/data/parser/parseLoadErr1.out index 0603b4809..944c55203 100644 --- a/tests/data/parser/parseLoadErr1.out +++ b/tests/data/parser/parseLoadErr1.out @@ -2,7 +2,7 @@ "query": "LOAD DATA CONCURRENT FROM 'employee1.txt' INTO TABLE employee;", "lexer": { "@type": "PhpMyAdmin\\SqlParser\\Lexer", - "PARSER_METHODS": [ + "parserMethods": [ "parseDelimiter", "parseWhitespace", "parseNumber", @@ -160,7 +160,7 @@ "count": 15, "idx": 15 }, - "DEFAULT_DELIMITER": ";", + "defaultDelimiter": ";", "delimiter": ";", "delimiterLen": 1, "strict": false, @@ -168,7 +168,7 @@ }, "parser": { "@type": "PhpMyAdmin\\SqlParser\\Parser", - "STATEMENT_PARSERS": { + "statementParsers": { "DESCRIBE": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", "DESC": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", "EXPLAIN": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", @@ -213,7 +213,7 @@ "LOCK": "PhpMyAdmin\\SqlParser\\Statements\\LockStatement", "UNLOCK": "PhpMyAdmin\\SqlParser\\Statements\\LockStatement" }, - "KEYWORD_PARSERS": { + "keywordParsers": { "PARTITION BY": [], "SUBPARTITION BY": [], "_OPTIONS": { @@ -222,7 +222,7 @@ }, "_END_OPTIONS": { "class": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", - "field": "end_options" + "field": "endOptions" }, "INTERSECT": { "class": "PhpMyAdmin\\SqlParser\\Components\\UnionKeyword", @@ -470,12 +470,12 @@ "statements": [ { "@type": "PhpMyAdmin\\SqlParser\\Statements\\LoadStatement", - "OPTIONS": { + "statementOptions": { "LOW_PRIORITY": 1, "CONCURRENT": 1, "LOCAL": 2 }, - "FIELDS_OPTIONS": { + "statementFieldsOptions": { "TERMINATED BY": [ 1, "expr" @@ -490,7 +490,7 @@ "expr" ] }, - "LINES_OPTIONS": { + "statementLinesOptions": { "STARTING BY": [ 1, "expr" @@ -500,20 +500,20 @@ "expr" ] }, - "file_name": null, + "fileName": null, "table": null, "partition": null, - "charset_name": null, - "fields_options": null, - "fields_keyword": null, - "lines_options": null, - "col_name_or_user_var": null, + "charsetName": null, + "fieldsOptions": null, + "fieldsKeyword": null, + "linesOptions": null, + "columnNamesOrUserVariables": null, "set": null, - "ignore_number": null, - "replace_ignore": null, - "lines_rows": null, - "CLAUSES": [], - "END_OPTIONS": [], + "ignoreNumber": null, + "replaceIgnore": null, + "linesRows": null, + "clauses": [], + "statementEndOptions": [], "options": { "@type": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", "options": { diff --git a/tests/data/parser/parseLoadErr2.out b/tests/data/parser/parseLoadErr2.out index ab7570dec..3096a1efa 100644 --- a/tests/data/parser/parseLoadErr2.out +++ b/tests/data/parser/parseLoadErr2.out @@ -2,7 +2,7 @@ "query": "LOAD DATA CONCURRENT ABC 'employee1.txt' INTO TABLE employee;", "lexer": { "@type": "PhpMyAdmin\\SqlParser\\Lexer", - "PARSER_METHODS": [ + "parserMethods": [ "parseDelimiter", "parseWhitespace", "parseNumber", @@ -160,7 +160,7 @@ "count": 15, "idx": 15 }, - "DEFAULT_DELIMITER": ";", + "defaultDelimiter": ";", "delimiter": ";", "delimiterLen": 1, "strict": false, @@ -168,7 +168,7 @@ }, "parser": { "@type": "PhpMyAdmin\\SqlParser\\Parser", - "STATEMENT_PARSERS": { + "statementParsers": { "DESCRIBE": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", "DESC": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", "EXPLAIN": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", @@ -213,7 +213,7 @@ "LOCK": "PhpMyAdmin\\SqlParser\\Statements\\LockStatement", "UNLOCK": "PhpMyAdmin\\SqlParser\\Statements\\LockStatement" }, - "KEYWORD_PARSERS": { + "keywordParsers": { "PARTITION BY": [], "SUBPARTITION BY": [], "_OPTIONS": { @@ -222,7 +222,7 @@ }, "_END_OPTIONS": { "class": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", - "field": "end_options" + "field": "endOptions" }, "INTERSECT": { "class": "PhpMyAdmin\\SqlParser\\Components\\UnionKeyword", @@ -470,12 +470,12 @@ "statements": [ { "@type": "PhpMyAdmin\\SqlParser\\Statements\\LoadStatement", - "OPTIONS": { + "statementOptions": { "LOW_PRIORITY": 1, "CONCURRENT": 1, "LOCAL": 2 }, - "FIELDS_OPTIONS": { + "statementFieldsOptions": { "TERMINATED BY": [ 1, "expr" @@ -490,7 +490,7 @@ "expr" ] }, - "LINES_OPTIONS": { + "statementLinesOptions": { "STARTING BY": [ 1, "expr" @@ -500,20 +500,20 @@ "expr" ] }, - "file_name": null, + "fileName": null, "table": null, "partition": null, - "charset_name": null, - "fields_options": null, - "fields_keyword": null, - "lines_options": null, - "col_name_or_user_var": null, + "charsetName": null, + "fieldsOptions": null, + "fieldsKeyword": null, + "linesOptions": null, + "columnNamesOrUserVariables": null, "set": null, - "ignore_number": null, - "replace_ignore": null, - "lines_rows": null, - "CLAUSES": [], - "END_OPTIONS": [], + "ignoreNumber": null, + "replaceIgnore": null, + "linesRows": null, + "clauses": [], + "statementEndOptions": [], "options": { "@type": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", "options": { diff --git a/tests/data/parser/parseLoadErr3.out b/tests/data/parser/parseLoadErr3.out index 2afd223b1..2656bc6b9 100644 --- a/tests/data/parser/parseLoadErr3.out +++ b/tests/data/parser/parseLoadErr3.out @@ -2,7 +2,7 @@ "query": "LOAD DATA INFILE '\/tmp\/test.txt' IGNORE\nINTO TABLE test\nDATA @a = 1;", "lexer": { "@type": "PhpMyAdmin\\SqlParser\\Lexer", - "PARSER_METHODS": [ + "parserMethods": [ "parseDelimiter", "parseWhitespace", "parseNumber", @@ -232,7 +232,7 @@ "count": 23, "idx": 23 }, - "DEFAULT_DELIMITER": ";", + "defaultDelimiter": ";", "delimiter": ";", "delimiterLen": 1, "strict": false, @@ -240,7 +240,7 @@ }, "parser": { "@type": "PhpMyAdmin\\SqlParser\\Parser", - "STATEMENT_PARSERS": { + "statementParsers": { "DESCRIBE": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", "DESC": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", "EXPLAIN": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", @@ -285,7 +285,7 @@ "LOCK": "PhpMyAdmin\\SqlParser\\Statements\\LockStatement", "UNLOCK": "PhpMyAdmin\\SqlParser\\Statements\\LockStatement" }, - "KEYWORD_PARSERS": { + "keywordParsers": { "PARTITION BY": [], "SUBPARTITION BY": [], "_OPTIONS": { @@ -294,7 +294,7 @@ }, "_END_OPTIONS": { "class": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", - "field": "end_options" + "field": "endOptions" }, "INTERSECT": { "class": "PhpMyAdmin\\SqlParser\\Components\\UnionKeyword", @@ -542,12 +542,12 @@ "statements": [ { "@type": "PhpMyAdmin\\SqlParser\\Statements\\LoadStatement", - "OPTIONS": { + "statementOptions": { "LOW_PRIORITY": 1, "CONCURRENT": 1, "LOCAL": 2 }, - "FIELDS_OPTIONS": { + "statementFieldsOptions": { "TERMINATED BY": [ 1, "expr" @@ -562,7 +562,7 @@ "expr" ] }, - "LINES_OPTIONS": { + "statementLinesOptions": { "STARTING BY": [ 1, "expr" @@ -572,9 +572,9 @@ "expr" ] }, - "file_name": { + "fileName": { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -599,7 +599,7 @@ }, "table": { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -622,17 +622,17 @@ "subquery": null }, "partition": null, - "charset_name": null, - "fields_options": null, - "fields_keyword": null, - "lines_options": null, - "col_name_or_user_var": null, + "charsetName": null, + "fieldsOptions": null, + "fieldsKeyword": null, + "linesOptions": null, + "columnNamesOrUserVariables": null, "set": null, - "ignore_number": null, - "replace_ignore": "IGNORE", - "lines_rows": null, - "CLAUSES": [], - "END_OPTIONS": [], + "ignoreNumber": null, + "replaceIgnore": "IGNORE", + "linesRows": null, + "clauses": [], + "statementEndOptions": [], "options": { "@type": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", "options": [] diff --git a/tests/data/parser/parseLoadErr4.out b/tests/data/parser/parseLoadErr4.out index 134d45c4b..bf1da34d9 100644 --- a/tests/data/parser/parseLoadErr4.out +++ b/tests/data/parser/parseLoadErr4.out @@ -2,7 +2,7 @@ "query": "LOAD DATA INFILE '\/tmp\/test.txt' IGNORE\nINTO test\nDATA @a = 1;", "lexer": { "@type": "PhpMyAdmin\\SqlParser\\Lexer", - "PARSER_METHODS": [ + "parserMethods": [ "parseDelimiter", "parseWhitespace", "parseNumber", @@ -214,7 +214,7 @@ "count": 21, "idx": 21 }, - "DEFAULT_DELIMITER": ";", + "defaultDelimiter": ";", "delimiter": ";", "delimiterLen": 1, "strict": false, @@ -222,7 +222,7 @@ }, "parser": { "@type": "PhpMyAdmin\\SqlParser\\Parser", - "STATEMENT_PARSERS": { + "statementParsers": { "DESCRIBE": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", "DESC": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", "EXPLAIN": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", @@ -267,7 +267,7 @@ "LOCK": "PhpMyAdmin\\SqlParser\\Statements\\LockStatement", "UNLOCK": "PhpMyAdmin\\SqlParser\\Statements\\LockStatement" }, - "KEYWORD_PARSERS": { + "keywordParsers": { "PARTITION BY": [], "SUBPARTITION BY": [], "_OPTIONS": { @@ -276,7 +276,7 @@ }, "_END_OPTIONS": { "class": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", - "field": "end_options" + "field": "endOptions" }, "INTERSECT": { "class": "PhpMyAdmin\\SqlParser\\Components\\UnionKeyword", @@ -524,12 +524,12 @@ "statements": [ { "@type": "PhpMyAdmin\\SqlParser\\Statements\\LoadStatement", - "OPTIONS": { + "statementOptions": { "LOW_PRIORITY": 1, "CONCURRENT": 1, "LOCAL": 2 }, - "FIELDS_OPTIONS": { + "statementFieldsOptions": { "TERMINATED BY": [ 1, "expr" @@ -544,7 +544,7 @@ "expr" ] }, - "LINES_OPTIONS": { + "statementLinesOptions": { "STARTING BY": [ 1, "expr" @@ -554,9 +554,9 @@ "expr" ] }, - "file_name": { + "fileName": { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -581,17 +581,17 @@ }, "table": null, "partition": null, - "charset_name": null, - "fields_options": null, - "fields_keyword": null, - "lines_options": null, - "col_name_or_user_var": null, + "charsetName": null, + "fieldsOptions": null, + "fieldsKeyword": null, + "linesOptions": null, + "columnNamesOrUserVariables": null, "set": null, - "ignore_number": null, - "replace_ignore": "IGNORE", - "lines_rows": null, - "CLAUSES": [], - "END_OPTIONS": [], + "ignoreNumber": null, + "replaceIgnore": "IGNORE", + "linesRows": null, + "clauses": [], + "statementEndOptions": [], "options": { "@type": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", "options": [] diff --git a/tests/data/parser/parseLoadErr5.out b/tests/data/parser/parseLoadErr5.out index e55bc7fe5..c7d253e88 100644 --- a/tests/data/parser/parseLoadErr5.out +++ b/tests/data/parser/parseLoadErr5.out @@ -2,7 +2,7 @@ "query": "LOAD DATA INFILE '\/tmp\/test.txt' IGNORE\nINTO TABLE test\n@a = 1;", "lexer": { "@type": "PhpMyAdmin\\SqlParser\\Lexer", - "PARSER_METHODS": [ + "parserMethods": [ "parseDelimiter", "parseWhitespace", "parseNumber", @@ -214,7 +214,7 @@ "count": 21, "idx": 21 }, - "DEFAULT_DELIMITER": ";", + "defaultDelimiter": ";", "delimiter": ";", "delimiterLen": 1, "strict": false, @@ -222,7 +222,7 @@ }, "parser": { "@type": "PhpMyAdmin\\SqlParser\\Parser", - "STATEMENT_PARSERS": { + "statementParsers": { "DESCRIBE": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", "DESC": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", "EXPLAIN": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", @@ -267,7 +267,7 @@ "LOCK": "PhpMyAdmin\\SqlParser\\Statements\\LockStatement", "UNLOCK": "PhpMyAdmin\\SqlParser\\Statements\\LockStatement" }, - "KEYWORD_PARSERS": { + "keywordParsers": { "PARTITION BY": [], "SUBPARTITION BY": [], "_OPTIONS": { @@ -276,7 +276,7 @@ }, "_END_OPTIONS": { "class": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", - "field": "end_options" + "field": "endOptions" }, "INTERSECT": { "class": "PhpMyAdmin\\SqlParser\\Components\\UnionKeyword", @@ -524,12 +524,12 @@ "statements": [ { "@type": "PhpMyAdmin\\SqlParser\\Statements\\LoadStatement", - "OPTIONS": { + "statementOptions": { "LOW_PRIORITY": 1, "CONCURRENT": 1, "LOCAL": 2 }, - "FIELDS_OPTIONS": { + "statementFieldsOptions": { "TERMINATED BY": [ 1, "expr" @@ -544,7 +544,7 @@ "expr" ] }, - "LINES_OPTIONS": { + "statementLinesOptions": { "STARTING BY": [ 1, "expr" @@ -554,9 +554,9 @@ "expr" ] }, - "file_name": { + "fileName": { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -581,7 +581,7 @@ }, "table": { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -604,17 +604,17 @@ "subquery": null }, "partition": null, - "charset_name": null, - "fields_options": null, - "fields_keyword": null, - "lines_options": null, - "col_name_or_user_var": null, + "charsetName": null, + "fieldsOptions": null, + "fieldsKeyword": null, + "linesOptions": null, + "columnNamesOrUserVariables": null, "set": null, - "ignore_number": null, - "replace_ignore": "IGNORE", - "lines_rows": null, - "CLAUSES": [], - "END_OPTIONS": [], + "ignoreNumber": null, + "replaceIgnore": "IGNORE", + "linesRows": null, + "clauses": [], + "statementEndOptions": [], "options": { "@type": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", "options": [] diff --git a/tests/data/parser/parseLoadErr6.out b/tests/data/parser/parseLoadErr6.out index 2afd223b1..2656bc6b9 100644 --- a/tests/data/parser/parseLoadErr6.out +++ b/tests/data/parser/parseLoadErr6.out @@ -2,7 +2,7 @@ "query": "LOAD DATA INFILE '\/tmp\/test.txt' IGNORE\nINTO TABLE test\nDATA @a = 1;", "lexer": { "@type": "PhpMyAdmin\\SqlParser\\Lexer", - "PARSER_METHODS": [ + "parserMethods": [ "parseDelimiter", "parseWhitespace", "parseNumber", @@ -232,7 +232,7 @@ "count": 23, "idx": 23 }, - "DEFAULT_DELIMITER": ";", + "defaultDelimiter": ";", "delimiter": ";", "delimiterLen": 1, "strict": false, @@ -240,7 +240,7 @@ }, "parser": { "@type": "PhpMyAdmin\\SqlParser\\Parser", - "STATEMENT_PARSERS": { + "statementParsers": { "DESCRIBE": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", "DESC": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", "EXPLAIN": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", @@ -285,7 +285,7 @@ "LOCK": "PhpMyAdmin\\SqlParser\\Statements\\LockStatement", "UNLOCK": "PhpMyAdmin\\SqlParser\\Statements\\LockStatement" }, - "KEYWORD_PARSERS": { + "keywordParsers": { "PARTITION BY": [], "SUBPARTITION BY": [], "_OPTIONS": { @@ -294,7 +294,7 @@ }, "_END_OPTIONS": { "class": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", - "field": "end_options" + "field": "endOptions" }, "INTERSECT": { "class": "PhpMyAdmin\\SqlParser\\Components\\UnionKeyword", @@ -542,12 +542,12 @@ "statements": [ { "@type": "PhpMyAdmin\\SqlParser\\Statements\\LoadStatement", - "OPTIONS": { + "statementOptions": { "LOW_PRIORITY": 1, "CONCURRENT": 1, "LOCAL": 2 }, - "FIELDS_OPTIONS": { + "statementFieldsOptions": { "TERMINATED BY": [ 1, "expr" @@ -562,7 +562,7 @@ "expr" ] }, - "LINES_OPTIONS": { + "statementLinesOptions": { "STARTING BY": [ 1, "expr" @@ -572,9 +572,9 @@ "expr" ] }, - "file_name": { + "fileName": { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -599,7 +599,7 @@ }, "table": { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -622,17 +622,17 @@ "subquery": null }, "partition": null, - "charset_name": null, - "fields_options": null, - "fields_keyword": null, - "lines_options": null, - "col_name_or_user_var": null, + "charsetName": null, + "fieldsOptions": null, + "fieldsKeyword": null, + "linesOptions": null, + "columnNamesOrUserVariables": null, "set": null, - "ignore_number": null, - "replace_ignore": "IGNORE", - "lines_rows": null, - "CLAUSES": [], - "END_OPTIONS": [], + "ignoreNumber": null, + "replaceIgnore": "IGNORE", + "linesRows": null, + "clauses": [], + "statementEndOptions": [], "options": { "@type": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", "options": [] diff --git a/tests/data/parser/parseLock1.out b/tests/data/parser/parseLock1.out index af5f4eb50..50174a3a0 100644 --- a/tests/data/parser/parseLock1.out +++ b/tests/data/parser/parseLock1.out @@ -2,7 +2,7 @@ "query": "LOCK TABLES table1 AS `t1` READ LOCAL;", "lexer": { "@type": "PhpMyAdmin\\SqlParser\\Lexer", - "PARSER_METHODS": [ + "parserMethods": [ "parseDelimiter", "parseWhitespace", "parseNumber", @@ -160,7 +160,7 @@ "count": 15, "idx": 15 }, - "DEFAULT_DELIMITER": ";", + "defaultDelimiter": ";", "delimiter": ";", "delimiterLen": 1, "strict": false, @@ -168,7 +168,7 @@ }, "parser": { "@type": "PhpMyAdmin\\SqlParser\\Parser", - "STATEMENT_PARSERS": { + "statementParsers": { "DESCRIBE": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", "DESC": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", "EXPLAIN": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", @@ -213,7 +213,7 @@ "LOCK": "PhpMyAdmin\\SqlParser\\Statements\\LockStatement", "UNLOCK": "PhpMyAdmin\\SqlParser\\Statements\\LockStatement" }, - "KEYWORD_PARSERS": { + "keywordParsers": { "PARTITION BY": [], "SUBPARTITION BY": [], "_OPTIONS": { @@ -222,7 +222,7 @@ }, "_END_OPTIONS": { "class": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", - "field": "end_options" + "field": "endOptions" }, "INTERSECT": { "class": "PhpMyAdmin\\SqlParser\\Components\\UnionKeyword", @@ -475,7 +475,7 @@ "@type": "PhpMyAdmin\\SqlParser\\Components\\LockExpression", "table": { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -501,9 +501,9 @@ } ], "isLock": true, - "OPTIONS": [], - "CLAUSES": [], - "END_OPTIONS": [], + "statementOptions": [], + "clauses": [], + "statementEndOptions": [], "options": null, "first": 0, "last": 13 diff --git a/tests/data/parser/parseLock2.out b/tests/data/parser/parseLock2.out index 8cc6385f9..6ece08301 100644 --- a/tests/data/parser/parseLock2.out +++ b/tests/data/parser/parseLock2.out @@ -2,7 +2,7 @@ "query": "LOCK TABLES table1 AS `t1` READ;", "lexer": { "@type": "PhpMyAdmin\\SqlParser\\Lexer", - "PARSER_METHODS": [ + "parserMethods": [ "parseDelimiter", "parseWhitespace", "parseNumber", @@ -142,7 +142,7 @@ "count": 13, "idx": 13 }, - "DEFAULT_DELIMITER": ";", + "defaultDelimiter": ";", "delimiter": ";", "delimiterLen": 1, "strict": false, @@ -150,7 +150,7 @@ }, "parser": { "@type": "PhpMyAdmin\\SqlParser\\Parser", - "STATEMENT_PARSERS": { + "statementParsers": { "DESCRIBE": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", "DESC": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", "EXPLAIN": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", @@ -195,7 +195,7 @@ "LOCK": "PhpMyAdmin\\SqlParser\\Statements\\LockStatement", "UNLOCK": "PhpMyAdmin\\SqlParser\\Statements\\LockStatement" }, - "KEYWORD_PARSERS": { + "keywordParsers": { "PARTITION BY": [], "SUBPARTITION BY": [], "_OPTIONS": { @@ -204,7 +204,7 @@ }, "_END_OPTIONS": { "class": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", - "field": "end_options" + "field": "endOptions" }, "INTERSECT": { "class": "PhpMyAdmin\\SqlParser\\Components\\UnionKeyword", @@ -457,7 +457,7 @@ "@type": "PhpMyAdmin\\SqlParser\\Components\\LockExpression", "table": { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -483,9 +483,9 @@ } ], "isLock": true, - "OPTIONS": [], - "CLAUSES": [], - "END_OPTIONS": [], + "statementOptions": [], + "clauses": [], + "statementEndOptions": [], "options": null, "first": 0, "last": 11 diff --git a/tests/data/parser/parseLock3.out b/tests/data/parser/parseLock3.out index 4548ab6e6..e458955b2 100644 --- a/tests/data/parser/parseLock3.out +++ b/tests/data/parser/parseLock3.out @@ -2,7 +2,7 @@ "query": "LOCK TABLES table1 AS `t1` LOW_PRIORITY WRITE;", "lexer": { "@type": "PhpMyAdmin\\SqlParser\\Lexer", - "PARSER_METHODS": [ + "parserMethods": [ "parseDelimiter", "parseWhitespace", "parseNumber", @@ -160,7 +160,7 @@ "count": 15, "idx": 15 }, - "DEFAULT_DELIMITER": ";", + "defaultDelimiter": ";", "delimiter": ";", "delimiterLen": 1, "strict": false, @@ -168,7 +168,7 @@ }, "parser": { "@type": "PhpMyAdmin\\SqlParser\\Parser", - "STATEMENT_PARSERS": { + "statementParsers": { "DESCRIBE": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", "DESC": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", "EXPLAIN": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", @@ -213,7 +213,7 @@ "LOCK": "PhpMyAdmin\\SqlParser\\Statements\\LockStatement", "UNLOCK": "PhpMyAdmin\\SqlParser\\Statements\\LockStatement" }, - "KEYWORD_PARSERS": { + "keywordParsers": { "PARTITION BY": [], "SUBPARTITION BY": [], "_OPTIONS": { @@ -222,7 +222,7 @@ }, "_END_OPTIONS": { "class": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", - "field": "end_options" + "field": "endOptions" }, "INTERSECT": { "class": "PhpMyAdmin\\SqlParser\\Components\\UnionKeyword", @@ -475,7 +475,7 @@ "@type": "PhpMyAdmin\\SqlParser\\Components\\LockExpression", "table": { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -501,9 +501,9 @@ } ], "isLock": true, - "OPTIONS": [], - "CLAUSES": [], - "END_OPTIONS": [], + "statementOptions": [], + "clauses": [], + "statementEndOptions": [], "options": null, "first": 0, "last": 13 diff --git a/tests/data/parser/parseLock4.out b/tests/data/parser/parseLock4.out index 6fb60ed0f..9ff7c5ee2 100644 --- a/tests/data/parser/parseLock4.out +++ b/tests/data/parser/parseLock4.out @@ -2,7 +2,7 @@ "query": "LOCK TABLES table1 AS `t1` WRITE;", "lexer": { "@type": "PhpMyAdmin\\SqlParser\\Lexer", - "PARSER_METHODS": [ + "parserMethods": [ "parseDelimiter", "parseWhitespace", "parseNumber", @@ -142,7 +142,7 @@ "count": 13, "idx": 13 }, - "DEFAULT_DELIMITER": ";", + "defaultDelimiter": ";", "delimiter": ";", "delimiterLen": 1, "strict": false, @@ -150,7 +150,7 @@ }, "parser": { "@type": "PhpMyAdmin\\SqlParser\\Parser", - "STATEMENT_PARSERS": { + "statementParsers": { "DESCRIBE": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", "DESC": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", "EXPLAIN": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", @@ -195,7 +195,7 @@ "LOCK": "PhpMyAdmin\\SqlParser\\Statements\\LockStatement", "UNLOCK": "PhpMyAdmin\\SqlParser\\Statements\\LockStatement" }, - "KEYWORD_PARSERS": { + "keywordParsers": { "PARTITION BY": [], "SUBPARTITION BY": [], "_OPTIONS": { @@ -204,7 +204,7 @@ }, "_END_OPTIONS": { "class": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", - "field": "end_options" + "field": "endOptions" }, "INTERSECT": { "class": "PhpMyAdmin\\SqlParser\\Components\\UnionKeyword", @@ -457,7 +457,7 @@ "@type": "PhpMyAdmin\\SqlParser\\Components\\LockExpression", "table": { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -483,9 +483,9 @@ } ], "isLock": true, - "OPTIONS": [], - "CLAUSES": [], - "END_OPTIONS": [], + "statementOptions": [], + "clauses": [], + "statementEndOptions": [], "options": null, "first": 0, "last": 11 diff --git a/tests/data/parser/parseLock5.out b/tests/data/parser/parseLock5.out index b6b7d1510..d2fa24404 100644 --- a/tests/data/parser/parseLock5.out +++ b/tests/data/parser/parseLock5.out @@ -2,7 +2,7 @@ "query": "LOCK TABLES table1 AS `t1` READ LOCAL, table2 AS `t2` WRITE;", "lexer": { "@type": "PhpMyAdmin\\SqlParser\\Lexer", - "PARSER_METHODS": [ + "parserMethods": [ "parseDelimiter", "parseWhitespace", "parseNumber", @@ -241,7 +241,7 @@ "count": 24, "idx": 24 }, - "DEFAULT_DELIMITER": ";", + "defaultDelimiter": ";", "delimiter": ";", "delimiterLen": 1, "strict": false, @@ -249,7 +249,7 @@ }, "parser": { "@type": "PhpMyAdmin\\SqlParser\\Parser", - "STATEMENT_PARSERS": { + "statementParsers": { "DESCRIBE": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", "DESC": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", "EXPLAIN": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", @@ -294,7 +294,7 @@ "LOCK": "PhpMyAdmin\\SqlParser\\Statements\\LockStatement", "UNLOCK": "PhpMyAdmin\\SqlParser\\Statements\\LockStatement" }, - "KEYWORD_PARSERS": { + "keywordParsers": { "PARTITION BY": [], "SUBPARTITION BY": [], "_OPTIONS": { @@ -303,7 +303,7 @@ }, "_END_OPTIONS": { "class": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", - "field": "end_options" + "field": "endOptions" }, "INTERSECT": { "class": "PhpMyAdmin\\SqlParser\\Components\\UnionKeyword", @@ -556,7 +556,7 @@ "@type": "PhpMyAdmin\\SqlParser\\Components\\LockExpression", "table": { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -584,7 +584,7 @@ "@type": "PhpMyAdmin\\SqlParser\\Components\\LockExpression", "table": { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -610,9 +610,9 @@ } ], "isLock": true, - "OPTIONS": [], - "CLAUSES": [], - "END_OPTIONS": [], + "statementOptions": [], + "clauses": [], + "statementEndOptions": [], "options": null, "first": 0, "last": 22 diff --git a/tests/data/parser/parseLock6.out b/tests/data/parser/parseLock6.out index 94b7313db..9cbbffb7e 100644 --- a/tests/data/parser/parseLock6.out +++ b/tests/data/parser/parseLock6.out @@ -2,7 +2,7 @@ "query": "LOCK TABLES table1 READ LOCAL, table2 AS `t2` WRITE;", "lexer": { "@type": "PhpMyAdmin\\SqlParser\\Lexer", - "PARSER_METHODS": [ + "parserMethods": [ "parseDelimiter", "parseWhitespace", "parseNumber", @@ -205,7 +205,7 @@ "count": 20, "idx": 20 }, - "DEFAULT_DELIMITER": ";", + "defaultDelimiter": ";", "delimiter": ";", "delimiterLen": 1, "strict": false, @@ -213,7 +213,7 @@ }, "parser": { "@type": "PhpMyAdmin\\SqlParser\\Parser", - "STATEMENT_PARSERS": { + "statementParsers": { "DESCRIBE": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", "DESC": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", "EXPLAIN": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", @@ -258,7 +258,7 @@ "LOCK": "PhpMyAdmin\\SqlParser\\Statements\\LockStatement", "UNLOCK": "PhpMyAdmin\\SqlParser\\Statements\\LockStatement" }, - "KEYWORD_PARSERS": { + "keywordParsers": { "PARTITION BY": [], "SUBPARTITION BY": [], "_OPTIONS": { @@ -267,7 +267,7 @@ }, "_END_OPTIONS": { "class": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", - "field": "end_options" + "field": "endOptions" }, "INTERSECT": { "class": "PhpMyAdmin\\SqlParser\\Components\\UnionKeyword", @@ -520,7 +520,7 @@ "@type": "PhpMyAdmin\\SqlParser\\Components\\LockExpression", "table": { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -548,7 +548,7 @@ "@type": "PhpMyAdmin\\SqlParser\\Components\\LockExpression", "table": { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -574,9 +574,9 @@ } ], "isLock": true, - "OPTIONS": [], - "CLAUSES": [], - "END_OPTIONS": [], + "statementOptions": [], + "clauses": [], + "statementEndOptions": [], "options": null, "first": 0, "last": 18 diff --git a/tests/data/parser/parseLockErr1.out b/tests/data/parser/parseLockErr1.out index 2b91ad455..8c0d7a701 100644 --- a/tests/data/parser/parseLockErr1.out +++ b/tests/data/parser/parseLockErr1.out @@ -2,7 +2,7 @@ "query": "LOCK TABLES table1", "lexer": { "@type": "PhpMyAdmin\\SqlParser\\Lexer", - "PARSER_METHODS": [ + "parserMethods": [ "parseDelimiter", "parseWhitespace", "parseNumber", @@ -79,7 +79,7 @@ "count": 6, "idx": 6 }, - "DEFAULT_DELIMITER": ";", + "defaultDelimiter": ";", "delimiter": ";", "delimiterLen": 1, "strict": false, @@ -87,7 +87,7 @@ }, "parser": { "@type": "PhpMyAdmin\\SqlParser\\Parser", - "STATEMENT_PARSERS": { + "statementParsers": { "DESCRIBE": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", "DESC": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", "EXPLAIN": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", @@ -132,7 +132,7 @@ "LOCK": "PhpMyAdmin\\SqlParser\\Statements\\LockStatement", "UNLOCK": "PhpMyAdmin\\SqlParser\\Statements\\LockStatement" }, - "KEYWORD_PARSERS": { + "keywordParsers": { "PARTITION BY": [], "SUBPARTITION BY": [], "_OPTIONS": { @@ -141,7 +141,7 @@ }, "_END_OPTIONS": { "class": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", - "field": "end_options" + "field": "endOptions" }, "INTERSECT": { "class": "PhpMyAdmin\\SqlParser\\Components\\UnionKeyword", @@ -394,7 +394,7 @@ "@type": "PhpMyAdmin\\SqlParser\\Components\\LockExpression", "table": { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -420,9 +420,9 @@ } ], "isLock": true, - "OPTIONS": [], - "CLAUSES": [], - "END_OPTIONS": [], + "statementOptions": [], + "clauses": [], + "statementEndOptions": [], "options": null, "first": 0, "last": 5 diff --git a/tests/data/parser/parseLockErr10.out b/tests/data/parser/parseLockErr10.out index 62174fe60..664ab0825 100644 --- a/tests/data/parser/parseLockErr10.out +++ b/tests/data/parser/parseLockErr10.out @@ -2,7 +2,7 @@ "query": "LOCK TABLES table1 AS table1 LOW_PRIORITY WRITE abc", "lexer": { "@type": "PhpMyAdmin\\SqlParser\\Lexer", - "PARSER_METHODS": [ + "parserMethods": [ "parseDelimiter", "parseWhitespace", "parseNumber", @@ -169,7 +169,7 @@ "count": 16, "idx": 16 }, - "DEFAULT_DELIMITER": ";", + "defaultDelimiter": ";", "delimiter": ";", "delimiterLen": 1, "strict": false, @@ -177,7 +177,7 @@ }, "parser": { "@type": "PhpMyAdmin\\SqlParser\\Parser", - "STATEMENT_PARSERS": { + "statementParsers": { "DESCRIBE": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", "DESC": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", "EXPLAIN": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", @@ -222,7 +222,7 @@ "LOCK": "PhpMyAdmin\\SqlParser\\Statements\\LockStatement", "UNLOCK": "PhpMyAdmin\\SqlParser\\Statements\\LockStatement" }, - "KEYWORD_PARSERS": { + "keywordParsers": { "PARTITION BY": [], "SUBPARTITION BY": [], "_OPTIONS": { @@ -231,7 +231,7 @@ }, "_END_OPTIONS": { "class": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", - "field": "end_options" + "field": "endOptions" }, "INTERSECT": { "class": "PhpMyAdmin\\SqlParser\\Components\\UnionKeyword", @@ -484,7 +484,7 @@ "@type": "PhpMyAdmin\\SqlParser\\Components\\LockExpression", "table": { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -510,9 +510,9 @@ } ], "isLock": true, - "OPTIONS": [], - "CLAUSES": [], - "END_OPTIONS": [], + "statementOptions": [], + "clauses": [], + "statementEndOptions": [], "options": null, "first": 0, "last": 15 diff --git a/tests/data/parser/parseLockErr2.out b/tests/data/parser/parseLockErr2.out index 7ec62aad0..b8eb9d691 100644 --- a/tests/data/parser/parseLockErr2.out +++ b/tests/data/parser/parseLockErr2.out @@ -2,7 +2,7 @@ "query": "LOCK TABLES table1 AS `t1` LOCAL", "lexer": { "@type": "PhpMyAdmin\\SqlParser\\Lexer", - "PARSER_METHODS": [ + "parserMethods": [ "parseDelimiter", "parseWhitespace", "parseNumber", @@ -133,7 +133,7 @@ "count": 12, "idx": 12 }, - "DEFAULT_DELIMITER": ";", + "defaultDelimiter": ";", "delimiter": ";", "delimiterLen": 1, "strict": false, @@ -141,7 +141,7 @@ }, "parser": { "@type": "PhpMyAdmin\\SqlParser\\Parser", - "STATEMENT_PARSERS": { + "statementParsers": { "DESCRIBE": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", "DESC": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", "EXPLAIN": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", @@ -186,7 +186,7 @@ "LOCK": "PhpMyAdmin\\SqlParser\\Statements\\LockStatement", "UNLOCK": "PhpMyAdmin\\SqlParser\\Statements\\LockStatement" }, - "KEYWORD_PARSERS": { + "keywordParsers": { "PARTITION BY": [], "SUBPARTITION BY": [], "_OPTIONS": { @@ -195,7 +195,7 @@ }, "_END_OPTIONS": { "class": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", - "field": "end_options" + "field": "endOptions" }, "INTERSECT": { "class": "PhpMyAdmin\\SqlParser\\Components\\UnionKeyword", @@ -448,7 +448,7 @@ "@type": "PhpMyAdmin\\SqlParser\\Components\\LockExpression", "table": { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -474,9 +474,9 @@ } ], "isLock": true, - "OPTIONS": [], - "CLAUSES": [], - "END_OPTIONS": [], + "statementOptions": [], + "clauses": [], + "statementEndOptions": [], "options": null, "first": 0, "last": 11 diff --git a/tests/data/parser/parseLockErr3.out b/tests/data/parser/parseLockErr3.out index 8f6c09ea3..406355b7c 100644 --- a/tests/data/parser/parseLockErr3.out +++ b/tests/data/parser/parseLockErr3.out @@ -2,7 +2,7 @@ "query": "-- TABLES misspelled\nLOCK TABLE table1 AS t1 READ", "lexer": { "@type": "PhpMyAdmin\\SqlParser\\Lexer", - "PARSER_METHODS": [ + "parserMethods": [ "parseDelimiter", "parseWhitespace", "parseNumber", @@ -151,7 +151,7 @@ "count": 14, "idx": 15 }, - "DEFAULT_DELIMITER": ";", + "defaultDelimiter": ";", "delimiter": ";", "delimiterLen": 1, "strict": false, @@ -159,7 +159,7 @@ }, "parser": { "@type": "PhpMyAdmin\\SqlParser\\Parser", - "STATEMENT_PARSERS": { + "statementParsers": { "DESCRIBE": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", "DESC": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", "EXPLAIN": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", @@ -204,7 +204,7 @@ "LOCK": "PhpMyAdmin\\SqlParser\\Statements\\LockStatement", "UNLOCK": "PhpMyAdmin\\SqlParser\\Statements\\LockStatement" }, - "KEYWORD_PARSERS": { + "keywordParsers": { "PARTITION BY": [], "SUBPARTITION BY": [], "_OPTIONS": { @@ -213,7 +213,7 @@ }, "_END_OPTIONS": { "class": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", - "field": "end_options" + "field": "endOptions" }, "INTERSECT": { "class": "PhpMyAdmin\\SqlParser\\Components\\UnionKeyword", @@ -463,9 +463,9 @@ "@type": "PhpMyAdmin\\SqlParser\\Statements\\LockStatement", "locked": [], "isLock": true, - "OPTIONS": [], - "CLAUSES": [], - "END_OPTIONS": [], + "statementOptions": [], + "clauses": [], + "statementEndOptions": [], "options": null, "first": 0, "last": 4 diff --git a/tests/data/parser/parseLockErr4.out b/tests/data/parser/parseLockErr4.out index 803c70d35..f55b74b58 100644 --- a/tests/data/parser/parseLockErr4.out +++ b/tests/data/parser/parseLockErr4.out @@ -2,7 +2,7 @@ "query": "-- missing TABLES keyword\nLOCK table1 READ LOCAL", "lexer": { "@type": "PhpMyAdmin\\SqlParser\\Lexer", - "PARSER_METHODS": [ + "parserMethods": [ "parseDelimiter", "parseWhitespace", "parseNumber", @@ -115,7 +115,7 @@ "count": 10, "idx": 11 }, - "DEFAULT_DELIMITER": ";", + "defaultDelimiter": ";", "delimiter": ";", "delimiterLen": 1, "strict": false, @@ -123,7 +123,7 @@ }, "parser": { "@type": "PhpMyAdmin\\SqlParser\\Parser", - "STATEMENT_PARSERS": { + "statementParsers": { "DESCRIBE": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", "DESC": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", "EXPLAIN": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", @@ -168,7 +168,7 @@ "LOCK": "PhpMyAdmin\\SqlParser\\Statements\\LockStatement", "UNLOCK": "PhpMyAdmin\\SqlParser\\Statements\\LockStatement" }, - "KEYWORD_PARSERS": { + "keywordParsers": { "PARTITION BY": [], "SUBPARTITION BY": [], "_OPTIONS": { @@ -177,7 +177,7 @@ }, "_END_OPTIONS": { "class": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", - "field": "end_options" + "field": "endOptions" }, "INTERSECT": { "class": "PhpMyAdmin\\SqlParser\\Components\\UnionKeyword", @@ -427,9 +427,9 @@ "@type": "PhpMyAdmin\\SqlParser\\Statements\\LockStatement", "locked": [], "isLock": true, - "OPTIONS": [], - "CLAUSES": [], - "END_OPTIONS": [], + "statementOptions": [], + "clauses": [], + "statementEndOptions": [], "options": null, "first": 0, "last": 4 diff --git a/tests/data/parser/parseLockErr5.out b/tests/data/parser/parseLockErr5.out index 3e6fd8fdb..b51966f18 100644 --- a/tests/data/parser/parseLockErr5.out +++ b/tests/data/parser/parseLockErr5.out @@ -2,7 +2,7 @@ "query": "-- extraneous comma\nLOCK TABLES table1 READ LOCAL,", "lexer": { "@type": "PhpMyAdmin\\SqlParser\\Lexer", - "PARSER_METHODS": [ + "parserMethods": [ "parseDelimiter", "parseWhitespace", "parseNumber", @@ -142,7 +142,7 @@ "count": 13, "idx": 13 }, - "DEFAULT_DELIMITER": ";", + "defaultDelimiter": ";", "delimiter": ";", "delimiterLen": 1, "strict": false, @@ -150,7 +150,7 @@ }, "parser": { "@type": "PhpMyAdmin\\SqlParser\\Parser", - "STATEMENT_PARSERS": { + "statementParsers": { "DESCRIBE": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", "DESC": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", "EXPLAIN": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", @@ -195,7 +195,7 @@ "LOCK": "PhpMyAdmin\\SqlParser\\Statements\\LockStatement", "UNLOCK": "PhpMyAdmin\\SqlParser\\Statements\\LockStatement" }, - "KEYWORD_PARSERS": { + "keywordParsers": { "PARTITION BY": [], "SUBPARTITION BY": [], "_OPTIONS": { @@ -204,7 +204,7 @@ }, "_END_OPTIONS": { "class": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", - "field": "end_options" + "field": "endOptions" }, "INTERSECT": { "class": "PhpMyAdmin\\SqlParser\\Components\\UnionKeyword", @@ -457,7 +457,7 @@ "@type": "PhpMyAdmin\\SqlParser\\Components\\LockExpression", "table": { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -483,9 +483,9 @@ } ], "isLock": true, - "OPTIONS": [], - "CLAUSES": [], - "END_OPTIONS": [], + "statementOptions": [], + "clauses": [], + "statementEndOptions": [], "options": null, "first": 0, "last": 12 diff --git a/tests/data/parser/parseLockErr6.out b/tests/data/parser/parseLockErr6.out index 346df95a5..4b9bed4f9 100644 --- a/tests/data/parser/parseLockErr6.out +++ b/tests/data/parser/parseLockErr6.out @@ -2,7 +2,7 @@ "query": "-- missing lock type\nLOCK TABLES table1", "lexer": { "@type": "PhpMyAdmin\\SqlParser\\Lexer", - "PARSER_METHODS": [ + "parserMethods": [ "parseDelimiter", "parseWhitespace", "parseNumber", @@ -97,7 +97,7 @@ "count": 8, "idx": 8 }, - "DEFAULT_DELIMITER": ";", + "defaultDelimiter": ";", "delimiter": ";", "delimiterLen": 1, "strict": false, @@ -105,7 +105,7 @@ }, "parser": { "@type": "PhpMyAdmin\\SqlParser\\Parser", - "STATEMENT_PARSERS": { + "statementParsers": { "DESCRIBE": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", "DESC": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", "EXPLAIN": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", @@ -150,7 +150,7 @@ "LOCK": "PhpMyAdmin\\SqlParser\\Statements\\LockStatement", "UNLOCK": "PhpMyAdmin\\SqlParser\\Statements\\LockStatement" }, - "KEYWORD_PARSERS": { + "keywordParsers": { "PARTITION BY": [], "SUBPARTITION BY": [], "_OPTIONS": { @@ -159,7 +159,7 @@ }, "_END_OPTIONS": { "class": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", - "field": "end_options" + "field": "endOptions" }, "INTERSECT": { "class": "PhpMyAdmin\\SqlParser\\Components\\UnionKeyword", @@ -412,7 +412,7 @@ "@type": "PhpMyAdmin\\SqlParser\\Components\\LockExpression", "table": { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -438,9 +438,9 @@ } ], "isLock": true, - "OPTIONS": [], - "CLAUSES": [], - "END_OPTIONS": [], + "statementOptions": [], + "clauses": [], + "statementEndOptions": [], "options": null, "first": 0, "last": 7 diff --git a/tests/data/parser/parseLockErr7.out b/tests/data/parser/parseLockErr7.out index 91f414d70..c6f0f0520 100644 --- a/tests/data/parser/parseLockErr7.out +++ b/tests/data/parser/parseLockErr7.out @@ -2,7 +2,7 @@ "query": "LOCK TABLES table1 AS table1 non_keyword", "lexer": { "@type": "PhpMyAdmin\\SqlParser\\Lexer", - "PARSER_METHODS": [ + "parserMethods": [ "parseDelimiter", "parseWhitespace", "parseNumber", @@ -133,7 +133,7 @@ "count": 12, "idx": 12 }, - "DEFAULT_DELIMITER": ";", + "defaultDelimiter": ";", "delimiter": ";", "delimiterLen": 1, "strict": false, @@ -141,7 +141,7 @@ }, "parser": { "@type": "PhpMyAdmin\\SqlParser\\Parser", - "STATEMENT_PARSERS": { + "statementParsers": { "DESCRIBE": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", "DESC": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", "EXPLAIN": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", @@ -186,7 +186,7 @@ "LOCK": "PhpMyAdmin\\SqlParser\\Statements\\LockStatement", "UNLOCK": "PhpMyAdmin\\SqlParser\\Statements\\LockStatement" }, - "KEYWORD_PARSERS": { + "keywordParsers": { "PARTITION BY": [], "SUBPARTITION BY": [], "_OPTIONS": { @@ -195,7 +195,7 @@ }, "_END_OPTIONS": { "class": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", - "field": "end_options" + "field": "endOptions" }, "INTERSECT": { "class": "PhpMyAdmin\\SqlParser\\Components\\UnionKeyword", @@ -448,7 +448,7 @@ "@type": "PhpMyAdmin\\SqlParser\\Components\\LockExpression", "table": { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -474,9 +474,9 @@ } ], "isLock": true, - "OPTIONS": [], - "CLAUSES": [], - "END_OPTIONS": [], + "statementOptions": [], + "clauses": [], + "statementEndOptions": [], "options": null, "first": 0, "last": 11 diff --git a/tests/data/parser/parseLockErr8.out b/tests/data/parser/parseLockErr8.out index ed62ce130..a01a3a5a3 100644 --- a/tests/data/parser/parseLockErr8.out +++ b/tests/data/parser/parseLockErr8.out @@ -2,7 +2,7 @@ "query": "LOCK TABLES table1 AS table1 READ AUTO_INCREMENT", "lexer": { "@type": "PhpMyAdmin\\SqlParser\\Lexer", - "PARSER_METHODS": [ + "parserMethods": [ "parseDelimiter", "parseWhitespace", "parseNumber", @@ -151,7 +151,7 @@ "count": 14, "idx": 14 }, - "DEFAULT_DELIMITER": ";", + "defaultDelimiter": ";", "delimiter": ";", "delimiterLen": 1, "strict": false, @@ -159,7 +159,7 @@ }, "parser": { "@type": "PhpMyAdmin\\SqlParser\\Parser", - "STATEMENT_PARSERS": { + "statementParsers": { "DESCRIBE": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", "DESC": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", "EXPLAIN": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", @@ -204,7 +204,7 @@ "LOCK": "PhpMyAdmin\\SqlParser\\Statements\\LockStatement", "UNLOCK": "PhpMyAdmin\\SqlParser\\Statements\\LockStatement" }, - "KEYWORD_PARSERS": { + "keywordParsers": { "PARTITION BY": [], "SUBPARTITION BY": [], "_OPTIONS": { @@ -213,7 +213,7 @@ }, "_END_OPTIONS": { "class": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", - "field": "end_options" + "field": "endOptions" }, "INTERSECT": { "class": "PhpMyAdmin\\SqlParser\\Components\\UnionKeyword", @@ -466,7 +466,7 @@ "@type": "PhpMyAdmin\\SqlParser\\Components\\LockExpression", "table": { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -492,9 +492,9 @@ } ], "isLock": true, - "OPTIONS": [], - "CLAUSES": [], - "END_OPTIONS": [], + "statementOptions": [], + "clauses": [], + "statementEndOptions": [], "options": null, "first": 0, "last": 13 diff --git a/tests/data/parser/parseLockErr9.out b/tests/data/parser/parseLockErr9.out index e627b5812..913c8de9c 100644 --- a/tests/data/parser/parseLockErr9.out +++ b/tests/data/parser/parseLockErr9.out @@ -2,7 +2,7 @@ "query": "LOCK TABLES table1 AS table1 LOW_PRIORITY READ", "lexer": { "@type": "PhpMyAdmin\\SqlParser\\Lexer", - "PARSER_METHODS": [ + "parserMethods": [ "parseDelimiter", "parseWhitespace", "parseNumber", @@ -151,7 +151,7 @@ "count": 14, "idx": 14 }, - "DEFAULT_DELIMITER": ";", + "defaultDelimiter": ";", "delimiter": ";", "delimiterLen": 1, "strict": false, @@ -159,7 +159,7 @@ }, "parser": { "@type": "PhpMyAdmin\\SqlParser\\Parser", - "STATEMENT_PARSERS": { + "statementParsers": { "DESCRIBE": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", "DESC": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", "EXPLAIN": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", @@ -204,7 +204,7 @@ "LOCK": "PhpMyAdmin\\SqlParser\\Statements\\LockStatement", "UNLOCK": "PhpMyAdmin\\SqlParser\\Statements\\LockStatement" }, - "KEYWORD_PARSERS": { + "keywordParsers": { "PARTITION BY": [], "SUBPARTITION BY": [], "_OPTIONS": { @@ -213,7 +213,7 @@ }, "_END_OPTIONS": { "class": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", - "field": "end_options" + "field": "endOptions" }, "INTERSECT": { "class": "PhpMyAdmin\\SqlParser\\Components\\UnionKeyword", @@ -466,7 +466,7 @@ "@type": "PhpMyAdmin\\SqlParser\\Components\\LockExpression", "table": { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -492,9 +492,9 @@ } ], "isLock": true, - "OPTIONS": [], - "CLAUSES": [], - "END_OPTIONS": [], + "statementOptions": [], + "clauses": [], + "statementEndOptions": [], "options": null, "first": 0, "last": 13 diff --git a/tests/data/parser/parsePurge.out b/tests/data/parser/parsePurge.out index 8795d048b..62d9c10ab 100644 --- a/tests/data/parser/parsePurge.out +++ b/tests/data/parser/parsePurge.out @@ -2,7 +2,7 @@ "query": "PURGE BINARY LOGS TO 'mysql-bin.010';", "lexer": { "@type": "PhpMyAdmin\\SqlParser\\Lexer", - "PARSER_METHODS": [ + "parserMethods": [ "parseDelimiter", "parseWhitespace", "parseNumber", @@ -124,7 +124,7 @@ "count": 11, "idx": 11 }, - "DEFAULT_DELIMITER": ";", + "defaultDelimiter": ";", "delimiter": ";", "delimiterLen": 1, "strict": false, @@ -132,7 +132,7 @@ }, "parser": { "@type": "PhpMyAdmin\\SqlParser\\Parser", - "STATEMENT_PARSERS": { + "statementParsers": { "DESCRIBE": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", "DESC": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", "EXPLAIN": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", @@ -177,7 +177,7 @@ "LOCK": "PhpMyAdmin\\SqlParser\\Statements\\LockStatement", "UNLOCK": "PhpMyAdmin\\SqlParser\\Statements\\LockStatement" }, - "KEYWORD_PARSERS": { + "keywordParsers": { "PARTITION BY": [], "SUBPARTITION BY": [], "_OPTIONS": { @@ -186,7 +186,7 @@ }, "_END_OPTIONS": { "class": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", - "field": "end_options" + "field": "endOptions" }, "INTERSECT": { "class": "PhpMyAdmin\\SqlParser\\Components\\UnionKeyword", @@ -434,11 +434,11 @@ "statements": [ { "@type": "PhpMyAdmin\\SqlParser\\Statements\\PurgeStatement", - "log_type": "BINARY", - "end_option": "TO", - "end_expr": { + "logType": "BINARY", + "endOption": "TO", + "endExpr": { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -460,9 +460,9 @@ "function": null, "subquery": null }, - "OPTIONS": [], - "CLAUSES": [], - "END_OPTIONS": [], + "statementOptions": [], + "clauses": [], + "statementEndOptions": [], "options": null, "first": 0, "last": 9 diff --git a/tests/data/parser/parsePurge2.out b/tests/data/parser/parsePurge2.out index 4be02fd09..ec3a6c589 100644 --- a/tests/data/parser/parsePurge2.out +++ b/tests/data/parser/parsePurge2.out @@ -2,7 +2,7 @@ "query": "PURGE BINARY LOGS BEFORE '2008-04-02 22:46:26';", "lexer": { "@type": "PhpMyAdmin\\SqlParser\\Lexer", - "PARSER_METHODS": [ + "parserMethods": [ "parseDelimiter", "parseWhitespace", "parseNumber", @@ -124,7 +124,7 @@ "count": 11, "idx": 11 }, - "DEFAULT_DELIMITER": ";", + "defaultDelimiter": ";", "delimiter": ";", "delimiterLen": 1, "strict": false, @@ -132,7 +132,7 @@ }, "parser": { "@type": "PhpMyAdmin\\SqlParser\\Parser", - "STATEMENT_PARSERS": { + "statementParsers": { "DESCRIBE": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", "DESC": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", "EXPLAIN": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", @@ -177,7 +177,7 @@ "LOCK": "PhpMyAdmin\\SqlParser\\Statements\\LockStatement", "UNLOCK": "PhpMyAdmin\\SqlParser\\Statements\\LockStatement" }, - "KEYWORD_PARSERS": { + "keywordParsers": { "PARTITION BY": [], "SUBPARTITION BY": [], "_OPTIONS": { @@ -186,7 +186,7 @@ }, "_END_OPTIONS": { "class": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", - "field": "end_options" + "field": "endOptions" }, "INTERSECT": { "class": "PhpMyAdmin\\SqlParser\\Components\\UnionKeyword", @@ -434,11 +434,11 @@ "statements": [ { "@type": "PhpMyAdmin\\SqlParser\\Statements\\PurgeStatement", - "log_type": "BINARY", - "end_option": "BEFORE", - "end_expr": { + "logType": "BINARY", + "endOption": "BEFORE", + "endExpr": { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -460,9 +460,9 @@ "function": null, "subquery": null }, - "OPTIONS": [], - "CLAUSES": [], - "END_OPTIONS": [], + "statementOptions": [], + "clauses": [], + "statementEndOptions": [], "options": null, "first": 0, "last": 9 diff --git a/tests/data/parser/parsePurge3.out b/tests/data/parser/parsePurge3.out index 8037cfb5d..b8b712952 100644 --- a/tests/data/parser/parsePurge3.out +++ b/tests/data/parser/parsePurge3.out @@ -2,7 +2,7 @@ "query": "PURGE MASTER LOGS BEFORE '2008-04-02 22:46:26';", "lexer": { "@type": "PhpMyAdmin\\SqlParser\\Lexer", - "PARSER_METHODS": [ + "parserMethods": [ "parseDelimiter", "parseWhitespace", "parseNumber", @@ -124,7 +124,7 @@ "count": 11, "idx": 11 }, - "DEFAULT_DELIMITER": ";", + "defaultDelimiter": ";", "delimiter": ";", "delimiterLen": 1, "strict": false, @@ -132,7 +132,7 @@ }, "parser": { "@type": "PhpMyAdmin\\SqlParser\\Parser", - "STATEMENT_PARSERS": { + "statementParsers": { "DESCRIBE": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", "DESC": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", "EXPLAIN": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", @@ -177,7 +177,7 @@ "LOCK": "PhpMyAdmin\\SqlParser\\Statements\\LockStatement", "UNLOCK": "PhpMyAdmin\\SqlParser\\Statements\\LockStatement" }, - "KEYWORD_PARSERS": { + "keywordParsers": { "PARTITION BY": [], "SUBPARTITION BY": [], "_OPTIONS": { @@ -186,7 +186,7 @@ }, "_END_OPTIONS": { "class": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", - "field": "end_options" + "field": "endOptions" }, "INTERSECT": { "class": "PhpMyAdmin\\SqlParser\\Components\\UnionKeyword", @@ -434,11 +434,11 @@ "statements": [ { "@type": "PhpMyAdmin\\SqlParser\\Statements\\PurgeStatement", - "log_type": "MASTER", - "end_option": "BEFORE", - "end_expr": { + "logType": "MASTER", + "endOption": "BEFORE", + "endExpr": { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -460,9 +460,9 @@ "function": null, "subquery": null }, - "OPTIONS": [], - "CLAUSES": [], - "END_OPTIONS": [], + "statementOptions": [], + "clauses": [], + "statementEndOptions": [], "options": null, "first": 0, "last": 9 diff --git a/tests/data/parser/parsePurge4.out b/tests/data/parser/parsePurge4.out index b32072f57..b1ac11ff3 100644 --- a/tests/data/parser/parsePurge4.out +++ b/tests/data/parser/parsePurge4.out @@ -2,7 +2,7 @@ "query": "PURGE MASTER LOGS TO 'mysql-bin.010';", "lexer": { "@type": "PhpMyAdmin\\SqlParser\\Lexer", - "PARSER_METHODS": [ + "parserMethods": [ "parseDelimiter", "parseWhitespace", "parseNumber", @@ -124,7 +124,7 @@ "count": 11, "idx": 11 }, - "DEFAULT_DELIMITER": ";", + "defaultDelimiter": ";", "delimiter": ";", "delimiterLen": 1, "strict": false, @@ -132,7 +132,7 @@ }, "parser": { "@type": "PhpMyAdmin\\SqlParser\\Parser", - "STATEMENT_PARSERS": { + "statementParsers": { "DESCRIBE": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", "DESC": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", "EXPLAIN": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", @@ -177,7 +177,7 @@ "LOCK": "PhpMyAdmin\\SqlParser\\Statements\\LockStatement", "UNLOCK": "PhpMyAdmin\\SqlParser\\Statements\\LockStatement" }, - "KEYWORD_PARSERS": { + "keywordParsers": { "PARTITION BY": [], "SUBPARTITION BY": [], "_OPTIONS": { @@ -186,7 +186,7 @@ }, "_END_OPTIONS": { "class": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", - "field": "end_options" + "field": "endOptions" }, "INTERSECT": { "class": "PhpMyAdmin\\SqlParser\\Components\\UnionKeyword", @@ -434,11 +434,11 @@ "statements": [ { "@type": "PhpMyAdmin\\SqlParser\\Statements\\PurgeStatement", - "log_type": "MASTER", - "end_option": "TO", - "end_expr": { + "logType": "MASTER", + "endOption": "TO", + "endExpr": { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -460,9 +460,9 @@ "function": null, "subquery": null }, - "OPTIONS": [], - "CLAUSES": [], - "END_OPTIONS": [], + "statementOptions": [], + "clauses": [], + "statementEndOptions": [], "options": null, "first": 0, "last": 9 diff --git a/tests/data/parser/parsePurgeErr.out b/tests/data/parser/parsePurgeErr.out index a12ea4dee..a74add3d2 100644 --- a/tests/data/parser/parsePurgeErr.out +++ b/tests/data/parser/parsePurgeErr.out @@ -2,7 +2,7 @@ "query": "PURGE LOGS TO 'mysql-bin.010';", "lexer": { "@type": "PhpMyAdmin\\SqlParser\\Lexer", - "PARSER_METHODS": [ + "parserMethods": [ "parseDelimiter", "parseWhitespace", "parseNumber", @@ -106,7 +106,7 @@ "count": 9, "idx": 9 }, - "DEFAULT_DELIMITER": ";", + "defaultDelimiter": ";", "delimiter": ";", "delimiterLen": 1, "strict": false, @@ -114,7 +114,7 @@ }, "parser": { "@type": "PhpMyAdmin\\SqlParser\\Parser", - "STATEMENT_PARSERS": { + "statementParsers": { "DESCRIBE": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", "DESC": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", "EXPLAIN": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", @@ -159,7 +159,7 @@ "LOCK": "PhpMyAdmin\\SqlParser\\Statements\\LockStatement", "UNLOCK": "PhpMyAdmin\\SqlParser\\Statements\\LockStatement" }, - "KEYWORD_PARSERS": { + "keywordParsers": { "PARTITION BY": [], "SUBPARTITION BY": [], "_OPTIONS": { @@ -168,7 +168,7 @@ }, "_END_OPTIONS": { "class": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", - "field": "end_options" + "field": "endOptions" }, "INTERSECT": { "class": "PhpMyAdmin\\SqlParser\\Components\\UnionKeyword", @@ -416,12 +416,12 @@ "statements": [ { "@type": "PhpMyAdmin\\SqlParser\\Statements\\PurgeStatement", - "log_type": null, - "end_option": null, - "end_expr": null, - "OPTIONS": [], - "CLAUSES": [], - "END_OPTIONS": [], + "logType": null, + "endOption": null, + "endExpr": null, + "statementOptions": [], + "clauses": [], + "statementEndOptions": [], "options": null, "first": 0, "last": 7 diff --git a/tests/data/parser/parsePurgeErr2.out b/tests/data/parser/parsePurgeErr2.out index ec2e01bfa..7183b6272 100644 --- a/tests/data/parser/parsePurgeErr2.out +++ b/tests/data/parser/parsePurgeErr2.out @@ -2,7 +2,7 @@ "query": "PURGE BINARY LOGS INTO;", "lexer": { "@type": "PhpMyAdmin\\SqlParser\\Lexer", - "PARSER_METHODS": [ + "parserMethods": [ "parseDelimiter", "parseWhitespace", "parseNumber", @@ -106,7 +106,7 @@ "count": 9, "idx": 9 }, - "DEFAULT_DELIMITER": ";", + "defaultDelimiter": ";", "delimiter": ";", "delimiterLen": 1, "strict": false, @@ -114,7 +114,7 @@ }, "parser": { "@type": "PhpMyAdmin\\SqlParser\\Parser", - "STATEMENT_PARSERS": { + "statementParsers": { "DESCRIBE": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", "DESC": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", "EXPLAIN": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", @@ -159,7 +159,7 @@ "LOCK": "PhpMyAdmin\\SqlParser\\Statements\\LockStatement", "UNLOCK": "PhpMyAdmin\\SqlParser\\Statements\\LockStatement" }, - "KEYWORD_PARSERS": { + "keywordParsers": { "PARTITION BY": [], "SUBPARTITION BY": [], "_OPTIONS": { @@ -168,7 +168,7 @@ }, "_END_OPTIONS": { "class": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", - "field": "end_options" + "field": "endOptions" }, "INTERSECT": { "class": "PhpMyAdmin\\SqlParser\\Components\\UnionKeyword", @@ -416,12 +416,12 @@ "statements": [ { "@type": "PhpMyAdmin\\SqlParser\\Statements\\PurgeStatement", - "log_type": "BINARY", - "end_option": null, - "end_expr": null, - "OPTIONS": [], - "CLAUSES": [], - "END_OPTIONS": [], + "logType": "BINARY", + "endOption": null, + "endExpr": null, + "statementOptions": [], + "clauses": [], + "statementEndOptions": [], "options": null, "first": 0, "last": 7 diff --git a/tests/data/parser/parsePurgeErr3.out b/tests/data/parser/parsePurgeErr3.out index e6f3e8f58..7262938d5 100644 --- a/tests/data/parser/parsePurgeErr3.out +++ b/tests/data/parser/parsePurgeErr3.out @@ -2,7 +2,7 @@ "query": "PURGE BINARY LOGS TO 'mysql.bin' INTO;", "lexer": { "@type": "PhpMyAdmin\\SqlParser\\Lexer", - "PARSER_METHODS": [ + "parserMethods": [ "parseDelimiter", "parseWhitespace", "parseNumber", @@ -142,7 +142,7 @@ "count": 13, "idx": 13 }, - "DEFAULT_DELIMITER": ";", + "defaultDelimiter": ";", "delimiter": ";", "delimiterLen": 1, "strict": false, @@ -150,7 +150,7 @@ }, "parser": { "@type": "PhpMyAdmin\\SqlParser\\Parser", - "STATEMENT_PARSERS": { + "statementParsers": { "DESCRIBE": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", "DESC": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", "EXPLAIN": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", @@ -195,7 +195,7 @@ "LOCK": "PhpMyAdmin\\SqlParser\\Statements\\LockStatement", "UNLOCK": "PhpMyAdmin\\SqlParser\\Statements\\LockStatement" }, - "KEYWORD_PARSERS": { + "keywordParsers": { "PARTITION BY": [], "SUBPARTITION BY": [], "_OPTIONS": { @@ -204,7 +204,7 @@ }, "_END_OPTIONS": { "class": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", - "field": "end_options" + "field": "endOptions" }, "INTERSECT": { "class": "PhpMyAdmin\\SqlParser\\Components\\UnionKeyword", @@ -452,11 +452,11 @@ "statements": [ { "@type": "PhpMyAdmin\\SqlParser\\Statements\\PurgeStatement", - "log_type": "BINARY", - "end_option": "TO", - "end_expr": { + "logType": "BINARY", + "endOption": "TO", + "endExpr": { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -478,9 +478,9 @@ "function": null, "subquery": null }, - "OPTIONS": [], - "CLAUSES": [], - "END_OPTIONS": [], + "statementOptions": [], + "clauses": [], + "statementEndOptions": [], "options": null, "first": 0, "last": 11 diff --git a/tests/data/parser/parseRename.out b/tests/data/parser/parseRename.out index 8a813a480..f97a9a740 100644 --- a/tests/data/parser/parseRename.out +++ b/tests/data/parser/parseRename.out @@ -2,7 +2,7 @@ "query": "RENAME TABLE foo TO bar", "lexer": { "@type": "PhpMyAdmin\\SqlParser\\Lexer", - "PARSER_METHODS": [ + "parserMethods": [ "parseDelimiter", "parseWhitespace", "parseNumber", @@ -115,7 +115,7 @@ "count": 10, "idx": 10 }, - "DEFAULT_DELIMITER": ";", + "defaultDelimiter": ";", "delimiter": ";", "delimiterLen": 1, "strict": false, @@ -123,7 +123,7 @@ }, "parser": { "@type": "PhpMyAdmin\\SqlParser\\Parser", - "STATEMENT_PARSERS": { + "statementParsers": { "DESCRIBE": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", "DESC": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", "EXPLAIN": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", @@ -168,7 +168,7 @@ "LOCK": "PhpMyAdmin\\SqlParser\\Statements\\LockStatement", "UNLOCK": "PhpMyAdmin\\SqlParser\\Statements\\LockStatement" }, - "KEYWORD_PARSERS": { + "keywordParsers": { "PARTITION BY": [], "SUBPARTITION BY": [], "_OPTIONS": { @@ -177,7 +177,7 @@ }, "_END_OPTIONS": { "class": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", - "field": "end_options" + "field": "endOptions" }, "INTERSECT": { "class": "PhpMyAdmin\\SqlParser\\Components\\UnionKeyword", @@ -430,7 +430,7 @@ "@type": "PhpMyAdmin\\SqlParser\\Components\\RenameOperation", "old": { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -454,7 +454,7 @@ }, "new": { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -478,9 +478,9 @@ } } ], - "OPTIONS": [], - "CLAUSES": [], - "END_OPTIONS": [], + "statementOptions": [], + "clauses": [], + "statementEndOptions": [], "options": null, "first": 0, "last": 8 diff --git a/tests/data/parser/parseRename2.out b/tests/data/parser/parseRename2.out index 8d61d6732..2baeb2ddb 100644 --- a/tests/data/parser/parseRename2.out +++ b/tests/data/parser/parseRename2.out @@ -2,7 +2,7 @@ "query": "RENAME TABLE foo TO bar, baz TO qux;", "lexer": { "@type": "PhpMyAdmin\\SqlParser\\Lexer", - "PARSER_METHODS": [ + "parserMethods": [ "parseDelimiter", "parseWhitespace", "parseNumber", @@ -187,7 +187,7 @@ "count": 18, "idx": 18 }, - "DEFAULT_DELIMITER": ";", + "defaultDelimiter": ";", "delimiter": ";", "delimiterLen": 1, "strict": false, @@ -195,7 +195,7 @@ }, "parser": { "@type": "PhpMyAdmin\\SqlParser\\Parser", - "STATEMENT_PARSERS": { + "statementParsers": { "DESCRIBE": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", "DESC": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", "EXPLAIN": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", @@ -240,7 +240,7 @@ "LOCK": "PhpMyAdmin\\SqlParser\\Statements\\LockStatement", "UNLOCK": "PhpMyAdmin\\SqlParser\\Statements\\LockStatement" }, - "KEYWORD_PARSERS": { + "keywordParsers": { "PARTITION BY": [], "SUBPARTITION BY": [], "_OPTIONS": { @@ -249,7 +249,7 @@ }, "_END_OPTIONS": { "class": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", - "field": "end_options" + "field": "endOptions" }, "INTERSECT": { "class": "PhpMyAdmin\\SqlParser\\Components\\UnionKeyword", @@ -502,7 +502,7 @@ "@type": "PhpMyAdmin\\SqlParser\\Components\\RenameOperation", "old": { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -526,7 +526,7 @@ }, "new": { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -553,7 +553,7 @@ "@type": "PhpMyAdmin\\SqlParser\\Components\\RenameOperation", "old": { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -577,7 +577,7 @@ }, "new": { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -601,9 +601,9 @@ } } ], - "OPTIONS": [], - "CLAUSES": [], - "END_OPTIONS": [], + "statementOptions": [], + "clauses": [], + "statementEndOptions": [], "options": null, "first": 0, "last": 15 diff --git a/tests/data/parser/parseRenameErr1.out b/tests/data/parser/parseRenameErr1.out index dd6e0533b..cda6c64d0 100644 --- a/tests/data/parser/parseRenameErr1.out +++ b/tests/data/parser/parseRenameErr1.out @@ -2,7 +2,7 @@ "query": "RENAME TABLE a TO TO", "lexer": { "@type": "PhpMyAdmin\\SqlParser\\Lexer", - "PARSER_METHODS": [ + "parserMethods": [ "parseDelimiter", "parseWhitespace", "parseNumber", @@ -115,7 +115,7 @@ "count": 10, "idx": 10 }, - "DEFAULT_DELIMITER": ";", + "defaultDelimiter": ";", "delimiter": ";", "delimiterLen": 1, "strict": false, @@ -123,7 +123,7 @@ }, "parser": { "@type": "PhpMyAdmin\\SqlParser\\Parser", - "STATEMENT_PARSERS": { + "statementParsers": { "DESCRIBE": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", "DESC": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", "EXPLAIN": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", @@ -168,7 +168,7 @@ "LOCK": "PhpMyAdmin\\SqlParser\\Statements\\LockStatement", "UNLOCK": "PhpMyAdmin\\SqlParser\\Statements\\LockStatement" }, - "KEYWORD_PARSERS": { + "keywordParsers": { "PARTITION BY": [], "SUBPARTITION BY": [], "_OPTIONS": { @@ -177,7 +177,7 @@ }, "_END_OPTIONS": { "class": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", - "field": "end_options" + "field": "endOptions" }, "INTERSECT": { "class": "PhpMyAdmin\\SqlParser\\Components\\UnionKeyword", @@ -430,7 +430,7 @@ "@type": "PhpMyAdmin\\SqlParser\\Components\\RenameOperation", "old": { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -455,9 +455,9 @@ "new": null } ], - "OPTIONS": [], - "CLAUSES": [], - "END_OPTIONS": [], + "statementOptions": [], + "clauses": [], + "statementEndOptions": [], "options": null, "first": 0, "last": 8 diff --git a/tests/data/parser/parseRenameErr2.out b/tests/data/parser/parseRenameErr2.out index 33cb2d1e6..d4f9c6159 100644 --- a/tests/data/parser/parseRenameErr2.out +++ b/tests/data/parser/parseRenameErr2.out @@ -2,7 +2,7 @@ "query": "RENAME TABLE TABLE", "lexer": { "@type": "PhpMyAdmin\\SqlParser\\Lexer", - "PARSER_METHODS": [ + "parserMethods": [ "parseDelimiter", "parseWhitespace", "parseNumber", @@ -79,7 +79,7 @@ "count": 6, "idx": 6 }, - "DEFAULT_DELIMITER": ";", + "defaultDelimiter": ";", "delimiter": ";", "delimiterLen": 1, "strict": false, @@ -87,7 +87,7 @@ }, "parser": { "@type": "PhpMyAdmin\\SqlParser\\Parser", - "STATEMENT_PARSERS": { + "statementParsers": { "DESCRIBE": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", "DESC": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", "EXPLAIN": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", @@ -132,7 +132,7 @@ "LOCK": "PhpMyAdmin\\SqlParser\\Statements\\LockStatement", "UNLOCK": "PhpMyAdmin\\SqlParser\\Statements\\LockStatement" }, - "KEYWORD_PARSERS": { + "keywordParsers": { "PARTITION BY": [], "SUBPARTITION BY": [], "_OPTIONS": { @@ -141,7 +141,7 @@ }, "_END_OPTIONS": { "class": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", - "field": "end_options" + "field": "endOptions" }, "INTERSECT": { "class": "PhpMyAdmin\\SqlParser\\Components\\UnionKeyword", @@ -390,9 +390,9 @@ { "@type": "PhpMyAdmin\\SqlParser\\Statements\\RenameStatement", "renames": [], - "OPTIONS": [], - "CLAUSES": [], - "END_OPTIONS": [], + "statementOptions": [], + "clauses": [], + "statementEndOptions": [], "options": null, "first": 0, "last": 4 diff --git a/tests/data/parser/parseRenameErr3.out b/tests/data/parser/parseRenameErr3.out index 74de2b335..bc3e07a2d 100644 --- a/tests/data/parser/parseRenameErr3.out +++ b/tests/data/parser/parseRenameErr3.out @@ -2,7 +2,7 @@ "query": "RENAME TABLE a FROM", "lexer": { "@type": "PhpMyAdmin\\SqlParser\\Lexer", - "PARSER_METHODS": [ + "parserMethods": [ "parseDelimiter", "parseWhitespace", "parseNumber", @@ -97,7 +97,7 @@ "count": 8, "idx": 8 }, - "DEFAULT_DELIMITER": ";", + "defaultDelimiter": ";", "delimiter": ";", "delimiterLen": 1, "strict": false, @@ -105,7 +105,7 @@ }, "parser": { "@type": "PhpMyAdmin\\SqlParser\\Parser", - "STATEMENT_PARSERS": { + "statementParsers": { "DESCRIBE": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", "DESC": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", "EXPLAIN": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", @@ -150,7 +150,7 @@ "LOCK": "PhpMyAdmin\\SqlParser\\Statements\\LockStatement", "UNLOCK": "PhpMyAdmin\\SqlParser\\Statements\\LockStatement" }, - "KEYWORD_PARSERS": { + "keywordParsers": { "PARTITION BY": [], "SUBPARTITION BY": [], "_OPTIONS": { @@ -159,7 +159,7 @@ }, "_END_OPTIONS": { "class": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", - "field": "end_options" + "field": "endOptions" }, "INTERSECT": { "class": "PhpMyAdmin\\SqlParser\\Components\\UnionKeyword", @@ -412,7 +412,7 @@ "@type": "PhpMyAdmin\\SqlParser\\Components\\RenameOperation", "old": { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -437,9 +437,9 @@ "new": null } ], - "OPTIONS": [], - "CLAUSES": [], - "END_OPTIONS": [], + "statementOptions": [], + "clauses": [], + "statementEndOptions": [], "options": null, "first": 0, "last": 6, diff --git a/tests/data/parser/parseRenameErr4.out b/tests/data/parser/parseRenameErr4.out index b9ebcc95c..e6c8d5057 100644 --- a/tests/data/parser/parseRenameErr4.out +++ b/tests/data/parser/parseRenameErr4.out @@ -2,7 +2,7 @@ "query": "RENAME TABLE foo TO bar TO", "lexer": { "@type": "PhpMyAdmin\\SqlParser\\Lexer", - "PARSER_METHODS": [ + "parserMethods": [ "parseDelimiter", "parseWhitespace", "parseNumber", @@ -133,7 +133,7 @@ "count": 12, "idx": 12 }, - "DEFAULT_DELIMITER": ";", + "defaultDelimiter": ";", "delimiter": ";", "delimiterLen": 1, "strict": false, @@ -141,7 +141,7 @@ }, "parser": { "@type": "PhpMyAdmin\\SqlParser\\Parser", - "STATEMENT_PARSERS": { + "statementParsers": { "DESCRIBE": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", "DESC": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", "EXPLAIN": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", @@ -186,7 +186,7 @@ "LOCK": "PhpMyAdmin\\SqlParser\\Statements\\LockStatement", "UNLOCK": "PhpMyAdmin\\SqlParser\\Statements\\LockStatement" }, - "KEYWORD_PARSERS": { + "keywordParsers": { "PARTITION BY": [], "SUBPARTITION BY": [], "_OPTIONS": { @@ -195,7 +195,7 @@ }, "_END_OPTIONS": { "class": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", - "field": "end_options" + "field": "endOptions" }, "INTERSECT": { "class": "PhpMyAdmin\\SqlParser\\Components\\UnionKeyword", @@ -448,7 +448,7 @@ "@type": "PhpMyAdmin\\SqlParser\\Components\\RenameOperation", "old": { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -472,7 +472,7 @@ }, "new": { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -496,9 +496,9 @@ } } ], - "OPTIONS": [], - "CLAUSES": [], - "END_OPTIONS": [], + "statementOptions": [], + "clauses": [], + "statementEndOptions": [], "options": null, "first": 0, "last": 10 diff --git a/tests/data/parser/parseRenameErr5.out b/tests/data/parser/parseRenameErr5.out index 336a67187..5265b3d69 100644 --- a/tests/data/parser/parseRenameErr5.out +++ b/tests/data/parser/parseRenameErr5.out @@ -2,7 +2,7 @@ "query": "RENAME\n", "lexer": { "@type": "PhpMyAdmin\\SqlParser\\Lexer", - "PARSER_METHODS": [ + "parserMethods": [ "parseDelimiter", "parseWhitespace", "parseNumber", @@ -52,7 +52,7 @@ "count": 3, "idx": 4 }, - "DEFAULT_DELIMITER": ";", + "defaultDelimiter": ";", "delimiter": ";", "delimiterLen": 1, "strict": false, @@ -60,7 +60,7 @@ }, "parser": { "@type": "PhpMyAdmin\\SqlParser\\Parser", - "STATEMENT_PARSERS": { + "statementParsers": { "DESCRIBE": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", "DESC": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", "EXPLAIN": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", @@ -105,7 +105,7 @@ "LOCK": "PhpMyAdmin\\SqlParser\\Statements\\LockStatement", "UNLOCK": "PhpMyAdmin\\SqlParser\\Statements\\LockStatement" }, - "KEYWORD_PARSERS": { + "keywordParsers": { "PARTITION BY": [], "SUBPARTITION BY": [], "_OPTIONS": { @@ -114,7 +114,7 @@ }, "_END_OPTIONS": { "class": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", - "field": "end_options" + "field": "endOptions" }, "INTERSECT": { "class": "PhpMyAdmin\\SqlParser\\Components\\UnionKeyword", @@ -363,9 +363,9 @@ { "@type": "PhpMyAdmin\\SqlParser\\Statements\\RenameStatement", "renames": null, - "OPTIONS": [], - "CLAUSES": [], - "END_OPTIONS": [], + "statementOptions": [], + "clauses": [], + "statementEndOptions": [], "options": null, "first": 0, "last": 3 diff --git a/tests/data/parser/parseReplace.out b/tests/data/parser/parseReplace.out index 326122f0c..1e11f47ec 100644 --- a/tests/data/parser/parseReplace.out +++ b/tests/data/parser/parseReplace.out @@ -2,7 +2,7 @@ "query": "REPLACE LOW_PRIORITY\nINTO users(id, username)\nVALUES (1, 'Foo'), (2, 'Bar')", "lexer": { "@type": "PhpMyAdmin\\SqlParser\\Lexer", - "PARSER_METHODS": [ + "parserMethods": [ "parseDelimiter", "parseWhitespace", "parseNumber", @@ -304,7 +304,7 @@ "count": 31, "idx": 31 }, - "DEFAULT_DELIMITER": ";", + "defaultDelimiter": ";", "delimiter": ";", "delimiterLen": 1, "strict": false, @@ -312,7 +312,7 @@ }, "parser": { "@type": "PhpMyAdmin\\SqlParser\\Parser", - "STATEMENT_PARSERS": { + "statementParsers": { "DESCRIBE": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", "DESC": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", "EXPLAIN": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", @@ -357,7 +357,7 @@ "LOCK": "PhpMyAdmin\\SqlParser\\Statements\\LockStatement", "UNLOCK": "PhpMyAdmin\\SqlParser\\Statements\\LockStatement" }, - "KEYWORD_PARSERS": { + "keywordParsers": { "PARTITION BY": [], "SUBPARTITION BY": [], "_OPTIONS": { @@ -366,7 +366,7 @@ }, "_END_OPTIONS": { "class": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", - "field": "end_options" + "field": "endOptions" }, "INTERSECT": { "class": "PhpMyAdmin\\SqlParser\\Components\\UnionKeyword", @@ -614,13 +614,13 @@ "statements": [ { "@type": "PhpMyAdmin\\SqlParser\\Statements\\ReplaceStatement", - "OPTIONS": { + "statementOptions": { "LOW_PRIORITY": 1, "DELAYED": 1 }, "into": { "@type": "PhpMyAdmin\\SqlParser\\Components\\IntoKeyword", - "FIELDS_OPTIONS": { + "statementFieldsOptions": { "TERMINATED BY": [ 1, "expr" @@ -635,7 +635,7 @@ "expr" ] }, - "LINES_OPTIONS": { + "statementLinesOptions": { "STARTING BY": [ 1, "expr" @@ -648,7 +648,7 @@ "type": null, "dest": { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -675,9 +675,9 @@ "username" ], "values": null, - "fields_options": null, - "fields_keyword": null, - "lines_options": null + "fieldsOptions": null, + "fieldsKeyword": null, + "linesOptions": null }, "values": [ { @@ -705,8 +705,8 @@ ], "set": null, "select": null, - "CLAUSES": [], - "END_OPTIONS": [], + "clauses": [], + "statementEndOptions": [], "options": { "@type": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", "options": { diff --git a/tests/data/parser/parseReplace2.out b/tests/data/parser/parseReplace2.out index 485d57998..d10fab8d2 100644 --- a/tests/data/parser/parseReplace2.out +++ b/tests/data/parser/parseReplace2.out @@ -2,7 +2,7 @@ "query": "REPLACE LOW_PRIORITY\nINTO users\nSET id = 1,\n username = 'Bar';", "lexer": { "@type": "PhpMyAdmin\\SqlParser\\Lexer", - "PARSER_METHODS": [ + "parserMethods": [ "parseDelimiter", "parseWhitespace", "parseNumber", @@ -241,7 +241,7 @@ "count": 24, "idx": 24 }, - "DEFAULT_DELIMITER": ";", + "defaultDelimiter": ";", "delimiter": ";", "delimiterLen": 1, "strict": false, @@ -249,7 +249,7 @@ }, "parser": { "@type": "PhpMyAdmin\\SqlParser\\Parser", - "STATEMENT_PARSERS": { + "statementParsers": { "DESCRIBE": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", "DESC": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", "EXPLAIN": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", @@ -294,7 +294,7 @@ "LOCK": "PhpMyAdmin\\SqlParser\\Statements\\LockStatement", "UNLOCK": "PhpMyAdmin\\SqlParser\\Statements\\LockStatement" }, - "KEYWORD_PARSERS": { + "keywordParsers": { "PARTITION BY": [], "SUBPARTITION BY": [], "_OPTIONS": { @@ -303,7 +303,7 @@ }, "_END_OPTIONS": { "class": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", - "field": "end_options" + "field": "endOptions" }, "INTERSECT": { "class": "PhpMyAdmin\\SqlParser\\Components\\UnionKeyword", @@ -551,13 +551,13 @@ "statements": [ { "@type": "PhpMyAdmin\\SqlParser\\Statements\\ReplaceStatement", - "OPTIONS": { + "statementOptions": { "LOW_PRIORITY": 1, "DELAYED": 1 }, "into": { "@type": "PhpMyAdmin\\SqlParser\\Components\\IntoKeyword", - "FIELDS_OPTIONS": { + "statementFieldsOptions": { "TERMINATED BY": [ 1, "expr" @@ -572,7 +572,7 @@ "expr" ] }, - "LINES_OPTIONS": { + "statementLinesOptions": { "STARTING BY": [ 1, "expr" @@ -585,7 +585,7 @@ "type": null, "dest": { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -609,9 +609,9 @@ }, "columns": null, "values": null, - "fields_options": null, - "fields_keyword": null, - "lines_options": null + "fieldsOptions": null, + "fieldsKeyword": null, + "linesOptions": null }, "values": null, "set": [ @@ -627,8 +627,8 @@ } ], "select": null, - "CLAUSES": [], - "END_OPTIONS": [], + "clauses": [], + "statementEndOptions": [], "options": { "@type": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", "options": { diff --git a/tests/data/parser/parseReplaceErr.out b/tests/data/parser/parseReplaceErr.out index 727f2d2f8..1daa575a4 100644 --- a/tests/data/parser/parseReplaceErr.out +++ b/tests/data/parser/parseReplaceErr.out @@ -2,7 +2,7 @@ "query": "REPLACE LOW_PRIORITY\nINTO users(id, username)\n(1, 'Foo'), (2, 'Bar')", "lexer": { "@type": "PhpMyAdmin\\SqlParser\\Lexer", - "PARSER_METHODS": [ + "parserMethods": [ "parseDelimiter", "parseWhitespace", "parseNumber", @@ -286,7 +286,7 @@ "count": 29, "idx": 29 }, - "DEFAULT_DELIMITER": ";", + "defaultDelimiter": ";", "delimiter": ";", "delimiterLen": 1, "strict": false, @@ -294,7 +294,7 @@ }, "parser": { "@type": "PhpMyAdmin\\SqlParser\\Parser", - "STATEMENT_PARSERS": { + "statementParsers": { "DESCRIBE": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", "DESC": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", "EXPLAIN": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", @@ -339,7 +339,7 @@ "LOCK": "PhpMyAdmin\\SqlParser\\Statements\\LockStatement", "UNLOCK": "PhpMyAdmin\\SqlParser\\Statements\\LockStatement" }, - "KEYWORD_PARSERS": { + "keywordParsers": { "PARTITION BY": [], "SUBPARTITION BY": [], "_OPTIONS": { @@ -348,7 +348,7 @@ }, "_END_OPTIONS": { "class": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", - "field": "end_options" + "field": "endOptions" }, "INTERSECT": { "class": "PhpMyAdmin\\SqlParser\\Components\\UnionKeyword", @@ -596,13 +596,13 @@ "statements": [ { "@type": "PhpMyAdmin\\SqlParser\\Statements\\ReplaceStatement", - "OPTIONS": { + "statementOptions": { "LOW_PRIORITY": 1, "DELAYED": 1 }, "into": { "@type": "PhpMyAdmin\\SqlParser\\Components\\IntoKeyword", - "FIELDS_OPTIONS": { + "statementFieldsOptions": { "TERMINATED BY": [ 1, "expr" @@ -617,7 +617,7 @@ "expr" ] }, - "LINES_OPTIONS": { + "statementLinesOptions": { "STARTING BY": [ 1, "expr" @@ -630,7 +630,7 @@ "type": null, "dest": { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -657,15 +657,15 @@ "username" ], "values": null, - "fields_options": null, - "fields_keyword": null, - "lines_options": null + "fieldsOptions": null, + "fieldsKeyword": null, + "linesOptions": null }, "values": null, "set": null, "select": null, - "CLAUSES": [], - "END_OPTIONS": [], + "clauses": [], + "statementEndOptions": [], "options": { "@type": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", "options": { diff --git a/tests/data/parser/parseReplaceErr2.out b/tests/data/parser/parseReplaceErr2.out index 9cf74dced..b9f9672bf 100644 --- a/tests/data/parser/parseReplaceErr2.out +++ b/tests/data/parser/parseReplaceErr2.out @@ -2,7 +2,7 @@ "query": "REPLACE SELECT\n", "lexer": { "@type": "PhpMyAdmin\\SqlParser\\Lexer", - "PARSER_METHODS": [ + "parserMethods": [ "parseDelimiter", "parseWhitespace", "parseNumber", @@ -70,7 +70,7 @@ "count": 5, "idx": 5 }, - "DEFAULT_DELIMITER": ";", + "defaultDelimiter": ";", "delimiter": ";", "delimiterLen": 1, "strict": false, @@ -78,7 +78,7 @@ }, "parser": { "@type": "PhpMyAdmin\\SqlParser\\Parser", - "STATEMENT_PARSERS": { + "statementParsers": { "DESCRIBE": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", "DESC": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", "EXPLAIN": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", @@ -123,7 +123,7 @@ "LOCK": "PhpMyAdmin\\SqlParser\\Statements\\LockStatement", "UNLOCK": "PhpMyAdmin\\SqlParser\\Statements\\LockStatement" }, - "KEYWORD_PARSERS": { + "keywordParsers": { "PARTITION BY": [], "SUBPARTITION BY": [], "_OPTIONS": { @@ -132,7 +132,7 @@ }, "_END_OPTIONS": { "class": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", - "field": "end_options" + "field": "endOptions" }, "INTERSECT": { "class": "PhpMyAdmin\\SqlParser\\Components\\UnionKeyword", @@ -380,7 +380,7 @@ "statements": [ { "@type": "PhpMyAdmin\\SqlParser\\Statements\\ReplaceStatement", - "OPTIONS": { + "statementOptions": { "LOW_PRIORITY": 1, "DELAYED": 1 }, @@ -388,8 +388,8 @@ "values": null, "set": null, "select": null, - "CLAUSES": [], - "END_OPTIONS": [], + "clauses": [], + "statementEndOptions": [], "options": { "@type": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", "options": [] @@ -399,7 +399,7 @@ }, { "@type": "PhpMyAdmin\\SqlParser\\Statements\\SelectStatement", - "OPTIONS": { + "statementOptions": { "ALL": 1, "DISTINCT": 1, "DISTINCTROW": 1, @@ -416,11 +416,11 @@ "SQL_NO_CACHE": 8, "SQL_CALC_FOUND_ROWS": 9 }, - "END_OPTIONS": { + "statementEndOptions": { "FOR UPDATE": 1, "LOCK IN SHARE MODE": 1 }, - "CLAUSES": { + "clauses": { "SELECT": [ "SELECT", 2 @@ -548,7 +548,7 @@ }, "expr": [], "from": [], - "index_hints": null, + "indexHints": null, "partition": null, "where": null, "group": null, @@ -559,7 +559,7 @@ "into": null, "join": null, "union": [], - "end_options": null, + "endOptions": null, "options": { "@type": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", "options": [] diff --git a/tests/data/parser/parseReplaceErr3.out b/tests/data/parser/parseReplaceErr3.out index 24189ecc5..419094a96 100644 --- a/tests/data/parser/parseReplaceErr3.out +++ b/tests/data/parser/parseReplaceErr3.out @@ -2,7 +2,7 @@ "query": "REPLACE INTO x \"string\"\n\n", "lexer": { "@type": "PhpMyAdmin\\SqlParser\\Lexer", - "PARSER_METHODS": [ + "parserMethods": [ "parseDelimiter", "parseWhitespace", "parseNumber", @@ -106,7 +106,7 @@ "count": 9, "idx": 9 }, - "DEFAULT_DELIMITER": ";", + "defaultDelimiter": ";", "delimiter": ";", "delimiterLen": 1, "strict": false, @@ -114,7 +114,7 @@ }, "parser": { "@type": "PhpMyAdmin\\SqlParser\\Parser", - "STATEMENT_PARSERS": { + "statementParsers": { "DESCRIBE": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", "DESC": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", "EXPLAIN": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", @@ -159,7 +159,7 @@ "LOCK": "PhpMyAdmin\\SqlParser\\Statements\\LockStatement", "UNLOCK": "PhpMyAdmin\\SqlParser\\Statements\\LockStatement" }, - "KEYWORD_PARSERS": { + "keywordParsers": { "PARTITION BY": [], "SUBPARTITION BY": [], "_OPTIONS": { @@ -168,7 +168,7 @@ }, "_END_OPTIONS": { "class": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", - "field": "end_options" + "field": "endOptions" }, "INTERSECT": { "class": "PhpMyAdmin\\SqlParser\\Components\\UnionKeyword", @@ -416,13 +416,13 @@ "statements": [ { "@type": "PhpMyAdmin\\SqlParser\\Statements\\ReplaceStatement", - "OPTIONS": { + "statementOptions": { "LOW_PRIORITY": 1, "DELAYED": 1 }, "into": { "@type": "PhpMyAdmin\\SqlParser\\Components\\IntoKeyword", - "FIELDS_OPTIONS": { + "statementFieldsOptions": { "TERMINATED BY": [ 1, "expr" @@ -437,7 +437,7 @@ "expr" ] }, - "LINES_OPTIONS": { + "statementLinesOptions": { "STARTING BY": [ 1, "expr" @@ -450,7 +450,7 @@ "type": null, "dest": { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -474,15 +474,15 @@ }, "columns": null, "values": null, - "fields_options": null, - "fields_keyword": null, - "lines_options": null + "fieldsOptions": null, + "fieldsKeyword": null, + "linesOptions": null }, "values": null, "set": null, "select": null, - "CLAUSES": [], - "END_OPTIONS": [], + "clauses": [], + "statementEndOptions": [], "options": { "@type": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", "options": [] diff --git a/tests/data/parser/parseReplaceIntoErr.out b/tests/data/parser/parseReplaceIntoErr.out index d34c645ef..63dcc1c91 100644 --- a/tests/data/parser/parseReplaceIntoErr.out +++ b/tests/data/parser/parseReplaceIntoErr.out @@ -2,7 +2,7 @@ "query": "REPLACE INTO x INSERT\n\n", "lexer": { "@type": "PhpMyAdmin\\SqlParser\\Lexer", - "PARSER_METHODS": [ + "parserMethods": [ "parseDelimiter", "parseWhitespace", "parseNumber", @@ -106,7 +106,7 @@ "count": 9, "idx": 9 }, - "DEFAULT_DELIMITER": ";", + "defaultDelimiter": ";", "delimiter": ";", "delimiterLen": 1, "strict": false, @@ -114,7 +114,7 @@ }, "parser": { "@type": "PhpMyAdmin\\SqlParser\\Parser", - "STATEMENT_PARSERS": { + "statementParsers": { "DESCRIBE": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", "DESC": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", "EXPLAIN": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", @@ -159,7 +159,7 @@ "LOCK": "PhpMyAdmin\\SqlParser\\Statements\\LockStatement", "UNLOCK": "PhpMyAdmin\\SqlParser\\Statements\\LockStatement" }, - "KEYWORD_PARSERS": { + "keywordParsers": { "PARTITION BY": [], "SUBPARTITION BY": [], "_OPTIONS": { @@ -168,7 +168,7 @@ }, "_END_OPTIONS": { "class": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", - "field": "end_options" + "field": "endOptions" }, "INTERSECT": { "class": "PhpMyAdmin\\SqlParser\\Components\\UnionKeyword", @@ -416,13 +416,13 @@ "statements": [ { "@type": "PhpMyAdmin\\SqlParser\\Statements\\ReplaceStatement", - "OPTIONS": { + "statementOptions": { "LOW_PRIORITY": 1, "DELAYED": 1 }, "into": { "@type": "PhpMyAdmin\\SqlParser\\Components\\IntoKeyword", - "FIELDS_OPTIONS": { + "statementFieldsOptions": { "TERMINATED BY": [ 1, "expr" @@ -437,7 +437,7 @@ "expr" ] }, - "LINES_OPTIONS": { + "statementLinesOptions": { "STARTING BY": [ 1, "expr" @@ -450,7 +450,7 @@ "type": null, "dest": { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -474,15 +474,15 @@ }, "columns": null, "values": null, - "fields_options": null, - "fields_keyword": null, - "lines_options": null + "fieldsOptions": null, + "fieldsKeyword": null, + "linesOptions": null }, "values": null, "set": null, "select": null, - "CLAUSES": [], - "END_OPTIONS": [], + "clauses": [], + "statementEndOptions": [], "options": { "@type": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", "options": [] @@ -492,7 +492,7 @@ }, { "@type": "PhpMyAdmin\\SqlParser\\Statements\\InsertStatement", - "OPTIONS": { + "statementOptions": { "LOW_PRIORITY": 1, "DELAYED": 2, "HIGH_PRIORITY": 3, @@ -504,8 +504,8 @@ "select": null, "with": null, "onDuplicateSet": null, - "CLAUSES": [], - "END_OPTIONS": [], + "clauses": [], + "statementEndOptions": [], "options": { "@type": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", "options": [] diff --git a/tests/data/parser/parseReplaceSelect.out b/tests/data/parser/parseReplaceSelect.out index 2d31b9d02..0d52f9efd 100644 --- a/tests/data/parser/parseReplaceSelect.out +++ b/tests/data/parser/parseReplaceSelect.out @@ -2,7 +2,7 @@ "query": "REPLACE INTO `a` (`value`) SELECT value from `b`", "lexer": { "@type": "PhpMyAdmin\\SqlParser\\Lexer", - "PARSER_METHODS": [ + "parserMethods": [ "parseDelimiter", "parseWhitespace", "parseNumber", @@ -187,7 +187,7 @@ "count": 18, "idx": 18 }, - "DEFAULT_DELIMITER": ";", + "defaultDelimiter": ";", "delimiter": ";", "delimiterLen": 1, "strict": false, @@ -195,7 +195,7 @@ }, "parser": { "@type": "PhpMyAdmin\\SqlParser\\Parser", - "STATEMENT_PARSERS": { + "statementParsers": { "DESCRIBE": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", "DESC": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", "EXPLAIN": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", @@ -240,7 +240,7 @@ "LOCK": "PhpMyAdmin\\SqlParser\\Statements\\LockStatement", "UNLOCK": "PhpMyAdmin\\SqlParser\\Statements\\LockStatement" }, - "KEYWORD_PARSERS": { + "keywordParsers": { "PARTITION BY": [], "SUBPARTITION BY": [], "_OPTIONS": { @@ -249,7 +249,7 @@ }, "_END_OPTIONS": { "class": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", - "field": "end_options" + "field": "endOptions" }, "INTERSECT": { "class": "PhpMyAdmin\\SqlParser\\Components\\UnionKeyword", @@ -497,13 +497,13 @@ "statements": [ { "@type": "PhpMyAdmin\\SqlParser\\Statements\\ReplaceStatement", - "OPTIONS": { + "statementOptions": { "LOW_PRIORITY": 1, "DELAYED": 1 }, "into": { "@type": "PhpMyAdmin\\SqlParser\\Components\\IntoKeyword", - "FIELDS_OPTIONS": { + "statementFieldsOptions": { "TERMINATED BY": [ 1, "expr" @@ -518,7 +518,7 @@ "expr" ] }, - "LINES_OPTIONS": { + "statementLinesOptions": { "STARTING BY": [ 1, "expr" @@ -531,7 +531,7 @@ "type": null, "dest": { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -557,15 +557,15 @@ "value" ], "values": null, - "fields_options": null, - "fields_keyword": null, - "lines_options": null + "fieldsOptions": null, + "fieldsKeyword": null, + "linesOptions": null }, "values": null, "set": null, "select": { "@type": "PhpMyAdmin\\SqlParser\\Statements\\SelectStatement", - "OPTIONS": { + "statementOptions": { "ALL": 1, "DISTINCT": 1, "DISTINCTROW": 1, @@ -582,11 +582,11 @@ "SQL_NO_CACHE": 8, "SQL_CALC_FOUND_ROWS": 9 }, - "END_OPTIONS": { + "statementEndOptions": { "FOR UPDATE": 1, "LOCK IN SHARE MODE": 1 }, - "CLAUSES": { + "clauses": { "SELECT": [ "SELECT", 2 @@ -715,7 +715,7 @@ "expr": [ { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -741,7 +741,7 @@ "from": [ { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -764,7 +764,7 @@ "subquery": null } ], - "index_hints": null, + "indexHints": null, "partition": null, "where": null, "group": null, @@ -775,7 +775,7 @@ "into": null, "join": null, "union": [], - "end_options": null, + "endOptions": null, "options": { "@type": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", "options": [] @@ -783,8 +783,8 @@ "first": 10, "last": 16 }, - "CLAUSES": [], - "END_OPTIONS": [], + "clauses": [], + "statementEndOptions": [], "options": { "@type": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", "options": [] diff --git a/tests/data/parser/parseReplaceSet.out b/tests/data/parser/parseReplaceSet.out index 8aecfd9ae..cc16e2da0 100644 --- a/tests/data/parser/parseReplaceSet.out +++ b/tests/data/parser/parseReplaceSet.out @@ -2,7 +2,7 @@ "query": "REPLACE INTO `a` (`value`) SET value = '123'", "lexer": { "@type": "PhpMyAdmin\\SqlParser\\Lexer", - "PARSER_METHODS": [ + "parserMethods": [ "parseDelimiter", "parseWhitespace", "parseNumber", @@ -187,7 +187,7 @@ "count": 18, "idx": 18 }, - "DEFAULT_DELIMITER": ";", + "defaultDelimiter": ";", "delimiter": ";", "delimiterLen": 1, "strict": false, @@ -195,7 +195,7 @@ }, "parser": { "@type": "PhpMyAdmin\\SqlParser\\Parser", - "STATEMENT_PARSERS": { + "statementParsers": { "DESCRIBE": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", "DESC": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", "EXPLAIN": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", @@ -240,7 +240,7 @@ "LOCK": "PhpMyAdmin\\SqlParser\\Statements\\LockStatement", "UNLOCK": "PhpMyAdmin\\SqlParser\\Statements\\LockStatement" }, - "KEYWORD_PARSERS": { + "keywordParsers": { "PARTITION BY": [], "SUBPARTITION BY": [], "_OPTIONS": { @@ -249,7 +249,7 @@ }, "_END_OPTIONS": { "class": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", - "field": "end_options" + "field": "endOptions" }, "INTERSECT": { "class": "PhpMyAdmin\\SqlParser\\Components\\UnionKeyword", @@ -497,13 +497,13 @@ "statements": [ { "@type": "PhpMyAdmin\\SqlParser\\Statements\\ReplaceStatement", - "OPTIONS": { + "statementOptions": { "LOW_PRIORITY": 1, "DELAYED": 1 }, "into": { "@type": "PhpMyAdmin\\SqlParser\\Components\\IntoKeyword", - "FIELDS_OPTIONS": { + "statementFieldsOptions": { "TERMINATED BY": [ 1, "expr" @@ -518,7 +518,7 @@ "expr" ] }, - "LINES_OPTIONS": { + "statementLinesOptions": { "STARTING BY": [ 1, "expr" @@ -531,7 +531,7 @@ "type": null, "dest": { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -557,9 +557,9 @@ "value" ], "values": null, - "fields_options": null, - "fields_keyword": null, - "lines_options": null + "fieldsOptions": null, + "fieldsKeyword": null, + "linesOptions": null }, "values": null, "set": [ @@ -570,8 +570,8 @@ } ], "select": null, - "CLAUSES": [], - "END_OPTIONS": [], + "clauses": [], + "statementEndOptions": [], "options": { "@type": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", "options": [] diff --git a/tests/data/parser/parseReplaceValues.out b/tests/data/parser/parseReplaceValues.out index 48736df9e..be6bd5c7b 100644 --- a/tests/data/parser/parseReplaceValues.out +++ b/tests/data/parser/parseReplaceValues.out @@ -2,7 +2,7 @@ "query": "REPLACE INTO `a` (`value`) VALUES ('123'), ('123')", "lexer": { "@type": "PhpMyAdmin\\SqlParser\\Lexer", - "PARSER_METHODS": [ + "parserMethods": [ "parseDelimiter", "parseWhitespace", "parseNumber", @@ -214,7 +214,7 @@ "count": 21, "idx": 21 }, - "DEFAULT_DELIMITER": ";", + "defaultDelimiter": ";", "delimiter": ";", "delimiterLen": 1, "strict": false, @@ -222,7 +222,7 @@ }, "parser": { "@type": "PhpMyAdmin\\SqlParser\\Parser", - "STATEMENT_PARSERS": { + "statementParsers": { "DESCRIBE": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", "DESC": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", "EXPLAIN": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", @@ -267,7 +267,7 @@ "LOCK": "PhpMyAdmin\\SqlParser\\Statements\\LockStatement", "UNLOCK": "PhpMyAdmin\\SqlParser\\Statements\\LockStatement" }, - "KEYWORD_PARSERS": { + "keywordParsers": { "PARTITION BY": [], "SUBPARTITION BY": [], "_OPTIONS": { @@ -276,7 +276,7 @@ }, "_END_OPTIONS": { "class": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", - "field": "end_options" + "field": "endOptions" }, "INTERSECT": { "class": "PhpMyAdmin\\SqlParser\\Components\\UnionKeyword", @@ -524,13 +524,13 @@ "statements": [ { "@type": "PhpMyAdmin\\SqlParser\\Statements\\ReplaceStatement", - "OPTIONS": { + "statementOptions": { "LOW_PRIORITY": 1, "DELAYED": 1 }, "into": { "@type": "PhpMyAdmin\\SqlParser\\Components\\IntoKeyword", - "FIELDS_OPTIONS": { + "statementFieldsOptions": { "TERMINATED BY": [ 1, "expr" @@ -545,7 +545,7 @@ "expr" ] }, - "LINES_OPTIONS": { + "statementLinesOptions": { "STARTING BY": [ 1, "expr" @@ -558,7 +558,7 @@ "type": null, "dest": { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -584,9 +584,9 @@ "value" ], "values": null, - "fields_options": null, - "fields_keyword": null, - "lines_options": null + "fieldsOptions": null, + "fieldsKeyword": null, + "linesOptions": null }, "values": [ { @@ -610,8 +610,8 @@ ], "set": null, "select": null, - "CLAUSES": [], - "END_OPTIONS": [], + "clauses": [], + "statementEndOptions": [], "options": { "@type": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", "options": [] diff --git a/tests/data/parser/parseRestore.out b/tests/data/parser/parseRestore.out index 90d43f1ef..3959429a0 100644 --- a/tests/data/parser/parseRestore.out +++ b/tests/data/parser/parseRestore.out @@ -2,7 +2,7 @@ "query": "RESTORE TABLE my_table FROM \"\/path\/to\/backup\/directory\"", "lexer": { "@type": "PhpMyAdmin\\SqlParser\\Lexer", - "PARSER_METHODS": [ + "parserMethods": [ "parseDelimiter", "parseWhitespace", "parseNumber", @@ -115,7 +115,7 @@ "count": 10, "idx": 10 }, - "DEFAULT_DELIMITER": ";", + "defaultDelimiter": ";", "delimiter": ";", "delimiterLen": 1, "strict": false, @@ -123,7 +123,7 @@ }, "parser": { "@type": "PhpMyAdmin\\SqlParser\\Parser", - "STATEMENT_PARSERS": { + "statementParsers": { "DESCRIBE": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", "DESC": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", "EXPLAIN": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", @@ -168,7 +168,7 @@ "LOCK": "PhpMyAdmin\\SqlParser\\Statements\\LockStatement", "UNLOCK": "PhpMyAdmin\\SqlParser\\Statements\\LockStatement" }, - "KEYWORD_PARSERS": { + "keywordParsers": { "PARTITION BY": [], "SUBPARTITION BY": [], "_OPTIONS": { @@ -177,7 +177,7 @@ }, "_END_OPTIONS": { "class": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", - "field": "end_options" + "field": "endOptions" }, "INTERSECT": { "class": "PhpMyAdmin\\SqlParser\\Components\\UnionKeyword", @@ -425,7 +425,7 @@ "statements": [ { "@type": "PhpMyAdmin\\SqlParser\\Statements\\RestoreStatement", - "OPTIONS": { + "statementOptions": { "TABLE": 1, "FROM": [ 2, @@ -435,7 +435,7 @@ "tables": [ { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -458,8 +458,8 @@ "subquery": null } ], - "CLAUSES": [], - "END_OPTIONS": [], + "clauses": [], + "statementEndOptions": [], "options": { "@type": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", "options": [ diff --git a/tests/data/parser/parseSelect.out b/tests/data/parser/parseSelect.out index 2dac70f72..716e0721f 100644 --- a/tests/data/parser/parseSelect.out +++ b/tests/data/parser/parseSelect.out @@ -2,7 +2,7 @@ "query": "SELECT ALL MAX_STATEMENT_TIME = 10\n 1 + 2 AS result,\n @idx,\n id,\n test.`users`.username AS `name`\nFROM\n `test`.users, posts\n PARTITION (p1, p2)\nWHERE\n id > 0\nORDER BY\n username DESC,\n id\nLIMIT 3 OFFSET 2;", "lexer": { "@type": "PhpMyAdmin\\SqlParser\\Lexer", - "PARSER_METHODS": [ + "parserMethods": [ "parseDelimiter", "parseWhitespace", "parseNumber", @@ -754,7 +754,7 @@ "count": 81, "idx": 81 }, - "DEFAULT_DELIMITER": ";", + "defaultDelimiter": ";", "delimiter": ";", "delimiterLen": 1, "strict": false, @@ -762,7 +762,7 @@ }, "parser": { "@type": "PhpMyAdmin\\SqlParser\\Parser", - "STATEMENT_PARSERS": { + "statementParsers": { "DESCRIBE": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", "DESC": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", "EXPLAIN": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", @@ -807,7 +807,7 @@ "LOCK": "PhpMyAdmin\\SqlParser\\Statements\\LockStatement", "UNLOCK": "PhpMyAdmin\\SqlParser\\Statements\\LockStatement" }, - "KEYWORD_PARSERS": { + "keywordParsers": { "PARTITION BY": [], "SUBPARTITION BY": [], "_OPTIONS": { @@ -816,7 +816,7 @@ }, "_END_OPTIONS": { "class": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", - "field": "end_options" + "field": "endOptions" }, "INTERSECT": { "class": "PhpMyAdmin\\SqlParser\\Components\\UnionKeyword", @@ -1064,7 +1064,7 @@ "statements": [ { "@type": "PhpMyAdmin\\SqlParser\\Statements\\SelectStatement", - "OPTIONS": { + "statementOptions": { "ALL": 1, "DISTINCT": 1, "DISTINCTROW": 1, @@ -1081,11 +1081,11 @@ "SQL_NO_CACHE": 8, "SQL_CALC_FOUND_ROWS": 9 }, - "END_OPTIONS": { + "statementEndOptions": { "FOR UPDATE": 1, "LOCK IN SHARE MODE": 1 }, - "CLAUSES": { + "clauses": { "SELECT": [ "SELECT", 2 @@ -1214,7 +1214,7 @@ "expr": [ { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -1238,7 +1238,7 @@ }, { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -1262,7 +1262,7 @@ }, { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -1286,7 +1286,7 @@ }, { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -1312,7 +1312,7 @@ "from": [ { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -1336,7 +1336,7 @@ }, { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -1359,7 +1359,7 @@ "subquery": null } ], - "index_hints": null, + "indexHints": null, "partition": { "@type": "PhpMyAdmin\\SqlParser\\Components\\ArrayObj", "raw": [ @@ -1374,14 +1374,14 @@ "where": [ { "@type": "PhpMyAdmin\\SqlParser\\Components\\Condition", - "DELIMITERS": [ + "delimiters": [ "&&", "||", "AND", "OR", "XOR" ], - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "ALL": 1, "AND": 1, "BETWEEN": 1, @@ -1416,7 +1416,7 @@ "@type": "PhpMyAdmin\\SqlParser\\Components\\OrderKeyword", "expr": { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -1444,7 +1444,7 @@ "@type": "PhpMyAdmin\\SqlParser\\Components\\OrderKeyword", "expr": { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -1478,7 +1478,7 @@ "into": null, "join": null, "union": [], - "end_options": null, + "endOptions": null, "options": { "@type": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", "options": { diff --git a/tests/data/parser/parseSelect10.out b/tests/data/parser/parseSelect10.out index 8f3299673..4cc2aef95 100644 --- a/tests/data/parser/parseSelect10.out +++ b/tests/data/parser/parseSelect10.out @@ -2,7 +2,7 @@ "query": "SELECT my_column FROM my_table WHERE BINARY(my_column) != BINARY(UPPER(my_column))\n", "lexer": { "@type": "PhpMyAdmin\\SqlParser\\Lexer", - "PARSER_METHODS": [ + "parserMethods": [ "parseDelimiter", "parseWhitespace", "parseNumber", @@ -259,7 +259,7 @@ "count": 26, "idx": 26 }, - "DEFAULT_DELIMITER": ";", + "defaultDelimiter": ";", "delimiter": ";", "delimiterLen": 1, "strict": false, @@ -267,7 +267,7 @@ }, "parser": { "@type": "PhpMyAdmin\\SqlParser\\Parser", - "STATEMENT_PARSERS": { + "statementParsers": { "DESCRIBE": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", "DESC": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", "EXPLAIN": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", @@ -312,7 +312,7 @@ "LOCK": "PhpMyAdmin\\SqlParser\\Statements\\LockStatement", "UNLOCK": "PhpMyAdmin\\SqlParser\\Statements\\LockStatement" }, - "KEYWORD_PARSERS": { + "keywordParsers": { "PARTITION BY": [], "SUBPARTITION BY": [], "_OPTIONS": { @@ -321,7 +321,7 @@ }, "_END_OPTIONS": { "class": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", - "field": "end_options" + "field": "endOptions" }, "INTERSECT": { "class": "PhpMyAdmin\\SqlParser\\Components\\UnionKeyword", @@ -569,7 +569,7 @@ "statements": [ { "@type": "PhpMyAdmin\\SqlParser\\Statements\\SelectStatement", - "OPTIONS": { + "statementOptions": { "ALL": 1, "DISTINCT": 1, "DISTINCTROW": 1, @@ -586,11 +586,11 @@ "SQL_NO_CACHE": 8, "SQL_CALC_FOUND_ROWS": 9 }, - "END_OPTIONS": { + "statementEndOptions": { "FOR UPDATE": 1, "LOCK IN SHARE MODE": 1 }, - "CLAUSES": { + "clauses": { "SELECT": [ "SELECT", 2 @@ -719,7 +719,7 @@ "expr": [ { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -745,7 +745,7 @@ "from": [ { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -768,19 +768,19 @@ "subquery": null } ], - "index_hints": null, + "indexHints": null, "partition": null, "where": [ { "@type": "PhpMyAdmin\\SqlParser\\Components\\Condition", - "DELIMITERS": [ + "delimiters": [ "&&", "||", "AND", "OR", "XOR" ], - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "ALL": 1, "AND": 1, "BETWEEN": 1, @@ -817,7 +817,7 @@ "into": null, "join": null, "union": [], - "end_options": null, + "endOptions": null, "options": { "@type": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", "options": [] diff --git a/tests/data/parser/parseSelect11.out b/tests/data/parser/parseSelect11.out index 8cf48cc6c..a2a767107 100644 --- a/tests/data/parser/parseSelect11.out +++ b/tests/data/parser/parseSelect11.out @@ -2,7 +2,7 @@ "query": "SELECT 1 AND NOT 1\n", "lexer": { "@type": "PhpMyAdmin\\SqlParser\\Lexer", - "PARSER_METHODS": [ + "parserMethods": [ "parseDelimiter", "parseWhitespace", "parseNumber", @@ -124,7 +124,7 @@ "count": 11, "idx": 11 }, - "DEFAULT_DELIMITER": ";", + "defaultDelimiter": ";", "delimiter": ";", "delimiterLen": 1, "strict": false, @@ -132,7 +132,7 @@ }, "parser": { "@type": "PhpMyAdmin\\SqlParser\\Parser", - "STATEMENT_PARSERS": { + "statementParsers": { "DESCRIBE": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", "DESC": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", "EXPLAIN": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", @@ -177,7 +177,7 @@ "LOCK": "PhpMyAdmin\\SqlParser\\Statements\\LockStatement", "UNLOCK": "PhpMyAdmin\\SqlParser\\Statements\\LockStatement" }, - "KEYWORD_PARSERS": { + "keywordParsers": { "PARTITION BY": [], "SUBPARTITION BY": [], "_OPTIONS": { @@ -186,7 +186,7 @@ }, "_END_OPTIONS": { "class": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", - "field": "end_options" + "field": "endOptions" }, "INTERSECT": { "class": "PhpMyAdmin\\SqlParser\\Components\\UnionKeyword", @@ -434,7 +434,7 @@ "statements": [ { "@type": "PhpMyAdmin\\SqlParser\\Statements\\SelectStatement", - "OPTIONS": { + "statementOptions": { "ALL": 1, "DISTINCT": 1, "DISTINCTROW": 1, @@ -451,11 +451,11 @@ "SQL_NO_CACHE": 8, "SQL_CALC_FOUND_ROWS": 9 }, - "END_OPTIONS": { + "statementEndOptions": { "FOR UPDATE": 1, "LOCK IN SHARE MODE": 1 }, - "CLAUSES": { + "clauses": { "SELECT": [ "SELECT", 2 @@ -584,7 +584,7 @@ "expr": [ { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -608,7 +608,7 @@ } ], "from": [], - "index_hints": null, + "indexHints": null, "partition": null, "where": null, "group": null, @@ -619,7 +619,7 @@ "into": null, "join": null, "union": [], - "end_options": null, + "endOptions": null, "options": { "@type": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", "options": [] diff --git a/tests/data/parser/parseSelect2.out b/tests/data/parser/parseSelect2.out index 61baec07a..7550b4f97 100644 --- a/tests/data/parser/parseSelect2.out +++ b/tests/data/parser/parseSelect2.out @@ -2,7 +2,7 @@ "query": "SELECT (SELECT 'foo') bar, (SELECT 'baz') AS qux, a as b FROM tabl;", "lexer": { "@type": "PhpMyAdmin\\SqlParser\\Lexer", - "PARSER_METHODS": [ + "parserMethods": [ "parseDelimiter", "parseWhitespace", "parseNumber", @@ -322,7 +322,7 @@ "count": 33, "idx": 33 }, - "DEFAULT_DELIMITER": ";", + "defaultDelimiter": ";", "delimiter": ";", "delimiterLen": 1, "strict": false, @@ -330,7 +330,7 @@ }, "parser": { "@type": "PhpMyAdmin\\SqlParser\\Parser", - "STATEMENT_PARSERS": { + "statementParsers": { "DESCRIBE": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", "DESC": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", "EXPLAIN": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", @@ -375,7 +375,7 @@ "LOCK": "PhpMyAdmin\\SqlParser\\Statements\\LockStatement", "UNLOCK": "PhpMyAdmin\\SqlParser\\Statements\\LockStatement" }, - "KEYWORD_PARSERS": { + "keywordParsers": { "PARTITION BY": [], "SUBPARTITION BY": [], "_OPTIONS": { @@ -384,7 +384,7 @@ }, "_END_OPTIONS": { "class": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", - "field": "end_options" + "field": "endOptions" }, "INTERSECT": { "class": "PhpMyAdmin\\SqlParser\\Components\\UnionKeyword", @@ -632,7 +632,7 @@ "statements": [ { "@type": "PhpMyAdmin\\SqlParser\\Statements\\SelectStatement", - "OPTIONS": { + "statementOptions": { "ALL": 1, "DISTINCT": 1, "DISTINCTROW": 1, @@ -649,11 +649,11 @@ "SQL_NO_CACHE": 8, "SQL_CALC_FOUND_ROWS": 9 }, - "END_OPTIONS": { + "statementEndOptions": { "FOR UPDATE": 1, "LOCK IN SHARE MODE": 1 }, - "CLAUSES": { + "clauses": { "SELECT": [ "SELECT", 2 @@ -782,7 +782,7 @@ "expr": [ { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -806,7 +806,7 @@ }, { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -830,7 +830,7 @@ }, { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -856,7 +856,7 @@ "from": [ { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -879,7 +879,7 @@ "subquery": null } ], - "index_hints": null, + "indexHints": null, "partition": null, "where": null, "group": null, @@ -890,7 +890,7 @@ "into": null, "join": null, "union": [], - "end_options": null, + "endOptions": null, "options": { "@type": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", "options": [] diff --git a/tests/data/parser/parseSelect3.out b/tests/data/parser/parseSelect3.out index 5493471c8..903263cce 100644 --- a/tests/data/parser/parseSelect3.out +++ b/tests/data/parser/parseSelect3.out @@ -2,7 +2,7 @@ "query": "SELECT left_tbl.*\nFROM left_tbl LEFT JOIN right_tbl ON left_tbl.id = right_tbl.id\nWHERE right_tbl.id IS NULL;", "lexer": { "@type": "PhpMyAdmin\\SqlParser\\Lexer", - "PARSER_METHODS": [ + "parserMethods": [ "parseDelimiter", "parseWhitespace", "parseNumber", @@ -358,7 +358,7 @@ "count": 37, "idx": 37 }, - "DEFAULT_DELIMITER": ";", + "defaultDelimiter": ";", "delimiter": ";", "delimiterLen": 1, "strict": false, @@ -366,7 +366,7 @@ }, "parser": { "@type": "PhpMyAdmin\\SqlParser\\Parser", - "STATEMENT_PARSERS": { + "statementParsers": { "DESCRIBE": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", "DESC": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", "EXPLAIN": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", @@ -411,7 +411,7 @@ "LOCK": "PhpMyAdmin\\SqlParser\\Statements\\LockStatement", "UNLOCK": "PhpMyAdmin\\SqlParser\\Statements\\LockStatement" }, - "KEYWORD_PARSERS": { + "keywordParsers": { "PARTITION BY": [], "SUBPARTITION BY": [], "_OPTIONS": { @@ -420,7 +420,7 @@ }, "_END_OPTIONS": { "class": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", - "field": "end_options" + "field": "endOptions" }, "INTERSECT": { "class": "PhpMyAdmin\\SqlParser\\Components\\UnionKeyword", @@ -668,7 +668,7 @@ "statements": [ { "@type": "PhpMyAdmin\\SqlParser\\Statements\\SelectStatement", - "OPTIONS": { + "statementOptions": { "ALL": 1, "DISTINCT": 1, "DISTINCTROW": 1, @@ -685,11 +685,11 @@ "SQL_NO_CACHE": 8, "SQL_CALC_FOUND_ROWS": 9 }, - "END_OPTIONS": { + "statementEndOptions": { "FOR UPDATE": 1, "LOCK IN SHARE MODE": 1 }, - "CLAUSES": { + "clauses": { "SELECT": [ "SELECT", 2 @@ -818,7 +818,7 @@ "expr": [ { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -844,7 +844,7 @@ "from": [ { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -867,19 +867,19 @@ "subquery": null } ], - "index_hints": null, + "indexHints": null, "partition": null, "where": [ { "@type": "PhpMyAdmin\\SqlParser\\Components\\Condition", - "DELIMITERS": [ + "delimiters": [ "&&", "||", "AND", "OR", "XOR" ], - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "ALL": 1, "AND": 1, "BETWEEN": 1, @@ -917,7 +917,7 @@ "join": [ { "@type": "PhpMyAdmin\\SqlParser\\Components\\JoinKeyword", - "JOINS": { + "joins": { "CROSS JOIN": "CROSS", "FULL JOIN": "FULL", "FULL OUTER JOIN": "FULL", @@ -937,7 +937,7 @@ "type": "LEFT", "expr": { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -962,14 +962,14 @@ "on": [ { "@type": "PhpMyAdmin\\SqlParser\\Components\\Condition", - "DELIMITERS": [ + "delimiters": [ "&&", "||", "AND", "OR", "XOR" ], - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "ALL": 1, "AND": 1, "BETWEEN": 1, @@ -1003,7 +1003,7 @@ } ], "union": [], - "end_options": null, + "endOptions": null, "options": { "@type": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", "options": [] diff --git a/tests/data/parser/parseSelect4.out b/tests/data/parser/parseSelect4.out index fd87d8891..ccaa45b61 100644 --- a/tests/data/parser/parseSelect4.out +++ b/tests/data/parser/parseSelect4.out @@ -2,7 +2,7 @@ "query": "SELECT *\n FROM test\n WHERE RIGHT(name, 2) = 'AB';\n", "lexer": { "@type": "PhpMyAdmin\\SqlParser\\Lexer", - "PARSER_METHODS": [ + "parserMethods": [ "parseDelimiter", "parseWhitespace", "parseNumber", @@ -241,7 +241,7 @@ "count": 24, "idx": 24 }, - "DEFAULT_DELIMITER": ";", + "defaultDelimiter": ";", "delimiter": ";", "delimiterLen": 1, "strict": false, @@ -249,7 +249,7 @@ }, "parser": { "@type": "PhpMyAdmin\\SqlParser\\Parser", - "STATEMENT_PARSERS": { + "statementParsers": { "DESCRIBE": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", "DESC": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", "EXPLAIN": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", @@ -294,7 +294,7 @@ "LOCK": "PhpMyAdmin\\SqlParser\\Statements\\LockStatement", "UNLOCK": "PhpMyAdmin\\SqlParser\\Statements\\LockStatement" }, - "KEYWORD_PARSERS": { + "keywordParsers": { "PARTITION BY": [], "SUBPARTITION BY": [], "_OPTIONS": { @@ -303,7 +303,7 @@ }, "_END_OPTIONS": { "class": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", - "field": "end_options" + "field": "endOptions" }, "INTERSECT": { "class": "PhpMyAdmin\\SqlParser\\Components\\UnionKeyword", @@ -551,7 +551,7 @@ "statements": [ { "@type": "PhpMyAdmin\\SqlParser\\Statements\\SelectStatement", - "OPTIONS": { + "statementOptions": { "ALL": 1, "DISTINCT": 1, "DISTINCTROW": 1, @@ -568,11 +568,11 @@ "SQL_NO_CACHE": 8, "SQL_CALC_FOUND_ROWS": 9 }, - "END_OPTIONS": { + "statementEndOptions": { "FOR UPDATE": 1, "LOCK IN SHARE MODE": 1 }, - "CLAUSES": { + "clauses": { "SELECT": [ "SELECT", 2 @@ -701,7 +701,7 @@ "expr": [ { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -727,7 +727,7 @@ "from": [ { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -750,19 +750,19 @@ "subquery": null } ], - "index_hints": null, + "indexHints": null, "partition": null, "where": [ { "@type": "PhpMyAdmin\\SqlParser\\Components\\Condition", - "DELIMITERS": [ + "delimiters": [ "&&", "||", "AND", "OR", "XOR" ], - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "ALL": 1, "AND": 1, "BETWEEN": 1, @@ -799,7 +799,7 @@ "into": null, "join": null, "union": [], - "end_options": null, + "endOptions": null, "options": { "@type": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", "options": [] diff --git a/tests/data/parser/parseSelect5.out b/tests/data/parser/parseSelect5.out index f163d927f..39b214462 100644 --- a/tests/data/parser/parseSelect5.out +++ b/tests/data/parser/parseSelect5.out @@ -2,7 +2,7 @@ "query": "SELECT c1, c2, c3\n \/* Subquery in FROM list *\/\n FROM (SELECT C1, c2, c3 FROM test2) t1\n WHERE RIGHT(name, 2) = 'AB';\n", "lexer": { "@type": "PhpMyAdmin\\SqlParser\\Lexer", - "PARSER_METHODS": [ + "parserMethods": [ "parseDelimiter", "parseWhitespace", "parseNumber", @@ -457,7 +457,7 @@ "count": 48, "idx": 48 }, - "DEFAULT_DELIMITER": ";", + "defaultDelimiter": ";", "delimiter": ";", "delimiterLen": 1, "strict": false, @@ -465,7 +465,7 @@ }, "parser": { "@type": "PhpMyAdmin\\SqlParser\\Parser", - "STATEMENT_PARSERS": { + "statementParsers": { "DESCRIBE": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", "DESC": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", "EXPLAIN": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", @@ -510,7 +510,7 @@ "LOCK": "PhpMyAdmin\\SqlParser\\Statements\\LockStatement", "UNLOCK": "PhpMyAdmin\\SqlParser\\Statements\\LockStatement" }, - "KEYWORD_PARSERS": { + "keywordParsers": { "PARTITION BY": [], "SUBPARTITION BY": [], "_OPTIONS": { @@ -519,7 +519,7 @@ }, "_END_OPTIONS": { "class": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", - "field": "end_options" + "field": "endOptions" }, "INTERSECT": { "class": "PhpMyAdmin\\SqlParser\\Components\\UnionKeyword", @@ -767,7 +767,7 @@ "statements": [ { "@type": "PhpMyAdmin\\SqlParser\\Statements\\SelectStatement", - "OPTIONS": { + "statementOptions": { "ALL": 1, "DISTINCT": 1, "DISTINCTROW": 1, @@ -784,11 +784,11 @@ "SQL_NO_CACHE": 8, "SQL_CALC_FOUND_ROWS": 9 }, - "END_OPTIONS": { + "statementEndOptions": { "FOR UPDATE": 1, "LOCK IN SHARE MODE": 1 }, - "CLAUSES": { + "clauses": { "SELECT": [ "SELECT", 2 @@ -917,7 +917,7 @@ "expr": [ { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -941,7 +941,7 @@ }, { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -965,7 +965,7 @@ }, { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -991,7 +991,7 @@ "from": [ { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -1014,19 +1014,19 @@ "subquery": "SELECT" } ], - "index_hints": null, + "indexHints": null, "partition": null, "where": [ { "@type": "PhpMyAdmin\\SqlParser\\Components\\Condition", - "DELIMITERS": [ + "delimiters": [ "&&", "||", "AND", "OR", "XOR" ], - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "ALL": 1, "AND": 1, "BETWEEN": 1, @@ -1063,7 +1063,7 @@ "into": null, "join": null, "union": [], - "end_options": null, + "endOptions": null, "options": { "@type": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", "options": [] diff --git a/tests/data/parser/parseSelect6.out b/tests/data/parser/parseSelect6.out index 49c141e20..86c485730 100644 --- a/tests/data/parser/parseSelect6.out +++ b/tests/data/parser/parseSelect6.out @@ -2,7 +2,7 @@ "query": "SELECT * FROM t1 LEFT JOIN (t2, t3, t4)\n ON (t2.a=t1.a AND t3.b=t1.b AND t4.c=t1.c)\n", "lexer": { "@type": "PhpMyAdmin\\SqlParser\\Lexer", - "PARSER_METHODS": [ + "parserMethods": [ "parseDelimiter", "parseWhitespace", "parseNumber", @@ -502,7 +502,7 @@ "count": 53, "idx": 53 }, - "DEFAULT_DELIMITER": ";", + "defaultDelimiter": ";", "delimiter": ";", "delimiterLen": 1, "strict": false, @@ -510,7 +510,7 @@ }, "parser": { "@type": "PhpMyAdmin\\SqlParser\\Parser", - "STATEMENT_PARSERS": { + "statementParsers": { "DESCRIBE": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", "DESC": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", "EXPLAIN": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", @@ -555,7 +555,7 @@ "LOCK": "PhpMyAdmin\\SqlParser\\Statements\\LockStatement", "UNLOCK": "PhpMyAdmin\\SqlParser\\Statements\\LockStatement" }, - "KEYWORD_PARSERS": { + "keywordParsers": { "PARTITION BY": [], "SUBPARTITION BY": [], "_OPTIONS": { @@ -564,7 +564,7 @@ }, "_END_OPTIONS": { "class": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", - "field": "end_options" + "field": "endOptions" }, "INTERSECT": { "class": "PhpMyAdmin\\SqlParser\\Components\\UnionKeyword", @@ -812,7 +812,7 @@ "statements": [ { "@type": "PhpMyAdmin\\SqlParser\\Statements\\SelectStatement", - "OPTIONS": { + "statementOptions": { "ALL": 1, "DISTINCT": 1, "DISTINCTROW": 1, @@ -829,11 +829,11 @@ "SQL_NO_CACHE": 8, "SQL_CALC_FOUND_ROWS": 9 }, - "END_OPTIONS": { + "statementEndOptions": { "FOR UPDATE": 1, "LOCK IN SHARE MODE": 1 }, - "CLAUSES": { + "clauses": { "SELECT": [ "SELECT", 2 @@ -962,7 +962,7 @@ "expr": [ { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -988,7 +988,7 @@ "from": [ { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -1011,7 +1011,7 @@ "subquery": null } ], - "index_hints": null, + "indexHints": null, "partition": null, "where": null, "group": null, @@ -1023,7 +1023,7 @@ "join": [ { "@type": "PhpMyAdmin\\SqlParser\\Components\\JoinKeyword", - "JOINS": { + "joins": { "CROSS JOIN": "CROSS", "FULL JOIN": "FULL", "FULL OUTER JOIN": "FULL", @@ -1043,7 +1043,7 @@ "type": "LEFT", "expr": { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -1068,14 +1068,14 @@ "on": [ { "@type": "PhpMyAdmin\\SqlParser\\Components\\Condition", - "DELIMITERS": [ + "delimiters": [ "&&", "||", "AND", "OR", "XOR" ], - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "ALL": 1, "AND": 1, "BETWEEN": 1, @@ -1106,14 +1106,14 @@ }, { "@type": "PhpMyAdmin\\SqlParser\\Components\\Condition", - "DELIMITERS": [ + "delimiters": [ "&&", "||", "AND", "OR", "XOR" ], - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "ALL": 1, "AND": 1, "BETWEEN": 1, @@ -1140,14 +1140,14 @@ }, { "@type": "PhpMyAdmin\\SqlParser\\Components\\Condition", - "DELIMITERS": [ + "delimiters": [ "&&", "||", "AND", "OR", "XOR" ], - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "ALL": 1, "AND": 1, "BETWEEN": 1, @@ -1178,14 +1178,14 @@ }, { "@type": "PhpMyAdmin\\SqlParser\\Components\\Condition", - "DELIMITERS": [ + "delimiters": [ "&&", "||", "AND", "OR", "XOR" ], - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "ALL": 1, "AND": 1, "BETWEEN": 1, @@ -1212,14 +1212,14 @@ }, { "@type": "PhpMyAdmin\\SqlParser\\Components\\Condition", - "DELIMITERS": [ + "delimiters": [ "&&", "||", "AND", "OR", "XOR" ], - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "ALL": 1, "AND": 1, "BETWEEN": 1, @@ -1253,7 +1253,7 @@ } ], "union": [], - "end_options": null, + "endOptions": null, "options": { "@type": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", "options": [] diff --git a/tests/data/parser/parseSelect7.out b/tests/data/parser/parseSelect7.out index 02c77347c..fd499d977 100644 --- a/tests/data/parser/parseSelect7.out +++ b/tests/data/parser/parseSelect7.out @@ -2,7 +2,7 @@ "query": "SELECT * FROM t1 LEFT JOIN (t2 CROSS JOIN t3 CROSS JOIN t4)\n ON (t2.a=t1.a AND t3.b=t1.b AND t4.c=t1.c)", "lexer": { "@type": "PhpMyAdmin\\SqlParser\\Lexer", - "PARSER_METHODS": [ + "parserMethods": [ "parseDelimiter", "parseWhitespace", "parseNumber", @@ -511,7 +511,7 @@ "count": 54, "idx": 54 }, - "DEFAULT_DELIMITER": ";", + "defaultDelimiter": ";", "delimiter": ";", "delimiterLen": 1, "strict": false, @@ -519,7 +519,7 @@ }, "parser": { "@type": "PhpMyAdmin\\SqlParser\\Parser", - "STATEMENT_PARSERS": { + "statementParsers": { "DESCRIBE": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", "DESC": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", "EXPLAIN": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", @@ -564,7 +564,7 @@ "LOCK": "PhpMyAdmin\\SqlParser\\Statements\\LockStatement", "UNLOCK": "PhpMyAdmin\\SqlParser\\Statements\\LockStatement" }, - "KEYWORD_PARSERS": { + "keywordParsers": { "PARTITION BY": [], "SUBPARTITION BY": [], "_OPTIONS": { @@ -573,7 +573,7 @@ }, "_END_OPTIONS": { "class": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", - "field": "end_options" + "field": "endOptions" }, "INTERSECT": { "class": "PhpMyAdmin\\SqlParser\\Components\\UnionKeyword", @@ -821,7 +821,7 @@ "statements": [ { "@type": "PhpMyAdmin\\SqlParser\\Statements\\SelectStatement", - "OPTIONS": { + "statementOptions": { "ALL": 1, "DISTINCT": 1, "DISTINCTROW": 1, @@ -838,11 +838,11 @@ "SQL_NO_CACHE": 8, "SQL_CALC_FOUND_ROWS": 9 }, - "END_OPTIONS": { + "statementEndOptions": { "FOR UPDATE": 1, "LOCK IN SHARE MODE": 1 }, - "CLAUSES": { + "clauses": { "SELECT": [ "SELECT", 2 @@ -971,7 +971,7 @@ "expr": [ { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -997,7 +997,7 @@ "from": [ { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -1020,7 +1020,7 @@ "subquery": null } ], - "index_hints": null, + "indexHints": null, "partition": null, "where": null, "group": null, @@ -1032,7 +1032,7 @@ "join": [ { "@type": "PhpMyAdmin\\SqlParser\\Components\\JoinKeyword", - "JOINS": { + "joins": { "CROSS JOIN": "CROSS", "FULL JOIN": "FULL", "FULL OUTER JOIN": "FULL", @@ -1052,7 +1052,7 @@ "type": "LEFT", "expr": { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -1077,14 +1077,14 @@ "on": [ { "@type": "PhpMyAdmin\\SqlParser\\Components\\Condition", - "DELIMITERS": [ + "delimiters": [ "&&", "||", "AND", "OR", "XOR" ], - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "ALL": 1, "AND": 1, "BETWEEN": 1, @@ -1115,14 +1115,14 @@ }, { "@type": "PhpMyAdmin\\SqlParser\\Components\\Condition", - "DELIMITERS": [ + "delimiters": [ "&&", "||", "AND", "OR", "XOR" ], - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "ALL": 1, "AND": 1, "BETWEEN": 1, @@ -1149,14 +1149,14 @@ }, { "@type": "PhpMyAdmin\\SqlParser\\Components\\Condition", - "DELIMITERS": [ + "delimiters": [ "&&", "||", "AND", "OR", "XOR" ], - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "ALL": 1, "AND": 1, "BETWEEN": 1, @@ -1187,14 +1187,14 @@ }, { "@type": "PhpMyAdmin\\SqlParser\\Components\\Condition", - "DELIMITERS": [ + "delimiters": [ "&&", "||", "AND", "OR", "XOR" ], - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "ALL": 1, "AND": 1, "BETWEEN": 1, @@ -1221,14 +1221,14 @@ }, { "@type": "PhpMyAdmin\\SqlParser\\Components\\Condition", - "DELIMITERS": [ + "delimiters": [ "&&", "||", "AND", "OR", "XOR" ], - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "ALL": 1, "AND": 1, "BETWEEN": 1, @@ -1262,7 +1262,7 @@ } ], "union": [], - "end_options": null, + "endOptions": null, "options": { "@type": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", "options": [] diff --git a/tests/data/parser/parseSelect8.out b/tests/data/parser/parseSelect8.out index 70e540ce4..87147ecd4 100644 --- a/tests/data/parser/parseSelect8.out +++ b/tests/data/parser/parseSelect8.out @@ -2,7 +2,7 @@ "query": "select * FROM (select Pop FROM MyTable) p join tadaa t where p.x=t.y", "lexer": { "@type": "PhpMyAdmin\\SqlParser\\Lexer", - "PARSER_METHODS": [ + "parserMethods": [ "parseDelimiter", "parseWhitespace", "parseNumber", @@ -331,7 +331,7 @@ "count": 34, "idx": 34 }, - "DEFAULT_DELIMITER": ";", + "defaultDelimiter": ";", "delimiter": ";", "delimiterLen": 1, "strict": false, @@ -339,7 +339,7 @@ }, "parser": { "@type": "PhpMyAdmin\\SqlParser\\Parser", - "STATEMENT_PARSERS": { + "statementParsers": { "DESCRIBE": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", "DESC": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", "EXPLAIN": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", @@ -384,7 +384,7 @@ "LOCK": "PhpMyAdmin\\SqlParser\\Statements\\LockStatement", "UNLOCK": "PhpMyAdmin\\SqlParser\\Statements\\LockStatement" }, - "KEYWORD_PARSERS": { + "keywordParsers": { "PARTITION BY": [], "SUBPARTITION BY": [], "_OPTIONS": { @@ -393,7 +393,7 @@ }, "_END_OPTIONS": { "class": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", - "field": "end_options" + "field": "endOptions" }, "INTERSECT": { "class": "PhpMyAdmin\\SqlParser\\Components\\UnionKeyword", @@ -641,7 +641,7 @@ "statements": [ { "@type": "PhpMyAdmin\\SqlParser\\Statements\\SelectStatement", - "OPTIONS": { + "statementOptions": { "ALL": 1, "DISTINCT": 1, "DISTINCTROW": 1, @@ -658,11 +658,11 @@ "SQL_NO_CACHE": 8, "SQL_CALC_FOUND_ROWS": 9 }, - "END_OPTIONS": { + "statementEndOptions": { "FOR UPDATE": 1, "LOCK IN SHARE MODE": 1 }, - "CLAUSES": { + "clauses": { "SELECT": [ "SELECT", 2 @@ -791,7 +791,7 @@ "expr": [ { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -817,7 +817,7 @@ "from": [ { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -840,19 +840,19 @@ "subquery": "SELECT" } ], - "index_hints": null, + "indexHints": null, "partition": null, "where": [ { "@type": "PhpMyAdmin\\SqlParser\\Components\\Condition", - "DELIMITERS": [ + "delimiters": [ "&&", "||", "AND", "OR", "XOR" ], - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "ALL": 1, "AND": 1, "BETWEEN": 1, @@ -892,7 +892,7 @@ "join": [ { "@type": "PhpMyAdmin\\SqlParser\\Components\\JoinKeyword", - "JOINS": { + "joins": { "CROSS JOIN": "CROSS", "FULL JOIN": "FULL", "FULL OUTER JOIN": "FULL", @@ -912,7 +912,7 @@ "type": "JOIN", "expr": { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -939,7 +939,7 @@ } ], "union": [], - "end_options": null, + "endOptions": null, "options": { "@type": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", "options": [] diff --git a/tests/data/parser/parseSelect9.out b/tests/data/parser/parseSelect9.out index 771e8a47f..d2676e8ad 100644 --- a/tests/data/parser/parseSelect9.out +++ b/tests/data/parser/parseSelect9.out @@ -2,7 +2,7 @@ "query": "SELECT casein_pipe, email_cp, name_first_cp, name_last_cp, purpose_pipe\nFROM (tbl_comp_person INNER JOIN `tbl_pipelist` ON tbl_comp_person.IDp = tbl_pipelist.IDp)\nWHERE casein_pipe > '2016-03-01' AND `campaign_id_pipe` = 24569 AND `weeksonlist_pipe` = 1\nORDER BY `tbl_pipelist`.`casein_pipe` ASC", "lexer": { "@type": "PhpMyAdmin\\SqlParser\\Lexer", - "PARSER_METHODS": [ + "parserMethods": [ "parseDelimiter", "parseWhitespace", "parseNumber", @@ -655,7 +655,7 @@ "count": 70, "idx": 70 }, - "DEFAULT_DELIMITER": ";", + "defaultDelimiter": ";", "delimiter": ";", "delimiterLen": 1, "strict": false, @@ -663,7 +663,7 @@ }, "parser": { "@type": "PhpMyAdmin\\SqlParser\\Parser", - "STATEMENT_PARSERS": { + "statementParsers": { "DESCRIBE": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", "DESC": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", "EXPLAIN": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", @@ -708,7 +708,7 @@ "LOCK": "PhpMyAdmin\\SqlParser\\Statements\\LockStatement", "UNLOCK": "PhpMyAdmin\\SqlParser\\Statements\\LockStatement" }, - "KEYWORD_PARSERS": { + "keywordParsers": { "PARTITION BY": [], "SUBPARTITION BY": [], "_OPTIONS": { @@ -717,7 +717,7 @@ }, "_END_OPTIONS": { "class": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", - "field": "end_options" + "field": "endOptions" }, "INTERSECT": { "class": "PhpMyAdmin\\SqlParser\\Components\\UnionKeyword", @@ -965,7 +965,7 @@ "statements": [ { "@type": "PhpMyAdmin\\SqlParser\\Statements\\SelectStatement", - "OPTIONS": { + "statementOptions": { "ALL": 1, "DISTINCT": 1, "DISTINCTROW": 1, @@ -982,11 +982,11 @@ "SQL_NO_CACHE": 8, "SQL_CALC_FOUND_ROWS": 9 }, - "END_OPTIONS": { + "statementEndOptions": { "FOR UPDATE": 1, "LOCK IN SHARE MODE": 1 }, - "CLAUSES": { + "clauses": { "SELECT": [ "SELECT", 2 @@ -1115,7 +1115,7 @@ "expr": [ { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -1139,7 +1139,7 @@ }, { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -1163,7 +1163,7 @@ }, { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -1187,7 +1187,7 @@ }, { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -1211,7 +1211,7 @@ }, { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -1237,7 +1237,7 @@ "from": [ { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -1260,19 +1260,19 @@ "subquery": null } ], - "index_hints": null, + "indexHints": null, "partition": null, "where": [ { "@type": "PhpMyAdmin\\SqlParser\\Components\\Condition", - "DELIMITERS": [ + "delimiters": [ "&&", "||", "AND", "OR", "XOR" ], - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "ALL": 1, "AND": 1, "BETWEEN": 1, @@ -1302,14 +1302,14 @@ }, { "@type": "PhpMyAdmin\\SqlParser\\Components\\Condition", - "DELIMITERS": [ + "delimiters": [ "&&", "||", "AND", "OR", "XOR" ], - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "ALL": 1, "AND": 1, "BETWEEN": 1, @@ -1336,14 +1336,14 @@ }, { "@type": "PhpMyAdmin\\SqlParser\\Components\\Condition", - "DELIMITERS": [ + "delimiters": [ "&&", "||", "AND", "OR", "XOR" ], - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "ALL": 1, "AND": 1, "BETWEEN": 1, @@ -1372,14 +1372,14 @@ }, { "@type": "PhpMyAdmin\\SqlParser\\Components\\Condition", - "DELIMITERS": [ + "delimiters": [ "&&", "||", "AND", "OR", "XOR" ], - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "ALL": 1, "AND": 1, "BETWEEN": 1, @@ -1406,14 +1406,14 @@ }, { "@type": "PhpMyAdmin\\SqlParser\\Components\\Condition", - "DELIMITERS": [ + "delimiters": [ "&&", "||", "AND", "OR", "XOR" ], - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "ALL": 1, "AND": 1, "BETWEEN": 1, @@ -1448,7 +1448,7 @@ "@type": "PhpMyAdmin\\SqlParser\\Components\\OrderKeyword", "expr": { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -1478,7 +1478,7 @@ "into": null, "join": null, "union": [], - "end_options": null, + "endOptions": null, "options": { "@type": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", "options": [] diff --git a/tests/data/parser/parseSelectCase1.out b/tests/data/parser/parseSelectCase1.out index 38efee9c3..8e746f699 100644 --- a/tests/data/parser/parseSelectCase1.out +++ b/tests/data/parser/parseSelectCase1.out @@ -2,7 +2,7 @@ "query": "select (SELECT name FROM mysql.help_category WHERE help_category_id = 1) as name,\ncase 1 when 1 then \"Some\" else \"Other\" end FROM a;", "lexer": { "@type": "PhpMyAdmin\\SqlParser\\Lexer", - "PARSER_METHODS": [ + "parserMethods": [ "parseDelimiter", "parseWhitespace", "parseNumber", @@ -475,7 +475,7 @@ "count": 50, "idx": 50 }, - "DEFAULT_DELIMITER": ";", + "defaultDelimiter": ";", "delimiter": ";", "delimiterLen": 1, "strict": false, @@ -483,7 +483,7 @@ }, "parser": { "@type": "PhpMyAdmin\\SqlParser\\Parser", - "STATEMENT_PARSERS": { + "statementParsers": { "DESCRIBE": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", "DESC": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", "EXPLAIN": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", @@ -528,7 +528,7 @@ "LOCK": "PhpMyAdmin\\SqlParser\\Statements\\LockStatement", "UNLOCK": "PhpMyAdmin\\SqlParser\\Statements\\LockStatement" }, - "KEYWORD_PARSERS": { + "keywordParsers": { "PARTITION BY": [], "SUBPARTITION BY": [], "_OPTIONS": { @@ -537,7 +537,7 @@ }, "_END_OPTIONS": { "class": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", - "field": "end_options" + "field": "endOptions" }, "INTERSECT": { "class": "PhpMyAdmin\\SqlParser\\Components\\UnionKeyword", @@ -785,7 +785,7 @@ "statements": [ { "@type": "PhpMyAdmin\\SqlParser\\Statements\\SelectStatement", - "OPTIONS": { + "statementOptions": { "ALL": 1, "DISTINCT": 1, "DISTINCTROW": 1, @@ -802,11 +802,11 @@ "SQL_NO_CACHE": 8, "SQL_CALC_FOUND_ROWS": 9 }, - "END_OPTIONS": { + "statementEndOptions": { "FOR UPDATE": 1, "LOCK IN SHARE MODE": 1 }, - "CLAUSES": { + "clauses": { "SELECT": [ "SELECT", 2 @@ -935,7 +935,7 @@ "expr": [ { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -961,7 +961,7 @@ "@type": "PhpMyAdmin\\SqlParser\\Components\\CaseExpression", "value": { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -987,7 +987,7 @@ "results": [ { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -1010,10 +1010,10 @@ "subquery": null } ], - "compare_values": [ + "compareValues": [ { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -1036,9 +1036,9 @@ "subquery": null } ], - "else_result": { + "elseResult": { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -1067,7 +1067,7 @@ "from": [ { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -1090,7 +1090,7 @@ "subquery": null } ], - "index_hints": null, + "indexHints": null, "partition": null, "where": null, "group": null, @@ -1101,7 +1101,7 @@ "into": null, "join": null, "union": [], - "end_options": null, + "endOptions": null, "options": { "@type": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", "options": [] diff --git a/tests/data/parser/parseSelectCase2.out b/tests/data/parser/parseSelectCase2.out index 4e6c95272..ae98c89b7 100644 --- a/tests/data/parser/parseSelectCase2.out +++ b/tests/data/parser/parseSelectCase2.out @@ -2,7 +2,7 @@ "query": "select (SELECT name FROM mysql.help_category WHERE help_category_id = 1) as name,\ncase \/* *\/ when 1=1 then \"Some\" else \"Other\" end FROM a;", "lexer": { "@type": "PhpMyAdmin\\SqlParser\\Lexer", - "PARSER_METHODS": [ + "parserMethods": [ "parseDelimiter", "parseWhitespace", "parseNumber", @@ -493,7 +493,7 @@ "count": 52, "idx": 52 }, - "DEFAULT_DELIMITER": ";", + "defaultDelimiter": ";", "delimiter": ";", "delimiterLen": 1, "strict": false, @@ -501,7 +501,7 @@ }, "parser": { "@type": "PhpMyAdmin\\SqlParser\\Parser", - "STATEMENT_PARSERS": { + "statementParsers": { "DESCRIBE": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", "DESC": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", "EXPLAIN": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", @@ -546,7 +546,7 @@ "LOCK": "PhpMyAdmin\\SqlParser\\Statements\\LockStatement", "UNLOCK": "PhpMyAdmin\\SqlParser\\Statements\\LockStatement" }, - "KEYWORD_PARSERS": { + "keywordParsers": { "PARTITION BY": [], "SUBPARTITION BY": [], "_OPTIONS": { @@ -555,7 +555,7 @@ }, "_END_OPTIONS": { "class": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", - "field": "end_options" + "field": "endOptions" }, "INTERSECT": { "class": "PhpMyAdmin\\SqlParser\\Components\\UnionKeyword", @@ -803,7 +803,7 @@ "statements": [ { "@type": "PhpMyAdmin\\SqlParser\\Statements\\SelectStatement", - "OPTIONS": { + "statementOptions": { "ALL": 1, "DISTINCT": 1, "DISTINCTROW": 1, @@ -820,11 +820,11 @@ "SQL_NO_CACHE": 8, "SQL_CALC_FOUND_ROWS": 9 }, - "END_OPTIONS": { + "statementEndOptions": { "FOR UPDATE": 1, "LOCK IN SHARE MODE": 1 }, - "CLAUSES": { + "clauses": { "SELECT": [ "SELECT", 2 @@ -953,7 +953,7 @@ "expr": [ { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -982,14 +982,14 @@ [ { "@type": "PhpMyAdmin\\SqlParser\\Components\\Condition", - "DELIMITERS": [ + "delimiters": [ "&&", "||", "AND", "OR", "XOR" ], - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "ALL": 1, "AND": 1, "BETWEEN": 1, @@ -1019,7 +1019,7 @@ "results": [ { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -1042,10 +1042,10 @@ "subquery": null } ], - "compare_values": [], - "else_result": { + "compareValues": [], + "elseResult": { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -1074,7 +1074,7 @@ "from": [ { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -1097,7 +1097,7 @@ "subquery": null } ], - "index_hints": null, + "indexHints": null, "partition": null, "where": null, "group": null, @@ -1108,7 +1108,7 @@ "into": null, "join": null, "union": [], - "end_options": null, + "endOptions": null, "options": { "@type": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", "options": [] diff --git a/tests/data/parser/parseSelectCase3.out b/tests/data/parser/parseSelectCase3.out index 367c4031b..04bba446e 100644 --- a/tests/data/parser/parseSelectCase3.out +++ b/tests/data/parser/parseSelectCase3.out @@ -2,7 +2,7 @@ "query": "select (SELECT name FROM mysql.help_category WHERE help_category_id = 1) as name,\ncase \/* *\/ when 1=1 then \"Some\" when 2=1 then \"Other\" end FROM a;", "lexer": { "@type": "PhpMyAdmin\\SqlParser\\Lexer", - "PARSER_METHODS": [ + "parserMethods": [ "parseDelimiter", "parseWhitespace", "parseNumber", @@ -547,7 +547,7 @@ "count": 58, "idx": 58 }, - "DEFAULT_DELIMITER": ";", + "defaultDelimiter": ";", "delimiter": ";", "delimiterLen": 1, "strict": false, @@ -555,7 +555,7 @@ }, "parser": { "@type": "PhpMyAdmin\\SqlParser\\Parser", - "STATEMENT_PARSERS": { + "statementParsers": { "DESCRIBE": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", "DESC": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", "EXPLAIN": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", @@ -600,7 +600,7 @@ "LOCK": "PhpMyAdmin\\SqlParser\\Statements\\LockStatement", "UNLOCK": "PhpMyAdmin\\SqlParser\\Statements\\LockStatement" }, - "KEYWORD_PARSERS": { + "keywordParsers": { "PARTITION BY": [], "SUBPARTITION BY": [], "_OPTIONS": { @@ -609,7 +609,7 @@ }, "_END_OPTIONS": { "class": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", - "field": "end_options" + "field": "endOptions" }, "INTERSECT": { "class": "PhpMyAdmin\\SqlParser\\Components\\UnionKeyword", @@ -857,7 +857,7 @@ "statements": [ { "@type": "PhpMyAdmin\\SqlParser\\Statements\\SelectStatement", - "OPTIONS": { + "statementOptions": { "ALL": 1, "DISTINCT": 1, "DISTINCTROW": 1, @@ -874,11 +874,11 @@ "SQL_NO_CACHE": 8, "SQL_CALC_FOUND_ROWS": 9 }, - "END_OPTIONS": { + "statementEndOptions": { "FOR UPDATE": 1, "LOCK IN SHARE MODE": 1 }, - "CLAUSES": { + "clauses": { "SELECT": [ "SELECT", 2 @@ -1007,7 +1007,7 @@ "expr": [ { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -1036,14 +1036,14 @@ [ { "@type": "PhpMyAdmin\\SqlParser\\Components\\Condition", - "DELIMITERS": [ + "delimiters": [ "&&", "||", "AND", "OR", "XOR" ], - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "ALL": 1, "AND": 1, "BETWEEN": 1, @@ -1072,14 +1072,14 @@ [ { "@type": "PhpMyAdmin\\SqlParser\\Components\\Condition", - "DELIMITERS": [ + "delimiters": [ "&&", "||", "AND", "OR", "XOR" ], - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "ALL": 1, "AND": 1, "BETWEEN": 1, @@ -1109,7 +1109,7 @@ "results": [ { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -1133,7 +1133,7 @@ }, { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -1156,8 +1156,8 @@ "subquery": null } ], - "compare_values": [], - "else_result": null, + "compareValues": [], + "elseResult": null, "alias": null, "expr": "CASE WHEN 1=1 THEN \"Some\" WHEN 2=1 THEN \"Other\" END" } @@ -1165,7 +1165,7 @@ "from": [ { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -1188,7 +1188,7 @@ "subquery": null } ], - "index_hints": null, + "indexHints": null, "partition": null, "where": null, "group": null, @@ -1199,7 +1199,7 @@ "into": null, "join": null, "union": [], - "end_options": null, + "endOptions": null, "options": { "@type": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", "options": [] diff --git a/tests/data/parser/parseSelectCase4.out b/tests/data/parser/parseSelectCase4.out index 2f393a363..aa8c42d2f 100644 --- a/tests/data/parser/parseSelectCase4.out +++ b/tests/data/parser/parseSelectCase4.out @@ -2,7 +2,7 @@ "query": "select (SELECT name FROM mysql.help_category WHERE help_category_id = 1) as name,\ncase 1 \/* *\/ when 1 then \"Some\" when 2 then \"Other\" end FROM a;", "lexer": { "@type": "PhpMyAdmin\\SqlParser\\Lexer", - "PARSER_METHODS": [ + "parserMethods": [ "parseDelimiter", "parseWhitespace", "parseNumber", @@ -529,7 +529,7 @@ "count": 56, "idx": 56 }, - "DEFAULT_DELIMITER": ";", + "defaultDelimiter": ";", "delimiter": ";", "delimiterLen": 1, "strict": false, @@ -537,7 +537,7 @@ }, "parser": { "@type": "PhpMyAdmin\\SqlParser\\Parser", - "STATEMENT_PARSERS": { + "statementParsers": { "DESCRIBE": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", "DESC": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", "EXPLAIN": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", @@ -582,7 +582,7 @@ "LOCK": "PhpMyAdmin\\SqlParser\\Statements\\LockStatement", "UNLOCK": "PhpMyAdmin\\SqlParser\\Statements\\LockStatement" }, - "KEYWORD_PARSERS": { + "keywordParsers": { "PARTITION BY": [], "SUBPARTITION BY": [], "_OPTIONS": { @@ -591,7 +591,7 @@ }, "_END_OPTIONS": { "class": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", - "field": "end_options" + "field": "endOptions" }, "INTERSECT": { "class": "PhpMyAdmin\\SqlParser\\Components\\UnionKeyword", @@ -839,7 +839,7 @@ "statements": [ { "@type": "PhpMyAdmin\\SqlParser\\Statements\\SelectStatement", - "OPTIONS": { + "statementOptions": { "ALL": 1, "DISTINCT": 1, "DISTINCTROW": 1, @@ -856,11 +856,11 @@ "SQL_NO_CACHE": 8, "SQL_CALC_FOUND_ROWS": 9 }, - "END_OPTIONS": { + "statementEndOptions": { "FOR UPDATE": 1, "LOCK IN SHARE MODE": 1 }, - "CLAUSES": { + "clauses": { "SELECT": [ "SELECT", 2 @@ -989,7 +989,7 @@ "expr": [ { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -1015,7 +1015,7 @@ "@type": "PhpMyAdmin\\SqlParser\\Components\\CaseExpression", "value": { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -1041,7 +1041,7 @@ "results": [ { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -1065,7 +1065,7 @@ }, { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -1088,10 +1088,10 @@ "subquery": null } ], - "compare_values": [ + "compareValues": [ { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -1115,7 +1115,7 @@ }, { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -1138,7 +1138,7 @@ "subquery": null } ], - "else_result": null, + "elseResult": null, "alias": null, "expr": "CASE 1 \/* *\/ WHEN 1 THEN \"Some\" WHEN 2 THEN \"Other\" END" } @@ -1146,7 +1146,7 @@ "from": [ { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -1169,7 +1169,7 @@ "subquery": null } ], - "index_hints": null, + "indexHints": null, "partition": null, "where": null, "group": null, @@ -1180,7 +1180,7 @@ "into": null, "join": null, "union": [], - "end_options": null, + "endOptions": null, "options": { "@type": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", "options": [] diff --git a/tests/data/parser/parseSelectCase5.out b/tests/data/parser/parseSelectCase5.out index 5027524f8..a81d5ba3e 100644 --- a/tests/data/parser/parseSelectCase5.out +++ b/tests/data/parser/parseSelectCase5.out @@ -2,7 +2,7 @@ "query": "select (SELECT name FROM mysql.help_category WHERE help_category_id = 1) as name,\ntest=case 1 \/* *\/ when 1 then \"Some\" when 2 then \"Other\" end FROM a;", "lexer": { "@type": "PhpMyAdmin\\SqlParser\\Lexer", - "PARSER_METHODS": [ + "parserMethods": [ "parseDelimiter", "parseWhitespace", "parseNumber", @@ -547,7 +547,7 @@ "count": 58, "idx": 58 }, - "DEFAULT_DELIMITER": ";", + "defaultDelimiter": ";", "delimiter": ";", "delimiterLen": 1, "strict": false, @@ -555,7 +555,7 @@ }, "parser": { "@type": "PhpMyAdmin\\SqlParser\\Parser", - "STATEMENT_PARSERS": { + "statementParsers": { "DESCRIBE": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", "DESC": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", "EXPLAIN": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", @@ -600,7 +600,7 @@ "LOCK": "PhpMyAdmin\\SqlParser\\Statements\\LockStatement", "UNLOCK": "PhpMyAdmin\\SqlParser\\Statements\\LockStatement" }, - "KEYWORD_PARSERS": { + "keywordParsers": { "PARTITION BY": [], "SUBPARTITION BY": [], "_OPTIONS": { @@ -609,7 +609,7 @@ }, "_END_OPTIONS": { "class": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", - "field": "end_options" + "field": "endOptions" }, "INTERSECT": { "class": "PhpMyAdmin\\SqlParser\\Components\\UnionKeyword", @@ -857,7 +857,7 @@ "statements": [ { "@type": "PhpMyAdmin\\SqlParser\\Statements\\SelectStatement", - "OPTIONS": { + "statementOptions": { "ALL": 1, "DISTINCT": 1, "DISTINCTROW": 1, @@ -874,11 +874,11 @@ "SQL_NO_CACHE": 8, "SQL_CALC_FOUND_ROWS": 9 }, - "END_OPTIONS": { + "statementEndOptions": { "FOR UPDATE": 1, "LOCK IN SHARE MODE": 1 }, - "CLAUSES": { + "clauses": { "SELECT": [ "SELECT", 2 @@ -1007,7 +1007,7 @@ "expr": [ { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -1031,7 +1031,7 @@ }, { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -1057,7 +1057,7 @@ "from": [ { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -1080,7 +1080,7 @@ "subquery": null } ], - "index_hints": null, + "indexHints": null, "partition": null, "where": null, "group": null, @@ -1091,7 +1091,7 @@ "into": null, "join": null, "union": [], - "end_options": null, + "endOptions": null, "options": { "@type": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", "options": [] diff --git a/tests/data/parser/parseSelectCaseAlias1.out b/tests/data/parser/parseSelectCaseAlias1.out index 5e969e18c..e101d146c 100644 --- a/tests/data/parser/parseSelectCaseAlias1.out +++ b/tests/data/parser/parseSelectCaseAlias1.out @@ -2,7 +2,7 @@ "query": "select (SELECT name FROM mysql.help_category WHERE help_category_id = 1) as name,\ncase \/* *\/ when 1=1 then \"Some\" when 2=1 then \"Other\" end \/* *\/ AS \/* *\/ foo FROM a;", "lexer": { "@type": "PhpMyAdmin\\SqlParser\\Lexer", - "PARSER_METHODS": [ + "parserMethods": [ "parseDelimiter", "parseWhitespace", "parseNumber", @@ -619,7 +619,7 @@ "count": 66, "idx": 66 }, - "DEFAULT_DELIMITER": ";", + "defaultDelimiter": ";", "delimiter": ";", "delimiterLen": 1, "strict": false, @@ -627,7 +627,7 @@ }, "parser": { "@type": "PhpMyAdmin\\SqlParser\\Parser", - "STATEMENT_PARSERS": { + "statementParsers": { "DESCRIBE": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", "DESC": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", "EXPLAIN": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", @@ -672,7 +672,7 @@ "LOCK": "PhpMyAdmin\\SqlParser\\Statements\\LockStatement", "UNLOCK": "PhpMyAdmin\\SqlParser\\Statements\\LockStatement" }, - "KEYWORD_PARSERS": { + "keywordParsers": { "PARTITION BY": [], "SUBPARTITION BY": [], "_OPTIONS": { @@ -681,7 +681,7 @@ }, "_END_OPTIONS": { "class": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", - "field": "end_options" + "field": "endOptions" }, "INTERSECT": { "class": "PhpMyAdmin\\SqlParser\\Components\\UnionKeyword", @@ -929,7 +929,7 @@ "statements": [ { "@type": "PhpMyAdmin\\SqlParser\\Statements\\SelectStatement", - "OPTIONS": { + "statementOptions": { "ALL": 1, "DISTINCT": 1, "DISTINCTROW": 1, @@ -946,11 +946,11 @@ "SQL_NO_CACHE": 8, "SQL_CALC_FOUND_ROWS": 9 }, - "END_OPTIONS": { + "statementEndOptions": { "FOR UPDATE": 1, "LOCK IN SHARE MODE": 1 }, - "CLAUSES": { + "clauses": { "SELECT": [ "SELECT", 2 @@ -1079,7 +1079,7 @@ "expr": [ { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -1108,14 +1108,14 @@ [ { "@type": "PhpMyAdmin\\SqlParser\\Components\\Condition", - "DELIMITERS": [ + "delimiters": [ "&&", "||", "AND", "OR", "XOR" ], - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "ALL": 1, "AND": 1, "BETWEEN": 1, @@ -1144,14 +1144,14 @@ [ { "@type": "PhpMyAdmin\\SqlParser\\Components\\Condition", - "DELIMITERS": [ + "delimiters": [ "&&", "||", "AND", "OR", "XOR" ], - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "ALL": 1, "AND": 1, "BETWEEN": 1, @@ -1181,7 +1181,7 @@ "results": [ { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -1205,7 +1205,7 @@ }, { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -1228,8 +1228,8 @@ "subquery": null } ], - "compare_values": [], - "else_result": null, + "compareValues": [], + "elseResult": null, "alias": "foo", "expr": "CASE WHEN 1=1 THEN \"Some\" WHEN 2=1 THEN \"Other\" END AS `foo`" } @@ -1237,7 +1237,7 @@ "from": [ { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -1260,7 +1260,7 @@ "subquery": null } ], - "index_hints": null, + "indexHints": null, "partition": null, "where": null, "group": null, @@ -1271,7 +1271,7 @@ "into": null, "join": null, "union": [], - "end_options": null, + "endOptions": null, "options": { "@type": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", "options": [] diff --git a/tests/data/parser/parseSelectCaseAlias2.out b/tests/data/parser/parseSelectCaseAlias2.out index 847944682..454cb895d 100644 --- a/tests/data/parser/parseSelectCaseAlias2.out +++ b/tests/data/parser/parseSelectCaseAlias2.out @@ -2,7 +2,7 @@ "query": "select (SELECT name FROM mysql.help_category WHERE help_category_id = 1) as name,\ncase \/* *\/ when 1=1 then \"Some\" when 2=1 then \"Other\" end \/* *\/ foo FROM a;", "lexer": { "@type": "PhpMyAdmin\\SqlParser\\Lexer", - "PARSER_METHODS": [ + "parserMethods": [ "parseDelimiter", "parseWhitespace", "parseNumber", @@ -583,7 +583,7 @@ "count": 62, "idx": 62 }, - "DEFAULT_DELIMITER": ";", + "defaultDelimiter": ";", "delimiter": ";", "delimiterLen": 1, "strict": false, @@ -591,7 +591,7 @@ }, "parser": { "@type": "PhpMyAdmin\\SqlParser\\Parser", - "STATEMENT_PARSERS": { + "statementParsers": { "DESCRIBE": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", "DESC": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", "EXPLAIN": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", @@ -636,7 +636,7 @@ "LOCK": "PhpMyAdmin\\SqlParser\\Statements\\LockStatement", "UNLOCK": "PhpMyAdmin\\SqlParser\\Statements\\LockStatement" }, - "KEYWORD_PARSERS": { + "keywordParsers": { "PARTITION BY": [], "SUBPARTITION BY": [], "_OPTIONS": { @@ -645,7 +645,7 @@ }, "_END_OPTIONS": { "class": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", - "field": "end_options" + "field": "endOptions" }, "INTERSECT": { "class": "PhpMyAdmin\\SqlParser\\Components\\UnionKeyword", @@ -893,7 +893,7 @@ "statements": [ { "@type": "PhpMyAdmin\\SqlParser\\Statements\\SelectStatement", - "OPTIONS": { + "statementOptions": { "ALL": 1, "DISTINCT": 1, "DISTINCTROW": 1, @@ -910,11 +910,11 @@ "SQL_NO_CACHE": 8, "SQL_CALC_FOUND_ROWS": 9 }, - "END_OPTIONS": { + "statementEndOptions": { "FOR UPDATE": 1, "LOCK IN SHARE MODE": 1 }, - "CLAUSES": { + "clauses": { "SELECT": [ "SELECT", 2 @@ -1043,7 +1043,7 @@ "expr": [ { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -1072,14 +1072,14 @@ [ { "@type": "PhpMyAdmin\\SqlParser\\Components\\Condition", - "DELIMITERS": [ + "delimiters": [ "&&", "||", "AND", "OR", "XOR" ], - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "ALL": 1, "AND": 1, "BETWEEN": 1, @@ -1108,14 +1108,14 @@ [ { "@type": "PhpMyAdmin\\SqlParser\\Components\\Condition", - "DELIMITERS": [ + "delimiters": [ "&&", "||", "AND", "OR", "XOR" ], - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "ALL": 1, "AND": 1, "BETWEEN": 1, @@ -1145,7 +1145,7 @@ "results": [ { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -1169,7 +1169,7 @@ }, { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -1192,8 +1192,8 @@ "subquery": null } ], - "compare_values": [], - "else_result": null, + "compareValues": [], + "elseResult": null, "alias": "foo", "expr": "CASE WHEN 1=1 THEN \"Some\" WHEN 2=1 THEN \"Other\" END AS `foo`" } @@ -1201,7 +1201,7 @@ "from": [ { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -1224,7 +1224,7 @@ "subquery": null } ], - "index_hints": null, + "indexHints": null, "partition": null, "where": null, "group": null, @@ -1235,7 +1235,7 @@ "into": null, "join": null, "union": [], - "end_options": null, + "endOptions": null, "options": { "@type": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", "options": [] diff --git a/tests/data/parser/parseSelectCaseAlias3.out b/tests/data/parser/parseSelectCaseAlias3.out index d800d98a7..8bcbffb86 100644 --- a/tests/data/parser/parseSelectCaseAlias3.out +++ b/tests/data/parser/parseSelectCaseAlias3.out @@ -2,7 +2,7 @@ "query": "select (SELECT name FROM mysql.help_category WHERE help_category_id = 1) as name,\ntest=case 1 \/* *\/ when 1 then \"Some\" when 2 then \"Other\" end \/* *\/ AS \/* *\/ foo FROM a;", "lexer": { "@type": "PhpMyAdmin\\SqlParser\\Lexer", - "PARSER_METHODS": [ + "parserMethods": [ "parseDelimiter", "parseWhitespace", "parseNumber", @@ -619,7 +619,7 @@ "count": 66, "idx": 66 }, - "DEFAULT_DELIMITER": ";", + "defaultDelimiter": ";", "delimiter": ";", "delimiterLen": 1, "strict": false, @@ -627,7 +627,7 @@ }, "parser": { "@type": "PhpMyAdmin\\SqlParser\\Parser", - "STATEMENT_PARSERS": { + "statementParsers": { "DESCRIBE": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", "DESC": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", "EXPLAIN": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", @@ -672,7 +672,7 @@ "LOCK": "PhpMyAdmin\\SqlParser\\Statements\\LockStatement", "UNLOCK": "PhpMyAdmin\\SqlParser\\Statements\\LockStatement" }, - "KEYWORD_PARSERS": { + "keywordParsers": { "PARTITION BY": [], "SUBPARTITION BY": [], "_OPTIONS": { @@ -681,7 +681,7 @@ }, "_END_OPTIONS": { "class": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", - "field": "end_options" + "field": "endOptions" }, "INTERSECT": { "class": "PhpMyAdmin\\SqlParser\\Components\\UnionKeyword", @@ -929,7 +929,7 @@ "statements": [ { "@type": "PhpMyAdmin\\SqlParser\\Statements\\SelectStatement", - "OPTIONS": { + "statementOptions": { "ALL": 1, "DISTINCT": 1, "DISTINCTROW": 1, @@ -946,11 +946,11 @@ "SQL_NO_CACHE": 8, "SQL_CALC_FOUND_ROWS": 9 }, - "END_OPTIONS": { + "statementEndOptions": { "FOR UPDATE": 1, "LOCK IN SHARE MODE": 1 }, - "CLAUSES": { + "clauses": { "SELECT": [ "SELECT", 2 @@ -1079,7 +1079,7 @@ "expr": [ { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -1103,7 +1103,7 @@ }, { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -1129,7 +1129,7 @@ "from": [ { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -1152,7 +1152,7 @@ "subquery": null } ], - "index_hints": null, + "indexHints": null, "partition": null, "where": null, "group": null, @@ -1163,7 +1163,7 @@ "into": null, "join": null, "union": [], - "end_options": null, + "endOptions": null, "options": { "@type": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", "options": [] diff --git a/tests/data/parser/parseSelectCaseAlias4.out b/tests/data/parser/parseSelectCaseAlias4.out index 790a0b1ba..3b90ffb6c 100644 --- a/tests/data/parser/parseSelectCaseAlias4.out +++ b/tests/data/parser/parseSelectCaseAlias4.out @@ -2,7 +2,7 @@ "query": "select (SELECT name FROM mysql.help_category WHERE help_category_id = 1) as name,\ntest=case 1 \/* *\/ when 1 then \"Some\" when 2 then \"Other\" end \/* *\/ foo FROM a;", "lexer": { "@type": "PhpMyAdmin\\SqlParser\\Lexer", - "PARSER_METHODS": [ + "parserMethods": [ "parseDelimiter", "parseWhitespace", "parseNumber", @@ -583,7 +583,7 @@ "count": 62, "idx": 62 }, - "DEFAULT_DELIMITER": ";", + "defaultDelimiter": ";", "delimiter": ";", "delimiterLen": 1, "strict": false, @@ -591,7 +591,7 @@ }, "parser": { "@type": "PhpMyAdmin\\SqlParser\\Parser", - "STATEMENT_PARSERS": { + "statementParsers": { "DESCRIBE": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", "DESC": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", "EXPLAIN": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", @@ -636,7 +636,7 @@ "LOCK": "PhpMyAdmin\\SqlParser\\Statements\\LockStatement", "UNLOCK": "PhpMyAdmin\\SqlParser\\Statements\\LockStatement" }, - "KEYWORD_PARSERS": { + "keywordParsers": { "PARTITION BY": [], "SUBPARTITION BY": [], "_OPTIONS": { @@ -645,7 +645,7 @@ }, "_END_OPTIONS": { "class": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", - "field": "end_options" + "field": "endOptions" }, "INTERSECT": { "class": "PhpMyAdmin\\SqlParser\\Components\\UnionKeyword", @@ -893,7 +893,7 @@ "statements": [ { "@type": "PhpMyAdmin\\SqlParser\\Statements\\SelectStatement", - "OPTIONS": { + "statementOptions": { "ALL": 1, "DISTINCT": 1, "DISTINCTROW": 1, @@ -910,11 +910,11 @@ "SQL_NO_CACHE": 8, "SQL_CALC_FOUND_ROWS": 9 }, - "END_OPTIONS": { + "statementEndOptions": { "FOR UPDATE": 1, "LOCK IN SHARE MODE": 1 }, - "CLAUSES": { + "clauses": { "SELECT": [ "SELECT", 2 @@ -1043,7 +1043,7 @@ "expr": [ { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -1067,7 +1067,7 @@ }, { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -1093,7 +1093,7 @@ "from": [ { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -1116,7 +1116,7 @@ "subquery": null } ], - "index_hints": null, + "indexHints": null, "partition": null, "where": null, "group": null, @@ -1127,7 +1127,7 @@ "into": null, "join": null, "union": [], - "end_options": null, + "endOptions": null, "options": { "@type": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", "options": [] diff --git a/tests/data/parser/parseSelectCaseAlias5.out b/tests/data/parser/parseSelectCaseAlias5.out index 0463545ef..16a2da782 100644 --- a/tests/data/parser/parseSelectCaseAlias5.out +++ b/tests/data/parser/parseSelectCaseAlias5.out @@ -2,7 +2,7 @@ "query": "select (SELECT name FROM mysql.help_category WHERE help_category_id = 1) as name,\ncase 1 when 1 then \"Some\" else \"Other\" end AS \"string value\" FROM a;", "lexer": { "@type": "PhpMyAdmin\\SqlParser\\Lexer", - "PARSER_METHODS": [ + "parserMethods": [ "parseDelimiter", "parseWhitespace", "parseNumber", @@ -511,7 +511,7 @@ "count": 54, "idx": 54 }, - "DEFAULT_DELIMITER": ";", + "defaultDelimiter": ";", "delimiter": ";", "delimiterLen": 1, "strict": false, @@ -519,7 +519,7 @@ }, "parser": { "@type": "PhpMyAdmin\\SqlParser\\Parser", - "STATEMENT_PARSERS": { + "statementParsers": { "DESCRIBE": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", "DESC": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", "EXPLAIN": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", @@ -564,7 +564,7 @@ "LOCK": "PhpMyAdmin\\SqlParser\\Statements\\LockStatement", "UNLOCK": "PhpMyAdmin\\SqlParser\\Statements\\LockStatement" }, - "KEYWORD_PARSERS": { + "keywordParsers": { "PARTITION BY": [], "SUBPARTITION BY": [], "_OPTIONS": { @@ -573,7 +573,7 @@ }, "_END_OPTIONS": { "class": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", - "field": "end_options" + "field": "endOptions" }, "INTERSECT": { "class": "PhpMyAdmin\\SqlParser\\Components\\UnionKeyword", @@ -821,7 +821,7 @@ "statements": [ { "@type": "PhpMyAdmin\\SqlParser\\Statements\\SelectStatement", - "OPTIONS": { + "statementOptions": { "ALL": 1, "DISTINCT": 1, "DISTINCTROW": 1, @@ -838,11 +838,11 @@ "SQL_NO_CACHE": 8, "SQL_CALC_FOUND_ROWS": 9 }, - "END_OPTIONS": { + "statementEndOptions": { "FOR UPDATE": 1, "LOCK IN SHARE MODE": 1 }, - "CLAUSES": { + "clauses": { "SELECT": [ "SELECT", 2 @@ -971,7 +971,7 @@ "expr": [ { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -997,7 +997,7 @@ "@type": "PhpMyAdmin\\SqlParser\\Components\\CaseExpression", "value": { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -1023,7 +1023,7 @@ "results": [ { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -1046,10 +1046,10 @@ "subquery": null } ], - "compare_values": [ + "compareValues": [ { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -1072,9 +1072,9 @@ "subquery": null } ], - "else_result": { + "elseResult": { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -1103,7 +1103,7 @@ "from": [ { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -1126,7 +1126,7 @@ "subquery": null } ], - "index_hints": null, + "indexHints": null, "partition": null, "where": null, "group": null, @@ -1137,7 +1137,7 @@ "into": null, "join": null, "union": [], - "end_options": null, + "endOptions": null, "options": { "@type": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", "options": [] diff --git a/tests/data/parser/parseSelectCaseAlias6.out b/tests/data/parser/parseSelectCaseAlias6.out index 37fa264da..79e24b55d 100644 --- a/tests/data/parser/parseSelectCaseAlias6.out +++ b/tests/data/parser/parseSelectCaseAlias6.out @@ -2,7 +2,7 @@ "query": "select (SELECT name FROM mysql.help_category WHERE help_category_id = 1) as name,\ncase 1 when 1 then \"Some\" else \"Other\" end AS `symbol_value` FROM a;", "lexer": { "@type": "PhpMyAdmin\\SqlParser\\Lexer", - "PARSER_METHODS": [ + "parserMethods": [ "parseDelimiter", "parseWhitespace", "parseNumber", @@ -511,7 +511,7 @@ "count": 54, "idx": 54 }, - "DEFAULT_DELIMITER": ";", + "defaultDelimiter": ";", "delimiter": ";", "delimiterLen": 1, "strict": false, @@ -519,7 +519,7 @@ }, "parser": { "@type": "PhpMyAdmin\\SqlParser\\Parser", - "STATEMENT_PARSERS": { + "statementParsers": { "DESCRIBE": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", "DESC": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", "EXPLAIN": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", @@ -564,7 +564,7 @@ "LOCK": "PhpMyAdmin\\SqlParser\\Statements\\LockStatement", "UNLOCK": "PhpMyAdmin\\SqlParser\\Statements\\LockStatement" }, - "KEYWORD_PARSERS": { + "keywordParsers": { "PARTITION BY": [], "SUBPARTITION BY": [], "_OPTIONS": { @@ -573,7 +573,7 @@ }, "_END_OPTIONS": { "class": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", - "field": "end_options" + "field": "endOptions" }, "INTERSECT": { "class": "PhpMyAdmin\\SqlParser\\Components\\UnionKeyword", @@ -821,7 +821,7 @@ "statements": [ { "@type": "PhpMyAdmin\\SqlParser\\Statements\\SelectStatement", - "OPTIONS": { + "statementOptions": { "ALL": 1, "DISTINCT": 1, "DISTINCTROW": 1, @@ -838,11 +838,11 @@ "SQL_NO_CACHE": 8, "SQL_CALC_FOUND_ROWS": 9 }, - "END_OPTIONS": { + "statementEndOptions": { "FOR UPDATE": 1, "LOCK IN SHARE MODE": 1 }, - "CLAUSES": { + "clauses": { "SELECT": [ "SELECT", 2 @@ -971,7 +971,7 @@ "expr": [ { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -997,7 +997,7 @@ "@type": "PhpMyAdmin\\SqlParser\\Components\\CaseExpression", "value": { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -1023,7 +1023,7 @@ "results": [ { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -1046,10 +1046,10 @@ "subquery": null } ], - "compare_values": [ + "compareValues": [ { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -1072,9 +1072,9 @@ "subquery": null } ], - "else_result": { + "elseResult": { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -1103,7 +1103,7 @@ "from": [ { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -1126,7 +1126,7 @@ "subquery": null } ], - "index_hints": null, + "indexHints": null, "partition": null, "where": null, "group": null, @@ -1137,7 +1137,7 @@ "into": null, "join": null, "union": [], - "end_options": null, + "endOptions": null, "options": { "@type": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", "options": [] diff --git a/tests/data/parser/parseSelectCaseAliasErr1.out b/tests/data/parser/parseSelectCaseAliasErr1.out index ad481584c..dd110fe8a 100644 --- a/tests/data/parser/parseSelectCaseAliasErr1.out +++ b/tests/data/parser/parseSelectCaseAliasErr1.out @@ -2,7 +2,7 @@ "query": "select (SELECT name FROM mysql.help_category WHERE help_category_id = 1) as name,\ncase 1 when 1 then \"Some\" else \"Other\" end AS AS foo FROM a;", "lexer": { "@type": "PhpMyAdmin\\SqlParser\\Lexer", - "PARSER_METHODS": [ + "parserMethods": [ "parseDelimiter", "parseWhitespace", "parseNumber", @@ -529,7 +529,7 @@ "count": 56, "idx": 56 }, - "DEFAULT_DELIMITER": ";", + "defaultDelimiter": ";", "delimiter": ";", "delimiterLen": 1, "strict": false, @@ -537,7 +537,7 @@ }, "parser": { "@type": "PhpMyAdmin\\SqlParser\\Parser", - "STATEMENT_PARSERS": { + "statementParsers": { "DESCRIBE": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", "DESC": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", "EXPLAIN": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", @@ -582,7 +582,7 @@ "LOCK": "PhpMyAdmin\\SqlParser\\Statements\\LockStatement", "UNLOCK": "PhpMyAdmin\\SqlParser\\Statements\\LockStatement" }, - "KEYWORD_PARSERS": { + "keywordParsers": { "PARTITION BY": [], "SUBPARTITION BY": [], "_OPTIONS": { @@ -591,7 +591,7 @@ }, "_END_OPTIONS": { "class": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", - "field": "end_options" + "field": "endOptions" }, "INTERSECT": { "class": "PhpMyAdmin\\SqlParser\\Components\\UnionKeyword", @@ -839,7 +839,7 @@ "statements": [ { "@type": "PhpMyAdmin\\SqlParser\\Statements\\SelectStatement", - "OPTIONS": { + "statementOptions": { "ALL": 1, "DISTINCT": 1, "DISTINCTROW": 1, @@ -856,11 +856,11 @@ "SQL_NO_CACHE": 8, "SQL_CALC_FOUND_ROWS": 9 }, - "END_OPTIONS": { + "statementEndOptions": { "FOR UPDATE": 1, "LOCK IN SHARE MODE": 1 }, - "CLAUSES": { + "clauses": { "SELECT": [ "SELECT", 2 @@ -989,7 +989,7 @@ "expr": [ { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -1015,7 +1015,7 @@ "@type": "PhpMyAdmin\\SqlParser\\Components\\CaseExpression", "value": { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -1041,7 +1041,7 @@ "results": [ { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -1064,10 +1064,10 @@ "subquery": null } ], - "compare_values": [ + "compareValues": [ { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -1090,9 +1090,9 @@ "subquery": null } ], - "else_result": { + "elseResult": { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -1121,7 +1121,7 @@ "from": [ { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -1144,7 +1144,7 @@ "subquery": null } ], - "index_hints": null, + "indexHints": null, "partition": null, "where": null, "group": null, @@ -1155,7 +1155,7 @@ "into": null, "join": null, "union": [], - "end_options": null, + "endOptions": null, "options": { "@type": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", "options": [] diff --git a/tests/data/parser/parseSelectCaseAliasErr2.out b/tests/data/parser/parseSelectCaseAliasErr2.out index fc9906a34..9943de0c2 100644 --- a/tests/data/parser/parseSelectCaseAliasErr2.out +++ b/tests/data/parser/parseSelectCaseAliasErr2.out @@ -2,7 +2,7 @@ "query": "select (SELECT name FROM mysql.help_category WHERE help_category_id = 1) as name,\ncase 1 when 1 then \"Some\" else \"Other\" end AS FROM a;", "lexer": { "@type": "PhpMyAdmin\\SqlParser\\Lexer", - "PARSER_METHODS": [ + "parserMethods": [ "parseDelimiter", "parseWhitespace", "parseNumber", @@ -493,7 +493,7 @@ "count": 52, "idx": 52 }, - "DEFAULT_DELIMITER": ";", + "defaultDelimiter": ";", "delimiter": ";", "delimiterLen": 1, "strict": false, @@ -501,7 +501,7 @@ }, "parser": { "@type": "PhpMyAdmin\\SqlParser\\Parser", - "STATEMENT_PARSERS": { + "statementParsers": { "DESCRIBE": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", "DESC": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", "EXPLAIN": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", @@ -546,7 +546,7 @@ "LOCK": "PhpMyAdmin\\SqlParser\\Statements\\LockStatement", "UNLOCK": "PhpMyAdmin\\SqlParser\\Statements\\LockStatement" }, - "KEYWORD_PARSERS": { + "keywordParsers": { "PARTITION BY": [], "SUBPARTITION BY": [], "_OPTIONS": { @@ -555,7 +555,7 @@ }, "_END_OPTIONS": { "class": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", - "field": "end_options" + "field": "endOptions" }, "INTERSECT": { "class": "PhpMyAdmin\\SqlParser\\Components\\UnionKeyword", @@ -803,7 +803,7 @@ "statements": [ { "@type": "PhpMyAdmin\\SqlParser\\Statements\\SelectStatement", - "OPTIONS": { + "statementOptions": { "ALL": 1, "DISTINCT": 1, "DISTINCTROW": 1, @@ -820,11 +820,11 @@ "SQL_NO_CACHE": 8, "SQL_CALC_FOUND_ROWS": 9 }, - "END_OPTIONS": { + "statementEndOptions": { "FOR UPDATE": 1, "LOCK IN SHARE MODE": 1 }, - "CLAUSES": { + "clauses": { "SELECT": [ "SELECT", 2 @@ -953,7 +953,7 @@ "expr": [ { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -979,7 +979,7 @@ "@type": "PhpMyAdmin\\SqlParser\\Components\\CaseExpression", "value": { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -1005,7 +1005,7 @@ "results": [ { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -1028,10 +1028,10 @@ "subquery": null } ], - "compare_values": [ + "compareValues": [ { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -1054,9 +1054,9 @@ "subquery": null } ], - "else_result": { + "elseResult": { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -1085,7 +1085,7 @@ "from": [ { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -1108,7 +1108,7 @@ "subquery": null } ], - "index_hints": null, + "indexHints": null, "partition": null, "where": null, "group": null, @@ -1119,7 +1119,7 @@ "into": null, "join": null, "union": [], - "end_options": null, + "endOptions": null, "options": { "@type": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", "options": [] diff --git a/tests/data/parser/parseSelectCaseAliasErr3.out b/tests/data/parser/parseSelectCaseAliasErr3.out index 676fcaa5d..914c25ff6 100644 --- a/tests/data/parser/parseSelectCaseAliasErr3.out +++ b/tests/data/parser/parseSelectCaseAliasErr3.out @@ -2,7 +2,7 @@ "query": "select (SELECT name FROM mysql.help_category WHERE help_category_id = 1) as name,\ncase 1 when 1 then \"Some\" else \"Other\" end AS foo bar FROM a;", "lexer": { "@type": "PhpMyAdmin\\SqlParser\\Lexer", - "PARSER_METHODS": [ + "parserMethods": [ "parseDelimiter", "parseWhitespace", "parseNumber", @@ -529,7 +529,7 @@ "count": 56, "idx": 56 }, - "DEFAULT_DELIMITER": ";", + "defaultDelimiter": ";", "delimiter": ";", "delimiterLen": 1, "strict": false, @@ -537,7 +537,7 @@ }, "parser": { "@type": "PhpMyAdmin\\SqlParser\\Parser", - "STATEMENT_PARSERS": { + "statementParsers": { "DESCRIBE": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", "DESC": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", "EXPLAIN": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", @@ -582,7 +582,7 @@ "LOCK": "PhpMyAdmin\\SqlParser\\Statements\\LockStatement", "UNLOCK": "PhpMyAdmin\\SqlParser\\Statements\\LockStatement" }, - "KEYWORD_PARSERS": { + "keywordParsers": { "PARTITION BY": [], "SUBPARTITION BY": [], "_OPTIONS": { @@ -591,7 +591,7 @@ }, "_END_OPTIONS": { "class": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", - "field": "end_options" + "field": "endOptions" }, "INTERSECT": { "class": "PhpMyAdmin\\SqlParser\\Components\\UnionKeyword", @@ -839,7 +839,7 @@ "statements": [ { "@type": "PhpMyAdmin\\SqlParser\\Statements\\SelectStatement", - "OPTIONS": { + "statementOptions": { "ALL": 1, "DISTINCT": 1, "DISTINCTROW": 1, @@ -856,11 +856,11 @@ "SQL_NO_CACHE": 8, "SQL_CALC_FOUND_ROWS": 9 }, - "END_OPTIONS": { + "statementEndOptions": { "FOR UPDATE": 1, "LOCK IN SHARE MODE": 1 }, - "CLAUSES": { + "clauses": { "SELECT": [ "SELECT", 2 @@ -989,7 +989,7 @@ "expr": [ { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -1015,7 +1015,7 @@ "@type": "PhpMyAdmin\\SqlParser\\Components\\CaseExpression", "value": { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -1041,7 +1041,7 @@ "results": [ { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -1064,10 +1064,10 @@ "subquery": null } ], - "compare_values": [ + "compareValues": [ { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -1090,9 +1090,9 @@ "subquery": null } ], - "else_result": { + "elseResult": { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -1121,7 +1121,7 @@ "from": [ { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -1144,7 +1144,7 @@ "subquery": null } ], - "index_hints": null, + "indexHints": null, "partition": null, "where": null, "group": null, @@ -1155,7 +1155,7 @@ "into": null, "join": null, "union": [], - "end_options": null, + "endOptions": null, "options": { "@type": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", "options": [] diff --git a/tests/data/parser/parseSelectCaseAliasErr4.out b/tests/data/parser/parseSelectCaseAliasErr4.out index a1713e103..d33619419 100644 --- a/tests/data/parser/parseSelectCaseAliasErr4.out +++ b/tests/data/parser/parseSelectCaseAliasErr4.out @@ -2,7 +2,7 @@ "query": "SELECT CASE WHEN 2 IS NULL THEN \"this is true\" ELSE \"this is false\" END AS ;", "lexer": { "@type": "PhpMyAdmin\\SqlParser\\Lexer", - "PARSER_METHODS": [ + "parserMethods": [ "parseDelimiter", "parseWhitespace", "parseNumber", @@ -259,7 +259,7 @@ "count": 26, "idx": 26 }, - "DEFAULT_DELIMITER": ";", + "defaultDelimiter": ";", "delimiter": ";", "delimiterLen": 1, "strict": false, @@ -267,7 +267,7 @@ }, "parser": { "@type": "PhpMyAdmin\\SqlParser\\Parser", - "STATEMENT_PARSERS": { + "statementParsers": { "DESCRIBE": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", "DESC": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", "EXPLAIN": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", @@ -312,7 +312,7 @@ "LOCK": "PhpMyAdmin\\SqlParser\\Statements\\LockStatement", "UNLOCK": "PhpMyAdmin\\SqlParser\\Statements\\LockStatement" }, - "KEYWORD_PARSERS": { + "keywordParsers": { "PARTITION BY": [], "SUBPARTITION BY": [], "_OPTIONS": { @@ -321,7 +321,7 @@ }, "_END_OPTIONS": { "class": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", - "field": "end_options" + "field": "endOptions" }, "INTERSECT": { "class": "PhpMyAdmin\\SqlParser\\Components\\UnionKeyword", @@ -569,7 +569,7 @@ "statements": [ { "@type": "PhpMyAdmin\\SqlParser\\Statements\\SelectStatement", - "OPTIONS": { + "statementOptions": { "ALL": 1, "DISTINCT": 1, "DISTINCTROW": 1, @@ -586,11 +586,11 @@ "SQL_NO_CACHE": 8, "SQL_CALC_FOUND_ROWS": 9 }, - "END_OPTIONS": { + "statementEndOptions": { "FOR UPDATE": 1, "LOCK IN SHARE MODE": 1 }, - "CLAUSES": { + "clauses": { "SELECT": [ "SELECT", 2 @@ -724,14 +724,14 @@ [ { "@type": "PhpMyAdmin\\SqlParser\\Components\\Condition", - "DELIMITERS": [ + "delimiters": [ "&&", "||", "AND", "OR", "XOR" ], - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "ALL": 1, "AND": 1, "BETWEEN": 1, @@ -761,7 +761,7 @@ "results": [ { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -784,10 +784,10 @@ "subquery": null } ], - "compare_values": [], - "else_result": { + "compareValues": [], + "elseResult": { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -814,7 +814,7 @@ } ], "from": [], - "index_hints": null, + "indexHints": null, "partition": null, "where": null, "group": null, @@ -825,7 +825,7 @@ "into": null, "join": null, "union": [], - "end_options": null, + "endOptions": null, "options": { "@type": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", "options": [] diff --git a/tests/data/parser/parseSelectCaseErr1.out b/tests/data/parser/parseSelectCaseErr1.out index 1091e4acc..16ae94452 100644 --- a/tests/data/parser/parseSelectCaseErr1.out +++ b/tests/data/parser/parseSelectCaseErr1.out @@ -2,7 +2,7 @@ "query": "select (SELECT name FROM mysql.help_category WHERE help_category_id = 1) as name, case 1 then 1 then \"Some\" else \"Other\" end FROM a;", "lexer": { "@type": "PhpMyAdmin\\SqlParser\\Lexer", - "PARSER_METHODS": [ + "parserMethods": [ "parseDelimiter", "parseWhitespace", "parseNumber", @@ -475,7 +475,7 @@ "count": 50, "idx": 50 }, - "DEFAULT_DELIMITER": ";", + "defaultDelimiter": ";", "delimiter": ";", "delimiterLen": 1, "strict": false, @@ -483,7 +483,7 @@ }, "parser": { "@type": "PhpMyAdmin\\SqlParser\\Parser", - "STATEMENT_PARSERS": { + "statementParsers": { "DESCRIBE": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", "DESC": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", "EXPLAIN": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", @@ -528,7 +528,7 @@ "LOCK": "PhpMyAdmin\\SqlParser\\Statements\\LockStatement", "UNLOCK": "PhpMyAdmin\\SqlParser\\Statements\\LockStatement" }, - "KEYWORD_PARSERS": { + "keywordParsers": { "PARTITION BY": [], "SUBPARTITION BY": [], "_OPTIONS": { @@ -537,7 +537,7 @@ }, "_END_OPTIONS": { "class": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", - "field": "end_options" + "field": "endOptions" }, "INTERSECT": { "class": "PhpMyAdmin\\SqlParser\\Components\\UnionKeyword", @@ -785,7 +785,7 @@ "statements": [ { "@type": "PhpMyAdmin\\SqlParser\\Statements\\SelectStatement", - "OPTIONS": { + "statementOptions": { "ALL": 1, "DISTINCT": 1, "DISTINCTROW": 1, @@ -802,11 +802,11 @@ "SQL_NO_CACHE": 8, "SQL_CALC_FOUND_ROWS": 9 }, - "END_OPTIONS": { + "statementEndOptions": { "FOR UPDATE": 1, "LOCK IN SHARE MODE": 1 }, - "CLAUSES": { + "clauses": { "SELECT": [ "SELECT", 2 @@ -935,7 +935,7 @@ "expr": [ { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -961,7 +961,7 @@ "@type": "PhpMyAdmin\\SqlParser\\Components\\CaseExpression", "value": { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -985,8 +985,8 @@ }, "conditions": [], "results": [], - "compare_values": [], - "else_result": null, + "compareValues": [], + "elseResult": null, "alias": null, "expr": "" } @@ -994,7 +994,7 @@ "from": [ { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -1017,7 +1017,7 @@ "subquery": null } ], - "index_hints": null, + "indexHints": null, "partition": null, "where": null, "group": null, @@ -1028,7 +1028,7 @@ "into": null, "join": null, "union": [], - "end_options": null, + "endOptions": null, "options": { "@type": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", "options": [] diff --git a/tests/data/parser/parseSelectCaseErr2.out b/tests/data/parser/parseSelectCaseErr2.out index d53c9e33e..f43620cff 100644 --- a/tests/data/parser/parseSelectCaseErr2.out +++ b/tests/data/parser/parseSelectCaseErr2.out @@ -2,7 +2,7 @@ "query": "select (SELECT name FROM mysql.help_category WHERE help_category_id = 1) as name,\ncase then 1=1 then \"Some\" else \"Other\" end FROM a;", "lexer": { "@type": "PhpMyAdmin\\SqlParser\\Lexer", - "PARSER_METHODS": [ + "parserMethods": [ "parseDelimiter", "parseWhitespace", "parseNumber", @@ -475,7 +475,7 @@ "count": 50, "idx": 50 }, - "DEFAULT_DELIMITER": ";", + "defaultDelimiter": ";", "delimiter": ";", "delimiterLen": 1, "strict": false, @@ -483,7 +483,7 @@ }, "parser": { "@type": "PhpMyAdmin\\SqlParser\\Parser", - "STATEMENT_PARSERS": { + "statementParsers": { "DESCRIBE": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", "DESC": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", "EXPLAIN": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", @@ -528,7 +528,7 @@ "LOCK": "PhpMyAdmin\\SqlParser\\Statements\\LockStatement", "UNLOCK": "PhpMyAdmin\\SqlParser\\Statements\\LockStatement" }, - "KEYWORD_PARSERS": { + "keywordParsers": { "PARTITION BY": [], "SUBPARTITION BY": [], "_OPTIONS": { @@ -537,7 +537,7 @@ }, "_END_OPTIONS": { "class": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", - "field": "end_options" + "field": "endOptions" }, "INTERSECT": { "class": "PhpMyAdmin\\SqlParser\\Components\\UnionKeyword", @@ -785,7 +785,7 @@ "statements": [ { "@type": "PhpMyAdmin\\SqlParser\\Statements\\SelectStatement", - "OPTIONS": { + "statementOptions": { "ALL": 1, "DISTINCT": 1, "DISTINCTROW": 1, @@ -802,11 +802,11 @@ "SQL_NO_CACHE": 8, "SQL_CALC_FOUND_ROWS": 9 }, - "END_OPTIONS": { + "statementEndOptions": { "FOR UPDATE": 1, "LOCK IN SHARE MODE": 1 }, - "CLAUSES": { + "clauses": { "SELECT": [ "SELECT", 2 @@ -935,7 +935,7 @@ "expr": [ { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -962,8 +962,8 @@ "value": null, "conditions": [], "results": [], - "compare_values": [], - "else_result": null, + "compareValues": [], + "elseResult": null, "alias": null, "expr": "" } @@ -971,7 +971,7 @@ "from": [ { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -994,7 +994,7 @@ "subquery": null } ], - "index_hints": null, + "indexHints": null, "partition": null, "where": null, "group": null, @@ -1005,7 +1005,7 @@ "into": null, "join": null, "union": [], - "end_options": null, + "endOptions": null, "options": { "@type": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", "options": [] diff --git a/tests/data/parser/parseSelectCaseErr3.out b/tests/data/parser/parseSelectCaseErr3.out index 7bf40ab5d..a5164dc00 100644 --- a/tests/data/parser/parseSelectCaseErr3.out +++ b/tests/data/parser/parseSelectCaseErr3.out @@ -2,7 +2,7 @@ "query": "select (SELECT name FROM mysql.help_category WHERE help_category_id = 1) as name,\ncase when 1=1 when \"Some\" else \"Other\" end FROM a;", "lexer": { "@type": "PhpMyAdmin\\SqlParser\\Lexer", - "PARSER_METHODS": [ + "parserMethods": [ "parseDelimiter", "parseWhitespace", "parseNumber", @@ -475,7 +475,7 @@ "count": 50, "idx": 50 }, - "DEFAULT_DELIMITER": ";", + "defaultDelimiter": ";", "delimiter": ";", "delimiterLen": 1, "strict": false, @@ -483,7 +483,7 @@ }, "parser": { "@type": "PhpMyAdmin\\SqlParser\\Parser", - "STATEMENT_PARSERS": { + "statementParsers": { "DESCRIBE": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", "DESC": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", "EXPLAIN": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", @@ -528,7 +528,7 @@ "LOCK": "PhpMyAdmin\\SqlParser\\Statements\\LockStatement", "UNLOCK": "PhpMyAdmin\\SqlParser\\Statements\\LockStatement" }, - "KEYWORD_PARSERS": { + "keywordParsers": { "PARTITION BY": [], "SUBPARTITION BY": [], "_OPTIONS": { @@ -537,7 +537,7 @@ }, "_END_OPTIONS": { "class": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", - "field": "end_options" + "field": "endOptions" }, "INTERSECT": { "class": "PhpMyAdmin\\SqlParser\\Components\\UnionKeyword", @@ -785,7 +785,7 @@ "statements": [ { "@type": "PhpMyAdmin\\SqlParser\\Statements\\SelectStatement", - "OPTIONS": { + "statementOptions": { "ALL": 1, "DISTINCT": 1, "DISTINCTROW": 1, @@ -802,11 +802,11 @@ "SQL_NO_CACHE": 8, "SQL_CALC_FOUND_ROWS": 9 }, - "END_OPTIONS": { + "statementEndOptions": { "FOR UPDATE": 1, "LOCK IN SHARE MODE": 1 }, - "CLAUSES": { + "clauses": { "SELECT": [ "SELECT", 2 @@ -935,7 +935,7 @@ "expr": [ { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -964,14 +964,14 @@ [ { "@type": "PhpMyAdmin\\SqlParser\\Components\\Condition", - "DELIMITERS": [ + "delimiters": [ "&&", "||", "AND", "OR", "XOR" ], - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "ALL": 1, "AND": 1, "BETWEEN": 1, @@ -999,8 +999,8 @@ ] ], "results": [], - "compare_values": [], - "else_result": null, + "compareValues": [], + "elseResult": null, "alias": null, "expr": "" } @@ -1008,7 +1008,7 @@ "from": [ { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -1031,7 +1031,7 @@ "subquery": null } ], - "index_hints": null, + "indexHints": null, "partition": null, "where": null, "group": null, @@ -1042,7 +1042,7 @@ "into": null, "join": null, "union": [], - "end_options": null, + "endOptions": null, "options": { "@type": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", "options": [] diff --git a/tests/data/parser/parseSelectCaseErr4.out b/tests/data/parser/parseSelectCaseErr4.out index d67619f44..1753e6275 100644 --- a/tests/data/parser/parseSelectCaseErr4.out +++ b/tests/data/parser/parseSelectCaseErr4.out @@ -2,7 +2,7 @@ "query": "select (SELECT name FROM mysql.help_category WHERE help_category_id = 1) as name,\ncase 1 then 1 when \"Some\" else \"Other\" end FROM a;", "lexer": { "@type": "PhpMyAdmin\\SqlParser\\Lexer", - "PARSER_METHODS": [ + "parserMethods": [ "parseDelimiter", "parseWhitespace", "parseNumber", @@ -475,7 +475,7 @@ "count": 50, "idx": 50 }, - "DEFAULT_DELIMITER": ";", + "defaultDelimiter": ";", "delimiter": ";", "delimiterLen": 1, "strict": false, @@ -483,7 +483,7 @@ }, "parser": { "@type": "PhpMyAdmin\\SqlParser\\Parser", - "STATEMENT_PARSERS": { + "statementParsers": { "DESCRIBE": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", "DESC": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", "EXPLAIN": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", @@ -528,7 +528,7 @@ "LOCK": "PhpMyAdmin\\SqlParser\\Statements\\LockStatement", "UNLOCK": "PhpMyAdmin\\SqlParser\\Statements\\LockStatement" }, - "KEYWORD_PARSERS": { + "keywordParsers": { "PARTITION BY": [], "SUBPARTITION BY": [], "_OPTIONS": { @@ -537,7 +537,7 @@ }, "_END_OPTIONS": { "class": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", - "field": "end_options" + "field": "endOptions" }, "INTERSECT": { "class": "PhpMyAdmin\\SqlParser\\Components\\UnionKeyword", @@ -785,7 +785,7 @@ "statements": [ { "@type": "PhpMyAdmin\\SqlParser\\Statements\\SelectStatement", - "OPTIONS": { + "statementOptions": { "ALL": 1, "DISTINCT": 1, "DISTINCTROW": 1, @@ -802,11 +802,11 @@ "SQL_NO_CACHE": 8, "SQL_CALC_FOUND_ROWS": 9 }, - "END_OPTIONS": { + "statementEndOptions": { "FOR UPDATE": 1, "LOCK IN SHARE MODE": 1 }, - "CLAUSES": { + "clauses": { "SELECT": [ "SELECT", 2 @@ -935,7 +935,7 @@ "expr": [ { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -961,7 +961,7 @@ "@type": "PhpMyAdmin\\SqlParser\\Components\\CaseExpression", "value": { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -985,8 +985,8 @@ }, "conditions": [], "results": [], - "compare_values": [], - "else_result": null, + "compareValues": [], + "elseResult": null, "alias": null, "expr": "" } @@ -994,7 +994,7 @@ "from": [ { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -1017,7 +1017,7 @@ "subquery": null } ], - "index_hints": null, + "indexHints": null, "partition": null, "where": null, "group": null, @@ -1028,7 +1028,7 @@ "into": null, "join": null, "union": [], - "end_options": null, + "endOptions": null, "options": { "@type": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", "options": [] diff --git a/tests/data/parser/parseSelectCaseErr5.out b/tests/data/parser/parseSelectCaseErr5.out index 5aaf35763..2a88e6561 100644 --- a/tests/data/parser/parseSelectCaseErr5.out +++ b/tests/data/parser/parseSelectCaseErr5.out @@ -2,7 +2,7 @@ "query": "select (SELECT name FROM mysql.help_category WHERE help_category_id = 1) as name,\ncase 1 when 1 then \"Some\" when 2 when \"Other\" end FROM a;", "lexer": { "@type": "PhpMyAdmin\\SqlParser\\Lexer", - "PARSER_METHODS": [ + "parserMethods": [ "parseDelimiter", "parseWhitespace", "parseNumber", @@ -511,7 +511,7 @@ "count": 54, "idx": 54 }, - "DEFAULT_DELIMITER": ";", + "defaultDelimiter": ";", "delimiter": ";", "delimiterLen": 1, "strict": false, @@ -519,7 +519,7 @@ }, "parser": { "@type": "PhpMyAdmin\\SqlParser\\Parser", - "STATEMENT_PARSERS": { + "statementParsers": { "DESCRIBE": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", "DESC": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", "EXPLAIN": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", @@ -564,7 +564,7 @@ "LOCK": "PhpMyAdmin\\SqlParser\\Statements\\LockStatement", "UNLOCK": "PhpMyAdmin\\SqlParser\\Statements\\LockStatement" }, - "KEYWORD_PARSERS": { + "keywordParsers": { "PARTITION BY": [], "SUBPARTITION BY": [], "_OPTIONS": { @@ -573,7 +573,7 @@ }, "_END_OPTIONS": { "class": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", - "field": "end_options" + "field": "endOptions" }, "INTERSECT": { "class": "PhpMyAdmin\\SqlParser\\Components\\UnionKeyword", @@ -821,7 +821,7 @@ "statements": [ { "@type": "PhpMyAdmin\\SqlParser\\Statements\\SelectStatement", - "OPTIONS": { + "statementOptions": { "ALL": 1, "DISTINCT": 1, "DISTINCTROW": 1, @@ -838,11 +838,11 @@ "SQL_NO_CACHE": 8, "SQL_CALC_FOUND_ROWS": 9 }, - "END_OPTIONS": { + "statementEndOptions": { "FOR UPDATE": 1, "LOCK IN SHARE MODE": 1 }, - "CLAUSES": { + "clauses": { "SELECT": [ "SELECT", 2 @@ -971,7 +971,7 @@ "expr": [ { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -997,7 +997,7 @@ "@type": "PhpMyAdmin\\SqlParser\\Components\\CaseExpression", "value": { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -1023,7 +1023,7 @@ "results": [ { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -1046,10 +1046,10 @@ "subquery": null } ], - "compare_values": [ + "compareValues": [ { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -1073,7 +1073,7 @@ }, { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -1096,7 +1096,7 @@ "subquery": null } ], - "else_result": null, + "elseResult": null, "alias": null, "expr": "" } @@ -1104,7 +1104,7 @@ "from": [ { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -1127,7 +1127,7 @@ "subquery": null } ], - "index_hints": null, + "indexHints": null, "partition": null, "where": null, "group": null, @@ -1138,7 +1138,7 @@ "into": null, "join": null, "union": [], - "end_options": null, + "endOptions": null, "options": { "@type": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", "options": [] diff --git a/tests/data/parser/parseSelectEndOptions1.out b/tests/data/parser/parseSelectEndOptions1.out index df18faab8..cee9828a2 100644 --- a/tests/data/parser/parseSelectEndOptions1.out +++ b/tests/data/parser/parseSelectEndOptions1.out @@ -2,7 +2,7 @@ "query": "SELECT pid, name2 FROM tablename WHERE pid = 20 \/* FOR UPDATE end_option *\/ FOR UPDATE", "lexer": { "@type": "PhpMyAdmin\\SqlParser\\Lexer", - "PARSER_METHODS": [ + "parserMethods": [ "parseDelimiter", "parseWhitespace", "parseNumber", @@ -232,7 +232,7 @@ "count": 23, "idx": 23 }, - "DEFAULT_DELIMITER": ";", + "defaultDelimiter": ";", "delimiter": ";", "delimiterLen": 1, "strict": false, @@ -240,7 +240,7 @@ }, "parser": { "@type": "PhpMyAdmin\\SqlParser\\Parser", - "STATEMENT_PARSERS": { + "statementParsers": { "DESCRIBE": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", "DESC": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", "EXPLAIN": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", @@ -285,7 +285,7 @@ "LOCK": "PhpMyAdmin\\SqlParser\\Statements\\LockStatement", "UNLOCK": "PhpMyAdmin\\SqlParser\\Statements\\LockStatement" }, - "KEYWORD_PARSERS": { + "keywordParsers": { "PARTITION BY": [], "SUBPARTITION BY": [], "_OPTIONS": { @@ -294,7 +294,7 @@ }, "_END_OPTIONS": { "class": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", - "field": "end_options" + "field": "endOptions" }, "INTERSECT": { "class": "PhpMyAdmin\\SqlParser\\Components\\UnionKeyword", @@ -542,7 +542,7 @@ "statements": [ { "@type": "PhpMyAdmin\\SqlParser\\Statements\\SelectStatement", - "OPTIONS": { + "statementOptions": { "ALL": 1, "DISTINCT": 1, "DISTINCTROW": 1, @@ -559,11 +559,11 @@ "SQL_NO_CACHE": 8, "SQL_CALC_FOUND_ROWS": 9 }, - "END_OPTIONS": { + "statementEndOptions": { "FOR UPDATE": 1, "LOCK IN SHARE MODE": 1 }, - "CLAUSES": { + "clauses": { "SELECT": [ "SELECT", 2 @@ -692,7 +692,7 @@ "expr": [ { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -716,7 +716,7 @@ }, { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -742,7 +742,7 @@ "from": [ { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -765,19 +765,19 @@ "subquery": null } ], - "index_hints": null, + "indexHints": null, "partition": null, "where": [ { "@type": "PhpMyAdmin\\SqlParser\\Components\\Condition", - "DELIMITERS": [ + "delimiters": [ "&&", "||", "AND", "OR", "XOR" ], - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "ALL": 1, "AND": 1, "BETWEEN": 1, @@ -813,7 +813,7 @@ "into": null, "join": null, "union": [], - "end_options": { + "endOptions": { "@type": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", "options": { "1": "FOR UPDATE" diff --git a/tests/data/parser/parseSelectEndOptions2.out b/tests/data/parser/parseSelectEndOptions2.out index bef278b9a..5cb37aad3 100644 --- a/tests/data/parser/parseSelectEndOptions2.out +++ b/tests/data/parser/parseSelectEndOptions2.out @@ -2,7 +2,7 @@ "query": "SELECT pid, name2 FROM tablename WHERE pid = 20\n\/* LOCK IN SHARE MODE end_option *\/ LOCK IN SHARE MODE", "lexer": { "@type": "PhpMyAdmin\\SqlParser\\Lexer", - "PARSER_METHODS": [ + "parserMethods": [ "parseDelimiter", "parseWhitespace", "parseNumber", @@ -232,7 +232,7 @@ "count": 23, "idx": 23 }, - "DEFAULT_DELIMITER": ";", + "defaultDelimiter": ";", "delimiter": ";", "delimiterLen": 1, "strict": false, @@ -240,7 +240,7 @@ }, "parser": { "@type": "PhpMyAdmin\\SqlParser\\Parser", - "STATEMENT_PARSERS": { + "statementParsers": { "DESCRIBE": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", "DESC": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", "EXPLAIN": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", @@ -285,7 +285,7 @@ "LOCK": "PhpMyAdmin\\SqlParser\\Statements\\LockStatement", "UNLOCK": "PhpMyAdmin\\SqlParser\\Statements\\LockStatement" }, - "KEYWORD_PARSERS": { + "keywordParsers": { "PARTITION BY": [], "SUBPARTITION BY": [], "_OPTIONS": { @@ -294,7 +294,7 @@ }, "_END_OPTIONS": { "class": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", - "field": "end_options" + "field": "endOptions" }, "INTERSECT": { "class": "PhpMyAdmin\\SqlParser\\Components\\UnionKeyword", @@ -542,7 +542,7 @@ "statements": [ { "@type": "PhpMyAdmin\\SqlParser\\Statements\\SelectStatement", - "OPTIONS": { + "statementOptions": { "ALL": 1, "DISTINCT": 1, "DISTINCTROW": 1, @@ -559,11 +559,11 @@ "SQL_NO_CACHE": 8, "SQL_CALC_FOUND_ROWS": 9 }, - "END_OPTIONS": { + "statementEndOptions": { "FOR UPDATE": 1, "LOCK IN SHARE MODE": 1 }, - "CLAUSES": { + "clauses": { "SELECT": [ "SELECT", 2 @@ -692,7 +692,7 @@ "expr": [ { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -716,7 +716,7 @@ }, { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -742,7 +742,7 @@ "from": [ { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -765,19 +765,19 @@ "subquery": null } ], - "index_hints": null, + "indexHints": null, "partition": null, "where": [ { "@type": "PhpMyAdmin\\SqlParser\\Components\\Condition", - "DELIMITERS": [ + "delimiters": [ "&&", "||", "AND", "OR", "XOR" ], - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "ALL": 1, "AND": 1, "BETWEEN": 1, @@ -813,7 +813,7 @@ "into": null, "join": null, "union": [], - "end_options": { + "endOptions": { "@type": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", "options": { "1": "LOCK IN SHARE MODE" diff --git a/tests/data/parser/parseSelectEndOptionsErr.out b/tests/data/parser/parseSelectEndOptionsErr.out index 1978394a2..0e13aea43 100644 --- a/tests/data/parser/parseSelectEndOptionsErr.out +++ b/tests/data/parser/parseSelectEndOptionsErr.out @@ -2,7 +2,7 @@ "query": "SELECT pid, name2 FROM tablename WHERE pid = 20\n\/* USE both end_option, gives error *\/\nFOR UPDATE LOCK IN SHARE MODE", "lexer": { "@type": "PhpMyAdmin\\SqlParser\\Lexer", - "PARSER_METHODS": [ + "parserMethods": [ "parseDelimiter", "parseWhitespace", "parseNumber", @@ -250,7 +250,7 @@ "count": 25, "idx": 25 }, - "DEFAULT_DELIMITER": ";", + "defaultDelimiter": ";", "delimiter": ";", "delimiterLen": 1, "strict": false, @@ -258,7 +258,7 @@ }, "parser": { "@type": "PhpMyAdmin\\SqlParser\\Parser", - "STATEMENT_PARSERS": { + "statementParsers": { "DESCRIBE": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", "DESC": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", "EXPLAIN": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", @@ -303,7 +303,7 @@ "LOCK": "PhpMyAdmin\\SqlParser\\Statements\\LockStatement", "UNLOCK": "PhpMyAdmin\\SqlParser\\Statements\\LockStatement" }, - "KEYWORD_PARSERS": { + "keywordParsers": { "PARTITION BY": [], "SUBPARTITION BY": [], "_OPTIONS": { @@ -312,7 +312,7 @@ }, "_END_OPTIONS": { "class": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", - "field": "end_options" + "field": "endOptions" }, "INTERSECT": { "class": "PhpMyAdmin\\SqlParser\\Components\\UnionKeyword", @@ -560,7 +560,7 @@ "statements": [ { "@type": "PhpMyAdmin\\SqlParser\\Statements\\SelectStatement", - "OPTIONS": { + "statementOptions": { "ALL": 1, "DISTINCT": 1, "DISTINCTROW": 1, @@ -577,11 +577,11 @@ "SQL_NO_CACHE": 8, "SQL_CALC_FOUND_ROWS": 9 }, - "END_OPTIONS": { + "statementEndOptions": { "FOR UPDATE": 1, "LOCK IN SHARE MODE": 1 }, - "CLAUSES": { + "clauses": { "SELECT": [ "SELECT", 2 @@ -710,7 +710,7 @@ "expr": [ { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -734,7 +734,7 @@ }, { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -760,7 +760,7 @@ "from": [ { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -783,19 +783,19 @@ "subquery": null } ], - "index_hints": null, + "indexHints": null, "partition": null, "where": [ { "@type": "PhpMyAdmin\\SqlParser\\Components\\Condition", - "DELIMITERS": [ + "delimiters": [ "&&", "||", "AND", "OR", "XOR" ], - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "ALL": 1, "AND": 1, "BETWEEN": 1, @@ -831,7 +831,7 @@ "into": null, "join": null, "union": [], - "end_options": { + "endOptions": { "@type": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", "options": { "1": "FOR UPDATE", diff --git a/tests/data/parser/parseSelectErr1.out b/tests/data/parser/parseSelectErr1.out index 94b8fb8aa..ca12cfd9b 100644 --- a/tests/data/parser/parseSelectErr1.out +++ b/tests/data/parser/parseSelectErr1.out @@ -2,7 +2,7 @@ "query": "SELECT ALL DISTINCT MAX_STATEMENT_TIME = 10\n 1 + 2 AS result,\n @idx,\n id,\n test.`users`.username AS\nFROM\n `test`.users\n PARTITION (p1, p2)\nWHERE\n id > 0\nORDER BY\n username DESC,\n id\nLIMIT 2, 3;", "lexer": { "@type": "PhpMyAdmin\\SqlParser\\Lexer", - "PARSER_METHODS": [ + "parserMethods": [ "parseDelimiter", "parseWhitespace", "parseNumber", @@ -718,7 +718,7 @@ "count": 77, "idx": 77 }, - "DEFAULT_DELIMITER": ";", + "defaultDelimiter": ";", "delimiter": ";", "delimiterLen": 1, "strict": false, @@ -726,7 +726,7 @@ }, "parser": { "@type": "PhpMyAdmin\\SqlParser\\Parser", - "STATEMENT_PARSERS": { + "statementParsers": { "DESCRIBE": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", "DESC": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", "EXPLAIN": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", @@ -771,7 +771,7 @@ "LOCK": "PhpMyAdmin\\SqlParser\\Statements\\LockStatement", "UNLOCK": "PhpMyAdmin\\SqlParser\\Statements\\LockStatement" }, - "KEYWORD_PARSERS": { + "keywordParsers": { "PARTITION BY": [], "SUBPARTITION BY": [], "_OPTIONS": { @@ -780,7 +780,7 @@ }, "_END_OPTIONS": { "class": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", - "field": "end_options" + "field": "endOptions" }, "INTERSECT": { "class": "PhpMyAdmin\\SqlParser\\Components\\UnionKeyword", @@ -1028,7 +1028,7 @@ "statements": [ { "@type": "PhpMyAdmin\\SqlParser\\Statements\\SelectStatement", - "OPTIONS": { + "statementOptions": { "ALL": 1, "DISTINCT": 1, "DISTINCTROW": 1, @@ -1045,11 +1045,11 @@ "SQL_NO_CACHE": 8, "SQL_CALC_FOUND_ROWS": 9 }, - "END_OPTIONS": { + "statementEndOptions": { "FOR UPDATE": 1, "LOCK IN SHARE MODE": 1 }, - "CLAUSES": { + "clauses": { "SELECT": [ "SELECT", 2 @@ -1178,7 +1178,7 @@ "expr": [ { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -1202,7 +1202,7 @@ }, { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -1226,7 +1226,7 @@ }, { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -1250,7 +1250,7 @@ }, { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -1276,7 +1276,7 @@ "from": [ { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -1299,7 +1299,7 @@ "subquery": null } ], - "index_hints": null, + "indexHints": null, "partition": { "@type": "PhpMyAdmin\\SqlParser\\Components\\ArrayObj", "raw": [ @@ -1314,14 +1314,14 @@ "where": [ { "@type": "PhpMyAdmin\\SqlParser\\Components\\Condition", - "DELIMITERS": [ + "delimiters": [ "&&", "||", "AND", "OR", "XOR" ], - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "ALL": 1, "AND": 1, "BETWEEN": 1, @@ -1356,7 +1356,7 @@ "@type": "PhpMyAdmin\\SqlParser\\Components\\OrderKeyword", "expr": { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -1384,7 +1384,7 @@ "@type": "PhpMyAdmin\\SqlParser\\Components\\OrderKeyword", "expr": { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -1418,7 +1418,7 @@ "into": null, "join": null, "union": [], - "end_options": null, + "endOptions": null, "options": { "@type": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", "options": { diff --git a/tests/data/parser/parseSelectErr2.out b/tests/data/parser/parseSelectErr2.out index 3c815a5f4..9cb427d79 100644 --- a/tests/data/parser/parseSelectErr2.out +++ b/tests/data/parser/parseSelectErr2.out @@ -2,7 +2,7 @@ "query": "select * from foobar where foo = @\n", "lexer": { "@type": "PhpMyAdmin\\SqlParser\\Lexer", - "PARSER_METHODS": [ + "parserMethods": [ "parseDelimiter", "parseWhitespace", "parseNumber", @@ -169,7 +169,7 @@ "count": 16, "idx": 16 }, - "DEFAULT_DELIMITER": ";", + "defaultDelimiter": ";", "delimiter": ";", "delimiterLen": 1, "strict": false, @@ -177,7 +177,7 @@ }, "parser": { "@type": "PhpMyAdmin\\SqlParser\\Parser", - "STATEMENT_PARSERS": { + "statementParsers": { "DESCRIBE": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", "DESC": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", "EXPLAIN": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", @@ -222,7 +222,7 @@ "LOCK": "PhpMyAdmin\\SqlParser\\Statements\\LockStatement", "UNLOCK": "PhpMyAdmin\\SqlParser\\Statements\\LockStatement" }, - "KEYWORD_PARSERS": { + "keywordParsers": { "PARTITION BY": [], "SUBPARTITION BY": [], "_OPTIONS": { @@ -231,7 +231,7 @@ }, "_END_OPTIONS": { "class": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", - "field": "end_options" + "field": "endOptions" }, "INTERSECT": { "class": "PhpMyAdmin\\SqlParser\\Components\\UnionKeyword", @@ -479,7 +479,7 @@ "statements": [ { "@type": "PhpMyAdmin\\SqlParser\\Statements\\SelectStatement", - "OPTIONS": { + "statementOptions": { "ALL": 1, "DISTINCT": 1, "DISTINCTROW": 1, @@ -496,11 +496,11 @@ "SQL_NO_CACHE": 8, "SQL_CALC_FOUND_ROWS": 9 }, - "END_OPTIONS": { + "statementEndOptions": { "FOR UPDATE": 1, "LOCK IN SHARE MODE": 1 }, - "CLAUSES": { + "clauses": { "SELECT": [ "SELECT", 2 @@ -629,7 +629,7 @@ "expr": [ { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -655,7 +655,7 @@ "from": [ { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -678,19 +678,19 @@ "subquery": null } ], - "index_hints": null, + "indexHints": null, "partition": null, "where": [ { "@type": "PhpMyAdmin\\SqlParser\\Components\\Condition", - "DELIMITERS": [ + "delimiters": [ "&&", "||", "AND", "OR", "XOR" ], - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "ALL": 1, "AND": 1, "BETWEEN": 1, @@ -727,7 +727,7 @@ "into": null, "join": null, "union": [], - "end_options": null, + "endOptions": null, "options": { "@type": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", "options": [] diff --git a/tests/data/parser/parseSelectExists.out b/tests/data/parser/parseSelectExists.out index cc1bebed3..c9ee7e710 100644 --- a/tests/data/parser/parseSelectExists.out +++ b/tests/data/parser/parseSelectExists.out @@ -2,7 +2,7 @@ "query": "SELECT EXISTS(SELECT 1)\n", "lexer": { "@type": "PhpMyAdmin\\SqlParser\\Lexer", - "PARSER_METHODS": [ + "parserMethods": [ "parseDelimiter", "parseWhitespace", "parseNumber", @@ -115,7 +115,7 @@ "count": 10, "idx": 10 }, - "DEFAULT_DELIMITER": ";", + "defaultDelimiter": ";", "delimiter": ";", "delimiterLen": 1, "strict": false, @@ -123,7 +123,7 @@ }, "parser": { "@type": "PhpMyAdmin\\SqlParser\\Parser", - "STATEMENT_PARSERS": { + "statementParsers": { "DESCRIBE": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", "DESC": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", "EXPLAIN": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", @@ -168,7 +168,7 @@ "LOCK": "PhpMyAdmin\\SqlParser\\Statements\\LockStatement", "UNLOCK": "PhpMyAdmin\\SqlParser\\Statements\\LockStatement" }, - "KEYWORD_PARSERS": { + "keywordParsers": { "PARTITION BY": [], "SUBPARTITION BY": [], "_OPTIONS": { @@ -177,7 +177,7 @@ }, "_END_OPTIONS": { "class": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", - "field": "end_options" + "field": "endOptions" }, "INTERSECT": { "class": "PhpMyAdmin\\SqlParser\\Components\\UnionKeyword", @@ -425,7 +425,7 @@ "statements": [ { "@type": "PhpMyAdmin\\SqlParser\\Statements\\SelectStatement", - "OPTIONS": { + "statementOptions": { "ALL": 1, "DISTINCT": 1, "DISTINCTROW": 1, @@ -442,11 +442,11 @@ "SQL_NO_CACHE": 8, "SQL_CALC_FOUND_ROWS": 9 }, - "END_OPTIONS": { + "statementEndOptions": { "FOR UPDATE": 1, "LOCK IN SHARE MODE": 1 }, - "CLAUSES": { + "clauses": { "SELECT": [ "SELECT", 2 @@ -575,7 +575,7 @@ "expr": [ { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -599,7 +599,7 @@ } ], "from": [], - "index_hints": null, + "indexHints": null, "partition": null, "where": null, "group": null, @@ -610,7 +610,7 @@ "into": null, "join": null, "union": [], - "end_options": null, + "endOptions": null, "options": { "@type": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", "options": [] diff --git a/tests/data/parser/parseSelectIndexHint1.out b/tests/data/parser/parseSelectIndexHint1.out index 124038574..e7c1ef51e 100644 --- a/tests/data/parser/parseSelectIndexHint1.out +++ b/tests/data/parser/parseSelectIndexHint1.out @@ -2,7 +2,7 @@ "query": "SELECT * FROM address FORCE INDEX (idx_fk_city_id) IGNORE KEY FOR GROUP BY (a, b,c) WHERE city_id<0;", "lexer": { "@type": "PhpMyAdmin\\SqlParser\\Lexer", - "PARSER_METHODS": [ + "parserMethods": [ "parseDelimiter", "parseWhitespace", "parseNumber", @@ -385,7 +385,7 @@ "count": 40, "idx": 40 }, - "DEFAULT_DELIMITER": ";", + "defaultDelimiter": ";", "delimiter": ";", "delimiterLen": 1, "strict": false, @@ -393,7 +393,7 @@ }, "parser": { "@type": "PhpMyAdmin\\SqlParser\\Parser", - "STATEMENT_PARSERS": { + "statementParsers": { "DESCRIBE": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", "DESC": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", "EXPLAIN": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", @@ -438,7 +438,7 @@ "LOCK": "PhpMyAdmin\\SqlParser\\Statements\\LockStatement", "UNLOCK": "PhpMyAdmin\\SqlParser\\Statements\\LockStatement" }, - "KEYWORD_PARSERS": { + "keywordParsers": { "PARTITION BY": [], "SUBPARTITION BY": [], "_OPTIONS": { @@ -447,7 +447,7 @@ }, "_END_OPTIONS": { "class": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", - "field": "end_options" + "field": "endOptions" }, "INTERSECT": { "class": "PhpMyAdmin\\SqlParser\\Components\\UnionKeyword", @@ -695,7 +695,7 @@ "statements": [ { "@type": "PhpMyAdmin\\SqlParser\\Statements\\SelectStatement", - "OPTIONS": { + "statementOptions": { "ALL": 1, "DISTINCT": 1, "DISTINCTROW": 1, @@ -712,11 +712,11 @@ "SQL_NO_CACHE": 8, "SQL_CALC_FOUND_ROWS": 9 }, - "END_OPTIONS": { + "statementEndOptions": { "FOR UPDATE": 1, "LOCK IN SHARE MODE": 1 }, - "CLAUSES": { + "clauses": { "SELECT": [ "SELECT", 2 @@ -845,7 +845,7 @@ "expr": [ { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -871,7 +871,7 @@ "from": [ { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -894,6 +894,61 @@ "subquery": null } ], + "indexHints": null, + "partition": null, + "where": [ + { + "@type": "PhpMyAdmin\\SqlParser\\Components\\Condition", + "delimiters": [ + "&&", + "||", + "AND", + "OR", + "XOR" + ], + "allowedKeywords": { + "ALL": 1, + "AND": 1, + "BETWEEN": 1, + "EXISTS": 1, + "IF": 1, + "IN": 1, + "INTERVAL": 1, + "IS": 1, + "LIKE": 1, + "MATCH": 1, + "NOT IN": 1, + "NOT NULL": 1, + "NOT": 1, + "NULL": 1, + "OR": 1, + "REGEXP": 1, + "RLIKE": 1, + "SOUNDS": 1, + "XOR": 1 + }, + "identifiers": [ + "city_id" + ], + "isOperator": false, + "expr": "city_id<0" + } + ], + "group": null, + "having": null, + "order": null, + "limit": null, + "procedure": null, + "into": null, + "join": null, + "union": [], + "endOptions": null, + "options": { + "@type": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", + "options": [] + }, + "first": 0, + "last": 37, "index_hints": [ { "@type": "PhpMyAdmin\\SqlParser\\Components\\IndexHint", @@ -903,7 +958,7 @@ "indexes": [ { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -935,7 +990,7 @@ "indexes": [ { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -959,61 +1014,7 @@ } ] } - ], - "partition": null, - "where": [ - { - "@type": "PhpMyAdmin\\SqlParser\\Components\\Condition", - "DELIMITERS": [ - "&&", - "||", - "AND", - "OR", - "XOR" - ], - "ALLOWED_KEYWORDS": { - "ALL": 1, - "AND": 1, - "BETWEEN": 1, - "EXISTS": 1, - "IF": 1, - "IN": 1, - "INTERVAL": 1, - "IS": 1, - "LIKE": 1, - "MATCH": 1, - "NOT IN": 1, - "NOT NULL": 1, - "NOT": 1, - "NULL": 1, - "OR": 1, - "REGEXP": 1, - "RLIKE": 1, - "SOUNDS": 1, - "XOR": 1 - }, - "identifiers": [ - "city_id" - ], - "isOperator": false, - "expr": "city_id<0" - } - ], - "group": null, - "having": null, - "order": null, - "limit": null, - "procedure": null, - "into": null, - "join": null, - "union": [], - "end_options": null, - "options": { - "@type": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", - "options": [] - }, - "first": 0, - "last": 37 + ] } ], "brackets": 0, diff --git a/tests/data/parser/parseSelectIndexHint2.out b/tests/data/parser/parseSelectIndexHint2.out index 7f115fb88..258ab7da4 100644 --- a/tests/data/parser/parseSelectIndexHint2.out +++ b/tests/data/parser/parseSelectIndexHint2.out @@ -2,7 +2,7 @@ "query": "SELECT * FROM address USE INDEX (idx_fk_city_id) FORCE KEY FOR GROUP BY (a, b,c) WHERE city_id<0", "lexer": { "@type": "PhpMyAdmin\\SqlParser\\Lexer", - "PARSER_METHODS": [ + "parserMethods": [ "parseDelimiter", "parseWhitespace", "parseNumber", @@ -376,7 +376,7 @@ "count": 39, "idx": 39 }, - "DEFAULT_DELIMITER": ";", + "defaultDelimiter": ";", "delimiter": ";", "delimiterLen": 1, "strict": false, @@ -384,7 +384,7 @@ }, "parser": { "@type": "PhpMyAdmin\\SqlParser\\Parser", - "STATEMENT_PARSERS": { + "statementParsers": { "DESCRIBE": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", "DESC": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", "EXPLAIN": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", @@ -429,7 +429,7 @@ "LOCK": "PhpMyAdmin\\SqlParser\\Statements\\LockStatement", "UNLOCK": "PhpMyAdmin\\SqlParser\\Statements\\LockStatement" }, - "KEYWORD_PARSERS": { + "keywordParsers": { "PARTITION BY": [], "SUBPARTITION BY": [], "_OPTIONS": { @@ -438,7 +438,7 @@ }, "_END_OPTIONS": { "class": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", - "field": "end_options" + "field": "endOptions" }, "INTERSECT": { "class": "PhpMyAdmin\\SqlParser\\Components\\UnionKeyword", @@ -686,7 +686,7 @@ "statements": [ { "@type": "PhpMyAdmin\\SqlParser\\Statements\\SelectStatement", - "OPTIONS": { + "statementOptions": { "ALL": 1, "DISTINCT": 1, "DISTINCTROW": 1, @@ -703,11 +703,11 @@ "SQL_NO_CACHE": 8, "SQL_CALC_FOUND_ROWS": 9 }, - "END_OPTIONS": { + "statementEndOptions": { "FOR UPDATE": 1, "LOCK IN SHARE MODE": 1 }, - "CLAUSES": { + "clauses": { "SELECT": [ "SELECT", 2 @@ -836,7 +836,7 @@ "expr": [ { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -862,7 +862,7 @@ "from": [ { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -885,6 +885,61 @@ "subquery": null } ], + "indexHints": null, + "partition": null, + "where": [ + { + "@type": "PhpMyAdmin\\SqlParser\\Components\\Condition", + "delimiters": [ + "&&", + "||", + "AND", + "OR", + "XOR" + ], + "allowedKeywords": { + "ALL": 1, + "AND": 1, + "BETWEEN": 1, + "EXISTS": 1, + "IF": 1, + "IN": 1, + "INTERVAL": 1, + "IS": 1, + "LIKE": 1, + "MATCH": 1, + "NOT IN": 1, + "NOT NULL": 1, + "NOT": 1, + "NULL": 1, + "OR": 1, + "REGEXP": 1, + "RLIKE": 1, + "SOUNDS": 1, + "XOR": 1 + }, + "identifiers": [ + "city_id" + ], + "isOperator": false, + "expr": "city_id<0" + } + ], + "group": null, + "having": null, + "order": null, + "limit": null, + "procedure": null, + "into": null, + "join": null, + "union": [], + "endOptions": null, + "options": { + "@type": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", + "options": [] + }, + "first": 0, + "last": 37, "index_hints": [ { "@type": "PhpMyAdmin\\SqlParser\\Components\\IndexHint", @@ -894,7 +949,7 @@ "indexes": [ { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -926,7 +981,7 @@ "indexes": [ { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -950,61 +1005,7 @@ } ] } - ], - "partition": null, - "where": [ - { - "@type": "PhpMyAdmin\\SqlParser\\Components\\Condition", - "DELIMITERS": [ - "&&", - "||", - "AND", - "OR", - "XOR" - ], - "ALLOWED_KEYWORDS": { - "ALL": 1, - "AND": 1, - "BETWEEN": 1, - "EXISTS": 1, - "IF": 1, - "IN": 1, - "INTERVAL": 1, - "IS": 1, - "LIKE": 1, - "MATCH": 1, - "NOT IN": 1, - "NOT NULL": 1, - "NOT": 1, - "NULL": 1, - "OR": 1, - "REGEXP": 1, - "RLIKE": 1, - "SOUNDS": 1, - "XOR": 1 - }, - "identifiers": [ - "city_id" - ], - "isOperator": false, - "expr": "city_id<0" - } - ], - "group": null, - "having": null, - "order": null, - "limit": null, - "procedure": null, - "into": null, - "join": null, - "union": [], - "end_options": null, - "options": { - "@type": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", - "options": [] - }, - "first": 0, - "last": 37 + ] } ], "brackets": 0, diff --git a/tests/data/parser/parseSelectIndexHintErr1.out b/tests/data/parser/parseSelectIndexHintErr1.out index 0c6b93fe1..c652f8b99 100644 --- a/tests/data/parser/parseSelectIndexHintErr1.out +++ b/tests/data/parser/parseSelectIndexHintErr1.out @@ -2,7 +2,7 @@ "query": "SELECT * FROM address FORCE INT (idx_fk_city_id);", "lexer": { "@type": "PhpMyAdmin\\SqlParser\\Lexer", - "PARSER_METHODS": [ + "parserMethods": [ "parseDelimiter", "parseWhitespace", "parseNumber", @@ -178,7 +178,7 @@ "count": 17, "idx": 17 }, - "DEFAULT_DELIMITER": ";", + "defaultDelimiter": ";", "delimiter": ";", "delimiterLen": 1, "strict": false, @@ -186,7 +186,7 @@ }, "parser": { "@type": "PhpMyAdmin\\SqlParser\\Parser", - "STATEMENT_PARSERS": { + "statementParsers": { "DESCRIBE": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", "DESC": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", "EXPLAIN": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", @@ -231,7 +231,7 @@ "LOCK": "PhpMyAdmin\\SqlParser\\Statements\\LockStatement", "UNLOCK": "PhpMyAdmin\\SqlParser\\Statements\\LockStatement" }, - "KEYWORD_PARSERS": { + "keywordParsers": { "PARTITION BY": [], "SUBPARTITION BY": [], "_OPTIONS": { @@ -240,7 +240,7 @@ }, "_END_OPTIONS": { "class": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", - "field": "end_options" + "field": "endOptions" }, "INTERSECT": { "class": "PhpMyAdmin\\SqlParser\\Components\\UnionKeyword", @@ -488,7 +488,7 @@ "statements": [ { "@type": "PhpMyAdmin\\SqlParser\\Statements\\SelectStatement", - "OPTIONS": { + "statementOptions": { "ALL": 1, "DISTINCT": 1, "DISTINCTROW": 1, @@ -505,11 +505,11 @@ "SQL_NO_CACHE": 8, "SQL_CALC_FOUND_ROWS": 9 }, - "END_OPTIONS": { + "statementEndOptions": { "FOR UPDATE": 1, "LOCK IN SHARE MODE": 1 }, - "CLAUSES": { + "clauses": { "SELECT": [ "SELECT", 2 @@ -638,7 +638,7 @@ "expr": [ { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -664,7 +664,7 @@ "from": [ { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -687,6 +687,24 @@ "subquery": null } ], + "indexHints": null, + "partition": null, + "where": null, + "group": null, + "having": null, + "order": null, + "limit": null, + "procedure": null, + "into": null, + "join": null, + "union": [], + "endOptions": null, + "options": { + "@type": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", + "options": [] + }, + "first": 0, + "last": 14, "index_hints": [ { "@type": "PhpMyAdmin\\SqlParser\\Components\\IndexHint", @@ -696,7 +714,7 @@ "indexes": [ { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -720,24 +738,7 @@ } ] } - ], - "partition": null, - "where": null, - "group": null, - "having": null, - "order": null, - "limit": null, - "procedure": null, - "into": null, - "join": null, - "union": [], - "end_options": null, - "options": { - "@type": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", - "options": [] - }, - "first": 0, - "last": 14 + ] } ], "brackets": 0, diff --git a/tests/data/parser/parseSelectIndexHintErr2.out b/tests/data/parser/parseSelectIndexHintErr2.out index 029130f6e..4ac9125b6 100644 --- a/tests/data/parser/parseSelectIndexHintErr2.out +++ b/tests/data/parser/parseSelectIndexHintErr2.out @@ -2,7 +2,7 @@ "query": "SELECT * FROM address FORCE abc (idx_fk_city_id);", "lexer": { "@type": "PhpMyAdmin\\SqlParser\\Lexer", - "PARSER_METHODS": [ + "parserMethods": [ "parseDelimiter", "parseWhitespace", "parseNumber", @@ -178,7 +178,7 @@ "count": 17, "idx": 17 }, - "DEFAULT_DELIMITER": ";", + "defaultDelimiter": ";", "delimiter": ";", "delimiterLen": 1, "strict": false, @@ -186,7 +186,7 @@ }, "parser": { "@type": "PhpMyAdmin\\SqlParser\\Parser", - "STATEMENT_PARSERS": { + "statementParsers": { "DESCRIBE": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", "DESC": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", "EXPLAIN": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", @@ -231,7 +231,7 @@ "LOCK": "PhpMyAdmin\\SqlParser\\Statements\\LockStatement", "UNLOCK": "PhpMyAdmin\\SqlParser\\Statements\\LockStatement" }, - "KEYWORD_PARSERS": { + "keywordParsers": { "PARTITION BY": [], "SUBPARTITION BY": [], "_OPTIONS": { @@ -240,7 +240,7 @@ }, "_END_OPTIONS": { "class": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", - "field": "end_options" + "field": "endOptions" }, "INTERSECT": { "class": "PhpMyAdmin\\SqlParser\\Components\\UnionKeyword", @@ -488,7 +488,7 @@ "statements": [ { "@type": "PhpMyAdmin\\SqlParser\\Statements\\SelectStatement", - "OPTIONS": { + "statementOptions": { "ALL": 1, "DISTINCT": 1, "DISTINCTROW": 1, @@ -505,11 +505,11 @@ "SQL_NO_CACHE": 8, "SQL_CALC_FOUND_ROWS": 9 }, - "END_OPTIONS": { + "statementEndOptions": { "FOR UPDATE": 1, "LOCK IN SHARE MODE": 1 }, - "CLAUSES": { + "clauses": { "SELECT": [ "SELECT", 2 @@ -638,7 +638,7 @@ "expr": [ { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -664,7 +664,7 @@ "from": [ { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -687,7 +687,7 @@ "subquery": null } ], - "index_hints": [], + "indexHints": null, "partition": null, "where": null, "group": null, @@ -698,13 +698,14 @@ "into": null, "join": null, "union": [], - "end_options": null, + "endOptions": null, "options": { "@type": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", "options": [] }, "first": 0, - "last": 14 + "last": 14, + "index_hints": [] } ], "brackets": 0, diff --git a/tests/data/parser/parseSelectIndexHintErr3.out b/tests/data/parser/parseSelectIndexHintErr3.out index fba9fe5a8..f6a3953fb 100644 --- a/tests/data/parser/parseSelectIndexHintErr3.out +++ b/tests/data/parser/parseSelectIndexHintErr3.out @@ -2,7 +2,7 @@ "query": "SELECT * FROM address FORCE INDEX FOR abc (idx_fk_city_id);", "lexer": { "@type": "PhpMyAdmin\\SqlParser\\Lexer", - "PARSER_METHODS": [ + "parserMethods": [ "parseDelimiter", "parseWhitespace", "parseNumber", @@ -214,7 +214,7 @@ "count": 21, "idx": 21 }, - "DEFAULT_DELIMITER": ";", + "defaultDelimiter": ";", "delimiter": ";", "delimiterLen": 1, "strict": false, @@ -222,7 +222,7 @@ }, "parser": { "@type": "PhpMyAdmin\\SqlParser\\Parser", - "STATEMENT_PARSERS": { + "statementParsers": { "DESCRIBE": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", "DESC": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", "EXPLAIN": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", @@ -267,7 +267,7 @@ "LOCK": "PhpMyAdmin\\SqlParser\\Statements\\LockStatement", "UNLOCK": "PhpMyAdmin\\SqlParser\\Statements\\LockStatement" }, - "KEYWORD_PARSERS": { + "keywordParsers": { "PARTITION BY": [], "SUBPARTITION BY": [], "_OPTIONS": { @@ -276,7 +276,7 @@ }, "_END_OPTIONS": { "class": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", - "field": "end_options" + "field": "endOptions" }, "INTERSECT": { "class": "PhpMyAdmin\\SqlParser\\Components\\UnionKeyword", @@ -524,7 +524,7 @@ "statements": [ { "@type": "PhpMyAdmin\\SqlParser\\Statements\\SelectStatement", - "OPTIONS": { + "statementOptions": { "ALL": 1, "DISTINCT": 1, "DISTINCTROW": 1, @@ -541,11 +541,11 @@ "SQL_NO_CACHE": 8, "SQL_CALC_FOUND_ROWS": 9 }, - "END_OPTIONS": { + "statementEndOptions": { "FOR UPDATE": 1, "LOCK IN SHARE MODE": 1 }, - "CLAUSES": { + "clauses": { "SELECT": [ "SELECT", 2 @@ -674,7 +674,7 @@ "expr": [ { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -700,7 +700,7 @@ "from": [ { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -723,7 +723,7 @@ "subquery": null } ], - "index_hints": [], + "indexHints": null, "partition": null, "where": null, "group": null, @@ -734,13 +734,14 @@ "into": null, "join": null, "union": [], - "end_options": null, + "endOptions": null, "options": { "@type": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", "options": [] }, "first": 0, - "last": 18 + "last": 18, + "index_hints": [] } ], "brackets": 0, diff --git a/tests/data/parser/parseSelectIndexHintErr4.out b/tests/data/parser/parseSelectIndexHintErr4.out index f4bba2e16..eb2bad88b 100644 --- a/tests/data/parser/parseSelectIndexHintErr4.out +++ b/tests/data/parser/parseSelectIndexHintErr4.out @@ -2,7 +2,7 @@ "query": "SELECT * FROM address FORCE INDEX FOR INT (idx_fk_city_id);", "lexer": { "@type": "PhpMyAdmin\\SqlParser\\Lexer", - "PARSER_METHODS": [ + "parserMethods": [ "parseDelimiter", "parseWhitespace", "parseNumber", @@ -214,7 +214,7 @@ "count": 21, "idx": 21 }, - "DEFAULT_DELIMITER": ";", + "defaultDelimiter": ";", "delimiter": ";", "delimiterLen": 1, "strict": false, @@ -222,7 +222,7 @@ }, "parser": { "@type": "PhpMyAdmin\\SqlParser\\Parser", - "STATEMENT_PARSERS": { + "statementParsers": { "DESCRIBE": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", "DESC": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", "EXPLAIN": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", @@ -267,7 +267,7 @@ "LOCK": "PhpMyAdmin\\SqlParser\\Statements\\LockStatement", "UNLOCK": "PhpMyAdmin\\SqlParser\\Statements\\LockStatement" }, - "KEYWORD_PARSERS": { + "keywordParsers": { "PARTITION BY": [], "SUBPARTITION BY": [], "_OPTIONS": { @@ -276,7 +276,7 @@ }, "_END_OPTIONS": { "class": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", - "field": "end_options" + "field": "endOptions" }, "INTERSECT": { "class": "PhpMyAdmin\\SqlParser\\Components\\UnionKeyword", @@ -524,7 +524,7 @@ "statements": [ { "@type": "PhpMyAdmin\\SqlParser\\Statements\\SelectStatement", - "OPTIONS": { + "statementOptions": { "ALL": 1, "DISTINCT": 1, "DISTINCTROW": 1, @@ -541,11 +541,11 @@ "SQL_NO_CACHE": 8, "SQL_CALC_FOUND_ROWS": 9 }, - "END_OPTIONS": { + "statementEndOptions": { "FOR UPDATE": 1, "LOCK IN SHARE MODE": 1 }, - "CLAUSES": { + "clauses": { "SELECT": [ "SELECT", 2 @@ -674,7 +674,7 @@ "expr": [ { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -700,7 +700,7 @@ "from": [ { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -723,6 +723,24 @@ "subquery": null } ], + "indexHints": null, + "partition": null, + "where": null, + "group": null, + "having": null, + "order": null, + "limit": null, + "procedure": null, + "into": null, + "join": null, + "union": [], + "endOptions": null, + "options": { + "@type": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", + "options": [] + }, + "first": 0, + "last": 18, "index_hints": [ { "@type": "PhpMyAdmin\\SqlParser\\Components\\IndexHint", @@ -732,7 +750,7 @@ "indexes": [ { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -756,24 +774,7 @@ } ] } - ], - "partition": null, - "where": null, - "group": null, - "having": null, - "order": null, - "limit": null, - "procedure": null, - "into": null, - "join": null, - "union": [], - "end_options": null, - "options": { - "@type": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", - "options": [] - }, - "first": 0, - "last": 18 + ] } ], "brackets": 0, diff --git a/tests/data/parser/parseSelectIntoOptions1.out b/tests/data/parser/parseSelectIntoOptions1.out index 51fc7a454..509ab0af9 100644 --- a/tests/data/parser/parseSelectIntoOptions1.out +++ b/tests/data/parser/parseSelectIntoOptions1.out @@ -2,7 +2,7 @@ "query": "SELECT a,b,a+b INTO OUTFILE '\/tmp\/result.txt'\n FIELDS TERMINATED BY ',' OPTIONALLY ENCLOSED BY '\\\"'\n LINES TERMINATED BY '\\n'\n FROM test_table;", "lexer": { "@type": "PhpMyAdmin\\SqlParser\\Lexer", - "PARSER_METHODS": [ + "parserMethods": [ "parseDelimiter", "parseWhitespace", "parseNumber", @@ -376,7 +376,7 @@ "count": 39, "idx": 39 }, - "DEFAULT_DELIMITER": ";", + "defaultDelimiter": ";", "delimiter": ";", "delimiterLen": 1, "strict": false, @@ -384,7 +384,7 @@ }, "parser": { "@type": "PhpMyAdmin\\SqlParser\\Parser", - "STATEMENT_PARSERS": { + "statementParsers": { "DESCRIBE": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", "DESC": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", "EXPLAIN": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", @@ -429,7 +429,7 @@ "LOCK": "PhpMyAdmin\\SqlParser\\Statements\\LockStatement", "UNLOCK": "PhpMyAdmin\\SqlParser\\Statements\\LockStatement" }, - "KEYWORD_PARSERS": { + "keywordParsers": { "PARTITION BY": [], "SUBPARTITION BY": [], "_OPTIONS": { @@ -438,7 +438,7 @@ }, "_END_OPTIONS": { "class": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", - "field": "end_options" + "field": "endOptions" }, "INTERSECT": { "class": "PhpMyAdmin\\SqlParser\\Components\\UnionKeyword", @@ -686,7 +686,7 @@ "statements": [ { "@type": "PhpMyAdmin\\SqlParser\\Statements\\SelectStatement", - "OPTIONS": { + "statementOptions": { "ALL": 1, "DISTINCT": 1, "DISTINCTROW": 1, @@ -703,11 +703,11 @@ "SQL_NO_CACHE": 8, "SQL_CALC_FOUND_ROWS": 9 }, - "END_OPTIONS": { + "statementEndOptions": { "FOR UPDATE": 1, "LOCK IN SHARE MODE": 1 }, - "CLAUSES": { + "clauses": { "SELECT": [ "SELECT", 2 @@ -836,7 +836,7 @@ "expr": [ { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -860,7 +860,7 @@ }, { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -884,7 +884,7 @@ }, { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -910,7 +910,7 @@ "from": [ { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -933,7 +933,7 @@ "subquery": null } ], - "index_hints": null, + "indexHints": null, "partition": null, "where": null, "group": null, @@ -943,7 +943,7 @@ "procedure": null, "into": { "@type": "PhpMyAdmin\\SqlParser\\Components\\IntoKeyword", - "FIELDS_OPTIONS": { + "statementFieldsOptions": { "TERMINATED BY": [ 1, "expr" @@ -958,7 +958,7 @@ "expr" ] }, - "LINES_OPTIONS": { + "statementLinesOptions": { "STARTING BY": [ 1, "expr" @@ -972,7 +972,7 @@ "dest": "\/tmp\/result.txt", "columns": null, "values": null, - "fields_options": { + "fieldsOptions": { "@type": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", "options": { "1": { @@ -980,7 +980,7 @@ "equals": false, "expr": { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -1010,7 +1010,7 @@ "equals": false, "expr": { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -1036,8 +1036,8 @@ } } }, - "fields_keyword": true, - "lines_options": { + "fieldsKeyword": true, + "linesOptions": { "@type": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", "options": { "2": { @@ -1045,7 +1045,7 @@ "equals": false, "expr": { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -1074,7 +1074,7 @@ }, "join": null, "union": [], - "end_options": null, + "endOptions": null, "options": { "@type": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", "options": [] diff --git a/tests/data/parser/parseSelectIntoOptions2.out b/tests/data/parser/parseSelectIntoOptions2.out index b037d3779..f71c52c94 100644 --- a/tests/data/parser/parseSelectIntoOptions2.out +++ b/tests/data/parser/parseSelectIntoOptions2.out @@ -2,7 +2,7 @@ "query": "SELECT a,b,a+b INTO OUTFILE '\/tmp\/result.txt'\n COLUMNS TERMINATED BY ',' OPTIONALLY ENCLOSED BY '\\\"'\n LINES TERMINATED BY '\\n'\n FROM test_table;", "lexer": { "@type": "PhpMyAdmin\\SqlParser\\Lexer", - "PARSER_METHODS": [ + "parserMethods": [ "parseDelimiter", "parseWhitespace", "parseNumber", @@ -376,7 +376,7 @@ "count": 39, "idx": 39 }, - "DEFAULT_DELIMITER": ";", + "defaultDelimiter": ";", "delimiter": ";", "delimiterLen": 1, "strict": false, @@ -384,7 +384,7 @@ }, "parser": { "@type": "PhpMyAdmin\\SqlParser\\Parser", - "STATEMENT_PARSERS": { + "statementParsers": { "DESCRIBE": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", "DESC": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", "EXPLAIN": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", @@ -429,7 +429,7 @@ "LOCK": "PhpMyAdmin\\SqlParser\\Statements\\LockStatement", "UNLOCK": "PhpMyAdmin\\SqlParser\\Statements\\LockStatement" }, - "KEYWORD_PARSERS": { + "keywordParsers": { "PARTITION BY": [], "SUBPARTITION BY": [], "_OPTIONS": { @@ -438,7 +438,7 @@ }, "_END_OPTIONS": { "class": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", - "field": "end_options" + "field": "endOptions" }, "INTERSECT": { "class": "PhpMyAdmin\\SqlParser\\Components\\UnionKeyword", @@ -686,7 +686,7 @@ "statements": [ { "@type": "PhpMyAdmin\\SqlParser\\Statements\\SelectStatement", - "OPTIONS": { + "statementOptions": { "ALL": 1, "DISTINCT": 1, "DISTINCTROW": 1, @@ -703,11 +703,11 @@ "SQL_NO_CACHE": 8, "SQL_CALC_FOUND_ROWS": 9 }, - "END_OPTIONS": { + "statementEndOptions": { "FOR UPDATE": 1, "LOCK IN SHARE MODE": 1 }, - "CLAUSES": { + "clauses": { "SELECT": [ "SELECT", 2 @@ -836,7 +836,7 @@ "expr": [ { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -860,7 +860,7 @@ }, { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -884,7 +884,7 @@ }, { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -910,7 +910,7 @@ "from": [ { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -933,7 +933,7 @@ "subquery": null } ], - "index_hints": null, + "indexHints": null, "partition": null, "where": null, "group": null, @@ -943,7 +943,7 @@ "procedure": null, "into": { "@type": "PhpMyAdmin\\SqlParser\\Components\\IntoKeyword", - "FIELDS_OPTIONS": { + "statementFieldsOptions": { "TERMINATED BY": [ 1, "expr" @@ -958,7 +958,7 @@ "expr" ] }, - "LINES_OPTIONS": { + "statementLinesOptions": { "STARTING BY": [ 1, "expr" @@ -972,7 +972,7 @@ "dest": "\/tmp\/result.txt", "columns": null, "values": null, - "fields_options": { + "fieldsOptions": { "@type": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", "options": { "1": { @@ -980,7 +980,7 @@ "equals": false, "expr": { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -1010,7 +1010,7 @@ "equals": false, "expr": { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -1036,8 +1036,8 @@ } } }, - "fields_keyword": false, - "lines_options": { + "fieldsKeyword": false, + "linesOptions": { "@type": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", "options": { "2": { @@ -1045,7 +1045,7 @@ "equals": false, "expr": { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -1074,7 +1074,7 @@ }, "join": null, "union": [], - "end_options": null, + "endOptions": null, "options": { "@type": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", "options": [] diff --git a/tests/data/parser/parseSelectIntoOptions3.out b/tests/data/parser/parseSelectIntoOptions3.out index edaf310f0..e622d3f5d 100644 --- a/tests/data/parser/parseSelectIntoOptions3.out +++ b/tests/data/parser/parseSelectIntoOptions3.out @@ -2,7 +2,7 @@ "query": "SELECT a,b,a+b INTO OUTFILE '\/tmp\/result.txt'\n COLUMNS TERMINATED BY ',' OPTIONALLY ENCLOSED BY '\\\"'\n FROM test_table;", "lexer": { "@type": "PhpMyAdmin\\SqlParser\\Lexer", - "PARSER_METHODS": [ + "parserMethods": [ "parseDelimiter", "parseWhitespace", "parseNumber", @@ -322,7 +322,7 @@ "count": 33, "idx": 33 }, - "DEFAULT_DELIMITER": ";", + "defaultDelimiter": ";", "delimiter": ";", "delimiterLen": 1, "strict": false, @@ -330,7 +330,7 @@ }, "parser": { "@type": "PhpMyAdmin\\SqlParser\\Parser", - "STATEMENT_PARSERS": { + "statementParsers": { "DESCRIBE": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", "DESC": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", "EXPLAIN": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", @@ -375,7 +375,7 @@ "LOCK": "PhpMyAdmin\\SqlParser\\Statements\\LockStatement", "UNLOCK": "PhpMyAdmin\\SqlParser\\Statements\\LockStatement" }, - "KEYWORD_PARSERS": { + "keywordParsers": { "PARTITION BY": [], "SUBPARTITION BY": [], "_OPTIONS": { @@ -384,7 +384,7 @@ }, "_END_OPTIONS": { "class": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", - "field": "end_options" + "field": "endOptions" }, "INTERSECT": { "class": "PhpMyAdmin\\SqlParser\\Components\\UnionKeyword", @@ -632,7 +632,7 @@ "statements": [ { "@type": "PhpMyAdmin\\SqlParser\\Statements\\SelectStatement", - "OPTIONS": { + "statementOptions": { "ALL": 1, "DISTINCT": 1, "DISTINCTROW": 1, @@ -649,11 +649,11 @@ "SQL_NO_CACHE": 8, "SQL_CALC_FOUND_ROWS": 9 }, - "END_OPTIONS": { + "statementEndOptions": { "FOR UPDATE": 1, "LOCK IN SHARE MODE": 1 }, - "CLAUSES": { + "clauses": { "SELECT": [ "SELECT", 2 @@ -782,7 +782,7 @@ "expr": [ { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -806,7 +806,7 @@ }, { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -830,7 +830,7 @@ }, { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -856,7 +856,7 @@ "from": [ { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -879,7 +879,7 @@ "subquery": null } ], - "index_hints": null, + "indexHints": null, "partition": null, "where": null, "group": null, @@ -889,7 +889,7 @@ "procedure": null, "into": { "@type": "PhpMyAdmin\\SqlParser\\Components\\IntoKeyword", - "FIELDS_OPTIONS": { + "statementFieldsOptions": { "TERMINATED BY": [ 1, "expr" @@ -904,7 +904,7 @@ "expr" ] }, - "LINES_OPTIONS": { + "statementLinesOptions": { "STARTING BY": [ 1, "expr" @@ -918,7 +918,7 @@ "dest": "\/tmp\/result.txt", "columns": null, "values": null, - "fields_options": { + "fieldsOptions": { "@type": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", "options": { "1": { @@ -926,7 +926,7 @@ "equals": false, "expr": { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -956,7 +956,7 @@ "equals": false, "expr": { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -982,12 +982,12 @@ } } }, - "fields_keyword": false, - "lines_options": null + "fieldsKeyword": false, + "linesOptions": null }, "join": null, "union": [], - "end_options": null, + "endOptions": null, "options": { "@type": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", "options": [] diff --git a/tests/data/parser/parseSelectJoinCross.out b/tests/data/parser/parseSelectJoinCross.out index 823848911..3fb2e0b2b 100644 --- a/tests/data/parser/parseSelectJoinCross.out +++ b/tests/data/parser/parseSelectJoinCross.out @@ -2,7 +2,7 @@ "query": "SELECT table112.id,table112.bval1,table112.bval2,\ntable111.id,table111.aval1\nFROM table112\nCROSS JOIN table111", "lexer": { "@type": "PhpMyAdmin\\SqlParser\\Lexer", - "PARSER_METHODS": [ + "parserMethods": [ "parseDelimiter", "parseWhitespace", "parseNumber", @@ -304,7 +304,7 @@ "count": 31, "idx": 31 }, - "DEFAULT_DELIMITER": ";", + "defaultDelimiter": ";", "delimiter": ";", "delimiterLen": 1, "strict": false, @@ -312,7 +312,7 @@ }, "parser": { "@type": "PhpMyAdmin\\SqlParser\\Parser", - "STATEMENT_PARSERS": { + "statementParsers": { "DESCRIBE": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", "DESC": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", "EXPLAIN": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", @@ -357,7 +357,7 @@ "LOCK": "PhpMyAdmin\\SqlParser\\Statements\\LockStatement", "UNLOCK": "PhpMyAdmin\\SqlParser\\Statements\\LockStatement" }, - "KEYWORD_PARSERS": { + "keywordParsers": { "PARTITION BY": [], "SUBPARTITION BY": [], "_OPTIONS": { @@ -366,7 +366,7 @@ }, "_END_OPTIONS": { "class": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", - "field": "end_options" + "field": "endOptions" }, "INTERSECT": { "class": "PhpMyAdmin\\SqlParser\\Components\\UnionKeyword", @@ -614,7 +614,7 @@ "statements": [ { "@type": "PhpMyAdmin\\SqlParser\\Statements\\SelectStatement", - "OPTIONS": { + "statementOptions": { "ALL": 1, "DISTINCT": 1, "DISTINCTROW": 1, @@ -631,11 +631,11 @@ "SQL_NO_CACHE": 8, "SQL_CALC_FOUND_ROWS": 9 }, - "END_OPTIONS": { + "statementEndOptions": { "FOR UPDATE": 1, "LOCK IN SHARE MODE": 1 }, - "CLAUSES": { + "clauses": { "SELECT": [ "SELECT", 2 @@ -764,7 +764,7 @@ "expr": [ { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -788,7 +788,7 @@ }, { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -812,7 +812,7 @@ }, { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -836,7 +836,7 @@ }, { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -860,7 +860,7 @@ }, { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -886,7 +886,7 @@ "from": [ { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -909,7 +909,7 @@ "subquery": null } ], - "index_hints": null, + "indexHints": null, "partition": null, "where": null, "group": null, @@ -921,7 +921,7 @@ "join": [ { "@type": "PhpMyAdmin\\SqlParser\\Components\\JoinKeyword", - "JOINS": { + "joins": { "CROSS JOIN": "CROSS", "FULL JOIN": "FULL", "FULL OUTER JOIN": "FULL", @@ -941,7 +941,7 @@ "type": "CROSS", "expr": { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -968,7 +968,7 @@ } ], "union": [], - "end_options": null, + "endOptions": null, "options": { "@type": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", "options": [] diff --git a/tests/data/parser/parseSelectJoinMultiple.out b/tests/data/parser/parseSelectJoinMultiple.out index 020d16204..fdd52ba66 100644 --- a/tests/data/parser/parseSelectJoinMultiple.out +++ b/tests/data/parser/parseSelectJoinMultiple.out @@ -2,7 +2,7 @@ "query": "SELECT * FROM Orders NATURAL JOIN Items_Orders NATURAL JOIN Items\nWHERE customer= 'username'", "lexer": { "@type": "PhpMyAdmin\\SqlParser\\Lexer", - "PARSER_METHODS": [ + "parserMethods": [ "parseDelimiter", "parseWhitespace", "parseNumber", @@ -232,7 +232,7 @@ "count": 23, "idx": 23 }, - "DEFAULT_DELIMITER": ";", + "defaultDelimiter": ";", "delimiter": ";", "delimiterLen": 1, "strict": false, @@ -240,7 +240,7 @@ }, "parser": { "@type": "PhpMyAdmin\\SqlParser\\Parser", - "STATEMENT_PARSERS": { + "statementParsers": { "DESCRIBE": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", "DESC": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", "EXPLAIN": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", @@ -285,7 +285,7 @@ "LOCK": "PhpMyAdmin\\SqlParser\\Statements\\LockStatement", "UNLOCK": "PhpMyAdmin\\SqlParser\\Statements\\LockStatement" }, - "KEYWORD_PARSERS": { + "keywordParsers": { "PARTITION BY": [], "SUBPARTITION BY": [], "_OPTIONS": { @@ -294,7 +294,7 @@ }, "_END_OPTIONS": { "class": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", - "field": "end_options" + "field": "endOptions" }, "INTERSECT": { "class": "PhpMyAdmin\\SqlParser\\Components\\UnionKeyword", @@ -542,7 +542,7 @@ "statements": [ { "@type": "PhpMyAdmin\\SqlParser\\Statements\\SelectStatement", - "OPTIONS": { + "statementOptions": { "ALL": 1, "DISTINCT": 1, "DISTINCTROW": 1, @@ -559,11 +559,11 @@ "SQL_NO_CACHE": 8, "SQL_CALC_FOUND_ROWS": 9 }, - "END_OPTIONS": { + "statementEndOptions": { "FOR UPDATE": 1, "LOCK IN SHARE MODE": 1 }, - "CLAUSES": { + "clauses": { "SELECT": [ "SELECT", 2 @@ -692,7 +692,7 @@ "expr": [ { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -718,7 +718,7 @@ "from": [ { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -741,19 +741,19 @@ "subquery": null } ], - "index_hints": null, + "indexHints": null, "partition": null, "where": [ { "@type": "PhpMyAdmin\\SqlParser\\Components\\Condition", - "DELIMITERS": [ + "delimiters": [ "&&", "||", "AND", "OR", "XOR" ], - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "ALL": 1, "AND": 1, "BETWEEN": 1, @@ -791,7 +791,7 @@ "join": [ { "@type": "PhpMyAdmin\\SqlParser\\Components\\JoinKeyword", - "JOINS": { + "joins": { "CROSS JOIN": "CROSS", "FULL JOIN": "FULL", "FULL OUTER JOIN": "FULL", @@ -811,7 +811,7 @@ "type": "NATURAL", "expr": { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -838,7 +838,7 @@ }, { "@type": "PhpMyAdmin\\SqlParser\\Components\\JoinKeyword", - "JOINS": { + "joins": { "CROSS JOIN": "CROSS", "FULL JOIN": "FULL", "FULL OUTER JOIN": "FULL", @@ -858,7 +858,7 @@ "type": "NATURAL", "expr": { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -885,7 +885,7 @@ } ], "union": [], - "end_options": null, + "endOptions": null, "options": { "@type": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", "options": [] diff --git a/tests/data/parser/parseSelectJoinMultiple2.out b/tests/data/parser/parseSelectJoinMultiple2.out index e62a28814..164c2bd06 100644 --- a/tests/data/parser/parseSelectJoinMultiple2.out +++ b/tests/data/parser/parseSelectJoinMultiple2.out @@ -2,7 +2,7 @@ "query": "SELECT * FROM orders\nNATURAL JOIN Items_Orders LEFT JOIN items on orders.item_id = items.id\nWHERE customer= 'username'", "lexer": { "@type": "PhpMyAdmin\\SqlParser\\Lexer", - "PARSER_METHODS": [ + "parserMethods": [ "parseDelimiter", "parseWhitespace", "parseNumber", @@ -340,7 +340,7 @@ "count": 35, "idx": 35 }, - "DEFAULT_DELIMITER": ";", + "defaultDelimiter": ";", "delimiter": ";", "delimiterLen": 1, "strict": false, @@ -348,7 +348,7 @@ }, "parser": { "@type": "PhpMyAdmin\\SqlParser\\Parser", - "STATEMENT_PARSERS": { + "statementParsers": { "DESCRIBE": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", "DESC": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", "EXPLAIN": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", @@ -393,7 +393,7 @@ "LOCK": "PhpMyAdmin\\SqlParser\\Statements\\LockStatement", "UNLOCK": "PhpMyAdmin\\SqlParser\\Statements\\LockStatement" }, - "KEYWORD_PARSERS": { + "keywordParsers": { "PARTITION BY": [], "SUBPARTITION BY": [], "_OPTIONS": { @@ -402,7 +402,7 @@ }, "_END_OPTIONS": { "class": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", - "field": "end_options" + "field": "endOptions" }, "INTERSECT": { "class": "PhpMyAdmin\\SqlParser\\Components\\UnionKeyword", @@ -650,7 +650,7 @@ "statements": [ { "@type": "PhpMyAdmin\\SqlParser\\Statements\\SelectStatement", - "OPTIONS": { + "statementOptions": { "ALL": 1, "DISTINCT": 1, "DISTINCTROW": 1, @@ -667,11 +667,11 @@ "SQL_NO_CACHE": 8, "SQL_CALC_FOUND_ROWS": 9 }, - "END_OPTIONS": { + "statementEndOptions": { "FOR UPDATE": 1, "LOCK IN SHARE MODE": 1 }, - "CLAUSES": { + "clauses": { "SELECT": [ "SELECT", 2 @@ -800,7 +800,7 @@ "expr": [ { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -826,7 +826,7 @@ "from": [ { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -849,19 +849,19 @@ "subquery": null } ], - "index_hints": null, + "indexHints": null, "partition": null, "where": [ { "@type": "PhpMyAdmin\\SqlParser\\Components\\Condition", - "DELIMITERS": [ + "delimiters": [ "&&", "||", "AND", "OR", "XOR" ], - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "ALL": 1, "AND": 1, "BETWEEN": 1, @@ -899,7 +899,7 @@ "join": [ { "@type": "PhpMyAdmin\\SqlParser\\Components\\JoinKeyword", - "JOINS": { + "joins": { "CROSS JOIN": "CROSS", "FULL JOIN": "FULL", "FULL OUTER JOIN": "FULL", @@ -919,7 +919,7 @@ "type": "NATURAL", "expr": { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -946,7 +946,7 @@ }, { "@type": "PhpMyAdmin\\SqlParser\\Components\\JoinKeyword", - "JOINS": { + "joins": { "CROSS JOIN": "CROSS", "FULL JOIN": "FULL", "FULL OUTER JOIN": "FULL", @@ -966,7 +966,7 @@ "type": "LEFT", "expr": { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -991,14 +991,14 @@ "on": [ { "@type": "PhpMyAdmin\\SqlParser\\Components\\Condition", - "DELIMITERS": [ + "delimiters": [ "&&", "||", "AND", "OR", "XOR" ], - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "ALL": 1, "AND": 1, "BETWEEN": 1, @@ -1033,7 +1033,7 @@ } ], "union": [], - "end_options": null, + "endOptions": null, "options": { "@type": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", "options": [] diff --git a/tests/data/parser/parseSelectJoinNatural.out b/tests/data/parser/parseSelectJoinNatural.out index a062e4235..fdd1f2229 100644 --- a/tests/data/parser/parseSelectJoinNatural.out +++ b/tests/data/parser/parseSelectJoinNatural.out @@ -2,7 +2,7 @@ "query": "SELECT id,aval1,cval1\nFROM table111\nNATURAL JOIN table113", "lexer": { "@type": "PhpMyAdmin\\SqlParser\\Lexer", - "PARSER_METHODS": [ + "parserMethods": [ "parseDelimiter", "parseWhitespace", "parseNumber", @@ -169,7 +169,7 @@ "count": 16, "idx": 16 }, - "DEFAULT_DELIMITER": ";", + "defaultDelimiter": ";", "delimiter": ";", "delimiterLen": 1, "strict": false, @@ -177,7 +177,7 @@ }, "parser": { "@type": "PhpMyAdmin\\SqlParser\\Parser", - "STATEMENT_PARSERS": { + "statementParsers": { "DESCRIBE": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", "DESC": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", "EXPLAIN": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", @@ -222,7 +222,7 @@ "LOCK": "PhpMyAdmin\\SqlParser\\Statements\\LockStatement", "UNLOCK": "PhpMyAdmin\\SqlParser\\Statements\\LockStatement" }, - "KEYWORD_PARSERS": { + "keywordParsers": { "PARTITION BY": [], "SUBPARTITION BY": [], "_OPTIONS": { @@ -231,7 +231,7 @@ }, "_END_OPTIONS": { "class": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", - "field": "end_options" + "field": "endOptions" }, "INTERSECT": { "class": "PhpMyAdmin\\SqlParser\\Components\\UnionKeyword", @@ -479,7 +479,7 @@ "statements": [ { "@type": "PhpMyAdmin\\SqlParser\\Statements\\SelectStatement", - "OPTIONS": { + "statementOptions": { "ALL": 1, "DISTINCT": 1, "DISTINCTROW": 1, @@ -496,11 +496,11 @@ "SQL_NO_CACHE": 8, "SQL_CALC_FOUND_ROWS": 9 }, - "END_OPTIONS": { + "statementEndOptions": { "FOR UPDATE": 1, "LOCK IN SHARE MODE": 1 }, - "CLAUSES": { + "clauses": { "SELECT": [ "SELECT", 2 @@ -629,7 +629,7 @@ "expr": [ { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -653,7 +653,7 @@ }, { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -677,7 +677,7 @@ }, { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -703,7 +703,7 @@ "from": [ { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -726,7 +726,7 @@ "subquery": null } ], - "index_hints": null, + "indexHints": null, "partition": null, "where": null, "group": null, @@ -738,7 +738,7 @@ "join": [ { "@type": "PhpMyAdmin\\SqlParser\\Components\\JoinKeyword", - "JOINS": { + "joins": { "CROSS JOIN": "CROSS", "FULL JOIN": "FULL", "FULL OUTER JOIN": "FULL", @@ -758,7 +758,7 @@ "type": "NATURAL", "expr": { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -785,7 +785,7 @@ } ], "union": [], - "end_options": null, + "endOptions": null, "options": { "@type": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", "options": [] diff --git a/tests/data/parser/parseSelectJoinNaturalLeft.out b/tests/data/parser/parseSelectJoinNaturalLeft.out index c1bb0b9c5..0fd355272 100644 --- a/tests/data/parser/parseSelectJoinNaturalLeft.out +++ b/tests/data/parser/parseSelectJoinNaturalLeft.out @@ -2,7 +2,7 @@ "query": "SELECT C.First_Name, C.Last_Name, O.title\nFROM Employee as C\nNATURAL LEFT JOIN JOb as O;", "lexer": { "@type": "PhpMyAdmin\\SqlParser\\Lexer", - "PARSER_METHODS": [ + "parserMethods": [ "parseDelimiter", "parseWhitespace", "parseNumber", @@ -322,7 +322,7 @@ "count": 33, "idx": 33 }, - "DEFAULT_DELIMITER": ";", + "defaultDelimiter": ";", "delimiter": ";", "delimiterLen": 1, "strict": false, @@ -330,7 +330,7 @@ }, "parser": { "@type": "PhpMyAdmin\\SqlParser\\Parser", - "STATEMENT_PARSERS": { + "statementParsers": { "DESCRIBE": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", "DESC": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", "EXPLAIN": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", @@ -375,7 +375,7 @@ "LOCK": "PhpMyAdmin\\SqlParser\\Statements\\LockStatement", "UNLOCK": "PhpMyAdmin\\SqlParser\\Statements\\LockStatement" }, - "KEYWORD_PARSERS": { + "keywordParsers": { "PARTITION BY": [], "SUBPARTITION BY": [], "_OPTIONS": { @@ -384,7 +384,7 @@ }, "_END_OPTIONS": { "class": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", - "field": "end_options" + "field": "endOptions" }, "INTERSECT": { "class": "PhpMyAdmin\\SqlParser\\Components\\UnionKeyword", @@ -632,7 +632,7 @@ "statements": [ { "@type": "PhpMyAdmin\\SqlParser\\Statements\\SelectStatement", - "OPTIONS": { + "statementOptions": { "ALL": 1, "DISTINCT": 1, "DISTINCTROW": 1, @@ -649,11 +649,11 @@ "SQL_NO_CACHE": 8, "SQL_CALC_FOUND_ROWS": 9 }, - "END_OPTIONS": { + "statementEndOptions": { "FOR UPDATE": 1, "LOCK IN SHARE MODE": 1 }, - "CLAUSES": { + "clauses": { "SELECT": [ "SELECT", 2 @@ -782,7 +782,7 @@ "expr": [ { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -806,7 +806,7 @@ }, { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -830,7 +830,7 @@ }, { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -856,7 +856,7 @@ "from": [ { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -879,7 +879,7 @@ "subquery": null } ], - "index_hints": null, + "indexHints": null, "partition": null, "where": null, "group": null, @@ -891,7 +891,7 @@ "join": [ { "@type": "PhpMyAdmin\\SqlParser\\Components\\JoinKeyword", - "JOINS": { + "joins": { "CROSS JOIN": "CROSS", "FULL JOIN": "FULL", "FULL OUTER JOIN": "FULL", @@ -911,7 +911,7 @@ "type": "NATURAL LEFT", "expr": { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -938,7 +938,7 @@ } ], "union": [], - "end_options": null, + "endOptions": null, "options": { "@type": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", "options": [] diff --git a/tests/data/parser/parseSelectJoinNaturalLeftOuter.out b/tests/data/parser/parseSelectJoinNaturalLeftOuter.out index 68d323029..e7689a621 100644 --- a/tests/data/parser/parseSelectJoinNaturalLeftOuter.out +++ b/tests/data/parser/parseSelectJoinNaturalLeftOuter.out @@ -2,7 +2,7 @@ "query": "SELECT * FROM actor NATURAL LEFT OUTER JOIN film_actor;", "lexer": { "@type": "PhpMyAdmin\\SqlParser\\Lexer", - "PARSER_METHODS": [ + "parserMethods": [ "parseDelimiter", "parseWhitespace", "parseNumber", @@ -142,7 +142,7 @@ "count": 13, "idx": 13 }, - "DEFAULT_DELIMITER": ";", + "defaultDelimiter": ";", "delimiter": ";", "delimiterLen": 1, "strict": false, @@ -150,7 +150,7 @@ }, "parser": { "@type": "PhpMyAdmin\\SqlParser\\Parser", - "STATEMENT_PARSERS": { + "statementParsers": { "DESCRIBE": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", "DESC": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", "EXPLAIN": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", @@ -195,7 +195,7 @@ "LOCK": "PhpMyAdmin\\SqlParser\\Statements\\LockStatement", "UNLOCK": "PhpMyAdmin\\SqlParser\\Statements\\LockStatement" }, - "KEYWORD_PARSERS": { + "keywordParsers": { "PARTITION BY": [], "SUBPARTITION BY": [], "_OPTIONS": { @@ -204,7 +204,7 @@ }, "_END_OPTIONS": { "class": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", - "field": "end_options" + "field": "endOptions" }, "INTERSECT": { "class": "PhpMyAdmin\\SqlParser\\Components\\UnionKeyword", @@ -452,7 +452,7 @@ "statements": [ { "@type": "PhpMyAdmin\\SqlParser\\Statements\\SelectStatement", - "OPTIONS": { + "statementOptions": { "ALL": 1, "DISTINCT": 1, "DISTINCTROW": 1, @@ -469,11 +469,11 @@ "SQL_NO_CACHE": 8, "SQL_CALC_FOUND_ROWS": 9 }, - "END_OPTIONS": { + "statementEndOptions": { "FOR UPDATE": 1, "LOCK IN SHARE MODE": 1 }, - "CLAUSES": { + "clauses": { "SELECT": [ "SELECT", 2 @@ -602,7 +602,7 @@ "expr": [ { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -628,7 +628,7 @@ "from": [ { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -651,7 +651,7 @@ "subquery": null } ], - "index_hints": null, + "indexHints": null, "partition": null, "where": null, "group": null, @@ -663,7 +663,7 @@ "join": [ { "@type": "PhpMyAdmin\\SqlParser\\Components\\JoinKeyword", - "JOINS": { + "joins": { "CROSS JOIN": "CROSS", "FULL JOIN": "FULL", "FULL OUTER JOIN": "FULL", @@ -683,7 +683,7 @@ "type": "NATURAL LEFT OUTER", "expr": { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -710,7 +710,7 @@ } ], "union": [], - "end_options": null, + "endOptions": null, "options": { "@type": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", "options": [] diff --git a/tests/data/parser/parseSelectJoinNaturalRight.out b/tests/data/parser/parseSelectJoinNaturalRight.out index 27836b643..ff44d038a 100644 --- a/tests/data/parser/parseSelectJoinNaturalRight.out +++ b/tests/data/parser/parseSelectJoinNaturalRight.out @@ -2,7 +2,7 @@ "query": "SELECT * FROM actor NATURAL RIGHT JOIN film_actor;\n", "lexer": { "@type": "PhpMyAdmin\\SqlParser\\Lexer", - "PARSER_METHODS": [ + "parserMethods": [ "parseDelimiter", "parseWhitespace", "parseNumber", @@ -151,7 +151,7 @@ "count": 14, "idx": 14 }, - "DEFAULT_DELIMITER": ";", + "defaultDelimiter": ";", "delimiter": ";", "delimiterLen": 1, "strict": false, @@ -159,7 +159,7 @@ }, "parser": { "@type": "PhpMyAdmin\\SqlParser\\Parser", - "STATEMENT_PARSERS": { + "statementParsers": { "DESCRIBE": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", "DESC": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", "EXPLAIN": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", @@ -204,7 +204,7 @@ "LOCK": "PhpMyAdmin\\SqlParser\\Statements\\LockStatement", "UNLOCK": "PhpMyAdmin\\SqlParser\\Statements\\LockStatement" }, - "KEYWORD_PARSERS": { + "keywordParsers": { "PARTITION BY": [], "SUBPARTITION BY": [], "_OPTIONS": { @@ -213,7 +213,7 @@ }, "_END_OPTIONS": { "class": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", - "field": "end_options" + "field": "endOptions" }, "INTERSECT": { "class": "PhpMyAdmin\\SqlParser\\Components\\UnionKeyword", @@ -461,7 +461,7 @@ "statements": [ { "@type": "PhpMyAdmin\\SqlParser\\Statements\\SelectStatement", - "OPTIONS": { + "statementOptions": { "ALL": 1, "DISTINCT": 1, "DISTINCTROW": 1, @@ -478,11 +478,11 @@ "SQL_NO_CACHE": 8, "SQL_CALC_FOUND_ROWS": 9 }, - "END_OPTIONS": { + "statementEndOptions": { "FOR UPDATE": 1, "LOCK IN SHARE MODE": 1 }, - "CLAUSES": { + "clauses": { "SELECT": [ "SELECT", 2 @@ -611,7 +611,7 @@ "expr": [ { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -637,7 +637,7 @@ "from": [ { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -660,7 +660,7 @@ "subquery": null } ], - "index_hints": null, + "indexHints": null, "partition": null, "where": null, "group": null, @@ -672,7 +672,7 @@ "join": [ { "@type": "PhpMyAdmin\\SqlParser\\Components\\JoinKeyword", - "JOINS": { + "joins": { "CROSS JOIN": "CROSS", "FULL JOIN": "FULL", "FULL OUTER JOIN": "FULL", @@ -692,7 +692,7 @@ "type": "NATURAL RIGHT", "expr": { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -719,7 +719,7 @@ } ], "union": [], - "end_options": null, + "endOptions": null, "options": { "@type": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", "options": [] diff --git a/tests/data/parser/parseSelectJoinNaturalRightOuter.out b/tests/data/parser/parseSelectJoinNaturalRightOuter.out index 606a1690d..ce846bd7b 100644 --- a/tests/data/parser/parseSelectJoinNaturalRightOuter.out +++ b/tests/data/parser/parseSelectJoinNaturalRightOuter.out @@ -2,7 +2,7 @@ "query": "SELECT * FROM actor NATURAL RIGHT OUTER JOIN film_actor;", "lexer": { "@type": "PhpMyAdmin\\SqlParser\\Lexer", - "PARSER_METHODS": [ + "parserMethods": [ "parseDelimiter", "parseWhitespace", "parseNumber", @@ -142,7 +142,7 @@ "count": 13, "idx": 13 }, - "DEFAULT_DELIMITER": ";", + "defaultDelimiter": ";", "delimiter": ";", "delimiterLen": 1, "strict": false, @@ -150,7 +150,7 @@ }, "parser": { "@type": "PhpMyAdmin\\SqlParser\\Parser", - "STATEMENT_PARSERS": { + "statementParsers": { "DESCRIBE": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", "DESC": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", "EXPLAIN": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", @@ -195,7 +195,7 @@ "LOCK": "PhpMyAdmin\\SqlParser\\Statements\\LockStatement", "UNLOCK": "PhpMyAdmin\\SqlParser\\Statements\\LockStatement" }, - "KEYWORD_PARSERS": { + "keywordParsers": { "PARTITION BY": [], "SUBPARTITION BY": [], "_OPTIONS": { @@ -204,7 +204,7 @@ }, "_END_OPTIONS": { "class": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", - "field": "end_options" + "field": "endOptions" }, "INTERSECT": { "class": "PhpMyAdmin\\SqlParser\\Components\\UnionKeyword", @@ -452,7 +452,7 @@ "statements": [ { "@type": "PhpMyAdmin\\SqlParser\\Statements\\SelectStatement", - "OPTIONS": { + "statementOptions": { "ALL": 1, "DISTINCT": 1, "DISTINCTROW": 1, @@ -469,11 +469,11 @@ "SQL_NO_CACHE": 8, "SQL_CALC_FOUND_ROWS": 9 }, - "END_OPTIONS": { + "statementEndOptions": { "FOR UPDATE": 1, "LOCK IN SHARE MODE": 1 }, - "CLAUSES": { + "clauses": { "SELECT": [ "SELECT", 2 @@ -602,7 +602,7 @@ "expr": [ { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -628,7 +628,7 @@ "from": [ { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -651,7 +651,7 @@ "subquery": null } ], - "index_hints": null, + "indexHints": null, "partition": null, "where": null, "group": null, @@ -663,7 +663,7 @@ "join": [ { "@type": "PhpMyAdmin\\SqlParser\\Components\\JoinKeyword", - "JOINS": { + "joins": { "CROSS JOIN": "CROSS", "FULL JOIN": "FULL", "FULL OUTER JOIN": "FULL", @@ -683,7 +683,7 @@ "type": "NATURAL RIGHT OUTER", "expr": { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -710,7 +710,7 @@ } ], "union": [], - "end_options": null, + "endOptions": null, "options": { "@type": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", "options": [] diff --git a/tests/data/parser/parseSelectJoinStraight.out b/tests/data/parser/parseSelectJoinStraight.out index bc901f12f..5214b8b2f 100644 --- a/tests/data/parser/parseSelectJoinStraight.out +++ b/tests/data/parser/parseSelectJoinStraight.out @@ -2,7 +2,7 @@ "query": "SELECT id,aval1,cval1\nFROM table111\nSTRAIGHT_JOIN table113 on table111.a = table113.b", "lexer": { "@type": "PhpMyAdmin\\SqlParser\\Lexer", - "PARSER_METHODS": [ + "parserMethods": [ "parseDelimiter", "parseWhitespace", "parseNumber", @@ -277,7 +277,7 @@ "count": 28, "idx": 28 }, - "DEFAULT_DELIMITER": ";", + "defaultDelimiter": ";", "delimiter": ";", "delimiterLen": 1, "strict": false, @@ -285,7 +285,7 @@ }, "parser": { "@type": "PhpMyAdmin\\SqlParser\\Parser", - "STATEMENT_PARSERS": { + "statementParsers": { "DESCRIBE": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", "DESC": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", "EXPLAIN": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", @@ -330,7 +330,7 @@ "LOCK": "PhpMyAdmin\\SqlParser\\Statements\\LockStatement", "UNLOCK": "PhpMyAdmin\\SqlParser\\Statements\\LockStatement" }, - "KEYWORD_PARSERS": { + "keywordParsers": { "PARTITION BY": [], "SUBPARTITION BY": [], "_OPTIONS": { @@ -339,7 +339,7 @@ }, "_END_OPTIONS": { "class": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", - "field": "end_options" + "field": "endOptions" }, "INTERSECT": { "class": "PhpMyAdmin\\SqlParser\\Components\\UnionKeyword", @@ -587,7 +587,7 @@ "statements": [ { "@type": "PhpMyAdmin\\SqlParser\\Statements\\SelectStatement", - "OPTIONS": { + "statementOptions": { "ALL": 1, "DISTINCT": 1, "DISTINCTROW": 1, @@ -604,11 +604,11 @@ "SQL_NO_CACHE": 8, "SQL_CALC_FOUND_ROWS": 9 }, - "END_OPTIONS": { + "statementEndOptions": { "FOR UPDATE": 1, "LOCK IN SHARE MODE": 1 }, - "CLAUSES": { + "clauses": { "SELECT": [ "SELECT", 2 @@ -737,7 +737,7 @@ "expr": [ { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -761,7 +761,7 @@ }, { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -785,7 +785,7 @@ }, { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -811,7 +811,7 @@ "from": [ { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -834,7 +834,7 @@ "subquery": null } ], - "index_hints": null, + "indexHints": null, "partition": null, "where": null, "group": null, @@ -846,7 +846,7 @@ "join": [ { "@type": "PhpMyAdmin\\SqlParser\\Components\\JoinKeyword", - "JOINS": { + "joins": { "CROSS JOIN": "CROSS", "FULL JOIN": "FULL", "FULL OUTER JOIN": "FULL", @@ -866,7 +866,7 @@ "type": "STRAIGHT", "expr": { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -891,14 +891,14 @@ "on": [ { "@type": "PhpMyAdmin\\SqlParser\\Components\\Condition", - "DELIMITERS": [ + "delimiters": [ "&&", "||", "AND", "OR", "XOR" ], - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "ALL": 1, "AND": 1, "BETWEEN": 1, @@ -933,7 +933,7 @@ } ], "union": [], - "end_options": null, + "endOptions": null, "options": { "@type": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", "options": [] diff --git a/tests/data/parser/parseSelectNested.out b/tests/data/parser/parseSelectNested.out index 4ffe6a2c8..0ed26811c 100644 --- a/tests/data/parser/parseSelectNested.out +++ b/tests/data/parser/parseSelectNested.out @@ -2,7 +2,7 @@ "query": "SELECT (SELECT 'foo') as Bar, (SELECT 'baz') as fOo;", "lexer": { "@type": "PhpMyAdmin\\SqlParser\\Lexer", - "PARSER_METHODS": [ + "parserMethods": [ "parseDelimiter", "parseWhitespace", "parseNumber", @@ -241,7 +241,7 @@ "count": 24, "idx": 24 }, - "DEFAULT_DELIMITER": ";", + "defaultDelimiter": ";", "delimiter": ";", "delimiterLen": 1, "strict": false, @@ -249,7 +249,7 @@ }, "parser": { "@type": "PhpMyAdmin\\SqlParser\\Parser", - "STATEMENT_PARSERS": { + "statementParsers": { "DESCRIBE": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", "DESC": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", "EXPLAIN": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", @@ -294,7 +294,7 @@ "LOCK": "PhpMyAdmin\\SqlParser\\Statements\\LockStatement", "UNLOCK": "PhpMyAdmin\\SqlParser\\Statements\\LockStatement" }, - "KEYWORD_PARSERS": { + "keywordParsers": { "PARTITION BY": [], "SUBPARTITION BY": [], "_OPTIONS": { @@ -303,7 +303,7 @@ }, "_END_OPTIONS": { "class": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", - "field": "end_options" + "field": "endOptions" }, "INTERSECT": { "class": "PhpMyAdmin\\SqlParser\\Components\\UnionKeyword", @@ -551,7 +551,7 @@ "statements": [ { "@type": "PhpMyAdmin\\SqlParser\\Statements\\SelectStatement", - "OPTIONS": { + "statementOptions": { "ALL": 1, "DISTINCT": 1, "DISTINCTROW": 1, @@ -568,11 +568,11 @@ "SQL_NO_CACHE": 8, "SQL_CALC_FOUND_ROWS": 9 }, - "END_OPTIONS": { + "statementEndOptions": { "FOR UPDATE": 1, "LOCK IN SHARE MODE": 1 }, - "CLAUSES": { + "clauses": { "SELECT": [ "SELECT", 2 @@ -701,7 +701,7 @@ "expr": [ { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -725,7 +725,7 @@ }, { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -749,7 +749,7 @@ } ], "from": [], - "index_hints": null, + "indexHints": null, "partition": null, "where": null, "group": null, @@ -760,7 +760,7 @@ "into": null, "join": null, "union": [], - "end_options": null, + "endOptions": null, "options": { "@type": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", "options": [] diff --git a/tests/data/parser/parseSelectOrderByComment.out b/tests/data/parser/parseSelectOrderByComment.out index c21237f73..5c7296630 100644 --- a/tests/data/parser/parseSelectOrderByComment.out +++ b/tests/data/parser/parseSelectOrderByComment.out @@ -2,7 +2,7 @@ "query": "SELECT `one space` -- this is the SELECT\n FROM `Une table espace` -- this is the FROM\n ORDER BY `one space` ASC -- this is the order by", "lexer": { "@type": "PhpMyAdmin\\SqlParser\\Lexer", - "PARSER_METHODS": [ + "parserMethods": [ "parseDelimiter", "parseWhitespace", "parseNumber", @@ -205,7 +205,7 @@ "count": 20, "idx": 20 }, - "DEFAULT_DELIMITER": ";", + "defaultDelimiter": ";", "delimiter": ";", "delimiterLen": 1, "strict": false, @@ -213,7 +213,7 @@ }, "parser": { "@type": "PhpMyAdmin\\SqlParser\\Parser", - "STATEMENT_PARSERS": { + "statementParsers": { "DESCRIBE": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", "DESC": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", "EXPLAIN": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", @@ -258,7 +258,7 @@ "LOCK": "PhpMyAdmin\\SqlParser\\Statements\\LockStatement", "UNLOCK": "PhpMyAdmin\\SqlParser\\Statements\\LockStatement" }, - "KEYWORD_PARSERS": { + "keywordParsers": { "PARTITION BY": [], "SUBPARTITION BY": [], "_OPTIONS": { @@ -267,7 +267,7 @@ }, "_END_OPTIONS": { "class": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", - "field": "end_options" + "field": "endOptions" }, "INTERSECT": { "class": "PhpMyAdmin\\SqlParser\\Components\\UnionKeyword", @@ -515,7 +515,7 @@ "statements": [ { "@type": "PhpMyAdmin\\SqlParser\\Statements\\SelectStatement", - "OPTIONS": { + "statementOptions": { "ALL": 1, "DISTINCT": 1, "DISTINCTROW": 1, @@ -532,11 +532,11 @@ "SQL_NO_CACHE": 8, "SQL_CALC_FOUND_ROWS": 9 }, - "END_OPTIONS": { + "statementEndOptions": { "FOR UPDATE": 1, "LOCK IN SHARE MODE": 1 }, - "CLAUSES": { + "clauses": { "SELECT": [ "SELECT", 2 @@ -665,7 +665,7 @@ "expr": [ { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -691,7 +691,7 @@ "from": [ { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -714,7 +714,7 @@ "subquery": null } ], - "index_hints": null, + "indexHints": null, "partition": null, "where": null, "group": null, @@ -724,7 +724,7 @@ "@type": "PhpMyAdmin\\SqlParser\\Components\\OrderKeyword", "expr": { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -754,7 +754,7 @@ "into": null, "join": null, "union": [], - "end_options": null, + "endOptions": null, "options": { "@type": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", "options": [] diff --git a/tests/data/parser/parseSelectOverAlias_mariadb_100600.out b/tests/data/parser/parseSelectOverAlias_mariadb_100600.out index 6d3d73357..d26197a8c 100644 --- a/tests/data/parser/parseSelectOverAlias_mariadb_100600.out +++ b/tests/data/parser/parseSelectOverAlias_mariadb_100600.out @@ -2,7 +2,7 @@ "query": "select `products`.`pid` AS `pid`, `products`.`pname` as `name`, rank() over( partition by `products`.`pvalue` order by `products`.`pid` desc) AS `myrank` from `products` \n", "lexer": { "@type": "PhpMyAdmin\\SqlParser\\Lexer", - "PARSER_METHODS": [ + "parserMethods": [ "parseDelimiter", "parseWhitespace", "parseNumber", @@ -484,7 +484,7 @@ "count": 51, "idx": 51 }, - "DEFAULT_DELIMITER": ";", + "defaultDelimiter": ";", "delimiter": ";", "delimiterLen": 1, "strict": false, @@ -492,7 +492,7 @@ }, "parser": { "@type": "PhpMyAdmin\\SqlParser\\Parser", - "STATEMENT_PARSERS": { + "statementParsers": { "DESCRIBE": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", "DESC": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", "EXPLAIN": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", @@ -537,7 +537,7 @@ "LOCK": "PhpMyAdmin\\SqlParser\\Statements\\LockStatement", "UNLOCK": "PhpMyAdmin\\SqlParser\\Statements\\LockStatement" }, - "KEYWORD_PARSERS": { + "keywordParsers": { "PARTITION BY": [], "SUBPARTITION BY": [], "_OPTIONS": { @@ -546,7 +546,7 @@ }, "_END_OPTIONS": { "class": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", - "field": "end_options" + "field": "endOptions" }, "INTERSECT": { "class": "PhpMyAdmin\\SqlParser\\Components\\UnionKeyword", @@ -794,7 +794,7 @@ "statements": [ { "@type": "PhpMyAdmin\\SqlParser\\Statements\\SelectStatement", - "OPTIONS": { + "statementOptions": { "ALL": 1, "DISTINCT": 1, "DISTINCTROW": 1, @@ -811,11 +811,11 @@ "SQL_NO_CACHE": 8, "SQL_CALC_FOUND_ROWS": 9 }, - "END_OPTIONS": { + "statementEndOptions": { "FOR UPDATE": 1, "LOCK IN SHARE MODE": 1 }, - "CLAUSES": { + "clauses": { "SELECT": [ "SELECT", 2 @@ -944,7 +944,7 @@ "expr": [ { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -968,7 +968,7 @@ }, { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -992,7 +992,7 @@ }, { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -1018,7 +1018,7 @@ "from": [ { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -1041,7 +1041,7 @@ "subquery": null } ], - "index_hints": null, + "indexHints": null, "partition": null, "where": null, "group": null, @@ -1052,7 +1052,7 @@ "into": null, "join": null, "union": [], - "end_options": null, + "endOptions": null, "options": { "@type": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", "options": [] diff --git a/tests/data/parser/parseSelectUnion.out b/tests/data/parser/parseSelectUnion.out index f57a1a7ac..949b5aa45 100644 --- a/tests/data/parser/parseSelectUnion.out +++ b/tests/data/parser/parseSelectUnion.out @@ -2,7 +2,7 @@ "query": "(SELECT a FROM t WHERE a=1) UNION (SELECT a FROM t WHERE a=2)\n", "lexer": { "@type": "PhpMyAdmin\\SqlParser\\Lexer", - "PARSER_METHODS": [ + "parserMethods": [ "parseDelimiter", "parseWhitespace", "parseNumber", @@ -340,7 +340,7 @@ "count": 35, "idx": 35 }, - "DEFAULT_DELIMITER": ";", + "defaultDelimiter": ";", "delimiter": ";", "delimiterLen": 1, "strict": false, @@ -348,7 +348,7 @@ }, "parser": { "@type": "PhpMyAdmin\\SqlParser\\Parser", - "STATEMENT_PARSERS": { + "statementParsers": { "DESCRIBE": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", "DESC": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", "EXPLAIN": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", @@ -393,7 +393,7 @@ "LOCK": "PhpMyAdmin\\SqlParser\\Statements\\LockStatement", "UNLOCK": "PhpMyAdmin\\SqlParser\\Statements\\LockStatement" }, - "KEYWORD_PARSERS": { + "keywordParsers": { "PARTITION BY": [], "SUBPARTITION BY": [], "_OPTIONS": { @@ -402,7 +402,7 @@ }, "_END_OPTIONS": { "class": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", - "field": "end_options" + "field": "endOptions" }, "INTERSECT": { "class": "PhpMyAdmin\\SqlParser\\Components\\UnionKeyword", @@ -650,7 +650,7 @@ "statements": [ { "@type": "PhpMyAdmin\\SqlParser\\Statements\\SelectStatement", - "OPTIONS": { + "statementOptions": { "ALL": 1, "DISTINCT": 1, "DISTINCTROW": 1, @@ -667,11 +667,11 @@ "SQL_NO_CACHE": 8, "SQL_CALC_FOUND_ROWS": 9 }, - "END_OPTIONS": { + "statementEndOptions": { "FOR UPDATE": 1, "LOCK IN SHARE MODE": 1 }, - "CLAUSES": { + "clauses": { "SELECT": [ "SELECT", 2 @@ -800,7 +800,7 @@ "expr": [ { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -826,7 +826,7 @@ "from": [ { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -849,19 +849,19 @@ "subquery": null } ], - "index_hints": null, + "indexHints": null, "partition": null, "where": [ { "@type": "PhpMyAdmin\\SqlParser\\Components\\Condition", - "DELIMITERS": [ + "delimiters": [ "&&", "||", "AND", "OR", "XOR" ], - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "ALL": 1, "AND": 1, "BETWEEN": 1, @@ -901,7 +901,7 @@ "UNION", { "@type": "PhpMyAdmin\\SqlParser\\Statements\\SelectStatement", - "OPTIONS": { + "statementOptions": { "ALL": 1, "DISTINCT": 1, "DISTINCTROW": 1, @@ -918,11 +918,11 @@ "SQL_NO_CACHE": 8, "SQL_CALC_FOUND_ROWS": 9 }, - "END_OPTIONS": { + "statementEndOptions": { "FOR UPDATE": 1, "LOCK IN SHARE MODE": 1 }, - "CLAUSES": { + "clauses": { "SELECT": [ "SELECT", 2 @@ -1051,7 +1051,7 @@ "expr": [ { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -1077,7 +1077,7 @@ "from": [ { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -1100,19 +1100,19 @@ "subquery": null } ], - "index_hints": null, + "indexHints": null, "partition": null, "where": [ { "@type": "PhpMyAdmin\\SqlParser\\Components\\Condition", - "DELIMITERS": [ + "delimiters": [ "&&", "||", "AND", "OR", "XOR" ], - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "ALL": 1, "AND": 1, "BETWEEN": 1, @@ -1148,7 +1148,7 @@ "into": null, "join": null, "union": [], - "end_options": null, + "endOptions": null, "options": { "@type": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", "options": [] @@ -1158,7 +1158,7 @@ } ] ], - "end_options": null, + "endOptions": null, "options": { "@type": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", "options": [] diff --git a/tests/data/parser/parseSelectUnion2.out b/tests/data/parser/parseSelectUnion2.out index 6d6ce933a..4e30fe468 100644 --- a/tests/data/parser/parseSelectUnion2.out +++ b/tests/data/parser/parseSelectUnion2.out @@ -2,7 +2,7 @@ "query": "(SELECT DISTINCT `User`, `Host` FROM `mysql`.`user` ) UNION (SELECT DISTINCT `User`, `Host` FROM `mysql`.`db` ) UNION (SELECT DISTINCT `User`, `Host` FROM `mysql`.`tables_priv` ) UNION (SELECT DISTINCT `User`, `Host` FROM `mysql`.`columns_priv` ) UNION (SELECT DISTINCT `User`, `Host` FROM `mysql`.`procs_priv` ) ORDER BY `User` ASC, `Host` ASC", "lexer": { "@type": "PhpMyAdmin\\SqlParser\\Lexer", - "PARSER_METHODS": [ + "parserMethods": [ "parseDelimiter", "parseWhitespace", "parseNumber", @@ -1006,7 +1006,7 @@ "count": 109, "idx": 109 }, - "DEFAULT_DELIMITER": ";", + "defaultDelimiter": ";", "delimiter": ";", "delimiterLen": 1, "strict": false, @@ -1014,7 +1014,7 @@ }, "parser": { "@type": "PhpMyAdmin\\SqlParser\\Parser", - "STATEMENT_PARSERS": { + "statementParsers": { "DESCRIBE": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", "DESC": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", "EXPLAIN": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", @@ -1059,7 +1059,7 @@ "LOCK": "PhpMyAdmin\\SqlParser\\Statements\\LockStatement", "UNLOCK": "PhpMyAdmin\\SqlParser\\Statements\\LockStatement" }, - "KEYWORD_PARSERS": { + "keywordParsers": { "PARTITION BY": [], "SUBPARTITION BY": [], "_OPTIONS": { @@ -1068,7 +1068,7 @@ }, "_END_OPTIONS": { "class": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", - "field": "end_options" + "field": "endOptions" }, "INTERSECT": { "class": "PhpMyAdmin\\SqlParser\\Components\\UnionKeyword", @@ -1316,7 +1316,7 @@ "statements": [ { "@type": "PhpMyAdmin\\SqlParser\\Statements\\SelectStatement", - "OPTIONS": { + "statementOptions": { "ALL": 1, "DISTINCT": 1, "DISTINCTROW": 1, @@ -1333,11 +1333,11 @@ "SQL_NO_CACHE": 8, "SQL_CALC_FOUND_ROWS": 9 }, - "END_OPTIONS": { + "statementEndOptions": { "FOR UPDATE": 1, "LOCK IN SHARE MODE": 1 }, - "CLAUSES": { + "clauses": { "SELECT": [ "SELECT", 2 @@ -1466,7 +1466,7 @@ "expr": [ { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -1490,7 +1490,7 @@ }, { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -1516,7 +1516,7 @@ "from": [ { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -1539,7 +1539,7 @@ "subquery": null } ], - "index_hints": null, + "indexHints": null, "partition": null, "where": null, "group": null, @@ -1549,7 +1549,7 @@ "@type": "PhpMyAdmin\\SqlParser\\Components\\OrderKeyword", "expr": { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -1577,7 +1577,7 @@ "@type": "PhpMyAdmin\\SqlParser\\Components\\OrderKeyword", "expr": { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -1611,7 +1611,7 @@ "UNION", { "@type": "PhpMyAdmin\\SqlParser\\Statements\\SelectStatement", - "OPTIONS": { + "statementOptions": { "ALL": 1, "DISTINCT": 1, "DISTINCTROW": 1, @@ -1628,11 +1628,11 @@ "SQL_NO_CACHE": 8, "SQL_CALC_FOUND_ROWS": 9 }, - "END_OPTIONS": { + "statementEndOptions": { "FOR UPDATE": 1, "LOCK IN SHARE MODE": 1 }, - "CLAUSES": { + "clauses": { "SELECT": [ "SELECT", 2 @@ -1761,7 +1761,7 @@ "expr": [ { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -1785,7 +1785,7 @@ }, { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -1811,7 +1811,7 @@ "from": [ { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -1834,7 +1834,7 @@ "subquery": null } ], - "index_hints": null, + "indexHints": null, "partition": null, "where": null, "group": null, @@ -1845,7 +1845,7 @@ "into": null, "join": null, "union": [], - "end_options": null, + "endOptions": null, "options": { "@type": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", "options": { @@ -1860,7 +1860,7 @@ "UNION", { "@type": "PhpMyAdmin\\SqlParser\\Statements\\SelectStatement", - "OPTIONS": { + "statementOptions": { "ALL": 1, "DISTINCT": 1, "DISTINCTROW": 1, @@ -1877,11 +1877,11 @@ "SQL_NO_CACHE": 8, "SQL_CALC_FOUND_ROWS": 9 }, - "END_OPTIONS": { + "statementEndOptions": { "FOR UPDATE": 1, "LOCK IN SHARE MODE": 1 }, - "CLAUSES": { + "clauses": { "SELECT": [ "SELECT", 2 @@ -2010,7 +2010,7 @@ "expr": [ { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -2034,7 +2034,7 @@ }, { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -2060,7 +2060,7 @@ "from": [ { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -2083,7 +2083,7 @@ "subquery": null } ], - "index_hints": null, + "indexHints": null, "partition": null, "where": null, "group": null, @@ -2094,7 +2094,7 @@ "into": null, "join": null, "union": [], - "end_options": null, + "endOptions": null, "options": { "@type": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", "options": { @@ -2109,7 +2109,7 @@ "UNION", { "@type": "PhpMyAdmin\\SqlParser\\Statements\\SelectStatement", - "OPTIONS": { + "statementOptions": { "ALL": 1, "DISTINCT": 1, "DISTINCTROW": 1, @@ -2126,11 +2126,11 @@ "SQL_NO_CACHE": 8, "SQL_CALC_FOUND_ROWS": 9 }, - "END_OPTIONS": { + "statementEndOptions": { "FOR UPDATE": 1, "LOCK IN SHARE MODE": 1 }, - "CLAUSES": { + "clauses": { "SELECT": [ "SELECT", 2 @@ -2259,7 +2259,7 @@ "expr": [ { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -2283,7 +2283,7 @@ }, { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -2309,7 +2309,7 @@ "from": [ { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -2332,7 +2332,7 @@ "subquery": null } ], - "index_hints": null, + "indexHints": null, "partition": null, "where": null, "group": null, @@ -2343,7 +2343,7 @@ "into": null, "join": null, "union": [], - "end_options": null, + "endOptions": null, "options": { "@type": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", "options": { @@ -2358,7 +2358,7 @@ "UNION", { "@type": "PhpMyAdmin\\SqlParser\\Statements\\SelectStatement", - "OPTIONS": { + "statementOptions": { "ALL": 1, "DISTINCT": 1, "DISTINCTROW": 1, @@ -2375,11 +2375,11 @@ "SQL_NO_CACHE": 8, "SQL_CALC_FOUND_ROWS": 9 }, - "END_OPTIONS": { + "statementEndOptions": { "FOR UPDATE": 1, "LOCK IN SHARE MODE": 1 }, - "CLAUSES": { + "clauses": { "SELECT": [ "SELECT", 2 @@ -2508,7 +2508,7 @@ "expr": [ { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -2532,7 +2532,7 @@ }, { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -2558,7 +2558,7 @@ "from": [ { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -2581,7 +2581,7 @@ "subquery": null } ], - "index_hints": null, + "indexHints": null, "partition": null, "where": null, "group": null, @@ -2592,7 +2592,7 @@ "into": null, "join": null, "union": [], - "end_options": null, + "endOptions": null, "options": { "@type": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", "options": { @@ -2604,7 +2604,7 @@ } ] ], - "end_options": null, + "endOptions": null, "options": { "@type": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", "options": { diff --git a/tests/data/parser/parseSelectWhere.out b/tests/data/parser/parseSelectWhere.out index fd9d3e56d..634ab9180 100644 --- a/tests/data/parser/parseSelectWhere.out +++ b/tests/data/parser/parseSelectWhere.out @@ -2,7 +2,7 @@ "query": "SELECT * FROM film WHERE film_id = 10 OR film_id >= 20;\nSELECT * FROM film WHERE (film_id < 10) || (film_id > 20);\nSELECT * FROM film WHERE `film_id` != 10 AND `film_id` <= 20;\nSELECT * FROM film WHERE `film`.`film_id` <> 10 && `film`.`film_id` <= 20;\nSELECT * FROM film WHERE film.film_id < 20 XOR film.rating = 'PG-13';\nSELECT * FROM film WHERE \/* film_id = *\/ film_id = 10;\nSELECT * FROM film WHERE NOT film_id > 10;\nSELECT * FROM film WHERE ! (film_id > 10);\nSELECT * FROM film WHERE description IS NULL;\nSELECT * FROM film WHERE description IS NOT NULL;\nSELECT * FROM film WHERE film_id BETWEEN 10 AND 20;\nSELECT * FROM film WHERE film_id NOT BETWEEN 10 AND 20;\nSELECT * FROM film WHERE film_id IN (3,5,7);\nSELECT * FROM film WHERE rating = UPPER('pg');\nSELECT * FROM film WHERE rating SOUNDS LIKE 'PG';", "lexer": { "@type": "PhpMyAdmin\\SqlParser\\Lexer", - "PARSER_METHODS": [ + "parserMethods": [ "parseDelimiter", "parseWhitespace", "parseNumber", @@ -3049,7 +3049,7 @@ "count": 336, "idx": 336 }, - "DEFAULT_DELIMITER": ";", + "defaultDelimiter": ";", "delimiter": ";", "delimiterLen": 1, "strict": false, @@ -3057,7 +3057,7 @@ }, "parser": { "@type": "PhpMyAdmin\\SqlParser\\Parser", - "STATEMENT_PARSERS": { + "statementParsers": { "DESCRIBE": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", "DESC": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", "EXPLAIN": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", @@ -3102,7 +3102,7 @@ "LOCK": "PhpMyAdmin\\SqlParser\\Statements\\LockStatement", "UNLOCK": "PhpMyAdmin\\SqlParser\\Statements\\LockStatement" }, - "KEYWORD_PARSERS": { + "keywordParsers": { "PARTITION BY": [], "SUBPARTITION BY": [], "_OPTIONS": { @@ -3111,7 +3111,7 @@ }, "_END_OPTIONS": { "class": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", - "field": "end_options" + "field": "endOptions" }, "INTERSECT": { "class": "PhpMyAdmin\\SqlParser\\Components\\UnionKeyword", @@ -3359,7 +3359,7 @@ "statements": [ { "@type": "PhpMyAdmin\\SqlParser\\Statements\\SelectStatement", - "OPTIONS": { + "statementOptions": { "ALL": 1, "DISTINCT": 1, "DISTINCTROW": 1, @@ -3376,11 +3376,11 @@ "SQL_NO_CACHE": 8, "SQL_CALC_FOUND_ROWS": 9 }, - "END_OPTIONS": { + "statementEndOptions": { "FOR UPDATE": 1, "LOCK IN SHARE MODE": 1 }, - "CLAUSES": { + "clauses": { "SELECT": [ "SELECT", 2 @@ -3509,7 +3509,7 @@ "expr": [ { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -3535,7 +3535,7 @@ "from": [ { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -3558,19 +3558,19 @@ "subquery": null } ], - "index_hints": null, + "indexHints": null, "partition": null, "where": [ { "@type": "PhpMyAdmin\\SqlParser\\Components\\Condition", - "DELIMITERS": [ + "delimiters": [ "&&", "||", "AND", "OR", "XOR" ], - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "ALL": 1, "AND": 1, "BETWEEN": 1, @@ -3599,14 +3599,14 @@ }, { "@type": "PhpMyAdmin\\SqlParser\\Components\\Condition", - "DELIMITERS": [ + "delimiters": [ "&&", "||", "AND", "OR", "XOR" ], - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "ALL": 1, "AND": 1, "BETWEEN": 1, @@ -3633,14 +3633,14 @@ }, { "@type": "PhpMyAdmin\\SqlParser\\Components\\Condition", - "DELIMITERS": [ + "delimiters": [ "&&", "||", "AND", "OR", "XOR" ], - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "ALL": 1, "AND": 1, "BETWEEN": 1, @@ -3676,7 +3676,7 @@ "into": null, "join": null, "union": [], - "end_options": null, + "endOptions": null, "options": { "@type": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", "options": [] @@ -3686,7 +3686,7 @@ }, { "@type": "PhpMyAdmin\\SqlParser\\Statements\\SelectStatement", - "OPTIONS": { + "statementOptions": { "ALL": 1, "DISTINCT": 1, "DISTINCTROW": 1, @@ -3703,11 +3703,11 @@ "SQL_NO_CACHE": 8, "SQL_CALC_FOUND_ROWS": 9 }, - "END_OPTIONS": { + "statementEndOptions": { "FOR UPDATE": 1, "LOCK IN SHARE MODE": 1 }, - "CLAUSES": { + "clauses": { "SELECT": [ "SELECT", 2 @@ -3836,7 +3836,7 @@ "expr": [ { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -3862,7 +3862,7 @@ "from": [ { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -3885,19 +3885,19 @@ "subquery": null } ], - "index_hints": null, + "indexHints": null, "partition": null, "where": [ { "@type": "PhpMyAdmin\\SqlParser\\Components\\Condition", - "DELIMITERS": [ + "delimiters": [ "&&", "||", "AND", "OR", "XOR" ], - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "ALL": 1, "AND": 1, "BETWEEN": 1, @@ -3926,14 +3926,14 @@ }, { "@type": "PhpMyAdmin\\SqlParser\\Components\\Condition", - "DELIMITERS": [ + "delimiters": [ "&&", "||", "AND", "OR", "XOR" ], - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "ALL": 1, "AND": 1, "BETWEEN": 1, @@ -3960,14 +3960,14 @@ }, { "@type": "PhpMyAdmin\\SqlParser\\Components\\Condition", - "DELIMITERS": [ + "delimiters": [ "&&", "||", "AND", "OR", "XOR" ], - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "ALL": 1, "AND": 1, "BETWEEN": 1, @@ -4003,7 +4003,7 @@ "into": null, "join": null, "union": [], - "end_options": null, + "endOptions": null, "options": { "@type": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", "options": [] @@ -4013,7 +4013,7 @@ }, { "@type": "PhpMyAdmin\\SqlParser\\Statements\\SelectStatement", - "OPTIONS": { + "statementOptions": { "ALL": 1, "DISTINCT": 1, "DISTINCTROW": 1, @@ -4030,11 +4030,11 @@ "SQL_NO_CACHE": 8, "SQL_CALC_FOUND_ROWS": 9 }, - "END_OPTIONS": { + "statementEndOptions": { "FOR UPDATE": 1, "LOCK IN SHARE MODE": 1 }, - "CLAUSES": { + "clauses": { "SELECT": [ "SELECT", 2 @@ -4163,7 +4163,7 @@ "expr": [ { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -4189,7 +4189,7 @@ "from": [ { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -4212,19 +4212,19 @@ "subquery": null } ], - "index_hints": null, + "indexHints": null, "partition": null, "where": [ { "@type": "PhpMyAdmin\\SqlParser\\Components\\Condition", - "DELIMITERS": [ + "delimiters": [ "&&", "||", "AND", "OR", "XOR" ], - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "ALL": 1, "AND": 1, "BETWEEN": 1, @@ -4253,14 +4253,14 @@ }, { "@type": "PhpMyAdmin\\SqlParser\\Components\\Condition", - "DELIMITERS": [ + "delimiters": [ "&&", "||", "AND", "OR", "XOR" ], - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "ALL": 1, "AND": 1, "BETWEEN": 1, @@ -4287,14 +4287,14 @@ }, { "@type": "PhpMyAdmin\\SqlParser\\Components\\Condition", - "DELIMITERS": [ + "delimiters": [ "&&", "||", "AND", "OR", "XOR" ], - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "ALL": 1, "AND": 1, "BETWEEN": 1, @@ -4330,7 +4330,7 @@ "into": null, "join": null, "union": [], - "end_options": null, + "endOptions": null, "options": { "@type": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", "options": [] @@ -4340,7 +4340,7 @@ }, { "@type": "PhpMyAdmin\\SqlParser\\Statements\\SelectStatement", - "OPTIONS": { + "statementOptions": { "ALL": 1, "DISTINCT": 1, "DISTINCTROW": 1, @@ -4357,11 +4357,11 @@ "SQL_NO_CACHE": 8, "SQL_CALC_FOUND_ROWS": 9 }, - "END_OPTIONS": { + "statementEndOptions": { "FOR UPDATE": 1, "LOCK IN SHARE MODE": 1 }, - "CLAUSES": { + "clauses": { "SELECT": [ "SELECT", 2 @@ -4490,7 +4490,7 @@ "expr": [ { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -4516,7 +4516,7 @@ "from": [ { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -4539,19 +4539,19 @@ "subquery": null } ], - "index_hints": null, + "indexHints": null, "partition": null, "where": [ { "@type": "PhpMyAdmin\\SqlParser\\Components\\Condition", - "DELIMITERS": [ + "delimiters": [ "&&", "||", "AND", "OR", "XOR" ], - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "ALL": 1, "AND": 1, "BETWEEN": 1, @@ -4581,14 +4581,14 @@ }, { "@type": "PhpMyAdmin\\SqlParser\\Components\\Condition", - "DELIMITERS": [ + "delimiters": [ "&&", "||", "AND", "OR", "XOR" ], - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "ALL": 1, "AND": 1, "BETWEEN": 1, @@ -4615,14 +4615,14 @@ }, { "@type": "PhpMyAdmin\\SqlParser\\Components\\Condition", - "DELIMITERS": [ + "delimiters": [ "&&", "||", "AND", "OR", "XOR" ], - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "ALL": 1, "AND": 1, "BETWEEN": 1, @@ -4659,7 +4659,7 @@ "into": null, "join": null, "union": [], - "end_options": null, + "endOptions": null, "options": { "@type": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", "options": [] @@ -4669,7 +4669,7 @@ }, { "@type": "PhpMyAdmin\\SqlParser\\Statements\\SelectStatement", - "OPTIONS": { + "statementOptions": { "ALL": 1, "DISTINCT": 1, "DISTINCTROW": 1, @@ -4686,11 +4686,11 @@ "SQL_NO_CACHE": 8, "SQL_CALC_FOUND_ROWS": 9 }, - "END_OPTIONS": { + "statementEndOptions": { "FOR UPDATE": 1, "LOCK IN SHARE MODE": 1 }, - "CLAUSES": { + "clauses": { "SELECT": [ "SELECT", 2 @@ -4819,7 +4819,7 @@ "expr": [ { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -4845,7 +4845,7 @@ "from": [ { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -4868,19 +4868,19 @@ "subquery": null } ], - "index_hints": null, + "indexHints": null, "partition": null, "where": [ { "@type": "PhpMyAdmin\\SqlParser\\Components\\Condition", - "DELIMITERS": [ + "delimiters": [ "&&", "||", "AND", "OR", "XOR" ], - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "ALL": 1, "AND": 1, "BETWEEN": 1, @@ -4910,14 +4910,14 @@ }, { "@type": "PhpMyAdmin\\SqlParser\\Components\\Condition", - "DELIMITERS": [ + "delimiters": [ "&&", "||", "AND", "OR", "XOR" ], - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "ALL": 1, "AND": 1, "BETWEEN": 1, @@ -4944,14 +4944,14 @@ }, { "@type": "PhpMyAdmin\\SqlParser\\Components\\Condition", - "DELIMITERS": [ + "delimiters": [ "&&", "||", "AND", "OR", "XOR" ], - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "ALL": 1, "AND": 1, "BETWEEN": 1, @@ -4989,7 +4989,7 @@ "into": null, "join": null, "union": [], - "end_options": null, + "endOptions": null, "options": { "@type": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", "options": [] @@ -4999,7 +4999,7 @@ }, { "@type": "PhpMyAdmin\\SqlParser\\Statements\\SelectStatement", - "OPTIONS": { + "statementOptions": { "ALL": 1, "DISTINCT": 1, "DISTINCTROW": 1, @@ -5016,11 +5016,11 @@ "SQL_NO_CACHE": 8, "SQL_CALC_FOUND_ROWS": 9 }, - "END_OPTIONS": { + "statementEndOptions": { "FOR UPDATE": 1, "LOCK IN SHARE MODE": 1 }, - "CLAUSES": { + "clauses": { "SELECT": [ "SELECT", 2 @@ -5149,7 +5149,7 @@ "expr": [ { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -5175,7 +5175,7 @@ "from": [ { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -5198,19 +5198,19 @@ "subquery": null } ], - "index_hints": null, + "indexHints": null, "partition": null, "where": [ { "@type": "PhpMyAdmin\\SqlParser\\Components\\Condition", - "DELIMITERS": [ + "delimiters": [ "&&", "||", "AND", "OR", "XOR" ], - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "ALL": 1, "AND": 1, "BETWEEN": 1, @@ -5246,7 +5246,7 @@ "into": null, "join": null, "union": [], - "end_options": null, + "endOptions": null, "options": { "@type": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", "options": [] @@ -5256,7 +5256,7 @@ }, { "@type": "PhpMyAdmin\\SqlParser\\Statements\\SelectStatement", - "OPTIONS": { + "statementOptions": { "ALL": 1, "DISTINCT": 1, "DISTINCTROW": 1, @@ -5273,11 +5273,11 @@ "SQL_NO_CACHE": 8, "SQL_CALC_FOUND_ROWS": 9 }, - "END_OPTIONS": { + "statementEndOptions": { "FOR UPDATE": 1, "LOCK IN SHARE MODE": 1 }, - "CLAUSES": { + "clauses": { "SELECT": [ "SELECT", 2 @@ -5406,7 +5406,7 @@ "expr": [ { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -5432,7 +5432,7 @@ "from": [ { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -5455,19 +5455,19 @@ "subquery": null } ], - "index_hints": null, + "indexHints": null, "partition": null, "where": [ { "@type": "PhpMyAdmin\\SqlParser\\Components\\Condition", - "DELIMITERS": [ + "delimiters": [ "&&", "||", "AND", "OR", "XOR" ], - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "ALL": 1, "AND": 1, "BETWEEN": 1, @@ -5503,7 +5503,7 @@ "into": null, "join": null, "union": [], - "end_options": null, + "endOptions": null, "options": { "@type": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", "options": [] @@ -5513,7 +5513,7 @@ }, { "@type": "PhpMyAdmin\\SqlParser\\Statements\\SelectStatement", - "OPTIONS": { + "statementOptions": { "ALL": 1, "DISTINCT": 1, "DISTINCTROW": 1, @@ -5530,11 +5530,11 @@ "SQL_NO_CACHE": 8, "SQL_CALC_FOUND_ROWS": 9 }, - "END_OPTIONS": { + "statementEndOptions": { "FOR UPDATE": 1, "LOCK IN SHARE MODE": 1 }, - "CLAUSES": { + "clauses": { "SELECT": [ "SELECT", 2 @@ -5663,7 +5663,7 @@ "expr": [ { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -5689,7 +5689,7 @@ "from": [ { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -5712,19 +5712,19 @@ "subquery": null } ], - "index_hints": null, + "indexHints": null, "partition": null, "where": [ { "@type": "PhpMyAdmin\\SqlParser\\Components\\Condition", - "DELIMITERS": [ + "delimiters": [ "&&", "||", "AND", "OR", "XOR" ], - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "ALL": 1, "AND": 1, "BETWEEN": 1, @@ -5760,7 +5760,7 @@ "into": null, "join": null, "union": [], - "end_options": null, + "endOptions": null, "options": { "@type": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", "options": [] @@ -5770,7 +5770,7 @@ }, { "@type": "PhpMyAdmin\\SqlParser\\Statements\\SelectStatement", - "OPTIONS": { + "statementOptions": { "ALL": 1, "DISTINCT": 1, "DISTINCTROW": 1, @@ -5787,11 +5787,11 @@ "SQL_NO_CACHE": 8, "SQL_CALC_FOUND_ROWS": 9 }, - "END_OPTIONS": { + "statementEndOptions": { "FOR UPDATE": 1, "LOCK IN SHARE MODE": 1 }, - "CLAUSES": { + "clauses": { "SELECT": [ "SELECT", 2 @@ -5920,7 +5920,7 @@ "expr": [ { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -5946,7 +5946,7 @@ "from": [ { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -5969,19 +5969,19 @@ "subquery": null } ], - "index_hints": null, + "indexHints": null, "partition": null, "where": [ { "@type": "PhpMyAdmin\\SqlParser\\Components\\Condition", - "DELIMITERS": [ + "delimiters": [ "&&", "||", "AND", "OR", "XOR" ], - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "ALL": 1, "AND": 1, "BETWEEN": 1, @@ -6017,7 +6017,7 @@ "into": null, "join": null, "union": [], - "end_options": null, + "endOptions": null, "options": { "@type": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", "options": [] @@ -6027,7 +6027,7 @@ }, { "@type": "PhpMyAdmin\\SqlParser\\Statements\\SelectStatement", - "OPTIONS": { + "statementOptions": { "ALL": 1, "DISTINCT": 1, "DISTINCTROW": 1, @@ -6044,11 +6044,11 @@ "SQL_NO_CACHE": 8, "SQL_CALC_FOUND_ROWS": 9 }, - "END_OPTIONS": { + "statementEndOptions": { "FOR UPDATE": 1, "LOCK IN SHARE MODE": 1 }, - "CLAUSES": { + "clauses": { "SELECT": [ "SELECT", 2 @@ -6177,7 +6177,7 @@ "expr": [ { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -6203,7 +6203,7 @@ "from": [ { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -6226,19 +6226,19 @@ "subquery": null } ], - "index_hints": null, + "indexHints": null, "partition": null, "where": [ { "@type": "PhpMyAdmin\\SqlParser\\Components\\Condition", - "DELIMITERS": [ + "delimiters": [ "&&", "||", "AND", "OR", "XOR" ], - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "ALL": 1, "AND": 1, "BETWEEN": 1, @@ -6274,7 +6274,7 @@ "into": null, "join": null, "union": [], - "end_options": null, + "endOptions": null, "options": { "@type": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", "options": [] @@ -6284,7 +6284,7 @@ }, { "@type": "PhpMyAdmin\\SqlParser\\Statements\\SelectStatement", - "OPTIONS": { + "statementOptions": { "ALL": 1, "DISTINCT": 1, "DISTINCTROW": 1, @@ -6301,11 +6301,11 @@ "SQL_NO_CACHE": 8, "SQL_CALC_FOUND_ROWS": 9 }, - "END_OPTIONS": { + "statementEndOptions": { "FOR UPDATE": 1, "LOCK IN SHARE MODE": 1 }, - "CLAUSES": { + "clauses": { "SELECT": [ "SELECT", 2 @@ -6434,7 +6434,7 @@ "expr": [ { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -6460,7 +6460,7 @@ "from": [ { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -6483,19 +6483,19 @@ "subquery": null } ], - "index_hints": null, + "indexHints": null, "partition": null, "where": [ { "@type": "PhpMyAdmin\\SqlParser\\Components\\Condition", - "DELIMITERS": [ + "delimiters": [ "&&", "||", "AND", "OR", "XOR" ], - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "ALL": 1, "AND": 1, "BETWEEN": 1, @@ -6531,7 +6531,7 @@ "into": null, "join": null, "union": [], - "end_options": null, + "endOptions": null, "options": { "@type": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", "options": [] @@ -6541,7 +6541,7 @@ }, { "@type": "PhpMyAdmin\\SqlParser\\Statements\\SelectStatement", - "OPTIONS": { + "statementOptions": { "ALL": 1, "DISTINCT": 1, "DISTINCTROW": 1, @@ -6558,11 +6558,11 @@ "SQL_NO_CACHE": 8, "SQL_CALC_FOUND_ROWS": 9 }, - "END_OPTIONS": { + "statementEndOptions": { "FOR UPDATE": 1, "LOCK IN SHARE MODE": 1 }, - "CLAUSES": { + "clauses": { "SELECT": [ "SELECT", 2 @@ -6691,7 +6691,7 @@ "expr": [ { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -6717,7 +6717,7 @@ "from": [ { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -6740,19 +6740,19 @@ "subquery": null } ], - "index_hints": null, + "indexHints": null, "partition": null, "where": [ { "@type": "PhpMyAdmin\\SqlParser\\Components\\Condition", - "DELIMITERS": [ + "delimiters": [ "&&", "||", "AND", "OR", "XOR" ], - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "ALL": 1, "AND": 1, "BETWEEN": 1, @@ -6788,7 +6788,7 @@ "into": null, "join": null, "union": [], - "end_options": null, + "endOptions": null, "options": { "@type": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", "options": [] @@ -6798,7 +6798,7 @@ }, { "@type": "PhpMyAdmin\\SqlParser\\Statements\\SelectStatement", - "OPTIONS": { + "statementOptions": { "ALL": 1, "DISTINCT": 1, "DISTINCTROW": 1, @@ -6815,11 +6815,11 @@ "SQL_NO_CACHE": 8, "SQL_CALC_FOUND_ROWS": 9 }, - "END_OPTIONS": { + "statementEndOptions": { "FOR UPDATE": 1, "LOCK IN SHARE MODE": 1 }, - "CLAUSES": { + "clauses": { "SELECT": [ "SELECT", 2 @@ -6948,7 +6948,7 @@ "expr": [ { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -6974,7 +6974,7 @@ "from": [ { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -6997,19 +6997,19 @@ "subquery": null } ], - "index_hints": null, + "indexHints": null, "partition": null, "where": [ { "@type": "PhpMyAdmin\\SqlParser\\Components\\Condition", - "DELIMITERS": [ + "delimiters": [ "&&", "||", "AND", "OR", "XOR" ], - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "ALL": 1, "AND": 1, "BETWEEN": 1, @@ -7045,7 +7045,7 @@ "into": null, "join": null, "union": [], - "end_options": null, + "endOptions": null, "options": { "@type": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", "options": [] @@ -7055,7 +7055,7 @@ }, { "@type": "PhpMyAdmin\\SqlParser\\Statements\\SelectStatement", - "OPTIONS": { + "statementOptions": { "ALL": 1, "DISTINCT": 1, "DISTINCTROW": 1, @@ -7072,11 +7072,11 @@ "SQL_NO_CACHE": 8, "SQL_CALC_FOUND_ROWS": 9 }, - "END_OPTIONS": { + "statementEndOptions": { "FOR UPDATE": 1, "LOCK IN SHARE MODE": 1 }, - "CLAUSES": { + "clauses": { "SELECT": [ "SELECT", 2 @@ -7205,7 +7205,7 @@ "expr": [ { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -7231,7 +7231,7 @@ "from": [ { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -7254,19 +7254,19 @@ "subquery": null } ], - "index_hints": null, + "indexHints": null, "partition": null, "where": [ { "@type": "PhpMyAdmin\\SqlParser\\Components\\Condition", - "DELIMITERS": [ + "delimiters": [ "&&", "||", "AND", "OR", "XOR" ], - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "ALL": 1, "AND": 1, "BETWEEN": 1, @@ -7304,7 +7304,7 @@ "into": null, "join": null, "union": [], - "end_options": null, + "endOptions": null, "options": { "@type": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", "options": [] @@ -7314,7 +7314,7 @@ }, { "@type": "PhpMyAdmin\\SqlParser\\Statements\\SelectStatement", - "OPTIONS": { + "statementOptions": { "ALL": 1, "DISTINCT": 1, "DISTINCTROW": 1, @@ -7331,11 +7331,11 @@ "SQL_NO_CACHE": 8, "SQL_CALC_FOUND_ROWS": 9 }, - "END_OPTIONS": { + "statementEndOptions": { "FOR UPDATE": 1, "LOCK IN SHARE MODE": 1 }, - "CLAUSES": { + "clauses": { "SELECT": [ "SELECT", 2 @@ -7464,7 +7464,7 @@ "expr": [ { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -7490,7 +7490,7 @@ "from": [ { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -7513,19 +7513,19 @@ "subquery": null } ], - "index_hints": null, + "indexHints": null, "partition": null, "where": [ { "@type": "PhpMyAdmin\\SqlParser\\Components\\Condition", - "DELIMITERS": [ + "delimiters": [ "&&", "||", "AND", "OR", "XOR" ], - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "ALL": 1, "AND": 1, "BETWEEN": 1, @@ -7563,7 +7563,7 @@ "into": null, "join": null, "union": [], - "end_options": null, + "endOptions": null, "options": { "@type": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", "options": [] diff --git a/tests/data/parser/parseSelectWithParenthesis.out b/tests/data/parser/parseSelectWithParenthesis.out index 18b4b6e57..fbc8b488a 100644 --- a/tests/data/parser/parseSelectWithParenthesis.out +++ b/tests/data/parser/parseSelectWithParenthesis.out @@ -2,7 +2,7 @@ "query": "(SELECT first_name FROM `actor` LIMIT 1, 2)", "lexer": { "@type": "PhpMyAdmin\\SqlParser\\Lexer", - "PARSER_METHODS": [ + "parserMethods": [ "parseDelimiter", "parseWhitespace", "parseNumber", @@ -178,7 +178,7 @@ "count": 17, "idx": 17 }, - "DEFAULT_DELIMITER": ";", + "defaultDelimiter": ";", "delimiter": ";", "delimiterLen": 1, "strict": false, @@ -186,7 +186,7 @@ }, "parser": { "@type": "PhpMyAdmin\\SqlParser\\Parser", - "STATEMENT_PARSERS": { + "statementParsers": { "DESCRIBE": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", "DESC": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", "EXPLAIN": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", @@ -231,7 +231,7 @@ "LOCK": "PhpMyAdmin\\SqlParser\\Statements\\LockStatement", "UNLOCK": "PhpMyAdmin\\SqlParser\\Statements\\LockStatement" }, - "KEYWORD_PARSERS": { + "keywordParsers": { "PARTITION BY": [], "SUBPARTITION BY": [], "_OPTIONS": { @@ -240,7 +240,7 @@ }, "_END_OPTIONS": { "class": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", - "field": "end_options" + "field": "endOptions" }, "INTERSECT": { "class": "PhpMyAdmin\\SqlParser\\Components\\UnionKeyword", @@ -488,7 +488,7 @@ "statements": [ { "@type": "PhpMyAdmin\\SqlParser\\Statements\\SelectStatement", - "OPTIONS": { + "statementOptions": { "ALL": 1, "DISTINCT": 1, "DISTINCTROW": 1, @@ -505,11 +505,11 @@ "SQL_NO_CACHE": 8, "SQL_CALC_FOUND_ROWS": 9 }, - "END_OPTIONS": { + "statementEndOptions": { "FOR UPDATE": 1, "LOCK IN SHARE MODE": 1 }, - "CLAUSES": { + "clauses": { "SELECT": [ "SELECT", 2 @@ -638,7 +638,7 @@ "expr": [ { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -664,7 +664,7 @@ "from": [ { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -687,7 +687,7 @@ "subquery": null } ], - "index_hints": null, + "indexHints": null, "partition": null, "where": null, "group": null, @@ -702,7 +702,7 @@ "into": null, "join": null, "union": [], - "end_options": null, + "endOptions": null, "options": { "@type": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", "options": [] diff --git a/tests/data/parser/parseSelectWrongOrder.out b/tests/data/parser/parseSelectWrongOrder.out index 5f4378ff8..2417b53c3 100644 --- a/tests/data/parser/parseSelectWrongOrder.out +++ b/tests/data/parser/parseSelectWrongOrder.out @@ -2,7 +2,7 @@ "query": "SELECT pid, name2 FROM tablename LIMIT 10 WHERE pid = 20", "lexer": { "@type": "PhpMyAdmin\\SqlParser\\Lexer", - "PARSER_METHODS": [ + "parserMethods": [ "parseDelimiter", "parseWhitespace", "parseNumber", @@ -232,7 +232,7 @@ "count": 23, "idx": 23 }, - "DEFAULT_DELIMITER": ";", + "defaultDelimiter": ";", "delimiter": ";", "delimiterLen": 1, "strict": false, @@ -240,7 +240,7 @@ }, "parser": { "@type": "PhpMyAdmin\\SqlParser\\Parser", - "STATEMENT_PARSERS": { + "statementParsers": { "DESCRIBE": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", "DESC": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", "EXPLAIN": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", @@ -285,7 +285,7 @@ "LOCK": "PhpMyAdmin\\SqlParser\\Statements\\LockStatement", "UNLOCK": "PhpMyAdmin\\SqlParser\\Statements\\LockStatement" }, - "KEYWORD_PARSERS": { + "keywordParsers": { "PARTITION BY": [], "SUBPARTITION BY": [], "_OPTIONS": { @@ -294,7 +294,7 @@ }, "_END_OPTIONS": { "class": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", - "field": "end_options" + "field": "endOptions" }, "INTERSECT": { "class": "PhpMyAdmin\\SqlParser\\Components\\UnionKeyword", @@ -542,7 +542,7 @@ "statements": [ { "@type": "PhpMyAdmin\\SqlParser\\Statements\\SelectStatement", - "OPTIONS": { + "statementOptions": { "ALL": 1, "DISTINCT": 1, "DISTINCTROW": 1, @@ -559,11 +559,11 @@ "SQL_NO_CACHE": 8, "SQL_CALC_FOUND_ROWS": 9 }, - "END_OPTIONS": { + "statementEndOptions": { "FOR UPDATE": 1, "LOCK IN SHARE MODE": 1 }, - "CLAUSES": { + "clauses": { "SELECT": [ "SELECT", 2 @@ -692,7 +692,7 @@ "expr": [ { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -716,7 +716,7 @@ }, { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -742,7 +742,7 @@ "from": [ { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -765,19 +765,19 @@ "subquery": null } ], - "index_hints": null, + "indexHints": null, "partition": null, "where": [ { "@type": "PhpMyAdmin\\SqlParser\\Components\\Condition", - "DELIMITERS": [ + "delimiters": [ "&&", "||", "AND", "OR", "XOR" ], - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "ALL": 1, "AND": 1, "BETWEEN": 1, @@ -817,7 +817,7 @@ "into": null, "join": null, "union": [], - "end_options": null, + "endOptions": null, "options": { "@type": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", "options": [] diff --git a/tests/data/parser/parseSelectWrongOrder2.out b/tests/data/parser/parseSelectWrongOrder2.out index 8931198fa..ecae24047 100644 --- a/tests/data/parser/parseSelectWrongOrder2.out +++ b/tests/data/parser/parseSelectWrongOrder2.out @@ -2,7 +2,7 @@ "query": "SELECT DISTINCT * FROM tbl1 INNER JOIN tbl2 ON id1 = id2 WHERE 1=1 LEFT OUTER JOIN l3;", "lexer": { "@type": "PhpMyAdmin\\SqlParser\\Lexer", - "PARSER_METHODS": [ + "parserMethods": [ "parseDelimiter", "parseWhitespace", "parseNumber", @@ -322,7 +322,7 @@ "count": 33, "idx": 33 }, - "DEFAULT_DELIMITER": ";", + "defaultDelimiter": ";", "delimiter": ";", "delimiterLen": 1, "strict": false, @@ -330,7 +330,7 @@ }, "parser": { "@type": "PhpMyAdmin\\SqlParser\\Parser", - "STATEMENT_PARSERS": { + "statementParsers": { "DESCRIBE": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", "DESC": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", "EXPLAIN": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", @@ -375,7 +375,7 @@ "LOCK": "PhpMyAdmin\\SqlParser\\Statements\\LockStatement", "UNLOCK": "PhpMyAdmin\\SqlParser\\Statements\\LockStatement" }, - "KEYWORD_PARSERS": { + "keywordParsers": { "PARTITION BY": [], "SUBPARTITION BY": [], "_OPTIONS": { @@ -384,7 +384,7 @@ }, "_END_OPTIONS": { "class": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", - "field": "end_options" + "field": "endOptions" }, "INTERSECT": { "class": "PhpMyAdmin\\SqlParser\\Components\\UnionKeyword", @@ -632,7 +632,7 @@ "statements": [ { "@type": "PhpMyAdmin\\SqlParser\\Statements\\SelectStatement", - "OPTIONS": { + "statementOptions": { "ALL": 1, "DISTINCT": 1, "DISTINCTROW": 1, @@ -649,11 +649,11 @@ "SQL_NO_CACHE": 8, "SQL_CALC_FOUND_ROWS": 9 }, - "END_OPTIONS": { + "statementEndOptions": { "FOR UPDATE": 1, "LOCK IN SHARE MODE": 1 }, - "CLAUSES": { + "clauses": { "SELECT": [ "SELECT", 2 @@ -782,7 +782,7 @@ "expr": [ { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -808,7 +808,7 @@ "from": [ { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -831,19 +831,19 @@ "subquery": null } ], - "index_hints": null, + "indexHints": null, "partition": null, "where": [ { "@type": "PhpMyAdmin\\SqlParser\\Components\\Condition", - "DELIMITERS": [ + "delimiters": [ "&&", "||", "AND", "OR", "XOR" ], - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "ALL": 1, "AND": 1, "BETWEEN": 1, @@ -878,7 +878,7 @@ "join": [ { "@type": "PhpMyAdmin\\SqlParser\\Components\\JoinKeyword", - "JOINS": { + "joins": { "CROSS JOIN": "CROSS", "FULL JOIN": "FULL", "FULL OUTER JOIN": "FULL", @@ -898,7 +898,7 @@ "type": "LEFT", "expr": { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -925,7 +925,7 @@ } ], "union": [], - "end_options": null, + "endOptions": null, "options": { "@type": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", "options": { diff --git a/tests/data/parser/parseSetCharacterSet.out b/tests/data/parser/parseSetCharacterSet.out index 13398956f..cd350c67e 100644 --- a/tests/data/parser/parseSetCharacterSet.out +++ b/tests/data/parser/parseSetCharacterSet.out @@ -2,7 +2,7 @@ "query": "SET CHARACTER SET 'utf8'", "lexer": { "@type": "PhpMyAdmin\\SqlParser\\Lexer", - "PARSER_METHODS": [ + "parserMethods": [ "parseDelimiter", "parseWhitespace", "parseNumber", @@ -79,7 +79,7 @@ "count": 6, "idx": 6 }, - "DEFAULT_DELIMITER": ";", + "defaultDelimiter": ";", "delimiter": ";", "delimiterLen": 1, "strict": false, @@ -87,7 +87,7 @@ }, "parser": { "@type": "PhpMyAdmin\\SqlParser\\Parser", - "STATEMENT_PARSERS": { + "statementParsers": { "DESCRIBE": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", "DESC": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", "EXPLAIN": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", @@ -132,7 +132,7 @@ "LOCK": "PhpMyAdmin\\SqlParser\\Statements\\LockStatement", "UNLOCK": "PhpMyAdmin\\SqlParser\\Statements\\LockStatement" }, - "KEYWORD_PARSERS": { + "keywordParsers": { "PARTITION BY": [], "SUBPARTITION BY": [], "_OPTIONS": { @@ -141,7 +141,7 @@ }, "_END_OPTIONS": { "class": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", - "field": "end_options" + "field": "endOptions" }, "INTERSECT": { "class": "PhpMyAdmin\\SqlParser\\Components\\UnionKeyword", @@ -389,7 +389,7 @@ "statements": [ { "@type": "PhpMyAdmin\\SqlParser\\Statements\\SetStatement", - "CLAUSES": { + "clauses": { "SET": [ "SET", 3 @@ -399,7 +399,7 @@ 1 ] }, - "OPTIONS": { + "statementOptions": { "CHARSET": [ 3, "var" @@ -425,7 +425,7 @@ "@@PERSIST": 3, "@@PERSIST_ONLY": 3 }, - "END_OPTIONS": { + "statementEndOptions": { "COLLATE": [ 1, "var" @@ -443,7 +443,7 @@ } } }, - "end_options": null, + "endOptions": null, "set": [], "first": 0, "last": 4 diff --git a/tests/data/parser/parseSetCharacterSetError.out b/tests/data/parser/parseSetCharacterSetError.out index 464ddeb06..deac95a4d 100644 --- a/tests/data/parser/parseSetCharacterSetError.out +++ b/tests/data/parser/parseSetCharacterSetError.out @@ -2,7 +2,7 @@ "query": "SET CHARACTER SET ", "lexer": { "@type": "PhpMyAdmin\\SqlParser\\Lexer", - "PARSER_METHODS": [ + "parserMethods": [ "parseDelimiter", "parseWhitespace", "parseNumber", @@ -70,7 +70,7 @@ "count": 5, "idx": 5 }, - "DEFAULT_DELIMITER": ";", + "defaultDelimiter": ";", "delimiter": ";", "delimiterLen": 1, "strict": false, @@ -78,7 +78,7 @@ }, "parser": { "@type": "PhpMyAdmin\\SqlParser\\Parser", - "STATEMENT_PARSERS": { + "statementParsers": { "DESCRIBE": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", "DESC": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", "EXPLAIN": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", @@ -123,7 +123,7 @@ "LOCK": "PhpMyAdmin\\SqlParser\\Statements\\LockStatement", "UNLOCK": "PhpMyAdmin\\SqlParser\\Statements\\LockStatement" }, - "KEYWORD_PARSERS": { + "keywordParsers": { "PARTITION BY": [], "SUBPARTITION BY": [], "_OPTIONS": { @@ -132,7 +132,7 @@ }, "_END_OPTIONS": { "class": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", - "field": "end_options" + "field": "endOptions" }, "INTERSECT": { "class": "PhpMyAdmin\\SqlParser\\Components\\UnionKeyword", @@ -380,7 +380,7 @@ "statements": [ { "@type": "PhpMyAdmin\\SqlParser\\Statements\\SetStatement", - "CLAUSES": { + "clauses": { "SET": [ "SET", 3 @@ -390,7 +390,7 @@ 1 ] }, - "OPTIONS": { + "statementOptions": { "CHARSET": [ 3, "var" @@ -416,7 +416,7 @@ "@@PERSIST": 3, "@@PERSIST_ONLY": 3 }, - "END_OPTIONS": { + "statementEndOptions": { "COLLATE": [ 1, "var" @@ -434,7 +434,7 @@ } } }, - "end_options": null, + "endOptions": null, "set": [], "first": 0, "last": 3 diff --git a/tests/data/parser/parseSetCharset.out b/tests/data/parser/parseSetCharset.out index fc0705bc4..b1c9693f9 100644 --- a/tests/data/parser/parseSetCharset.out +++ b/tests/data/parser/parseSetCharset.out @@ -2,7 +2,7 @@ "query": "SET CHARSET 'utf8'", "lexer": { "@type": "PhpMyAdmin\\SqlParser\\Lexer", - "PARSER_METHODS": [ + "parserMethods": [ "parseDelimiter", "parseWhitespace", "parseNumber", @@ -79,7 +79,7 @@ "count": 6, "idx": 6 }, - "DEFAULT_DELIMITER": ";", + "defaultDelimiter": ";", "delimiter": ";", "delimiterLen": 1, "strict": false, @@ -87,7 +87,7 @@ }, "parser": { "@type": "PhpMyAdmin\\SqlParser\\Parser", - "STATEMENT_PARSERS": { + "statementParsers": { "DESCRIBE": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", "DESC": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", "EXPLAIN": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", @@ -132,7 +132,7 @@ "LOCK": "PhpMyAdmin\\SqlParser\\Statements\\LockStatement", "UNLOCK": "PhpMyAdmin\\SqlParser\\Statements\\LockStatement" }, - "KEYWORD_PARSERS": { + "keywordParsers": { "PARTITION BY": [], "SUBPARTITION BY": [], "_OPTIONS": { @@ -141,7 +141,7 @@ }, "_END_OPTIONS": { "class": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", - "field": "end_options" + "field": "endOptions" }, "INTERSECT": { "class": "PhpMyAdmin\\SqlParser\\Components\\UnionKeyword", @@ -389,7 +389,7 @@ "statements": [ { "@type": "PhpMyAdmin\\SqlParser\\Statements\\SetStatement", - "CLAUSES": { + "clauses": { "SET": [ "SET", 3 @@ -399,7 +399,7 @@ 1 ] }, - "OPTIONS": { + "statementOptions": { "CHARSET": [ 3, "var" @@ -425,7 +425,7 @@ "@@PERSIST": 3, "@@PERSIST_ONLY": 3 }, - "END_OPTIONS": { + "statementEndOptions": { "COLLATE": [ 1, "var" @@ -443,7 +443,7 @@ } } }, - "end_options": null, + "endOptions": null, "set": [], "first": 0, "last": 4 diff --git a/tests/data/parser/parseSetCharsetError.out b/tests/data/parser/parseSetCharsetError.out index 2fec929f7..89b89a516 100644 --- a/tests/data/parser/parseSetCharsetError.out +++ b/tests/data/parser/parseSetCharsetError.out @@ -2,7 +2,7 @@ "query": "SET CHARSET ", "lexer": { "@type": "PhpMyAdmin\\SqlParser\\Lexer", - "PARSER_METHODS": [ + "parserMethods": [ "parseDelimiter", "parseWhitespace", "parseNumber", @@ -70,7 +70,7 @@ "count": 5, "idx": 5 }, - "DEFAULT_DELIMITER": ";", + "defaultDelimiter": ";", "delimiter": ";", "delimiterLen": 1, "strict": false, @@ -78,7 +78,7 @@ }, "parser": { "@type": "PhpMyAdmin\\SqlParser\\Parser", - "STATEMENT_PARSERS": { + "statementParsers": { "DESCRIBE": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", "DESC": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", "EXPLAIN": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", @@ -123,7 +123,7 @@ "LOCK": "PhpMyAdmin\\SqlParser\\Statements\\LockStatement", "UNLOCK": "PhpMyAdmin\\SqlParser\\Statements\\LockStatement" }, - "KEYWORD_PARSERS": { + "keywordParsers": { "PARTITION BY": [], "SUBPARTITION BY": [], "_OPTIONS": { @@ -132,7 +132,7 @@ }, "_END_OPTIONS": { "class": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", - "field": "end_options" + "field": "endOptions" }, "INTERSECT": { "class": "PhpMyAdmin\\SqlParser\\Components\\UnionKeyword", @@ -380,7 +380,7 @@ "statements": [ { "@type": "PhpMyAdmin\\SqlParser\\Statements\\SetStatement", - "CLAUSES": { + "clauses": { "SET": [ "SET", 3 @@ -390,7 +390,7 @@ 1 ] }, - "OPTIONS": { + "statementOptions": { "CHARSET": [ 3, "var" @@ -416,7 +416,7 @@ "@@PERSIST": 3, "@@PERSIST_ONLY": 3 }, - "END_OPTIONS": { + "statementEndOptions": { "COLLATE": [ 1, "var" @@ -434,7 +434,7 @@ } } }, - "end_options": null, + "endOptions": null, "set": [], "first": 0, "last": 3 diff --git a/tests/data/parser/parseSetError1.out b/tests/data/parser/parseSetError1.out index 896dbc14c..c9284d5ca 100644 --- a/tests/data/parser/parseSetError1.out +++ b/tests/data/parser/parseSetError1.out @@ -2,7 +2,7 @@ "query": "SET CHARSET 'utf8' CHARACTER SET 'utf8'", "lexer": { "@type": "PhpMyAdmin\\SqlParser\\Lexer", - "PARSER_METHODS": [ + "parserMethods": [ "parseDelimiter", "parseWhitespace", "parseNumber", @@ -115,7 +115,7 @@ "count": 10, "idx": 10 }, - "DEFAULT_DELIMITER": ";", + "defaultDelimiter": ";", "delimiter": ";", "delimiterLen": 1, "strict": false, @@ -123,7 +123,7 @@ }, "parser": { "@type": "PhpMyAdmin\\SqlParser\\Parser", - "STATEMENT_PARSERS": { + "statementParsers": { "DESCRIBE": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", "DESC": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", "EXPLAIN": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", @@ -168,7 +168,7 @@ "LOCK": "PhpMyAdmin\\SqlParser\\Statements\\LockStatement", "UNLOCK": "PhpMyAdmin\\SqlParser\\Statements\\LockStatement" }, - "KEYWORD_PARSERS": { + "keywordParsers": { "PARTITION BY": [], "SUBPARTITION BY": [], "_OPTIONS": { @@ -177,7 +177,7 @@ }, "_END_OPTIONS": { "class": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", - "field": "end_options" + "field": "endOptions" }, "INTERSECT": { "class": "PhpMyAdmin\\SqlParser\\Components\\UnionKeyword", @@ -425,7 +425,7 @@ "statements": [ { "@type": "PhpMyAdmin\\SqlParser\\Statements\\SetStatement", - "CLAUSES": { + "clauses": { "SET": [ "SET", 3 @@ -435,7 +435,7 @@ 1 ] }, - "OPTIONS": { + "statementOptions": { "CHARSET": [ 3, "var" @@ -461,7 +461,7 @@ "@@PERSIST": 3, "@@PERSIST_ONLY": 3 }, - "END_OPTIONS": { + "statementEndOptions": { "COLLATE": [ 1, "var" @@ -485,7 +485,7 @@ } } }, - "end_options": null, + "endOptions": null, "set": [], "first": 0, "last": 8 diff --git a/tests/data/parser/parseSetNames.out b/tests/data/parser/parseSetNames.out index d88fdfbd7..bb56f2ecb 100644 --- a/tests/data/parser/parseSetNames.out +++ b/tests/data/parser/parseSetNames.out @@ -2,7 +2,7 @@ "query": "SET NAMES 'utf8'", "lexer": { "@type": "PhpMyAdmin\\SqlParser\\Lexer", - "PARSER_METHODS": [ + "parserMethods": [ "parseDelimiter", "parseWhitespace", "parseNumber", @@ -79,7 +79,7 @@ "count": 6, "idx": 6 }, - "DEFAULT_DELIMITER": ";", + "defaultDelimiter": ";", "delimiter": ";", "delimiterLen": 1, "strict": false, @@ -87,7 +87,7 @@ }, "parser": { "@type": "PhpMyAdmin\\SqlParser\\Parser", - "STATEMENT_PARSERS": { + "statementParsers": { "DESCRIBE": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", "DESC": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", "EXPLAIN": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", @@ -132,7 +132,7 @@ "LOCK": "PhpMyAdmin\\SqlParser\\Statements\\LockStatement", "UNLOCK": "PhpMyAdmin\\SqlParser\\Statements\\LockStatement" }, - "KEYWORD_PARSERS": { + "keywordParsers": { "PARTITION BY": [], "SUBPARTITION BY": [], "_OPTIONS": { @@ -141,7 +141,7 @@ }, "_END_OPTIONS": { "class": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", - "field": "end_options" + "field": "endOptions" }, "INTERSECT": { "class": "PhpMyAdmin\\SqlParser\\Components\\UnionKeyword", @@ -389,7 +389,7 @@ "statements": [ { "@type": "PhpMyAdmin\\SqlParser\\Statements\\SetStatement", - "CLAUSES": { + "clauses": { "SET": [ "SET", 3 @@ -399,7 +399,7 @@ 1 ] }, - "OPTIONS": { + "statementOptions": { "CHARSET": [ 3, "var" @@ -425,7 +425,7 @@ "@@PERSIST": 3, "@@PERSIST_ONLY": 3 }, - "END_OPTIONS": { + "statementEndOptions": { "COLLATE": [ 1, "var" @@ -443,7 +443,7 @@ } } }, - "end_options": null, + "endOptions": null, "set": [], "first": 0, "last": 4 diff --git a/tests/data/parser/parseSetNames2.out b/tests/data/parser/parseSetNames2.out index 78ca37959..43a008967 100644 --- a/tests/data/parser/parseSetNames2.out +++ b/tests/data/parser/parseSetNames2.out @@ -2,7 +2,7 @@ "query": "SET NAMES 'utf8' COLLATE 'utf8_general_ci'", "lexer": { "@type": "PhpMyAdmin\\SqlParser\\Lexer", - "PARSER_METHODS": [ + "parserMethods": [ "parseDelimiter", "parseWhitespace", "parseNumber", @@ -115,7 +115,7 @@ "count": 10, "idx": 10 }, - "DEFAULT_DELIMITER": ";", + "defaultDelimiter": ";", "delimiter": ";", "delimiterLen": 1, "strict": false, @@ -123,7 +123,7 @@ }, "parser": { "@type": "PhpMyAdmin\\SqlParser\\Parser", - "STATEMENT_PARSERS": { + "statementParsers": { "DESCRIBE": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", "DESC": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", "EXPLAIN": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", @@ -168,7 +168,7 @@ "LOCK": "PhpMyAdmin\\SqlParser\\Statements\\LockStatement", "UNLOCK": "PhpMyAdmin\\SqlParser\\Statements\\LockStatement" }, - "KEYWORD_PARSERS": { + "keywordParsers": { "PARTITION BY": [], "SUBPARTITION BY": [], "_OPTIONS": { @@ -177,7 +177,7 @@ }, "_END_OPTIONS": { "class": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", - "field": "end_options" + "field": "endOptions" }, "INTERSECT": { "class": "PhpMyAdmin\\SqlParser\\Components\\UnionKeyword", @@ -425,7 +425,7 @@ "statements": [ { "@type": "PhpMyAdmin\\SqlParser\\Statements\\SetStatement", - "CLAUSES": { + "clauses": { "SET": [ "SET", 3 @@ -435,7 +435,7 @@ 1 ] }, - "OPTIONS": { + "statementOptions": { "CHARSET": [ 3, "var" @@ -461,7 +461,7 @@ "@@PERSIST": 3, "@@PERSIST_ONLY": 3 }, - "END_OPTIONS": { + "statementEndOptions": { "COLLATE": [ 1, "var" @@ -479,7 +479,7 @@ } } }, - "end_options": { + "endOptions": { "@type": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", "options": { "1": { diff --git a/tests/data/parser/parseSetNames3.out b/tests/data/parser/parseSetNames3.out index 73ca1adad..a833268fe 100644 --- a/tests/data/parser/parseSetNames3.out +++ b/tests/data/parser/parseSetNames3.out @@ -2,7 +2,7 @@ "query": "SET NAMES 'utf8' DEFAULT;", "lexer": { "@type": "PhpMyAdmin\\SqlParser\\Lexer", - "PARSER_METHODS": [ + "parserMethods": [ "parseDelimiter", "parseWhitespace", "parseNumber", @@ -106,7 +106,7 @@ "count": 9, "idx": 9 }, - "DEFAULT_DELIMITER": ";", + "defaultDelimiter": ";", "delimiter": ";", "delimiterLen": 1, "strict": false, @@ -114,7 +114,7 @@ }, "parser": { "@type": "PhpMyAdmin\\SqlParser\\Parser", - "STATEMENT_PARSERS": { + "statementParsers": { "DESCRIBE": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", "DESC": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", "EXPLAIN": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", @@ -159,7 +159,7 @@ "LOCK": "PhpMyAdmin\\SqlParser\\Statements\\LockStatement", "UNLOCK": "PhpMyAdmin\\SqlParser\\Statements\\LockStatement" }, - "KEYWORD_PARSERS": { + "keywordParsers": { "PARTITION BY": [], "SUBPARTITION BY": [], "_OPTIONS": { @@ -168,7 +168,7 @@ }, "_END_OPTIONS": { "class": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", - "field": "end_options" + "field": "endOptions" }, "INTERSECT": { "class": "PhpMyAdmin\\SqlParser\\Components\\UnionKeyword", @@ -416,7 +416,7 @@ "statements": [ { "@type": "PhpMyAdmin\\SqlParser\\Statements\\SetStatement", - "CLAUSES": { + "clauses": { "SET": [ "SET", 3 @@ -426,7 +426,7 @@ 1 ] }, - "OPTIONS": { + "statementOptions": { "CHARSET": [ 3, "var" @@ -452,7 +452,7 @@ "@@PERSIST": 3, "@@PERSIST_ONLY": 3 }, - "END_OPTIONS": { + "statementEndOptions": { "COLLATE": [ 1, "var" @@ -470,7 +470,7 @@ } } }, - "end_options": { + "endOptions": { "@type": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", "options": { "1": "DEFAULT" diff --git a/tests/data/parser/parseSetNamesError.out b/tests/data/parser/parseSetNamesError.out index 3bc54f096..94060ab07 100644 --- a/tests/data/parser/parseSetNamesError.out +++ b/tests/data/parser/parseSetNamesError.out @@ -2,7 +2,7 @@ "query": "SET NAMES ", "lexer": { "@type": "PhpMyAdmin\\SqlParser\\Lexer", - "PARSER_METHODS": [ + "parserMethods": [ "parseDelimiter", "parseWhitespace", "parseNumber", @@ -70,7 +70,7 @@ "count": 5, "idx": 5 }, - "DEFAULT_DELIMITER": ";", + "defaultDelimiter": ";", "delimiter": ";", "delimiterLen": 1, "strict": false, @@ -78,7 +78,7 @@ }, "parser": { "@type": "PhpMyAdmin\\SqlParser\\Parser", - "STATEMENT_PARSERS": { + "statementParsers": { "DESCRIBE": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", "DESC": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", "EXPLAIN": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", @@ -123,7 +123,7 @@ "LOCK": "PhpMyAdmin\\SqlParser\\Statements\\LockStatement", "UNLOCK": "PhpMyAdmin\\SqlParser\\Statements\\LockStatement" }, - "KEYWORD_PARSERS": { + "keywordParsers": { "PARTITION BY": [], "SUBPARTITION BY": [], "_OPTIONS": { @@ -132,7 +132,7 @@ }, "_END_OPTIONS": { "class": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", - "field": "end_options" + "field": "endOptions" }, "INTERSECT": { "class": "PhpMyAdmin\\SqlParser\\Components\\UnionKeyword", @@ -380,7 +380,7 @@ "statements": [ { "@type": "PhpMyAdmin\\SqlParser\\Statements\\SetStatement", - "CLAUSES": { + "clauses": { "SET": [ "SET", 3 @@ -390,7 +390,7 @@ 1 ] }, - "OPTIONS": { + "statementOptions": { "CHARSET": [ 3, "var" @@ -416,7 +416,7 @@ "@@PERSIST": 3, "@@PERSIST_ONLY": 3 }, - "END_OPTIONS": { + "statementEndOptions": { "COLLATE": [ 1, "var" @@ -434,7 +434,7 @@ } } }, - "end_options": null, + "endOptions": null, "set": [], "first": 0, "last": 3 diff --git a/tests/data/parser/parseSetNamesError2.out b/tests/data/parser/parseSetNamesError2.out index c30e7e633..effb66318 100644 --- a/tests/data/parser/parseSetNamesError2.out +++ b/tests/data/parser/parseSetNamesError2.out @@ -2,7 +2,7 @@ "query": "SET NAMES 'utf8' DEFAULT 'utf8_general_ci'", "lexer": { "@type": "PhpMyAdmin\\SqlParser\\Lexer", - "PARSER_METHODS": [ + "parserMethods": [ "parseDelimiter", "parseWhitespace", "parseNumber", @@ -115,7 +115,7 @@ "count": 10, "idx": 10 }, - "DEFAULT_DELIMITER": ";", + "defaultDelimiter": ";", "delimiter": ";", "delimiterLen": 1, "strict": false, @@ -123,7 +123,7 @@ }, "parser": { "@type": "PhpMyAdmin\\SqlParser\\Parser", - "STATEMENT_PARSERS": { + "statementParsers": { "DESCRIBE": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", "DESC": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", "EXPLAIN": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", @@ -168,7 +168,7 @@ "LOCK": "PhpMyAdmin\\SqlParser\\Statements\\LockStatement", "UNLOCK": "PhpMyAdmin\\SqlParser\\Statements\\LockStatement" }, - "KEYWORD_PARSERS": { + "keywordParsers": { "PARTITION BY": [], "SUBPARTITION BY": [], "_OPTIONS": { @@ -177,7 +177,7 @@ }, "_END_OPTIONS": { "class": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", - "field": "end_options" + "field": "endOptions" }, "INTERSECT": { "class": "PhpMyAdmin\\SqlParser\\Components\\UnionKeyword", @@ -425,7 +425,7 @@ "statements": [ { "@type": "PhpMyAdmin\\SqlParser\\Statements\\SetStatement", - "CLAUSES": { + "clauses": { "SET": [ "SET", 3 @@ -435,7 +435,7 @@ 1 ] }, - "OPTIONS": { + "statementOptions": { "CHARSET": [ 3, "var" @@ -461,7 +461,7 @@ "@@PERSIST": 3, "@@PERSIST_ONLY": 3 }, - "END_OPTIONS": { + "statementEndOptions": { "COLLATE": [ 1, "var" @@ -479,7 +479,7 @@ } } }, - "end_options": { + "endOptions": { "@type": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", "options": { "1": "DEFAULT" diff --git a/tests/data/parser/parseSetNamesError3.out b/tests/data/parser/parseSetNamesError3.out index ed9a09d9f..993e77cf5 100644 --- a/tests/data/parser/parseSetNamesError3.out +++ b/tests/data/parser/parseSetNamesError3.out @@ -2,7 +2,7 @@ "query": "SET NAMES 'utf8' COLLATE", "lexer": { "@type": "PhpMyAdmin\\SqlParser\\Lexer", - "PARSER_METHODS": [ + "parserMethods": [ "parseDelimiter", "parseWhitespace", "parseNumber", @@ -97,7 +97,7 @@ "count": 8, "idx": 8 }, - "DEFAULT_DELIMITER": ";", + "defaultDelimiter": ";", "delimiter": ";", "delimiterLen": 1, "strict": false, @@ -105,7 +105,7 @@ }, "parser": { "@type": "PhpMyAdmin\\SqlParser\\Parser", - "STATEMENT_PARSERS": { + "statementParsers": { "DESCRIBE": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", "DESC": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", "EXPLAIN": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", @@ -150,7 +150,7 @@ "LOCK": "PhpMyAdmin\\SqlParser\\Statements\\LockStatement", "UNLOCK": "PhpMyAdmin\\SqlParser\\Statements\\LockStatement" }, - "KEYWORD_PARSERS": { + "keywordParsers": { "PARTITION BY": [], "SUBPARTITION BY": [], "_OPTIONS": { @@ -159,7 +159,7 @@ }, "_END_OPTIONS": { "class": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", - "field": "end_options" + "field": "endOptions" }, "INTERSECT": { "class": "PhpMyAdmin\\SqlParser\\Components\\UnionKeyword", @@ -407,7 +407,7 @@ "statements": [ { "@type": "PhpMyAdmin\\SqlParser\\Statements\\SetStatement", - "CLAUSES": { + "clauses": { "SET": [ "SET", 3 @@ -417,7 +417,7 @@ 1 ] }, - "OPTIONS": { + "statementOptions": { "CHARSET": [ 3, "var" @@ -443,7 +443,7 @@ "@@PERSIST": 3, "@@PERSIST_ONLY": 3 }, - "END_OPTIONS": { + "statementEndOptions": { "COLLATE": [ 1, "var" @@ -461,7 +461,7 @@ } } }, - "end_options": { + "endOptions": { "@type": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", "options": { "1": { diff --git a/tests/data/parser/parseTransaction.out b/tests/data/parser/parseTransaction.out index 5a09bc93c..b31ae8635 100644 --- a/tests/data/parser/parseTransaction.out +++ b/tests/data/parser/parseTransaction.out @@ -2,7 +2,7 @@ "query": "START TRANSACTION;\nSELECT @A:=SUM(salary) FROM table1 WHERE type=1;\nUPDATE table2 SET summary=@A WHERE type=1;\nCOMMIT;", "lexer": { "@type": "PhpMyAdmin\\SqlParser\\Lexer", - "PARSER_METHODS": [ + "parserMethods": [ "parseDelimiter", "parseWhitespace", "parseNumber", @@ -412,7 +412,7 @@ "count": 43, "idx": 43 }, - "DEFAULT_DELIMITER": ";", + "defaultDelimiter": ";", "delimiter": ";", "delimiterLen": 1, "strict": false, @@ -420,7 +420,7 @@ }, "parser": { "@type": "PhpMyAdmin\\SqlParser\\Parser", - "STATEMENT_PARSERS": { + "statementParsers": { "DESCRIBE": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", "DESC": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", "EXPLAIN": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", @@ -465,7 +465,7 @@ "LOCK": "PhpMyAdmin\\SqlParser\\Statements\\LockStatement", "UNLOCK": "PhpMyAdmin\\SqlParser\\Statements\\LockStatement" }, - "KEYWORD_PARSERS": { + "keywordParsers": { "PARTITION BY": [], "SUBPARTITION BY": [], "_OPTIONS": { @@ -474,7 +474,7 @@ }, "_END_OPTIONS": { "class": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", - "field": "end_options" + "field": "endOptions" }, "INTERSECT": { "class": "PhpMyAdmin\\SqlParser\\Components\\UnionKeyword", @@ -726,7 +726,7 @@ "statements": [ { "@type": "PhpMyAdmin\\SqlParser\\Statements\\SelectStatement", - "OPTIONS": { + "statementOptions": { "ALL": 1, "DISTINCT": 1, "DISTINCTROW": 1, @@ -743,11 +743,11 @@ "SQL_NO_CACHE": 8, "SQL_CALC_FOUND_ROWS": 9 }, - "END_OPTIONS": { + "statementEndOptions": { "FOR UPDATE": 1, "LOCK IN SHARE MODE": 1 }, - "CLAUSES": { + "clauses": { "SELECT": [ "SELECT", 2 @@ -876,7 +876,7 @@ "expr": [ { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -902,7 +902,7 @@ "from": [ { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -925,19 +925,19 @@ "subquery": null } ], - "index_hints": null, + "indexHints": null, "partition": null, "where": [ { "@type": "PhpMyAdmin\\SqlParser\\Components\\Condition", - "DELIMITERS": [ + "delimiters": [ "&&", "||", "AND", "OR", "XOR" ], - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "ALL": 1, "AND": 1, "BETWEEN": 1, @@ -973,7 +973,7 @@ "into": null, "join": null, "union": [], - "end_options": null, + "endOptions": null, "options": { "@type": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", "options": [] @@ -983,11 +983,11 @@ }, { "@type": "PhpMyAdmin\\SqlParser\\Statements\\UpdateStatement", - "OPTIONS": { + "statementOptions": { "LOW_PRIORITY": 1, "IGNORE": 2 }, - "CLAUSES": { + "clauses": { "UPDATE": [ "UPDATE", 2 @@ -1020,7 +1020,7 @@ "tables": [ { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -1053,14 +1053,14 @@ "where": [ { "@type": "PhpMyAdmin\\SqlParser\\Components\\Condition", - "DELIMITERS": [ + "delimiters": [ "&&", "||", "AND", "OR", "XOR" ], - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "ALL": 1, "AND": 1, "BETWEEN": 1, @@ -1090,7 +1090,7 @@ ], "order": null, "limit": null, - "END_OPTIONS": [], + "statementEndOptions": [], "options": { "@type": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", "options": [] @@ -1104,7 +1104,7 @@ "type": 2, "statements": null, "end": null, - "OPTIONS": { + "statementOptions": { "START TRANSACTION": 1, "BEGIN": 1, "COMMIT": 1, @@ -1116,8 +1116,8 @@ "RELEASE": 4, "NO RELEASE": 4 }, - "CLAUSES": [], - "END_OPTIONS": [], + "clauses": [], + "statementEndOptions": [], "options": { "@type": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", "options": { @@ -1127,7 +1127,7 @@ "first": 38, "last": 40 }, - "OPTIONS": { + "statementOptions": { "START TRANSACTION": 1, "BEGIN": 1, "COMMIT": 1, @@ -1139,8 +1139,8 @@ "RELEASE": 4, "NO RELEASE": 4 }, - "CLAUSES": [], - "END_OPTIONS": [], + "clauses": [], + "statementEndOptions": [], "options": { "@type": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", "options": { diff --git a/tests/data/parser/parseTransaction2.out b/tests/data/parser/parseTransaction2.out index f4a502f5e..70199b40b 100644 --- a/tests/data/parser/parseTransaction2.out +++ b/tests/data/parser/parseTransaction2.out @@ -2,7 +2,7 @@ "query": "START TRANSACTION;\nSELECT @A:=SUM(salary) FROM table1 WHERE type=1;\nUPDATE table2 SET summary=@A WHERE type=1;\nROLLBACK;", "lexer": { "@type": "PhpMyAdmin\\SqlParser\\Lexer", - "PARSER_METHODS": [ + "parserMethods": [ "parseDelimiter", "parseWhitespace", "parseNumber", @@ -412,7 +412,7 @@ "count": 43, "idx": 43 }, - "DEFAULT_DELIMITER": ";", + "defaultDelimiter": ";", "delimiter": ";", "delimiterLen": 1, "strict": false, @@ -420,7 +420,7 @@ }, "parser": { "@type": "PhpMyAdmin\\SqlParser\\Parser", - "STATEMENT_PARSERS": { + "statementParsers": { "DESCRIBE": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", "DESC": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", "EXPLAIN": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", @@ -465,7 +465,7 @@ "LOCK": "PhpMyAdmin\\SqlParser\\Statements\\LockStatement", "UNLOCK": "PhpMyAdmin\\SqlParser\\Statements\\LockStatement" }, - "KEYWORD_PARSERS": { + "keywordParsers": { "PARTITION BY": [], "SUBPARTITION BY": [], "_OPTIONS": { @@ -474,7 +474,7 @@ }, "_END_OPTIONS": { "class": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", - "field": "end_options" + "field": "endOptions" }, "INTERSECT": { "class": "PhpMyAdmin\\SqlParser\\Components\\UnionKeyword", @@ -726,7 +726,7 @@ "statements": [ { "@type": "PhpMyAdmin\\SqlParser\\Statements\\SelectStatement", - "OPTIONS": { + "statementOptions": { "ALL": 1, "DISTINCT": 1, "DISTINCTROW": 1, @@ -743,11 +743,11 @@ "SQL_NO_CACHE": 8, "SQL_CALC_FOUND_ROWS": 9 }, - "END_OPTIONS": { + "statementEndOptions": { "FOR UPDATE": 1, "LOCK IN SHARE MODE": 1 }, - "CLAUSES": { + "clauses": { "SELECT": [ "SELECT", 2 @@ -876,7 +876,7 @@ "expr": [ { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -902,7 +902,7 @@ "from": [ { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -925,19 +925,19 @@ "subquery": null } ], - "index_hints": null, + "indexHints": null, "partition": null, "where": [ { "@type": "PhpMyAdmin\\SqlParser\\Components\\Condition", - "DELIMITERS": [ + "delimiters": [ "&&", "||", "AND", "OR", "XOR" ], - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "ALL": 1, "AND": 1, "BETWEEN": 1, @@ -973,7 +973,7 @@ "into": null, "join": null, "union": [], - "end_options": null, + "endOptions": null, "options": { "@type": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", "options": [] @@ -983,11 +983,11 @@ }, { "@type": "PhpMyAdmin\\SqlParser\\Statements\\UpdateStatement", - "OPTIONS": { + "statementOptions": { "LOW_PRIORITY": 1, "IGNORE": 2 }, - "CLAUSES": { + "clauses": { "UPDATE": [ "UPDATE", 2 @@ -1020,7 +1020,7 @@ "tables": [ { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -1053,14 +1053,14 @@ "where": [ { "@type": "PhpMyAdmin\\SqlParser\\Components\\Condition", - "DELIMITERS": [ + "delimiters": [ "&&", "||", "AND", "OR", "XOR" ], - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "ALL": 1, "AND": 1, "BETWEEN": 1, @@ -1090,7 +1090,7 @@ ], "order": null, "limit": null, - "END_OPTIONS": [], + "statementEndOptions": [], "options": { "@type": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", "options": [] @@ -1104,7 +1104,7 @@ "type": 2, "statements": null, "end": null, - "OPTIONS": { + "statementOptions": { "START TRANSACTION": 1, "BEGIN": 1, "COMMIT": 1, @@ -1116,8 +1116,8 @@ "RELEASE": 4, "NO RELEASE": 4 }, - "CLAUSES": [], - "END_OPTIONS": [], + "clauses": [], + "statementEndOptions": [], "options": { "@type": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", "options": { @@ -1127,7 +1127,7 @@ "first": 38, "last": 40 }, - "OPTIONS": { + "statementOptions": { "START TRANSACTION": 1, "BEGIN": 1, "COMMIT": 1, @@ -1139,8 +1139,8 @@ "RELEASE": 4, "NO RELEASE": 4 }, - "CLAUSES": [], - "END_OPTIONS": [], + "clauses": [], + "statementEndOptions": [], "options": { "@type": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", "options": { diff --git a/tests/data/parser/parseTransaction3.out b/tests/data/parser/parseTransaction3.out index 43c4f1891..f85a4f107 100644 --- a/tests/data/parser/parseTransaction3.out +++ b/tests/data/parser/parseTransaction3.out @@ -2,7 +2,7 @@ "query": "begin;\nSELECT * FROM `tablename`\ncommit;\n", "lexer": { "@type": "PhpMyAdmin\\SqlParser\\Lexer", - "PARSER_METHODS": [ + "parserMethods": [ "parseDelimiter", "parseWhitespace", "parseNumber", @@ -160,7 +160,7 @@ "count": 15, "idx": 15 }, - "DEFAULT_DELIMITER": ";", + "defaultDelimiter": ";", "delimiter": ";", "delimiterLen": 1, "strict": false, @@ -168,7 +168,7 @@ }, "parser": { "@type": "PhpMyAdmin\\SqlParser\\Parser", - "STATEMENT_PARSERS": { + "statementParsers": { "DESCRIBE": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", "DESC": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", "EXPLAIN": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", @@ -213,7 +213,7 @@ "LOCK": "PhpMyAdmin\\SqlParser\\Statements\\LockStatement", "UNLOCK": "PhpMyAdmin\\SqlParser\\Statements\\LockStatement" }, - "KEYWORD_PARSERS": { + "keywordParsers": { "PARTITION BY": [], "SUBPARTITION BY": [], "_OPTIONS": { @@ -222,7 +222,7 @@ }, "_END_OPTIONS": { "class": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", - "field": "end_options" + "field": "endOptions" }, "INTERSECT": { "class": "PhpMyAdmin\\SqlParser\\Components\\UnionKeyword", @@ -470,7 +470,7 @@ "statements": [ { "@type": "PhpMyAdmin\\SqlParser\\Statements\\SelectStatement", - "OPTIONS": { + "statementOptions": { "ALL": 1, "DISTINCT": 1, "DISTINCTROW": 1, @@ -487,11 +487,11 @@ "SQL_NO_CACHE": 8, "SQL_CALC_FOUND_ROWS": 9 }, - "END_OPTIONS": { + "statementEndOptions": { "FOR UPDATE": 1, "LOCK IN SHARE MODE": 1 }, - "CLAUSES": { + "clauses": { "SELECT": [ "SELECT", 2 @@ -620,7 +620,7 @@ "expr": [ { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -646,7 +646,7 @@ "from": [ { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -669,7 +669,7 @@ "subquery": null } ], - "index_hints": null, + "indexHints": null, "partition": null, "where": null, "group": null, @@ -680,7 +680,7 @@ "into": null, "join": null, "union": [], - "end_options": null, + "endOptions": null, "options": { "@type": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", "options": [] diff --git a/tests/data/parser/parseTransactionErr1.out b/tests/data/parser/parseTransactionErr1.out index 1cb8affba..1c7464e58 100644 --- a/tests/data/parser/parseTransactionErr1.out +++ b/tests/data/parser/parseTransactionErr1.out @@ -2,7 +2,7 @@ "query": "COMMIT;", "lexer": { "@type": "PhpMyAdmin\\SqlParser\\Lexer", - "PARSER_METHODS": [ + "parserMethods": [ "parseDelimiter", "parseWhitespace", "parseNumber", @@ -52,7 +52,7 @@ "count": 3, "idx": 3 }, - "DEFAULT_DELIMITER": ";", + "defaultDelimiter": ";", "delimiter": ";", "delimiterLen": 1, "strict": false, @@ -60,7 +60,7 @@ }, "parser": { "@type": "PhpMyAdmin\\SqlParser\\Parser", - "STATEMENT_PARSERS": { + "statementParsers": { "DESCRIBE": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", "DESC": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", "EXPLAIN": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", @@ -105,7 +105,7 @@ "LOCK": "PhpMyAdmin\\SqlParser\\Statements\\LockStatement", "UNLOCK": "PhpMyAdmin\\SqlParser\\Statements\\LockStatement" }, - "KEYWORD_PARSERS": { + "keywordParsers": { "PARTITION BY": [], "SUBPARTITION BY": [], "_OPTIONS": { @@ -114,7 +114,7 @@ }, "_END_OPTIONS": { "class": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", - "field": "end_options" + "field": "endOptions" }, "INTERSECT": { "class": "PhpMyAdmin\\SqlParser\\Components\\UnionKeyword", @@ -365,7 +365,7 @@ "type": 2, "statements": null, "end": null, - "OPTIONS": { + "statementOptions": { "START TRANSACTION": 1, "BEGIN": 1, "COMMIT": 1, @@ -377,8 +377,8 @@ "RELEASE": 4, "NO RELEASE": 4 }, - "CLAUSES": [], - "END_OPTIONS": [], + "clauses": [], + "statementEndOptions": [], "options": { "@type": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", "options": { diff --git a/tests/data/parser/parseUnlock1.out b/tests/data/parser/parseUnlock1.out index 4d3a4a348..e8c28a676 100644 --- a/tests/data/parser/parseUnlock1.out +++ b/tests/data/parser/parseUnlock1.out @@ -2,7 +2,7 @@ "query": "UNLOCK TABLES;", "lexer": { "@type": "PhpMyAdmin\\SqlParser\\Lexer", - "PARSER_METHODS": [ + "parserMethods": [ "parseDelimiter", "parseWhitespace", "parseNumber", @@ -70,7 +70,7 @@ "count": 5, "idx": 5 }, - "DEFAULT_DELIMITER": ";", + "defaultDelimiter": ";", "delimiter": ";", "delimiterLen": 1, "strict": false, @@ -78,7 +78,7 @@ }, "parser": { "@type": "PhpMyAdmin\\SqlParser\\Parser", - "STATEMENT_PARSERS": { + "statementParsers": { "DESCRIBE": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", "DESC": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", "EXPLAIN": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", @@ -123,7 +123,7 @@ "LOCK": "PhpMyAdmin\\SqlParser\\Statements\\LockStatement", "UNLOCK": "PhpMyAdmin\\SqlParser\\Statements\\LockStatement" }, - "KEYWORD_PARSERS": { + "keywordParsers": { "PARTITION BY": [], "SUBPARTITION BY": [], "_OPTIONS": { @@ -132,7 +132,7 @@ }, "_END_OPTIONS": { "class": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", - "field": "end_options" + "field": "endOptions" }, "INTERSECT": { "class": "PhpMyAdmin\\SqlParser\\Components\\UnionKeyword", @@ -382,9 +382,9 @@ "@type": "PhpMyAdmin\\SqlParser\\Statements\\LockStatement", "locked": [], "isLock": false, - "OPTIONS": [], - "CLAUSES": [], - "END_OPTIONS": [], + "statementOptions": [], + "clauses": [], + "statementEndOptions": [], "options": null, "first": 0, "last": 3 diff --git a/tests/data/parser/parseUnlockErr1.out b/tests/data/parser/parseUnlockErr1.out index 07ffc3cc5..d8e639aa8 100644 --- a/tests/data/parser/parseUnlockErr1.out +++ b/tests/data/parser/parseUnlockErr1.out @@ -2,7 +2,7 @@ "query": "UNLOCK TABLES abc;", "lexer": { "@type": "PhpMyAdmin\\SqlParser\\Lexer", - "PARSER_METHODS": [ + "parserMethods": [ "parseDelimiter", "parseWhitespace", "parseNumber", @@ -88,7 +88,7 @@ "count": 7, "idx": 7 }, - "DEFAULT_DELIMITER": ";", + "defaultDelimiter": ";", "delimiter": ";", "delimiterLen": 1, "strict": false, @@ -96,7 +96,7 @@ }, "parser": { "@type": "PhpMyAdmin\\SqlParser\\Parser", - "STATEMENT_PARSERS": { + "statementParsers": { "DESCRIBE": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", "DESC": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", "EXPLAIN": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", @@ -141,7 +141,7 @@ "LOCK": "PhpMyAdmin\\SqlParser\\Statements\\LockStatement", "UNLOCK": "PhpMyAdmin\\SqlParser\\Statements\\LockStatement" }, - "KEYWORD_PARSERS": { + "keywordParsers": { "PARTITION BY": [], "SUBPARTITION BY": [], "_OPTIONS": { @@ -150,7 +150,7 @@ }, "_END_OPTIONS": { "class": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", - "field": "end_options" + "field": "endOptions" }, "INTERSECT": { "class": "PhpMyAdmin\\SqlParser\\Components\\UnionKeyword", @@ -400,9 +400,9 @@ "@type": "PhpMyAdmin\\SqlParser\\Statements\\LockStatement", "locked": [], "isLock": false, - "OPTIONS": [], - "CLAUSES": [], - "END_OPTIONS": [], + "statementOptions": [], + "clauses": [], + "statementEndOptions": [], "options": null, "first": 0, "last": 4 diff --git a/tests/data/parser/parseUpdate.out b/tests/data/parser/parseUpdate.out index 101b68005..a2b52b2f9 100644 --- a/tests/data/parser/parseUpdate.out +++ b/tests/data/parser/parseUpdate.out @@ -2,7 +2,7 @@ "query": "UPDATE\n users\nSET\n username = \"Dan\",\n id=155;", "lexer": { "@type": "PhpMyAdmin\\SqlParser\\Lexer", - "PARSER_METHODS": [ + "parserMethods": [ "parseDelimiter", "parseWhitespace", "parseNumber", @@ -187,7 +187,7 @@ "count": 18, "idx": 18 }, - "DEFAULT_DELIMITER": ";", + "defaultDelimiter": ";", "delimiter": ";", "delimiterLen": 1, "strict": false, @@ -195,7 +195,7 @@ }, "parser": { "@type": "PhpMyAdmin\\SqlParser\\Parser", - "STATEMENT_PARSERS": { + "statementParsers": { "DESCRIBE": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", "DESC": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", "EXPLAIN": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", @@ -240,7 +240,7 @@ "LOCK": "PhpMyAdmin\\SqlParser\\Statements\\LockStatement", "UNLOCK": "PhpMyAdmin\\SqlParser\\Statements\\LockStatement" }, - "KEYWORD_PARSERS": { + "keywordParsers": { "PARTITION BY": [], "SUBPARTITION BY": [], "_OPTIONS": { @@ -249,7 +249,7 @@ }, "_END_OPTIONS": { "class": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", - "field": "end_options" + "field": "endOptions" }, "INTERSECT": { "class": "PhpMyAdmin\\SqlParser\\Components\\UnionKeyword", @@ -497,11 +497,11 @@ "statements": [ { "@type": "PhpMyAdmin\\SqlParser\\Statements\\UpdateStatement", - "OPTIONS": { + "statementOptions": { "LOW_PRIORITY": 1, "IGNORE": 2 }, - "CLAUSES": { + "clauses": { "UPDATE": [ "UPDATE", 2 @@ -534,7 +534,7 @@ "tables": [ { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -572,7 +572,7 @@ "where": null, "order": null, "limit": null, - "END_OPTIONS": [], + "statementEndOptions": [], "options": { "@type": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", "options": [] diff --git a/tests/data/parser/parseUpdate2.out b/tests/data/parser/parseUpdate2.out index 3f81dea01..e353a6f25 100644 --- a/tests/data/parser/parseUpdate2.out +++ b/tests/data/parser/parseUpdate2.out @@ -2,7 +2,7 @@ "query": "UPDATE\n users\nSET\n username = \"Dan\",\n id=155\nWHERE\n username = \"Paul\"\nLIMIT 1 OFFSET 2;", "lexer": { "@type": "PhpMyAdmin\\SqlParser\\Lexer", - "PARSER_METHODS": [ + "parserMethods": [ "parseDelimiter", "parseWhitespace", "parseNumber", @@ -331,7 +331,7 @@ "count": 34, "idx": 34 }, - "DEFAULT_DELIMITER": ";", + "defaultDelimiter": ";", "delimiter": ";", "delimiterLen": 1, "strict": false, @@ -339,7 +339,7 @@ }, "parser": { "@type": "PhpMyAdmin\\SqlParser\\Parser", - "STATEMENT_PARSERS": { + "statementParsers": { "DESCRIBE": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", "DESC": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", "EXPLAIN": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", @@ -384,7 +384,7 @@ "LOCK": "PhpMyAdmin\\SqlParser\\Statements\\LockStatement", "UNLOCK": "PhpMyAdmin\\SqlParser\\Statements\\LockStatement" }, - "KEYWORD_PARSERS": { + "keywordParsers": { "PARTITION BY": [], "SUBPARTITION BY": [], "_OPTIONS": { @@ -393,7 +393,7 @@ }, "_END_OPTIONS": { "class": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", - "field": "end_options" + "field": "endOptions" }, "INTERSECT": { "class": "PhpMyAdmin\\SqlParser\\Components\\UnionKeyword", @@ -641,11 +641,11 @@ "statements": [ { "@type": "PhpMyAdmin\\SqlParser\\Statements\\UpdateStatement", - "OPTIONS": { + "statementOptions": { "LOW_PRIORITY": 1, "IGNORE": 2 }, - "CLAUSES": { + "clauses": { "UPDATE": [ "UPDATE", 2 @@ -678,7 +678,7 @@ "tables": [ { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -716,14 +716,14 @@ "where": [ { "@type": "PhpMyAdmin\\SqlParser\\Components\\Condition", - "DELIMITERS": [ + "delimiters": [ "&&", "||", "AND", "OR", "XOR" ], - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "ALL": 1, "AND": 1, "BETWEEN": 1, @@ -758,7 +758,7 @@ "offset": 2, "rowCount": 1 }, - "END_OPTIONS": [], + "statementEndOptions": [], "options": { "@type": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", "options": [] diff --git a/tests/data/parser/parseUpdate3.out b/tests/data/parser/parseUpdate3.out index 30d9eb819..fc27df0aa 100644 --- a/tests/data/parser/parseUpdate3.out +++ b/tests/data/parser/parseUpdate3.out @@ -2,7 +2,7 @@ "query": "UPDATE foo SET bar = WHERE baz = 0\n", "lexer": { "@type": "PhpMyAdmin\\SqlParser\\Lexer", - "PARSER_METHODS": [ + "parserMethods": [ "parseDelimiter", "parseWhitespace", "parseNumber", @@ -196,7 +196,7 @@ "count": 19, "idx": 19 }, - "DEFAULT_DELIMITER": ";", + "defaultDelimiter": ";", "delimiter": ";", "delimiterLen": 1, "strict": false, @@ -204,7 +204,7 @@ }, "parser": { "@type": "PhpMyAdmin\\SqlParser\\Parser", - "STATEMENT_PARSERS": { + "statementParsers": { "DESCRIBE": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", "DESC": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", "EXPLAIN": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", @@ -249,7 +249,7 @@ "LOCK": "PhpMyAdmin\\SqlParser\\Statements\\LockStatement", "UNLOCK": "PhpMyAdmin\\SqlParser\\Statements\\LockStatement" }, - "KEYWORD_PARSERS": { + "keywordParsers": { "PARTITION BY": [], "SUBPARTITION BY": [], "_OPTIONS": { @@ -258,7 +258,7 @@ }, "_END_OPTIONS": { "class": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", - "field": "end_options" + "field": "endOptions" }, "INTERSECT": { "class": "PhpMyAdmin\\SqlParser\\Components\\UnionKeyword", @@ -506,11 +506,11 @@ "statements": [ { "@type": "PhpMyAdmin\\SqlParser\\Statements\\UpdateStatement", - "OPTIONS": { + "statementOptions": { "LOW_PRIORITY": 1, "IGNORE": 2 }, - "CLAUSES": { + "clauses": { "UPDATE": [ "UPDATE", 2 @@ -543,7 +543,7 @@ "tables": [ { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -570,14 +570,14 @@ "where": [ { "@type": "PhpMyAdmin\\SqlParser\\Components\\Condition", - "DELIMITERS": [ + "delimiters": [ "&&", "||", "AND", "OR", "XOR" ], - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "ALL": 1, "AND": 1, "BETWEEN": 1, @@ -607,7 +607,7 @@ ], "order": null, "limit": null, - "END_OPTIONS": [], + "statementEndOptions": [], "options": { "@type": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", "options": [] diff --git a/tests/data/parser/parseUpdateErr.out b/tests/data/parser/parseUpdateErr.out index d9989ee20..47e69a9b0 100644 --- a/tests/data/parser/parseUpdateErr.out +++ b/tests/data/parser/parseUpdateErr.out @@ -2,7 +2,7 @@ "query": "-- extraneous comma\nUPDATE\n users\nSET\n username = \"Dan\",\n id=155,\nWHERE 1 = 1;", "lexer": { "@type": "PhpMyAdmin\\SqlParser\\Lexer", - "PARSER_METHODS": [ + "parserMethods": [ "parseDelimiter", "parseWhitespace", "parseNumber", @@ -286,7 +286,7 @@ "count": 29, "idx": 29 }, - "DEFAULT_DELIMITER": ";", + "defaultDelimiter": ";", "delimiter": ";", "delimiterLen": 1, "strict": false, @@ -294,7 +294,7 @@ }, "parser": { "@type": "PhpMyAdmin\\SqlParser\\Parser", - "STATEMENT_PARSERS": { + "statementParsers": { "DESCRIBE": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", "DESC": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", "EXPLAIN": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", @@ -339,7 +339,7 @@ "LOCK": "PhpMyAdmin\\SqlParser\\Statements\\LockStatement", "UNLOCK": "PhpMyAdmin\\SqlParser\\Statements\\LockStatement" }, - "KEYWORD_PARSERS": { + "keywordParsers": { "PARTITION BY": [], "SUBPARTITION BY": [], "_OPTIONS": { @@ -348,7 +348,7 @@ }, "_END_OPTIONS": { "class": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", - "field": "end_options" + "field": "endOptions" }, "INTERSECT": { "class": "PhpMyAdmin\\SqlParser\\Components\\UnionKeyword", @@ -596,11 +596,11 @@ "statements": [ { "@type": "PhpMyAdmin\\SqlParser\\Statements\\UpdateStatement", - "OPTIONS": { + "statementOptions": { "LOW_PRIORITY": 1, "IGNORE": 2 }, - "CLAUSES": { + "clauses": { "UPDATE": [ "UPDATE", 2 @@ -633,7 +633,7 @@ "tables": [ { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -671,14 +671,14 @@ "where": [ { "@type": "PhpMyAdmin\\SqlParser\\Components\\Condition", - "DELIMITERS": [ + "delimiters": [ "&&", "||", "AND", "OR", "XOR" ], - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "ALL": 1, "AND": 1, "BETWEEN": 1, @@ -706,7 +706,7 @@ ], "order": null, "limit": null, - "END_OPTIONS": [], + "statementEndOptions": [], "options": { "@type": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", "options": [] diff --git a/tests/data/parser/parseWithStatement.out b/tests/data/parser/parseWithStatement.out index ec40be51b..f51b9a6bb 100644 --- a/tests/data/parser/parseWithStatement.out +++ b/tests/data/parser/parseWithStatement.out @@ -2,7 +2,7 @@ "query": "INSERT INTO table_name WITH cte (col1) AS ( SELECT 1 UNION ALL SELECT 2 ) SELECT col1 FROM cte", "lexer": { "@type": "PhpMyAdmin\\SqlParser\\Lexer", - "PARSER_METHODS": [ + "parserMethods": [ "parseDelimiter", "parseWhitespace", "parseNumber", @@ -367,7 +367,7 @@ "count": 38, "idx": 38 }, - "DEFAULT_DELIMITER": ";", + "defaultDelimiter": ";", "delimiter": ";", "delimiterLen": 1, "strict": false, @@ -375,7 +375,7 @@ }, "parser": { "@type": "PhpMyAdmin\\SqlParser\\Parser", - "STATEMENT_PARSERS": { + "statementParsers": { "DESCRIBE": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", "DESC": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", "EXPLAIN": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", @@ -420,7 +420,7 @@ "LOCK": "PhpMyAdmin\\SqlParser\\Statements\\LockStatement", "UNLOCK": "PhpMyAdmin\\SqlParser\\Statements\\LockStatement" }, - "KEYWORD_PARSERS": { + "keywordParsers": { "PARTITION BY": [], "SUBPARTITION BY": [], "_OPTIONS": { @@ -429,7 +429,7 @@ }, "_END_OPTIONS": { "class": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", - "field": "end_options" + "field": "endOptions" }, "INTERSECT": { "class": "PhpMyAdmin\\SqlParser\\Components\\UnionKeyword", @@ -677,7 +677,7 @@ "statements": [ { "@type": "PhpMyAdmin\\SqlParser\\Statements\\InsertStatement", - "OPTIONS": { + "statementOptions": { "LOW_PRIORITY": 1, "DELAYED": 2, "HIGH_PRIORITY": 3, @@ -685,7 +685,7 @@ }, "into": { "@type": "PhpMyAdmin\\SqlParser\\Components\\IntoKeyword", - "FIELDS_OPTIONS": { + "statementFieldsOptions": { "TERMINATED BY": [ 1, "expr" @@ -700,7 +700,7 @@ "expr" ] }, - "LINES_OPTIONS": { + "statementLinesOptions": { "STARTING BY": [ 1, "expr" @@ -713,7 +713,7 @@ "type": null, "dest": { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -737,19 +737,19 @@ }, "columns": null, "values": null, - "fields_options": null, - "fields_keyword": null, - "lines_options": null + "fieldsOptions": null, + "fieldsKeyword": null, + "linesOptions": null }, "values": null, "set": null, "select": null, "with": { "@type": "PhpMyAdmin\\SqlParser\\Statements\\WithStatement", - "OPTIONS": { + "statementOptions": { "RECURSIVE": 1 }, - "CLAUSES": { + "clauses": { "WITH": [ "WITH", 2 @@ -780,7 +780,7 @@ ], "statement": { "@type": "PhpMyAdmin\\SqlParser\\Parser", - "STATEMENT_PARSERS": { + "statementParsers": { "DESCRIBE": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", "DESC": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", "EXPLAIN": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", @@ -825,7 +825,7 @@ "LOCK": "PhpMyAdmin\\SqlParser\\Statements\\LockStatement", "UNLOCK": "PhpMyAdmin\\SqlParser\\Statements\\LockStatement" }, - "KEYWORD_PARSERS": { + "keywordParsers": { "PARTITION BY": [], "SUBPARTITION BY": [], "_OPTIONS": { @@ -834,7 +834,7 @@ }, "_END_OPTIONS": { "class": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", - "field": "end_options" + "field": "endOptions" }, "INTERSECT": { "class": "PhpMyAdmin\\SqlParser\\Components\\UnionKeyword", @@ -1119,7 +1119,7 @@ "statements": [ { "@type": "PhpMyAdmin\\SqlParser\\Statements\\SelectStatement", - "OPTIONS": { + "statementOptions": { "ALL": 1, "DISTINCT": 1, "DISTINCTROW": 1, @@ -1136,11 +1136,11 @@ "SQL_NO_CACHE": 8, "SQL_CALC_FOUND_ROWS": 9 }, - "END_OPTIONS": { + "statementEndOptions": { "FOR UPDATE": 1, "LOCK IN SHARE MODE": 1 }, - "CLAUSES": { + "clauses": { "SELECT": [ "SELECT", 2 @@ -1269,7 +1269,7 @@ "expr": [ { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -1293,7 +1293,7 @@ } ], "from": [], - "index_hints": null, + "indexHints": null, "partition": null, "where": null, "group": null, @@ -1308,7 +1308,7 @@ "UNION ALL", { "@type": "PhpMyAdmin\\SqlParser\\Statements\\SelectStatement", - "OPTIONS": { + "statementOptions": { "ALL": 1, "DISTINCT": 1, "DISTINCTROW": 1, @@ -1325,11 +1325,11 @@ "SQL_NO_CACHE": 8, "SQL_CALC_FOUND_ROWS": 9 }, - "END_OPTIONS": { + "statementEndOptions": { "FOR UPDATE": 1, "LOCK IN SHARE MODE": 1 }, - "CLAUSES": { + "clauses": { "SELECT": [ "SELECT", 2 @@ -1458,7 +1458,7 @@ "expr": [ { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -1482,7 +1482,7 @@ } ], "from": [], - "index_hints": null, + "indexHints": null, "partition": null, "where": null, "group": null, @@ -1493,7 +1493,7 @@ "into": null, "join": null, "union": [], - "end_options": null, + "endOptions": null, "options": { "@type": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", "options": [] @@ -1503,7 +1503,7 @@ } ] ], - "end_options": null, + "endOptions": null, "options": { "@type": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", "options": [] @@ -1520,7 +1520,7 @@ }, "cteStatementParser": { "@type": "PhpMyAdmin\\SqlParser\\Parser", - "STATEMENT_PARSERS": { + "statementParsers": { "DESCRIBE": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", "DESC": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", "EXPLAIN": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", @@ -1565,7 +1565,7 @@ "LOCK": "PhpMyAdmin\\SqlParser\\Statements\\LockStatement", "UNLOCK": "PhpMyAdmin\\SqlParser\\Statements\\LockStatement" }, - "KEYWORD_PARSERS": { + "keywordParsers": { "PARTITION BY": [], "SUBPARTITION BY": [], "_OPTIONS": { @@ -1574,7 +1574,7 @@ }, "_END_OPTIONS": { "class": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", - "field": "end_options" + "field": "endOptions" }, "INTERSECT": { "class": "PhpMyAdmin\\SqlParser\\Components\\UnionKeyword", @@ -1850,7 +1850,7 @@ "statements": [ { "@type": "PhpMyAdmin\\SqlParser\\Statements\\SelectStatement", - "OPTIONS": { + "statementOptions": { "ALL": 1, "DISTINCT": 1, "DISTINCTROW": 1, @@ -1867,11 +1867,11 @@ "SQL_NO_CACHE": 8, "SQL_CALC_FOUND_ROWS": 9 }, - "END_OPTIONS": { + "statementEndOptions": { "FOR UPDATE": 1, "LOCK IN SHARE MODE": 1 }, - "CLAUSES": { + "clauses": { "SELECT": [ "SELECT", 2 @@ -2000,7 +2000,7 @@ "expr": [ { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -2026,7 +2026,7 @@ "from": [ { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -2049,7 +2049,7 @@ "subquery": null } ], - "index_hints": null, + "indexHints": null, "partition": null, "where": null, "group": null, @@ -2060,7 +2060,7 @@ "into": null, "join": null, "union": [], - "end_options": null, + "endOptions": null, "options": { "@type": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", "options": [] @@ -2073,7 +2073,7 @@ "strict": false, "errors": [] }, - "END_OPTIONS": [], + "statementEndOptions": [], "options": { "@type": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", "options": [] @@ -2082,8 +2082,8 @@ "last": null }, "onDuplicateSet": null, - "CLAUSES": [], - "END_OPTIONS": [], + "clauses": [], + "statementEndOptions": [], "options": { "@type": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", "options": [] diff --git a/tests/data/parser/parseWithStatement1.out b/tests/data/parser/parseWithStatement1.out index d6549d7a2..6c5fbf0e4 100644 --- a/tests/data/parser/parseWithStatement1.out +++ b/tests/data/parser/parseWithStatement1.out @@ -2,7 +2,7 @@ "query": "CREATE table table_name WITH cte (col1) AS ( SELECT 1 UNION ALL SELECT 2 ) SELECT col1 FROM cte", "lexer": { "@type": "PhpMyAdmin\\SqlParser\\Lexer", - "PARSER_METHODS": [ + "parserMethods": [ "parseDelimiter", "parseWhitespace", "parseNumber", @@ -367,7 +367,7 @@ "count": 38, "idx": 38 }, - "DEFAULT_DELIMITER": ";", + "defaultDelimiter": ";", "delimiter": ";", "delimiterLen": 1, "strict": false, @@ -375,7 +375,7 @@ }, "parser": { "@type": "PhpMyAdmin\\SqlParser\\Parser", - "STATEMENT_PARSERS": { + "statementParsers": { "DESCRIBE": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", "DESC": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", "EXPLAIN": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", @@ -420,7 +420,7 @@ "LOCK": "PhpMyAdmin\\SqlParser\\Statements\\LockStatement", "UNLOCK": "PhpMyAdmin\\SqlParser\\Statements\\LockStatement" }, - "KEYWORD_PARSERS": { + "keywordParsers": { "PARTITION BY": [], "SUBPARTITION BY": [], "_OPTIONS": { @@ -429,7 +429,7 @@ }, "_END_OPTIONS": { "class": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", - "field": "end_options" + "field": "endOptions" }, "INTERSECT": { "class": "PhpMyAdmin\\SqlParser\\Components\\UnionKeyword", @@ -677,7 +677,7 @@ "statements": [ { "@type": "PhpMyAdmin\\SqlParser\\Statements\\CreateStatement", - "OPTIONS": { + "statementOptions": { "TEMPORARY": 1, "OR REPLACE": 2, "ALGORITHM": [ @@ -709,7 +709,7 @@ "SCHEMA": 6, "IF NOT EXISTS": 7 }, - "DB_OPTIONS": { + "databaseOptions": { "CHARACTER SET": [ 1, "var=" @@ -735,7 +735,7 @@ "var=" ] }, - "TABLE_OPTIONS": { + "tableOptions": { "ENGINE": [ 1, "var=" @@ -837,7 +837,7 @@ "var" ] }, - "FUNC_OPTIONS": { + "functionOptions": { "NOT": [ 2, "var" @@ -882,7 +882,7 @@ "DETERMINISTIC": 2, "DATA": 5 }, - "TRIGGER_OPTIONS": { + "triggerOptions": { "BEFORE": 1, "AFTER": 1, "INSERT": 2, @@ -891,7 +891,7 @@ }, "name": { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -917,10 +917,10 @@ "fields": null, "with": { "@type": "PhpMyAdmin\\SqlParser\\Statements\\WithStatement", - "OPTIONS": { + "statementOptions": { "RECURSIVE": 1 }, - "CLAUSES": { + "clauses": { "WITH": [ "WITH", 2 @@ -951,7 +951,7 @@ ], "statement": { "@type": "PhpMyAdmin\\SqlParser\\Parser", - "STATEMENT_PARSERS": { + "statementParsers": { "DESCRIBE": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", "DESC": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", "EXPLAIN": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", @@ -996,7 +996,7 @@ "LOCK": "PhpMyAdmin\\SqlParser\\Statements\\LockStatement", "UNLOCK": "PhpMyAdmin\\SqlParser\\Statements\\LockStatement" }, - "KEYWORD_PARSERS": { + "keywordParsers": { "PARTITION BY": [], "SUBPARTITION BY": [], "_OPTIONS": { @@ -1005,7 +1005,7 @@ }, "_END_OPTIONS": { "class": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", - "field": "end_options" + "field": "endOptions" }, "INTERSECT": { "class": "PhpMyAdmin\\SqlParser\\Components\\UnionKeyword", @@ -1290,7 +1290,7 @@ "statements": [ { "@type": "PhpMyAdmin\\SqlParser\\Statements\\SelectStatement", - "OPTIONS": { + "statementOptions": { "ALL": 1, "DISTINCT": 1, "DISTINCTROW": 1, @@ -1307,11 +1307,11 @@ "SQL_NO_CACHE": 8, "SQL_CALC_FOUND_ROWS": 9 }, - "END_OPTIONS": { + "statementEndOptions": { "FOR UPDATE": 1, "LOCK IN SHARE MODE": 1 }, - "CLAUSES": { + "clauses": { "SELECT": [ "SELECT", 2 @@ -1440,7 +1440,7 @@ "expr": [ { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -1464,7 +1464,7 @@ } ], "from": [], - "index_hints": null, + "indexHints": null, "partition": null, "where": null, "group": null, @@ -1479,7 +1479,7 @@ "UNION ALL", { "@type": "PhpMyAdmin\\SqlParser\\Statements\\SelectStatement", - "OPTIONS": { + "statementOptions": { "ALL": 1, "DISTINCT": 1, "DISTINCTROW": 1, @@ -1496,11 +1496,11 @@ "SQL_NO_CACHE": 8, "SQL_CALC_FOUND_ROWS": 9 }, - "END_OPTIONS": { + "statementEndOptions": { "FOR UPDATE": 1, "LOCK IN SHARE MODE": 1 }, - "CLAUSES": { + "clauses": { "SELECT": [ "SELECT", 2 @@ -1629,7 +1629,7 @@ "expr": [ { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -1653,7 +1653,7 @@ } ], "from": [], - "index_hints": null, + "indexHints": null, "partition": null, "where": null, "group": null, @@ -1664,7 +1664,7 @@ "into": null, "join": null, "union": [], - "end_options": null, + "endOptions": null, "options": { "@type": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", "options": [] @@ -1674,7 +1674,7 @@ } ] ], - "end_options": null, + "endOptions": null, "options": { "@type": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", "options": [] @@ -1691,7 +1691,7 @@ }, "cteStatementParser": { "@type": "PhpMyAdmin\\SqlParser\\Parser", - "STATEMENT_PARSERS": { + "statementParsers": { "DESCRIBE": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", "DESC": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", "EXPLAIN": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", @@ -1736,7 +1736,7 @@ "LOCK": "PhpMyAdmin\\SqlParser\\Statements\\LockStatement", "UNLOCK": "PhpMyAdmin\\SqlParser\\Statements\\LockStatement" }, - "KEYWORD_PARSERS": { + "keywordParsers": { "PARTITION BY": [], "SUBPARTITION BY": [], "_OPTIONS": { @@ -1745,7 +1745,7 @@ }, "_END_OPTIONS": { "class": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", - "field": "end_options" + "field": "endOptions" }, "INTERSECT": { "class": "PhpMyAdmin\\SqlParser\\Components\\UnionKeyword", @@ -2021,7 +2021,7 @@ "statements": [ { "@type": "PhpMyAdmin\\SqlParser\\Statements\\SelectStatement", - "OPTIONS": { + "statementOptions": { "ALL": 1, "DISTINCT": 1, "DISTINCTROW": 1, @@ -2038,11 +2038,11 @@ "SQL_NO_CACHE": 8, "SQL_CALC_FOUND_ROWS": 9 }, - "END_OPTIONS": { + "statementEndOptions": { "FOR UPDATE": 1, "LOCK IN SHARE MODE": 1 }, - "CLAUSES": { + "clauses": { "SELECT": [ "SELECT", 2 @@ -2171,7 +2171,7 @@ "expr": [ { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -2197,7 +2197,7 @@ "from": [ { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -2220,7 +2220,7 @@ "subquery": null } ], - "index_hints": null, + "indexHints": null, "partition": null, "where": null, "group": null, @@ -2231,7 +2231,7 @@ "into": null, "join": null, "union": [], - "end_options": null, + "endOptions": null, "options": { "@type": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", "options": [] @@ -2244,7 +2244,7 @@ "strict": false, "errors": [] }, - "END_OPTIONS": [], + "statementEndOptions": [], "options": { "@type": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", "options": [] @@ -2263,8 +2263,8 @@ "return": null, "parameters": null, "body": [], - "CLAUSES": [], - "END_OPTIONS": [], + "clauses": [], + "statementEndOptions": [], "options": { "@type": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", "options": { diff --git a/tests/data/parser/parseWithStatement2.out b/tests/data/parser/parseWithStatement2.out index f9541c022..0c3e095b7 100644 --- a/tests/data/parser/parseWithStatement2.out +++ b/tests/data/parser/parseWithStatement2.out @@ -2,7 +2,7 @@ "query": "INSERT INTO table_name WITH cte (col1) AS ( SELECT 1 ) SELECT col1 FROM cte ON DUPLICATE KEY UPDATE col_name = 3", "lexer": { "@type": "PhpMyAdmin\\SqlParser\\Lexer", - "PARSER_METHODS": [ + "parserMethods": [ "parseDelimiter", "parseWhitespace", "parseNumber", @@ -439,7 +439,7 @@ "count": 46, "idx": 46 }, - "DEFAULT_DELIMITER": ";", + "defaultDelimiter": ";", "delimiter": ";", "delimiterLen": 1, "strict": false, @@ -447,7 +447,7 @@ }, "parser": { "@type": "PhpMyAdmin\\SqlParser\\Parser", - "STATEMENT_PARSERS": { + "statementParsers": { "DESCRIBE": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", "DESC": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", "EXPLAIN": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", @@ -492,7 +492,7 @@ "LOCK": "PhpMyAdmin\\SqlParser\\Statements\\LockStatement", "UNLOCK": "PhpMyAdmin\\SqlParser\\Statements\\LockStatement" }, - "KEYWORD_PARSERS": { + "keywordParsers": { "PARTITION BY": [], "SUBPARTITION BY": [], "_OPTIONS": { @@ -501,7 +501,7 @@ }, "_END_OPTIONS": { "class": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", - "field": "end_options" + "field": "endOptions" }, "INTERSECT": { "class": "PhpMyAdmin\\SqlParser\\Components\\UnionKeyword", @@ -749,7 +749,7 @@ "statements": [ { "@type": "PhpMyAdmin\\SqlParser\\Statements\\InsertStatement", - "OPTIONS": { + "statementOptions": { "LOW_PRIORITY": 1, "DELAYED": 2, "HIGH_PRIORITY": 3, @@ -757,7 +757,7 @@ }, "into": { "@type": "PhpMyAdmin\\SqlParser\\Components\\IntoKeyword", - "FIELDS_OPTIONS": { + "statementFieldsOptions": { "TERMINATED BY": [ 1, "expr" @@ -772,7 +772,7 @@ "expr" ] }, - "LINES_OPTIONS": { + "statementLinesOptions": { "STARTING BY": [ 1, "expr" @@ -785,7 +785,7 @@ "type": null, "dest": { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -809,19 +809,19 @@ }, "columns": null, "values": null, - "fields_options": null, - "fields_keyword": null, - "lines_options": null + "fieldsOptions": null, + "fieldsKeyword": null, + "linesOptions": null }, "values": null, "set": null, "select": null, "with": { "@type": "PhpMyAdmin\\SqlParser\\Statements\\WithStatement", - "OPTIONS": { + "statementOptions": { "RECURSIVE": 1 }, - "CLAUSES": { + "clauses": { "WITH": [ "WITH", 2 @@ -852,7 +852,7 @@ ], "statement": { "@type": "PhpMyAdmin\\SqlParser\\Parser", - "STATEMENT_PARSERS": { + "statementParsers": { "DESCRIBE": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", "DESC": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", "EXPLAIN": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", @@ -897,7 +897,7 @@ "LOCK": "PhpMyAdmin\\SqlParser\\Statements\\LockStatement", "UNLOCK": "PhpMyAdmin\\SqlParser\\Statements\\LockStatement" }, - "KEYWORD_PARSERS": { + "keywordParsers": { "PARTITION BY": [], "SUBPARTITION BY": [], "_OPTIONS": { @@ -906,7 +906,7 @@ }, "_END_OPTIONS": { "class": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", - "field": "end_options" + "field": "endOptions" }, "INTERSECT": { "class": "PhpMyAdmin\\SqlParser\\Components\\UnionKeyword", @@ -1173,7 +1173,7 @@ "statements": [ { "@type": "PhpMyAdmin\\SqlParser\\Statements\\SelectStatement", - "OPTIONS": { + "statementOptions": { "ALL": 1, "DISTINCT": 1, "DISTINCTROW": 1, @@ -1190,11 +1190,11 @@ "SQL_NO_CACHE": 8, "SQL_CALC_FOUND_ROWS": 9 }, - "END_OPTIONS": { + "statementEndOptions": { "FOR UPDATE": 1, "LOCK IN SHARE MODE": 1 }, - "CLAUSES": { + "clauses": { "SELECT": [ "SELECT", 2 @@ -1323,7 +1323,7 @@ "expr": [ { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -1347,7 +1347,7 @@ } ], "from": [], - "index_hints": null, + "indexHints": null, "partition": null, "where": null, "group": null, @@ -1358,7 +1358,7 @@ "into": null, "join": null, "union": [], - "end_options": null, + "endOptions": null, "options": { "@type": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", "options": [] @@ -1375,7 +1375,7 @@ }, "cteStatementParser": { "@type": "PhpMyAdmin\\SqlParser\\Parser", - "STATEMENT_PARSERS": { + "statementParsers": { "DESCRIBE": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", "DESC": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", "EXPLAIN": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", @@ -1420,7 +1420,7 @@ "LOCK": "PhpMyAdmin\\SqlParser\\Statements\\LockStatement", "UNLOCK": "PhpMyAdmin\\SqlParser\\Statements\\LockStatement" }, - "KEYWORD_PARSERS": { + "keywordParsers": { "PARTITION BY": [], "SUBPARTITION BY": [], "_OPTIONS": { @@ -1429,7 +1429,7 @@ }, "_END_OPTIONS": { "class": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", - "field": "end_options" + "field": "endOptions" }, "INTERSECT": { "class": "PhpMyAdmin\\SqlParser\\Components\\UnionKeyword", @@ -1705,7 +1705,7 @@ "statements": [ { "@type": "PhpMyAdmin\\SqlParser\\Statements\\SelectStatement", - "OPTIONS": { + "statementOptions": { "ALL": 1, "DISTINCT": 1, "DISTINCTROW": 1, @@ -1722,11 +1722,11 @@ "SQL_NO_CACHE": 8, "SQL_CALC_FOUND_ROWS": 9 }, - "END_OPTIONS": { + "statementEndOptions": { "FOR UPDATE": 1, "LOCK IN SHARE MODE": 1 }, - "CLAUSES": { + "clauses": { "SELECT": [ "SELECT", 2 @@ -1855,7 +1855,7 @@ "expr": [ { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -1881,7 +1881,7 @@ "from": [ { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -1904,7 +1904,7 @@ "subquery": null } ], - "index_hints": null, + "indexHints": null, "partition": null, "where": null, "group": null, @@ -1915,7 +1915,7 @@ "into": null, "join": null, "union": [], - "end_options": null, + "endOptions": null, "options": { "@type": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", "options": [] @@ -1928,7 +1928,7 @@ "strict": false, "errors": [] }, - "END_OPTIONS": [], + "statementEndOptions": [], "options": { "@type": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", "options": [] @@ -1943,8 +1943,8 @@ "value": "3" } ], - "CLAUSES": [], - "END_OPTIONS": [], + "clauses": [], + "statementEndOptions": [], "options": { "@type": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", "options": [] diff --git a/tests/data/parser/parseWithStatement3.out b/tests/data/parser/parseWithStatement3.out index 8c5280d2d..680127f48 100644 --- a/tests/data/parser/parseWithStatement3.out +++ b/tests/data/parser/parseWithStatement3.out @@ -2,7 +2,7 @@ "query": "WITH categories(identifier, name, parent_id) AS ( SELECT c.identifier, c.name, c.parent_id FROM category c WHERE c.identifier = 'a' UNION ALL SELECT c.identifier, c.name, c.parent_id FROM categories, category c WHERE c.identifier = categories.parent_id ), foo AS ( SELECT * FROM test ) SELECT * FROM categories", "lexer": { "@type": "PhpMyAdmin\\SqlParser\\Lexer", - "PARSER_METHODS": [ + "parserMethods": [ "parseDelimiter", "parseWhitespace", "parseNumber", @@ -1060,7 +1060,7 @@ "count": 115, "idx": 115 }, - "DEFAULT_DELIMITER": ";", + "defaultDelimiter": ";", "delimiter": ";", "delimiterLen": 1, "strict": false, @@ -1068,7 +1068,7 @@ }, "parser": { "@type": "PhpMyAdmin\\SqlParser\\Parser", - "STATEMENT_PARSERS": { + "statementParsers": { "DESCRIBE": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", "DESC": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", "EXPLAIN": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", @@ -1113,7 +1113,7 @@ "LOCK": "PhpMyAdmin\\SqlParser\\Statements\\LockStatement", "UNLOCK": "PhpMyAdmin\\SqlParser\\Statements\\LockStatement" }, - "KEYWORD_PARSERS": { + "keywordParsers": { "PARTITION BY": [], "SUBPARTITION BY": [], "_OPTIONS": { @@ -1122,7 +1122,7 @@ }, "_END_OPTIONS": { "class": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", - "field": "end_options" + "field": "endOptions" }, "INTERSECT": { "class": "PhpMyAdmin\\SqlParser\\Components\\UnionKeyword", @@ -1370,10 +1370,10 @@ "statements": [ { "@type": "PhpMyAdmin\\SqlParser\\Statements\\WithStatement", - "OPTIONS": { + "statementOptions": { "RECURSIVE": 1 }, - "CLAUSES": { + "clauses": { "WITH": [ "WITH", 2 @@ -1408,7 +1408,7 @@ ], "statement": { "@type": "PhpMyAdmin\\SqlParser\\Parser", - "STATEMENT_PARSERS": { + "statementParsers": { "DESCRIBE": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", "DESC": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", "EXPLAIN": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", @@ -1453,7 +1453,7 @@ "LOCK": "PhpMyAdmin\\SqlParser\\Statements\\LockStatement", "UNLOCK": "PhpMyAdmin\\SqlParser\\Statements\\LockStatement" }, - "KEYWORD_PARSERS": { + "keywordParsers": { "PARTITION BY": [], "SUBPARTITION BY": [], "_OPTIONS": { @@ -1462,7 +1462,7 @@ }, "_END_OPTIONS": { "class": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", - "field": "end_options" + "field": "endOptions" }, "INTERSECT": { "class": "PhpMyAdmin\\SqlParser\\Components\\UnionKeyword", @@ -1930,7 +1930,7 @@ "statements": [ { "@type": "PhpMyAdmin\\SqlParser\\Statements\\SelectStatement", - "OPTIONS": { + "statementOptions": { "ALL": 1, "DISTINCT": 1, "DISTINCTROW": 1, @@ -1947,11 +1947,11 @@ "SQL_NO_CACHE": 8, "SQL_CALC_FOUND_ROWS": 9 }, - "END_OPTIONS": { + "statementEndOptions": { "FOR UPDATE": 1, "LOCK IN SHARE MODE": 1 }, - "CLAUSES": { + "clauses": { "SELECT": [ "SELECT", 2 @@ -2080,7 +2080,7 @@ "expr": [ { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -2104,7 +2104,7 @@ }, { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -2128,7 +2128,7 @@ }, { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -2154,7 +2154,7 @@ "from": [ { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -2177,19 +2177,19 @@ "subquery": null } ], - "index_hints": null, + "indexHints": null, "partition": null, "where": [ { "@type": "PhpMyAdmin\\SqlParser\\Components\\Condition", - "DELIMITERS": [ + "delimiters": [ "&&", "||", "AND", "OR", "XOR" ], - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "ALL": 1, "AND": 1, "BETWEEN": 1, @@ -2231,7 +2231,7 @@ "UNION ALL", { "@type": "PhpMyAdmin\\SqlParser\\Statements\\SelectStatement", - "OPTIONS": { + "statementOptions": { "ALL": 1, "DISTINCT": 1, "DISTINCTROW": 1, @@ -2248,11 +2248,11 @@ "SQL_NO_CACHE": 8, "SQL_CALC_FOUND_ROWS": 9 }, - "END_OPTIONS": { + "statementEndOptions": { "FOR UPDATE": 1, "LOCK IN SHARE MODE": 1 }, - "CLAUSES": { + "clauses": { "SELECT": [ "SELECT", 2 @@ -2381,7 +2381,7 @@ "expr": [ { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -2405,7 +2405,7 @@ }, { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -2429,7 +2429,7 @@ }, { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -2455,7 +2455,7 @@ "from": [ { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -2479,7 +2479,7 @@ }, { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -2502,19 +2502,19 @@ "subquery": null } ], - "index_hints": null, + "indexHints": null, "partition": null, "where": [ { "@type": "PhpMyAdmin\\SqlParser\\Components\\Condition", - "DELIMITERS": [ + "delimiters": [ "&&", "||", "AND", "OR", "XOR" ], - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "ALL": 1, "AND": 1, "BETWEEN": 1, @@ -2553,7 +2553,7 @@ "into": null, "join": null, "union": [], - "end_options": null, + "endOptions": null, "options": { "@type": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", "options": [] @@ -2563,7 +2563,7 @@ } ] ], - "end_options": null, + "endOptions": null, "options": { "@type": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", "options": [] @@ -2583,7 +2583,7 @@ "columns": [], "statement": { "@type": "PhpMyAdmin\\SqlParser\\Parser", - "STATEMENT_PARSERS": { + "statementParsers": { "DESCRIBE": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", "DESC": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", "EXPLAIN": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", @@ -2628,7 +2628,7 @@ "LOCK": "PhpMyAdmin\\SqlParser\\Statements\\LockStatement", "UNLOCK": "PhpMyAdmin\\SqlParser\\Statements\\LockStatement" }, - "KEYWORD_PARSERS": { + "keywordParsers": { "PARTITION BY": [], "SUBPARTITION BY": [], "_OPTIONS": { @@ -2637,7 +2637,7 @@ }, "_END_OPTIONS": { "class": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", - "field": "end_options" + "field": "endOptions" }, "INTERSECT": { "class": "PhpMyAdmin\\SqlParser\\Components\\UnionKeyword", @@ -2916,7 +2916,7 @@ "statements": [ { "@type": "PhpMyAdmin\\SqlParser\\Statements\\SelectStatement", - "OPTIONS": { + "statementOptions": { "ALL": 1, "DISTINCT": 1, "DISTINCTROW": 1, @@ -2933,11 +2933,11 @@ "SQL_NO_CACHE": 8, "SQL_CALC_FOUND_ROWS": 9 }, - "END_OPTIONS": { + "statementEndOptions": { "FOR UPDATE": 1, "LOCK IN SHARE MODE": 1 }, - "CLAUSES": { + "clauses": { "SELECT": [ "SELECT", 2 @@ -3066,7 +3066,7 @@ "expr": [ { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -3092,7 +3092,7 @@ "from": [ { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -3115,7 +3115,7 @@ "subquery": null } ], - "index_hints": null, + "indexHints": null, "partition": null, "where": null, "group": null, @@ -3126,7 +3126,7 @@ "into": null, "join": null, "union": [], - "end_options": null, + "endOptions": null, "options": { "@type": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", "options": [] @@ -3143,7 +3143,7 @@ }, "cteStatementParser": { "@type": "PhpMyAdmin\\SqlParser\\Parser", - "STATEMENT_PARSERS": { + "statementParsers": { "DESCRIBE": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", "DESC": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", "EXPLAIN": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", @@ -3188,7 +3188,7 @@ "LOCK": "PhpMyAdmin\\SqlParser\\Statements\\LockStatement", "UNLOCK": "PhpMyAdmin\\SqlParser\\Statements\\LockStatement" }, - "KEYWORD_PARSERS": { + "keywordParsers": { "PARTITION BY": [], "SUBPARTITION BY": [], "_OPTIONS": { @@ -3197,7 +3197,7 @@ }, "_END_OPTIONS": { "class": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", - "field": "end_options" + "field": "endOptions" }, "INTERSECT": { "class": "PhpMyAdmin\\SqlParser\\Components\\UnionKeyword", @@ -3473,7 +3473,7 @@ "statements": [ { "@type": "PhpMyAdmin\\SqlParser\\Statements\\SelectStatement", - "OPTIONS": { + "statementOptions": { "ALL": 1, "DISTINCT": 1, "DISTINCTROW": 1, @@ -3490,11 +3490,11 @@ "SQL_NO_CACHE": 8, "SQL_CALC_FOUND_ROWS": 9 }, - "END_OPTIONS": { + "statementEndOptions": { "FOR UPDATE": 1, "LOCK IN SHARE MODE": 1 }, - "CLAUSES": { + "clauses": { "SELECT": [ "SELECT", 2 @@ -3623,7 +3623,7 @@ "expr": [ { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -3649,7 +3649,7 @@ "from": [ { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -3672,7 +3672,7 @@ "subquery": null } ], - "index_hints": null, + "indexHints": null, "partition": null, "where": null, "group": null, @@ -3683,7 +3683,7 @@ "into": null, "join": null, "union": [], - "end_options": null, + "endOptions": null, "options": { "@type": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", "options": [] @@ -3696,7 +3696,7 @@ "strict": false, "errors": [] }, - "END_OPTIONS": [], + "statementEndOptions": [], "options": { "@type": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", "options": [] diff --git a/tests/data/parser/parseWithStatement4.out b/tests/data/parser/parseWithStatement4.out index f6aa29a4d..842ac6b02 100644 --- a/tests/data/parser/parseWithStatement4.out +++ b/tests/data/parser/parseWithStatement4.out @@ -2,7 +2,7 @@ "query": "CREATE table table_name AS WITH cte (col1) AS ( SELECT 1 UNION ALL SELECT 2 ) NO", "lexer": { "@type": "PhpMyAdmin\\SqlParser\\Lexer", - "PARSER_METHODS": [ + "parserMethods": [ "parseDelimiter", "parseWhitespace", "parseNumber", @@ -331,7 +331,7 @@ "count": 34, "idx": 35 }, - "DEFAULT_DELIMITER": ";", + "defaultDelimiter": ";", "delimiter": ";", "delimiterLen": 1, "strict": false, @@ -339,7 +339,7 @@ }, "parser": { "@type": "PhpMyAdmin\\SqlParser\\Parser", - "STATEMENT_PARSERS": { + "statementParsers": { "DESCRIBE": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", "DESC": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", "EXPLAIN": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", @@ -384,7 +384,7 @@ "LOCK": "PhpMyAdmin\\SqlParser\\Statements\\LockStatement", "UNLOCK": "PhpMyAdmin\\SqlParser\\Statements\\LockStatement" }, - "KEYWORD_PARSERS": { + "keywordParsers": { "PARTITION BY": [], "SUBPARTITION BY": [], "_OPTIONS": { @@ -393,7 +393,7 @@ }, "_END_OPTIONS": { "class": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", - "field": "end_options" + "field": "endOptions" }, "INTERSECT": { "class": "PhpMyAdmin\\SqlParser\\Components\\UnionKeyword", @@ -641,7 +641,7 @@ "statements": [ { "@type": "PhpMyAdmin\\SqlParser\\Statements\\CreateStatement", - "OPTIONS": { + "statementOptions": { "TEMPORARY": 1, "OR REPLACE": 2, "ALGORITHM": [ @@ -673,7 +673,7 @@ "SCHEMA": 6, "IF NOT EXISTS": 7 }, - "DB_OPTIONS": { + "databaseOptions": { "CHARACTER SET": [ 1, "var=" @@ -699,7 +699,7 @@ "var=" ] }, - "TABLE_OPTIONS": { + "tableOptions": { "ENGINE": [ 1, "var=" @@ -801,7 +801,7 @@ "var" ] }, - "FUNC_OPTIONS": { + "functionOptions": { "NOT": [ 2, "var" @@ -846,7 +846,7 @@ "DETERMINISTIC": 2, "DATA": 5 }, - "TRIGGER_OPTIONS": { + "triggerOptions": { "BEFORE": 1, "AFTER": 1, "INSERT": 2, @@ -855,7 +855,7 @@ }, "name": { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -881,10 +881,10 @@ "fields": null, "with": { "@type": "PhpMyAdmin\\SqlParser\\Statements\\WithStatement", - "OPTIONS": { + "statementOptions": { "RECURSIVE": 1 }, - "CLAUSES": { + "clauses": { "WITH": [ "WITH", 2 @@ -915,7 +915,7 @@ ], "statement": { "@type": "PhpMyAdmin\\SqlParser\\Parser", - "STATEMENT_PARSERS": { + "statementParsers": { "DESCRIBE": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", "DESC": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", "EXPLAIN": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", @@ -960,7 +960,7 @@ "LOCK": "PhpMyAdmin\\SqlParser\\Statements\\LockStatement", "UNLOCK": "PhpMyAdmin\\SqlParser\\Statements\\LockStatement" }, - "KEYWORD_PARSERS": { + "keywordParsers": { "PARTITION BY": [], "SUBPARTITION BY": [], "_OPTIONS": { @@ -969,7 +969,7 @@ }, "_END_OPTIONS": { "class": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", - "field": "end_options" + "field": "endOptions" }, "INTERSECT": { "class": "PhpMyAdmin\\SqlParser\\Components\\UnionKeyword", @@ -1254,7 +1254,7 @@ "statements": [ { "@type": "PhpMyAdmin\\SqlParser\\Statements\\SelectStatement", - "OPTIONS": { + "statementOptions": { "ALL": 1, "DISTINCT": 1, "DISTINCTROW": 1, @@ -1271,11 +1271,11 @@ "SQL_NO_CACHE": 8, "SQL_CALC_FOUND_ROWS": 9 }, - "END_OPTIONS": { + "statementEndOptions": { "FOR UPDATE": 1, "LOCK IN SHARE MODE": 1 }, - "CLAUSES": { + "clauses": { "SELECT": [ "SELECT", 2 @@ -1404,7 +1404,7 @@ "expr": [ { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -1428,7 +1428,7 @@ } ], "from": [], - "index_hints": null, + "indexHints": null, "partition": null, "where": null, "group": null, @@ -1443,7 +1443,7 @@ "UNION ALL", { "@type": "PhpMyAdmin\\SqlParser\\Statements\\SelectStatement", - "OPTIONS": { + "statementOptions": { "ALL": 1, "DISTINCT": 1, "DISTINCTROW": 1, @@ -1460,11 +1460,11 @@ "SQL_NO_CACHE": 8, "SQL_CALC_FOUND_ROWS": 9 }, - "END_OPTIONS": { + "statementEndOptions": { "FOR UPDATE": 1, "LOCK IN SHARE MODE": 1 }, - "CLAUSES": { + "clauses": { "SELECT": [ "SELECT", 2 @@ -1593,7 +1593,7 @@ "expr": [ { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -1617,7 +1617,7 @@ } ], "from": [], - "index_hints": null, + "indexHints": null, "partition": null, "where": null, "group": null, @@ -1628,7 +1628,7 @@ "into": null, "join": null, "union": [], - "end_options": null, + "endOptions": null, "options": { "@type": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", "options": [] @@ -1638,7 +1638,7 @@ } ] ], - "end_options": null, + "endOptions": null, "options": { "@type": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", "options": [] @@ -1654,7 +1654,7 @@ } }, "cteStatementParser": null, - "END_OPTIONS": [], + "statementEndOptions": [], "options": { "@type": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", "options": [] @@ -1673,8 +1673,8 @@ "return": null, "parameters": null, "body": [], - "CLAUSES": [], - "END_OPTIONS": [], + "clauses": [], + "statementEndOptions": [], "options": { "@type": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", "options": { diff --git a/tests/data/parser/parseWithStatement5.out b/tests/data/parser/parseWithStatement5.out index d3f99e332..955b32573 100644 --- a/tests/data/parser/parseWithStatement5.out +++ b/tests/data/parser/parseWithStatement5.out @@ -2,7 +2,7 @@ "query": "CREATE view view_name AS WITH aa(col1) AS ( SELECT 1 UNION ALL SELECT 2 ) SELECT col1 FROM cte", "lexer": { "@type": "PhpMyAdmin\\SqlParser\\Lexer", - "PARSER_METHODS": [ + "parserMethods": [ "parseDelimiter", "parseWhitespace", "parseNumber", @@ -376,7 +376,7 @@ "count": 39, "idx": 39 }, - "DEFAULT_DELIMITER": ";", + "defaultDelimiter": ";", "delimiter": ";", "delimiterLen": 1, "strict": false, @@ -384,7 +384,7 @@ }, "parser": { "@type": "PhpMyAdmin\\SqlParser\\Parser", - "STATEMENT_PARSERS": { + "statementParsers": { "DESCRIBE": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", "DESC": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", "EXPLAIN": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", @@ -429,7 +429,7 @@ "LOCK": "PhpMyAdmin\\SqlParser\\Statements\\LockStatement", "UNLOCK": "PhpMyAdmin\\SqlParser\\Statements\\LockStatement" }, - "KEYWORD_PARSERS": { + "keywordParsers": { "PARTITION BY": [], "SUBPARTITION BY": [], "_OPTIONS": { @@ -438,7 +438,7 @@ }, "_END_OPTIONS": { "class": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", - "field": "end_options" + "field": "endOptions" }, "INTERSECT": { "class": "PhpMyAdmin\\SqlParser\\Components\\UnionKeyword", @@ -686,7 +686,7 @@ "statements": [ { "@type": "PhpMyAdmin\\SqlParser\\Statements\\CreateStatement", - "OPTIONS": { + "statementOptions": { "TEMPORARY": 1, "OR REPLACE": 2, "ALGORITHM": [ @@ -718,7 +718,7 @@ "SCHEMA": 6, "IF NOT EXISTS": 7 }, - "DB_OPTIONS": { + "databaseOptions": { "CHARACTER SET": [ 1, "var=" @@ -744,7 +744,7 @@ "var=" ] }, - "TABLE_OPTIONS": { + "tableOptions": { "ENGINE": [ 1, "var=" @@ -846,7 +846,7 @@ "var" ] }, - "FUNC_OPTIONS": { + "functionOptions": { "NOT": [ 2, "var" @@ -891,7 +891,7 @@ "DETERMINISTIC": 2, "DATA": 5 }, - "TRIGGER_OPTIONS": { + "triggerOptions": { "BEFORE": 1, "AFTER": 1, "INSERT": 2, @@ -900,7 +900,7 @@ }, "name": { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -926,10 +926,10 @@ "fields": null, "with": { "@type": "PhpMyAdmin\\SqlParser\\Statements\\WithStatement", - "OPTIONS": { + "statementOptions": { "RECURSIVE": 1 }, - "CLAUSES": { + "clauses": { "WITH": [ "WITH", 2 @@ -960,7 +960,7 @@ ], "statement": { "@type": "PhpMyAdmin\\SqlParser\\Parser", - "STATEMENT_PARSERS": { + "statementParsers": { "DESCRIBE": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", "DESC": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", "EXPLAIN": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", @@ -1005,7 +1005,7 @@ "LOCK": "PhpMyAdmin\\SqlParser\\Statements\\LockStatement", "UNLOCK": "PhpMyAdmin\\SqlParser\\Statements\\LockStatement" }, - "KEYWORD_PARSERS": { + "keywordParsers": { "PARTITION BY": [], "SUBPARTITION BY": [], "_OPTIONS": { @@ -1014,7 +1014,7 @@ }, "_END_OPTIONS": { "class": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", - "field": "end_options" + "field": "endOptions" }, "INTERSECT": { "class": "PhpMyAdmin\\SqlParser\\Components\\UnionKeyword", @@ -1299,7 +1299,7 @@ "statements": [ { "@type": "PhpMyAdmin\\SqlParser\\Statements\\SelectStatement", - "OPTIONS": { + "statementOptions": { "ALL": 1, "DISTINCT": 1, "DISTINCTROW": 1, @@ -1316,11 +1316,11 @@ "SQL_NO_CACHE": 8, "SQL_CALC_FOUND_ROWS": 9 }, - "END_OPTIONS": { + "statementEndOptions": { "FOR UPDATE": 1, "LOCK IN SHARE MODE": 1 }, - "CLAUSES": { + "clauses": { "SELECT": [ "SELECT", 2 @@ -1449,7 +1449,7 @@ "expr": [ { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -1473,7 +1473,7 @@ } ], "from": [], - "index_hints": null, + "indexHints": null, "partition": null, "where": null, "group": null, @@ -1488,7 +1488,7 @@ "UNION ALL", { "@type": "PhpMyAdmin\\SqlParser\\Statements\\SelectStatement", - "OPTIONS": { + "statementOptions": { "ALL": 1, "DISTINCT": 1, "DISTINCTROW": 1, @@ -1505,11 +1505,11 @@ "SQL_NO_CACHE": 8, "SQL_CALC_FOUND_ROWS": 9 }, - "END_OPTIONS": { + "statementEndOptions": { "FOR UPDATE": 1, "LOCK IN SHARE MODE": 1 }, - "CLAUSES": { + "clauses": { "SELECT": [ "SELECT", 2 @@ -1638,7 +1638,7 @@ "expr": [ { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -1662,7 +1662,7 @@ } ], "from": [], - "index_hints": null, + "indexHints": null, "partition": null, "where": null, "group": null, @@ -1673,7 +1673,7 @@ "into": null, "join": null, "union": [], - "end_options": null, + "endOptions": null, "options": { "@type": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", "options": [] @@ -1683,7 +1683,7 @@ } ] ], - "end_options": null, + "endOptions": null, "options": { "@type": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", "options": [] @@ -1700,7 +1700,7 @@ }, "cteStatementParser": { "@type": "PhpMyAdmin\\SqlParser\\Parser", - "STATEMENT_PARSERS": { + "statementParsers": { "DESCRIBE": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", "DESC": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", "EXPLAIN": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", @@ -1745,7 +1745,7 @@ "LOCK": "PhpMyAdmin\\SqlParser\\Statements\\LockStatement", "UNLOCK": "PhpMyAdmin\\SqlParser\\Statements\\LockStatement" }, - "KEYWORD_PARSERS": { + "keywordParsers": { "PARTITION BY": [], "SUBPARTITION BY": [], "_OPTIONS": { @@ -1754,7 +1754,7 @@ }, "_END_OPTIONS": { "class": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", - "field": "end_options" + "field": "endOptions" }, "INTERSECT": { "class": "PhpMyAdmin\\SqlParser\\Components\\UnionKeyword", @@ -2030,7 +2030,7 @@ "statements": [ { "@type": "PhpMyAdmin\\SqlParser\\Statements\\SelectStatement", - "OPTIONS": { + "statementOptions": { "ALL": 1, "DISTINCT": 1, "DISTINCTROW": 1, @@ -2047,11 +2047,11 @@ "SQL_NO_CACHE": 8, "SQL_CALC_FOUND_ROWS": 9 }, - "END_OPTIONS": { + "statementEndOptions": { "FOR UPDATE": 1, "LOCK IN SHARE MODE": 1 }, - "CLAUSES": { + "clauses": { "SELECT": [ "SELECT", 2 @@ -2180,7 +2180,7 @@ "expr": [ { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -2206,7 +2206,7 @@ "from": [ { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -2229,7 +2229,7 @@ "subquery": null } ], - "index_hints": null, + "indexHints": null, "partition": null, "where": null, "group": null, @@ -2240,7 +2240,7 @@ "into": null, "join": null, "union": [], - "end_options": null, + "endOptions": null, "options": { "@type": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", "options": [] @@ -2253,7 +2253,7 @@ "strict": false, "errors": [] }, - "END_OPTIONS": [], + "statementEndOptions": [], "options": { "@type": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", "options": [] @@ -2276,8 +2276,8 @@ "@type": "@39" } ], - "CLAUSES": [], - "END_OPTIONS": [], + "clauses": [], + "statementEndOptions": [], "options": { "@type": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", "options": { diff --git a/tests/data/parser/parseWithStatement6.out b/tests/data/parser/parseWithStatement6.out index 18effdcd0..8e8dae537 100644 --- a/tests/data/parser/parseWithStatement6.out +++ b/tests/data/parser/parseWithStatement6.out @@ -2,7 +2,7 @@ "query": "CREATE view view_name WITH aa(col1) AS ( SELECT 1 UNION ALL SELECT 2 ) SELECT col1 FROM cte", "lexer": { "@type": "PhpMyAdmin\\SqlParser\\Lexer", - "PARSER_METHODS": [ + "parserMethods": [ "parseDelimiter", "parseWhitespace", "parseNumber", @@ -358,7 +358,7 @@ "count": 37, "idx": 37 }, - "DEFAULT_DELIMITER": ";", + "defaultDelimiter": ";", "delimiter": ";", "delimiterLen": 1, "strict": false, @@ -366,7 +366,7 @@ }, "parser": { "@type": "PhpMyAdmin\\SqlParser\\Parser", - "STATEMENT_PARSERS": { + "statementParsers": { "DESCRIBE": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", "DESC": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", "EXPLAIN": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", @@ -411,7 +411,7 @@ "LOCK": "PhpMyAdmin\\SqlParser\\Statements\\LockStatement", "UNLOCK": "PhpMyAdmin\\SqlParser\\Statements\\LockStatement" }, - "KEYWORD_PARSERS": { + "keywordParsers": { "PARTITION BY": [], "SUBPARTITION BY": [], "_OPTIONS": { @@ -420,7 +420,7 @@ }, "_END_OPTIONS": { "class": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", - "field": "end_options" + "field": "endOptions" }, "INTERSECT": { "class": "PhpMyAdmin\\SqlParser\\Components\\UnionKeyword", @@ -668,7 +668,7 @@ "statements": [ { "@type": "PhpMyAdmin\\SqlParser\\Statements\\CreateStatement", - "OPTIONS": { + "statementOptions": { "TEMPORARY": 1, "OR REPLACE": 2, "ALGORITHM": [ @@ -700,7 +700,7 @@ "SCHEMA": 6, "IF NOT EXISTS": 7 }, - "DB_OPTIONS": { + "databaseOptions": { "CHARACTER SET": [ 1, "var=" @@ -726,7 +726,7 @@ "var=" ] }, - "TABLE_OPTIONS": { + "tableOptions": { "ENGINE": [ 1, "var=" @@ -828,7 +828,7 @@ "var" ] }, - "FUNC_OPTIONS": { + "functionOptions": { "NOT": [ 2, "var" @@ -873,7 +873,7 @@ "DETERMINISTIC": 2, "DATA": 5 }, - "TRIGGER_OPTIONS": { + "triggerOptions": { "BEFORE": 1, "AFTER": 1, "INSERT": 2, @@ -882,7 +882,7 @@ }, "name": { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -1006,8 +1006,8 @@ "@type": "@37" } ], - "CLAUSES": [], - "END_OPTIONS": [], + "clauses": [], + "statementEndOptions": [], "options": { "@type": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", "options": { diff --git a/tests/data/parser/parseWithStatement7.out b/tests/data/parser/parseWithStatement7.out index 8dcef2eb2..610bbf587 100644 --- a/tests/data/parser/parseWithStatement7.out +++ b/tests/data/parser/parseWithStatement7.out @@ -2,7 +2,7 @@ "query": "WITH cte (col1) AS ( SELECT 1 UNION ALL SELECT 2 ) SELECT * FROM cte INNER JOIN table2 ON table2.col1=cte.col1;", "lexer": { "@type": "PhpMyAdmin\\SqlParser\\Lexer", - "PARSER_METHODS": [ + "parserMethods": [ "parseDelimiter", "parseWhitespace", "parseNumber", @@ -448,7 +448,7 @@ "count": 47, "idx": 47 }, - "DEFAULT_DELIMITER": ";", + "defaultDelimiter": ";", "delimiter": ";", "delimiterLen": 1, "strict": false, @@ -456,7 +456,7 @@ }, "parser": { "@type": "PhpMyAdmin\\SqlParser\\Parser", - "STATEMENT_PARSERS": { + "statementParsers": { "DESCRIBE": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", "DESC": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", "EXPLAIN": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", @@ -501,7 +501,7 @@ "LOCK": "PhpMyAdmin\\SqlParser\\Statements\\LockStatement", "UNLOCK": "PhpMyAdmin\\SqlParser\\Statements\\LockStatement" }, - "KEYWORD_PARSERS": { + "keywordParsers": { "PARTITION BY": [], "SUBPARTITION BY": [], "_OPTIONS": { @@ -510,7 +510,7 @@ }, "_END_OPTIONS": { "class": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", - "field": "end_options" + "field": "endOptions" }, "INTERSECT": { "class": "PhpMyAdmin\\SqlParser\\Components\\UnionKeyword", @@ -758,10 +758,10 @@ "statements": [ { "@type": "PhpMyAdmin\\SqlParser\\Statements\\WithStatement", - "OPTIONS": { + "statementOptions": { "RECURSIVE": 1 }, - "CLAUSES": { + "clauses": { "WITH": [ "WITH", 2 @@ -792,7 +792,7 @@ ], "statement": { "@type": "PhpMyAdmin\\SqlParser\\Parser", - "STATEMENT_PARSERS": { + "statementParsers": { "DESCRIBE": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", "DESC": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", "EXPLAIN": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", @@ -837,7 +837,7 @@ "LOCK": "PhpMyAdmin\\SqlParser\\Statements\\LockStatement", "UNLOCK": "PhpMyAdmin\\SqlParser\\Statements\\LockStatement" }, - "KEYWORD_PARSERS": { + "keywordParsers": { "PARTITION BY": [], "SUBPARTITION BY": [], "_OPTIONS": { @@ -846,7 +846,7 @@ }, "_END_OPTIONS": { "class": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", - "field": "end_options" + "field": "endOptions" }, "INTERSECT": { "class": "PhpMyAdmin\\SqlParser\\Components\\UnionKeyword", @@ -1131,7 +1131,7 @@ "statements": [ { "@type": "PhpMyAdmin\\SqlParser\\Statements\\SelectStatement", - "OPTIONS": { + "statementOptions": { "ALL": 1, "DISTINCT": 1, "DISTINCTROW": 1, @@ -1148,11 +1148,11 @@ "SQL_NO_CACHE": 8, "SQL_CALC_FOUND_ROWS": 9 }, - "END_OPTIONS": { + "statementEndOptions": { "FOR UPDATE": 1, "LOCK IN SHARE MODE": 1 }, - "CLAUSES": { + "clauses": { "SELECT": [ "SELECT", 2 @@ -1281,7 +1281,7 @@ "expr": [ { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -1305,7 +1305,7 @@ } ], "from": [], - "index_hints": null, + "indexHints": null, "partition": null, "where": null, "group": null, @@ -1320,7 +1320,7 @@ "UNION ALL", { "@type": "PhpMyAdmin\\SqlParser\\Statements\\SelectStatement", - "OPTIONS": { + "statementOptions": { "ALL": 1, "DISTINCT": 1, "DISTINCTROW": 1, @@ -1337,11 +1337,11 @@ "SQL_NO_CACHE": 8, "SQL_CALC_FOUND_ROWS": 9 }, - "END_OPTIONS": { + "statementEndOptions": { "FOR UPDATE": 1, "LOCK IN SHARE MODE": 1 }, - "CLAUSES": { + "clauses": { "SELECT": [ "SELECT", 2 @@ -1470,7 +1470,7 @@ "expr": [ { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -1494,7 +1494,7 @@ } ], "from": [], - "index_hints": null, + "indexHints": null, "partition": null, "where": null, "group": null, @@ -1505,7 +1505,7 @@ "into": null, "join": null, "union": [], - "end_options": null, + "endOptions": null, "options": { "@type": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", "options": [] @@ -1515,7 +1515,7 @@ } ] ], - "end_options": null, + "endOptions": null, "options": { "@type": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", "options": [] @@ -1532,7 +1532,7 @@ }, "cteStatementParser": { "@type": "PhpMyAdmin\\SqlParser\\Parser", - "STATEMENT_PARSERS": { + "statementParsers": { "DESCRIBE": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", "DESC": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", "EXPLAIN": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", @@ -1577,7 +1577,7 @@ "LOCK": "PhpMyAdmin\\SqlParser\\Statements\\LockStatement", "UNLOCK": "PhpMyAdmin\\SqlParser\\Statements\\LockStatement" }, - "KEYWORD_PARSERS": { + "keywordParsers": { "PARTITION BY": [], "SUBPARTITION BY": [], "_OPTIONS": { @@ -1586,7 +1586,7 @@ }, "_END_OPTIONS": { "class": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", - "field": "end_options" + "field": "endOptions" }, "INTERSECT": { "class": "PhpMyAdmin\\SqlParser\\Components\\UnionKeyword", @@ -1907,7 +1907,7 @@ "statements": [ { "@type": "PhpMyAdmin\\SqlParser\\Statements\\SelectStatement", - "OPTIONS": { + "statementOptions": { "ALL": 1, "DISTINCT": 1, "DISTINCTROW": 1, @@ -1924,11 +1924,11 @@ "SQL_NO_CACHE": 8, "SQL_CALC_FOUND_ROWS": 9 }, - "END_OPTIONS": { + "statementEndOptions": { "FOR UPDATE": 1, "LOCK IN SHARE MODE": 1 }, - "CLAUSES": { + "clauses": { "SELECT": [ "SELECT", 2 @@ -2057,7 +2057,7 @@ "expr": [ { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -2083,7 +2083,7 @@ "from": [ { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -2106,7 +2106,7 @@ "subquery": null } ], - "index_hints": null, + "indexHints": null, "partition": null, "where": null, "group": null, @@ -2118,7 +2118,7 @@ "join": [ { "@type": "PhpMyAdmin\\SqlParser\\Components\\JoinKeyword", - "JOINS": { + "joins": { "CROSS JOIN": "CROSS", "FULL JOIN": "FULL", "FULL OUTER JOIN": "FULL", @@ -2138,7 +2138,7 @@ "type": "INNER", "expr": { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -2163,14 +2163,14 @@ "on": [ { "@type": "PhpMyAdmin\\SqlParser\\Components\\Condition", - "DELIMITERS": [ + "delimiters": [ "&&", "||", "AND", "OR", "XOR" ], - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "ALL": 1, "AND": 1, "BETWEEN": 1, @@ -2204,7 +2204,7 @@ } ], "union": [], - "end_options": null, + "endOptions": null, "options": { "@type": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", "options": [] @@ -2217,7 +2217,7 @@ "strict": false, "errors": [] }, - "END_OPTIONS": [], + "statementEndOptions": [], "options": { "@type": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", "options": [] diff --git a/tests/data/parser/parseWithStatementErr.out b/tests/data/parser/parseWithStatementErr.out index 081cf7bf3..3e1c5a0ab 100644 --- a/tests/data/parser/parseWithStatementErr.out +++ b/tests/data/parser/parseWithStatementErr.out @@ -2,7 +2,7 @@ "query": "INSERT INTO table_name WITH cte col1) AS ( SELECT 1 UNION ALL SELECT 2 ) SELECT col1 FROM cte", "lexer": { "@type": "PhpMyAdmin\\SqlParser\\Lexer", - "PARSER_METHODS": [ + "parserMethods": [ "parseDelimiter", "parseWhitespace", "parseNumber", @@ -358,7 +358,7 @@ "count": 37, "idx": 38 }, - "DEFAULT_DELIMITER": ";", + "defaultDelimiter": ";", "delimiter": ";", "delimiterLen": 1, "strict": false, @@ -366,7 +366,7 @@ }, "parser": { "@type": "PhpMyAdmin\\SqlParser\\Parser", - "STATEMENT_PARSERS": { + "statementParsers": { "DESCRIBE": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", "DESC": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", "EXPLAIN": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", @@ -411,7 +411,7 @@ "LOCK": "PhpMyAdmin\\SqlParser\\Statements\\LockStatement", "UNLOCK": "PhpMyAdmin\\SqlParser\\Statements\\LockStatement" }, - "KEYWORD_PARSERS": { + "keywordParsers": { "PARTITION BY": [], "SUBPARTITION BY": [], "_OPTIONS": { @@ -420,7 +420,7 @@ }, "_END_OPTIONS": { "class": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", - "field": "end_options" + "field": "endOptions" }, "INTERSECT": { "class": "PhpMyAdmin\\SqlParser\\Components\\UnionKeyword", @@ -668,7 +668,7 @@ "statements": [ { "@type": "PhpMyAdmin\\SqlParser\\Statements\\InsertStatement", - "OPTIONS": { + "statementOptions": { "LOW_PRIORITY": 1, "DELAYED": 2, "HIGH_PRIORITY": 3, @@ -676,7 +676,7 @@ }, "into": { "@type": "PhpMyAdmin\\SqlParser\\Components\\IntoKeyword", - "FIELDS_OPTIONS": { + "statementFieldsOptions": { "TERMINATED BY": [ 1, "expr" @@ -691,7 +691,7 @@ "expr" ] }, - "LINES_OPTIONS": { + "statementLinesOptions": { "STARTING BY": [ 1, "expr" @@ -704,7 +704,7 @@ "type": null, "dest": { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -728,19 +728,19 @@ }, "columns": null, "values": null, - "fields_options": null, - "fields_keyword": null, - "lines_options": null + "fieldsOptions": null, + "fieldsKeyword": null, + "linesOptions": null }, "values": null, "set": null, "select": null, "with": { "@type": "PhpMyAdmin\\SqlParser\\Statements\\WithStatement", - "OPTIONS": { + "statementOptions": { "RECURSIVE": 1 }, - "CLAUSES": { + "clauses": { "WITH": [ "WITH", 2 @@ -763,7 +763,7 @@ } }, "cteStatementParser": null, - "END_OPTIONS": [], + "statementEndOptions": [], "options": { "@type": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", "options": [] @@ -772,8 +772,8 @@ "last": null }, "onDuplicateSet": null, - "CLAUSES": [], - "END_OPTIONS": [], + "clauses": [], + "statementEndOptions": [], "options": { "@type": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", "options": [] diff --git a/tests/data/parser/parseWithStatementErr1.out b/tests/data/parser/parseWithStatementErr1.out index 7f75ec587..efd5f8cc3 100644 --- a/tests/data/parser/parseWithStatementErr1.out +++ b/tests/data/parser/parseWithStatementErr1.out @@ -2,7 +2,7 @@ "query": "CREATE table table_name WITH cte (col1) ( SELECT 1 UNION ALL SELECT 2 ) SELECT col1 FROM cte", "lexer": { "@type": "PhpMyAdmin\\SqlParser\\Lexer", - "PARSER_METHODS": [ + "parserMethods": [ "parseDelimiter", "parseWhitespace", "parseNumber", @@ -349,7 +349,7 @@ "count": 36, "idx": 36 }, - "DEFAULT_DELIMITER": ";", + "defaultDelimiter": ";", "delimiter": ";", "delimiterLen": 1, "strict": false, @@ -357,7 +357,7 @@ }, "parser": { "@type": "PhpMyAdmin\\SqlParser\\Parser", - "STATEMENT_PARSERS": { + "statementParsers": { "DESCRIBE": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", "DESC": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", "EXPLAIN": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", @@ -402,7 +402,7 @@ "LOCK": "PhpMyAdmin\\SqlParser\\Statements\\LockStatement", "UNLOCK": "PhpMyAdmin\\SqlParser\\Statements\\LockStatement" }, - "KEYWORD_PARSERS": { + "keywordParsers": { "PARTITION BY": [], "SUBPARTITION BY": [], "_OPTIONS": { @@ -411,7 +411,7 @@ }, "_END_OPTIONS": { "class": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", - "field": "end_options" + "field": "endOptions" }, "INTERSECT": { "class": "PhpMyAdmin\\SqlParser\\Components\\UnionKeyword", @@ -659,7 +659,7 @@ "statements": [ { "@type": "PhpMyAdmin\\SqlParser\\Statements\\CreateStatement", - "OPTIONS": { + "statementOptions": { "TEMPORARY": 1, "OR REPLACE": 2, "ALGORITHM": [ @@ -691,7 +691,7 @@ "SCHEMA": 6, "IF NOT EXISTS": 7 }, - "DB_OPTIONS": { + "databaseOptions": { "CHARACTER SET": [ 1, "var=" @@ -717,7 +717,7 @@ "var=" ] }, - "TABLE_OPTIONS": { + "tableOptions": { "ENGINE": [ 1, "var=" @@ -819,7 +819,7 @@ "var" ] }, - "FUNC_OPTIONS": { + "functionOptions": { "NOT": [ 2, "var" @@ -864,7 +864,7 @@ "DETERMINISTIC": 2, "DATA": 5 }, - "TRIGGER_OPTIONS": { + "triggerOptions": { "BEFORE": 1, "AFTER": 1, "INSERT": 2, @@ -873,7 +873,7 @@ }, "name": { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -899,10 +899,10 @@ "fields": null, "with": { "@type": "PhpMyAdmin\\SqlParser\\Statements\\WithStatement", - "OPTIONS": { + "statementOptions": { "RECURSIVE": 1 }, - "CLAUSES": { + "clauses": { "WITH": [ "WITH", 2 @@ -935,7 +935,7 @@ } }, "cteStatementParser": null, - "END_OPTIONS": [], + "statementEndOptions": [], "options": { "@type": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", "options": [] @@ -954,8 +954,8 @@ "return": null, "parameters": null, "body": [], - "CLAUSES": [], - "END_OPTIONS": [], + "clauses": [], + "statementEndOptions": [], "options": { "@type": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", "options": { @@ -967,7 +967,7 @@ }, { "@type": "PhpMyAdmin\\SqlParser\\Statements\\SelectStatement", - "OPTIONS": { + "statementOptions": { "ALL": 1, "DISTINCT": 1, "DISTINCTROW": 1, @@ -984,11 +984,11 @@ "SQL_NO_CACHE": 8, "SQL_CALC_FOUND_ROWS": 9 }, - "END_OPTIONS": { + "statementEndOptions": { "FOR UPDATE": 1, "LOCK IN SHARE MODE": 1 }, - "CLAUSES": { + "clauses": { "SELECT": [ "SELECT", 2 @@ -1117,7 +1117,7 @@ "expr": [ { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -1141,7 +1141,7 @@ } ], "from": [], - "index_hints": null, + "indexHints": null, "partition": null, "where": null, "group": null, @@ -1156,7 +1156,7 @@ "UNION ALL", { "@type": "PhpMyAdmin\\SqlParser\\Statements\\SelectStatement", - "OPTIONS": { + "statementOptions": { "ALL": 1, "DISTINCT": 1, "DISTINCTROW": 1, @@ -1173,11 +1173,11 @@ "SQL_NO_CACHE": 8, "SQL_CALC_FOUND_ROWS": 9 }, - "END_OPTIONS": { + "statementEndOptions": { "FOR UPDATE": 1, "LOCK IN SHARE MODE": 1 }, - "CLAUSES": { + "clauses": { "SELECT": [ "SELECT", 2 @@ -1306,7 +1306,7 @@ "expr": [ { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -1330,7 +1330,7 @@ } ], "from": [], - "index_hints": null, + "indexHints": null, "partition": null, "where": null, "group": null, @@ -1341,7 +1341,7 @@ "into": null, "join": null, "union": [], - "end_options": null, + "endOptions": null, "options": { "@type": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", "options": [] @@ -1351,7 +1351,7 @@ } ] ], - "end_options": null, + "endOptions": null, "options": { "@type": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", "options": [] @@ -1361,7 +1361,7 @@ }, { "@type": "PhpMyAdmin\\SqlParser\\Statements\\SelectStatement", - "OPTIONS": { + "statementOptions": { "ALL": 1, "DISTINCT": 1, "DISTINCTROW": 1, @@ -1378,11 +1378,11 @@ "SQL_NO_CACHE": 8, "SQL_CALC_FOUND_ROWS": 9 }, - "END_OPTIONS": { + "statementEndOptions": { "FOR UPDATE": 1, "LOCK IN SHARE MODE": 1 }, - "CLAUSES": { + "clauses": { "SELECT": [ "SELECT", 2 @@ -1511,7 +1511,7 @@ "expr": [ { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -1537,7 +1537,7 @@ "from": [ { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -1560,7 +1560,7 @@ "subquery": null } ], - "index_hints": null, + "indexHints": null, "partition": null, "where": null, "group": null, @@ -1571,7 +1571,7 @@ "into": null, "join": null, "union": [], - "end_options": null, + "endOptions": null, "options": { "@type": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", "options": [] diff --git a/tests/data/parser/parseWithStatementErr2.out b/tests/data/parser/parseWithStatementErr2.out index 6d69f8fe3..3df68c3eb 100644 --- a/tests/data/parser/parseWithStatementErr2.out +++ b/tests/data/parser/parseWithStatementErr2.out @@ -2,7 +2,7 @@ "query": "WITH cte (col1) AS ( SELECT 1 UNION ALL SELECT 2 )", "lexer": { "@type": "PhpMyAdmin\\SqlParser\\Lexer", - "PARSER_METHODS": [ + "parserMethods": [ "parseDelimiter", "parseWhitespace", "parseNumber", @@ -241,7 +241,7 @@ "count": 24, "idx": 24 }, - "DEFAULT_DELIMITER": ";", + "defaultDelimiter": ";", "delimiter": ";", "delimiterLen": 1, "strict": false, @@ -249,7 +249,7 @@ }, "parser": { "@type": "PhpMyAdmin\\SqlParser\\Parser", - "STATEMENT_PARSERS": { + "statementParsers": { "DESCRIBE": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", "DESC": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", "EXPLAIN": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", @@ -294,7 +294,7 @@ "LOCK": "PhpMyAdmin\\SqlParser\\Statements\\LockStatement", "UNLOCK": "PhpMyAdmin\\SqlParser\\Statements\\LockStatement" }, - "KEYWORD_PARSERS": { + "keywordParsers": { "PARTITION BY": [], "SUBPARTITION BY": [], "_OPTIONS": { @@ -303,7 +303,7 @@ }, "_END_OPTIONS": { "class": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", - "field": "end_options" + "field": "endOptions" }, "INTERSECT": { "class": "PhpMyAdmin\\SqlParser\\Components\\UnionKeyword", @@ -551,10 +551,10 @@ "statements": [ { "@type": "PhpMyAdmin\\SqlParser\\Statements\\WithStatement", - "OPTIONS": { + "statementOptions": { "RECURSIVE": 1 }, - "CLAUSES": { + "clauses": { "WITH": [ "WITH", 2 @@ -585,7 +585,7 @@ ], "statement": { "@type": "PhpMyAdmin\\SqlParser\\Parser", - "STATEMENT_PARSERS": { + "statementParsers": { "DESCRIBE": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", "DESC": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", "EXPLAIN": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", @@ -630,7 +630,7 @@ "LOCK": "PhpMyAdmin\\SqlParser\\Statements\\LockStatement", "UNLOCK": "PhpMyAdmin\\SqlParser\\Statements\\LockStatement" }, - "KEYWORD_PARSERS": { + "keywordParsers": { "PARTITION BY": [], "SUBPARTITION BY": [], "_OPTIONS": { @@ -639,7 +639,7 @@ }, "_END_OPTIONS": { "class": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", - "field": "end_options" + "field": "endOptions" }, "INTERSECT": { "class": "PhpMyAdmin\\SqlParser\\Components\\UnionKeyword", @@ -924,7 +924,7 @@ "statements": [ { "@type": "PhpMyAdmin\\SqlParser\\Statements\\SelectStatement", - "OPTIONS": { + "statementOptions": { "ALL": 1, "DISTINCT": 1, "DISTINCTROW": 1, @@ -941,11 +941,11 @@ "SQL_NO_CACHE": 8, "SQL_CALC_FOUND_ROWS": 9 }, - "END_OPTIONS": { + "statementEndOptions": { "FOR UPDATE": 1, "LOCK IN SHARE MODE": 1 }, - "CLAUSES": { + "clauses": { "SELECT": [ "SELECT", 2 @@ -1074,7 +1074,7 @@ "expr": [ { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -1098,7 +1098,7 @@ } ], "from": [], - "index_hints": null, + "indexHints": null, "partition": null, "where": null, "group": null, @@ -1113,7 +1113,7 @@ "UNION ALL", { "@type": "PhpMyAdmin\\SqlParser\\Statements\\SelectStatement", - "OPTIONS": { + "statementOptions": { "ALL": 1, "DISTINCT": 1, "DISTINCTROW": 1, @@ -1130,11 +1130,11 @@ "SQL_NO_CACHE": 8, "SQL_CALC_FOUND_ROWS": 9 }, - "END_OPTIONS": { + "statementEndOptions": { "FOR UPDATE": 1, "LOCK IN SHARE MODE": 1 }, - "CLAUSES": { + "clauses": { "SELECT": [ "SELECT", 2 @@ -1263,7 +1263,7 @@ "expr": [ { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -1287,7 +1287,7 @@ } ], "from": [], - "index_hints": null, + "indexHints": null, "partition": null, "where": null, "group": null, @@ -1298,7 +1298,7 @@ "into": null, "join": null, "union": [], - "end_options": null, + "endOptions": null, "options": { "@type": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", "options": [] @@ -1308,7 +1308,7 @@ } ] ], - "end_options": null, + "endOptions": null, "options": { "@type": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", "options": [] @@ -1324,7 +1324,7 @@ } }, "cteStatementParser": null, - "END_OPTIONS": [], + "statementEndOptions": [], "options": { "@type": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", "options": [] diff --git a/tests/data/parser/parseWithStatementErr3.out b/tests/data/parser/parseWithStatementErr3.out index ceaf1a827..2fc76760d 100644 --- a/tests/data/parser/parseWithStatementErr3.out +++ b/tests/data/parser/parseWithStatementErr3.out @@ -2,7 +2,7 @@ "query": "CREATE table table_name WITH cte (col1) AS ( SELECT 1 UNION ALL SELECT 2 ),", "lexer": { "@type": "PhpMyAdmin\\SqlParser\\Lexer", - "PARSER_METHODS": [ + "parserMethods": [ "parseDelimiter", "parseWhitespace", "parseNumber", @@ -304,7 +304,7 @@ "count": 31, "idx": 31 }, - "DEFAULT_DELIMITER": ";", + "defaultDelimiter": ";", "delimiter": ";", "delimiterLen": 1, "strict": false, @@ -312,7 +312,7 @@ }, "parser": { "@type": "PhpMyAdmin\\SqlParser\\Parser", - "STATEMENT_PARSERS": { + "statementParsers": { "DESCRIBE": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", "DESC": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", "EXPLAIN": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", @@ -357,7 +357,7 @@ "LOCK": "PhpMyAdmin\\SqlParser\\Statements\\LockStatement", "UNLOCK": "PhpMyAdmin\\SqlParser\\Statements\\LockStatement" }, - "KEYWORD_PARSERS": { + "keywordParsers": { "PARTITION BY": [], "SUBPARTITION BY": [], "_OPTIONS": { @@ -366,7 +366,7 @@ }, "_END_OPTIONS": { "class": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", - "field": "end_options" + "field": "endOptions" }, "INTERSECT": { "class": "PhpMyAdmin\\SqlParser\\Components\\UnionKeyword", @@ -614,7 +614,7 @@ "statements": [ { "@type": "PhpMyAdmin\\SqlParser\\Statements\\CreateStatement", - "OPTIONS": { + "statementOptions": { "TEMPORARY": 1, "OR REPLACE": 2, "ALGORITHM": [ @@ -646,7 +646,7 @@ "SCHEMA": 6, "IF NOT EXISTS": 7 }, - "DB_OPTIONS": { + "databaseOptions": { "CHARACTER SET": [ 1, "var=" @@ -672,7 +672,7 @@ "var=" ] }, - "TABLE_OPTIONS": { + "tableOptions": { "ENGINE": [ 1, "var=" @@ -774,7 +774,7 @@ "var" ] }, - "FUNC_OPTIONS": { + "functionOptions": { "NOT": [ 2, "var" @@ -819,7 +819,7 @@ "DETERMINISTIC": 2, "DATA": 5 }, - "TRIGGER_OPTIONS": { + "triggerOptions": { "BEFORE": 1, "AFTER": 1, "INSERT": 2, @@ -828,7 +828,7 @@ }, "name": { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -854,10 +854,10 @@ "fields": null, "with": { "@type": "PhpMyAdmin\\SqlParser\\Statements\\WithStatement", - "OPTIONS": { + "statementOptions": { "RECURSIVE": 1 }, - "CLAUSES": { + "clauses": { "WITH": [ "WITH", 2 @@ -888,7 +888,7 @@ ], "statement": { "@type": "PhpMyAdmin\\SqlParser\\Parser", - "STATEMENT_PARSERS": { + "statementParsers": { "DESCRIBE": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", "DESC": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", "EXPLAIN": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", @@ -933,7 +933,7 @@ "LOCK": "PhpMyAdmin\\SqlParser\\Statements\\LockStatement", "UNLOCK": "PhpMyAdmin\\SqlParser\\Statements\\LockStatement" }, - "KEYWORD_PARSERS": { + "keywordParsers": { "PARTITION BY": [], "SUBPARTITION BY": [], "_OPTIONS": { @@ -942,7 +942,7 @@ }, "_END_OPTIONS": { "class": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", - "field": "end_options" + "field": "endOptions" }, "INTERSECT": { "class": "PhpMyAdmin\\SqlParser\\Components\\UnionKeyword", @@ -1227,7 +1227,7 @@ "statements": [ { "@type": "PhpMyAdmin\\SqlParser\\Statements\\SelectStatement", - "OPTIONS": { + "statementOptions": { "ALL": 1, "DISTINCT": 1, "DISTINCTROW": 1, @@ -1244,11 +1244,11 @@ "SQL_NO_CACHE": 8, "SQL_CALC_FOUND_ROWS": 9 }, - "END_OPTIONS": { + "statementEndOptions": { "FOR UPDATE": 1, "LOCK IN SHARE MODE": 1 }, - "CLAUSES": { + "clauses": { "SELECT": [ "SELECT", 2 @@ -1377,7 +1377,7 @@ "expr": [ { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -1401,7 +1401,7 @@ } ], "from": [], - "index_hints": null, + "indexHints": null, "partition": null, "where": null, "group": null, @@ -1416,7 +1416,7 @@ "UNION ALL", { "@type": "PhpMyAdmin\\SqlParser\\Statements\\SelectStatement", - "OPTIONS": { + "statementOptions": { "ALL": 1, "DISTINCT": 1, "DISTINCTROW": 1, @@ -1433,11 +1433,11 @@ "SQL_NO_CACHE": 8, "SQL_CALC_FOUND_ROWS": 9 }, - "END_OPTIONS": { + "statementEndOptions": { "FOR UPDATE": 1, "LOCK IN SHARE MODE": 1 }, - "CLAUSES": { + "clauses": { "SELECT": [ "SELECT", 2 @@ -1566,7 +1566,7 @@ "expr": [ { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -1590,7 +1590,7 @@ } ], "from": [], - "index_hints": null, + "indexHints": null, "partition": null, "where": null, "group": null, @@ -1601,7 +1601,7 @@ "into": null, "join": null, "union": [], - "end_options": null, + "endOptions": null, "options": { "@type": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", "options": [] @@ -1611,7 +1611,7 @@ } ] ], - "end_options": null, + "endOptions": null, "options": { "@type": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", "options": [] @@ -1627,7 +1627,7 @@ } }, "cteStatementParser": null, - "END_OPTIONS": [], + "statementEndOptions": [], "options": { "@type": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", "options": [] @@ -1646,8 +1646,8 @@ "return": null, "parameters": null, "body": [], - "CLAUSES": [], - "END_OPTIONS": [], + "clauses": [], + "statementEndOptions": [], "options": { "@type": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", "options": { diff --git a/tests/data/parser/parseWithStatementErr4.out b/tests/data/parser/parseWithStatementErr4.out index cf24c4b0b..0aaab0d6c 100644 --- a/tests/data/parser/parseWithStatementErr4.out +++ b/tests/data/parser/parseWithStatementErr4.out @@ -2,7 +2,7 @@ "query": "CREATE table table_name WITH cte (col1) AS ( SELECT 1 UNION ALL SELECT 2 ) NO", "lexer": { "@type": "PhpMyAdmin\\SqlParser\\Lexer", - "PARSER_METHODS": [ + "parserMethods": [ "parseDelimiter", "parseWhitespace", "parseNumber", @@ -313,7 +313,7 @@ "count": 32, "idx": 33 }, - "DEFAULT_DELIMITER": ";", + "defaultDelimiter": ";", "delimiter": ";", "delimiterLen": 1, "strict": false, @@ -321,7 +321,7 @@ }, "parser": { "@type": "PhpMyAdmin\\SqlParser\\Parser", - "STATEMENT_PARSERS": { + "statementParsers": { "DESCRIBE": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", "DESC": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", "EXPLAIN": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", @@ -366,7 +366,7 @@ "LOCK": "PhpMyAdmin\\SqlParser\\Statements\\LockStatement", "UNLOCK": "PhpMyAdmin\\SqlParser\\Statements\\LockStatement" }, - "KEYWORD_PARSERS": { + "keywordParsers": { "PARTITION BY": [], "SUBPARTITION BY": [], "_OPTIONS": { @@ -375,7 +375,7 @@ }, "_END_OPTIONS": { "class": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", - "field": "end_options" + "field": "endOptions" }, "INTERSECT": { "class": "PhpMyAdmin\\SqlParser\\Components\\UnionKeyword", @@ -623,7 +623,7 @@ "statements": [ { "@type": "PhpMyAdmin\\SqlParser\\Statements\\CreateStatement", - "OPTIONS": { + "statementOptions": { "TEMPORARY": 1, "OR REPLACE": 2, "ALGORITHM": [ @@ -655,7 +655,7 @@ "SCHEMA": 6, "IF NOT EXISTS": 7 }, - "DB_OPTIONS": { + "databaseOptions": { "CHARACTER SET": [ 1, "var=" @@ -681,7 +681,7 @@ "var=" ] }, - "TABLE_OPTIONS": { + "tableOptions": { "ENGINE": [ 1, "var=" @@ -783,7 +783,7 @@ "var" ] }, - "FUNC_OPTIONS": { + "functionOptions": { "NOT": [ 2, "var" @@ -828,7 +828,7 @@ "DETERMINISTIC": 2, "DATA": 5 }, - "TRIGGER_OPTIONS": { + "triggerOptions": { "BEFORE": 1, "AFTER": 1, "INSERT": 2, @@ -837,7 +837,7 @@ }, "name": { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -863,10 +863,10 @@ "fields": null, "with": { "@type": "PhpMyAdmin\\SqlParser\\Statements\\WithStatement", - "OPTIONS": { + "statementOptions": { "RECURSIVE": 1 }, - "CLAUSES": { + "clauses": { "WITH": [ "WITH", 2 @@ -897,7 +897,7 @@ ], "statement": { "@type": "PhpMyAdmin\\SqlParser\\Parser", - "STATEMENT_PARSERS": { + "statementParsers": { "DESCRIBE": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", "DESC": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", "EXPLAIN": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", @@ -942,7 +942,7 @@ "LOCK": "PhpMyAdmin\\SqlParser\\Statements\\LockStatement", "UNLOCK": "PhpMyAdmin\\SqlParser\\Statements\\LockStatement" }, - "KEYWORD_PARSERS": { + "keywordParsers": { "PARTITION BY": [], "SUBPARTITION BY": [], "_OPTIONS": { @@ -951,7 +951,7 @@ }, "_END_OPTIONS": { "class": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", - "field": "end_options" + "field": "endOptions" }, "INTERSECT": { "class": "PhpMyAdmin\\SqlParser\\Components\\UnionKeyword", @@ -1236,7 +1236,7 @@ "statements": [ { "@type": "PhpMyAdmin\\SqlParser\\Statements\\SelectStatement", - "OPTIONS": { + "statementOptions": { "ALL": 1, "DISTINCT": 1, "DISTINCTROW": 1, @@ -1253,11 +1253,11 @@ "SQL_NO_CACHE": 8, "SQL_CALC_FOUND_ROWS": 9 }, - "END_OPTIONS": { + "statementEndOptions": { "FOR UPDATE": 1, "LOCK IN SHARE MODE": 1 }, - "CLAUSES": { + "clauses": { "SELECT": [ "SELECT", 2 @@ -1386,7 +1386,7 @@ "expr": [ { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -1410,7 +1410,7 @@ } ], "from": [], - "index_hints": null, + "indexHints": null, "partition": null, "where": null, "group": null, @@ -1425,7 +1425,7 @@ "UNION ALL", { "@type": "PhpMyAdmin\\SqlParser\\Statements\\SelectStatement", - "OPTIONS": { + "statementOptions": { "ALL": 1, "DISTINCT": 1, "DISTINCTROW": 1, @@ -1442,11 +1442,11 @@ "SQL_NO_CACHE": 8, "SQL_CALC_FOUND_ROWS": 9 }, - "END_OPTIONS": { + "statementEndOptions": { "FOR UPDATE": 1, "LOCK IN SHARE MODE": 1 }, - "CLAUSES": { + "clauses": { "SELECT": [ "SELECT", 2 @@ -1575,7 +1575,7 @@ "expr": [ { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -1599,7 +1599,7 @@ } ], "from": [], - "index_hints": null, + "indexHints": null, "partition": null, "where": null, "group": null, @@ -1610,7 +1610,7 @@ "into": null, "join": null, "union": [], - "end_options": null, + "endOptions": null, "options": { "@type": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", "options": [] @@ -1620,7 +1620,7 @@ } ] ], - "end_options": null, + "endOptions": null, "options": { "@type": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", "options": [] @@ -1636,7 +1636,7 @@ } }, "cteStatementParser": null, - "END_OPTIONS": [], + "statementEndOptions": [], "options": { "@type": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", "options": [] @@ -1655,8 +1655,8 @@ "return": null, "parameters": null, "body": [], - "CLAUSES": [], - "END_OPTIONS": [], + "clauses": [], + "statementEndOptions": [], "options": { "@type": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", "options": { diff --git a/tests/data/parser/parseWithStatementErr5.out b/tests/data/parser/parseWithStatementErr5.out index 5a78e93e3..5844cffde 100644 --- a/tests/data/parser/parseWithStatementErr5.out +++ b/tests/data/parser/parseWithStatementErr5.out @@ -2,7 +2,7 @@ "query": "CREATE table table_name WITH (col1) AS ( SELECT 1 UNION ALL SELECT 2 ) NO", "lexer": { "@type": "PhpMyAdmin\\SqlParser\\Lexer", - "PARSER_METHODS": [ + "parserMethods": [ "parseDelimiter", "parseWhitespace", "parseNumber", @@ -295,7 +295,7 @@ "count": 30, "idx": 31 }, - "DEFAULT_DELIMITER": ";", + "defaultDelimiter": ";", "delimiter": ";", "delimiterLen": 1, "strict": false, @@ -303,7 +303,7 @@ }, "parser": { "@type": "PhpMyAdmin\\SqlParser\\Parser", - "STATEMENT_PARSERS": { + "statementParsers": { "DESCRIBE": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", "DESC": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", "EXPLAIN": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", @@ -348,7 +348,7 @@ "LOCK": "PhpMyAdmin\\SqlParser\\Statements\\LockStatement", "UNLOCK": "PhpMyAdmin\\SqlParser\\Statements\\LockStatement" }, - "KEYWORD_PARSERS": { + "keywordParsers": { "PARTITION BY": [], "SUBPARTITION BY": [], "_OPTIONS": { @@ -357,7 +357,7 @@ }, "_END_OPTIONS": { "class": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", - "field": "end_options" + "field": "endOptions" }, "INTERSECT": { "class": "PhpMyAdmin\\SqlParser\\Components\\UnionKeyword", @@ -605,7 +605,7 @@ "statements": [ { "@type": "PhpMyAdmin\\SqlParser\\Statements\\CreateStatement", - "OPTIONS": { + "statementOptions": { "TEMPORARY": 1, "OR REPLACE": 2, "ALGORITHM": [ @@ -637,7 +637,7 @@ "SCHEMA": 6, "IF NOT EXISTS": 7 }, - "DB_OPTIONS": { + "databaseOptions": { "CHARACTER SET": [ 1, "var=" @@ -663,7 +663,7 @@ "var=" ] }, - "TABLE_OPTIONS": { + "tableOptions": { "ENGINE": [ 1, "var=" @@ -765,7 +765,7 @@ "var" ] }, - "FUNC_OPTIONS": { + "functionOptions": { "NOT": [ 2, "var" @@ -810,7 +810,7 @@ "DETERMINISTIC": 2, "DATA": 5 }, - "TRIGGER_OPTIONS": { + "triggerOptions": { "BEFORE": 1, "AFTER": 1, "INSERT": 2, @@ -819,7 +819,7 @@ }, "name": { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -845,10 +845,10 @@ "fields": null, "with": { "@type": "PhpMyAdmin\\SqlParser\\Statements\\WithStatement", - "OPTIONS": { + "statementOptions": { "RECURSIVE": 1 }, - "CLAUSES": { + "clauses": { "WITH": [ "WITH", 2 @@ -864,7 +864,7 @@ }, "withers": [], "cteStatementParser": null, - "END_OPTIONS": [], + "statementEndOptions": [], "options": { "@type": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", "options": [] @@ -883,8 +883,8 @@ "return": null, "parameters": null, "body": [], - "CLAUSES": [], - "END_OPTIONS": [], + "clauses": [], + "statementEndOptions": [], "options": { "@type": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", "options": { diff --git a/tests/data/parser/parseWithStatementErr6.out b/tests/data/parser/parseWithStatementErr6.out index 9add092a0..cd42a3c9a 100644 --- a/tests/data/parser/parseWithStatementErr6.out +++ b/tests/data/parser/parseWithStatementErr6.out @@ -2,7 +2,7 @@ "query": "INSERT INTO table_name WITH cte (col1) AS ( INSERT INTO table_name (column1, column2, column3) VALUES (value1, value2, value3) ) SELECT col1 FROM cte ON DUPLICATE KEY UPDATE col_name = 3", "lexer": { "@type": "PhpMyAdmin\\SqlParser\\Lexer", - "PARSER_METHODS": [ + "parserMethods": [ "parseDelimiter", "parseWhitespace", "parseNumber", @@ -655,7 +655,7 @@ "count": 70, "idx": 71 }, - "DEFAULT_DELIMITER": ";", + "defaultDelimiter": ";", "delimiter": ";", "delimiterLen": 1, "strict": false, @@ -663,7 +663,7 @@ }, "parser": { "@type": "PhpMyAdmin\\SqlParser\\Parser", - "STATEMENT_PARSERS": { + "statementParsers": { "DESCRIBE": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", "DESC": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", "EXPLAIN": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", @@ -708,7 +708,7 @@ "LOCK": "PhpMyAdmin\\SqlParser\\Statements\\LockStatement", "UNLOCK": "PhpMyAdmin\\SqlParser\\Statements\\LockStatement" }, - "KEYWORD_PARSERS": { + "keywordParsers": { "PARTITION BY": [], "SUBPARTITION BY": [], "_OPTIONS": { @@ -717,7 +717,7 @@ }, "_END_OPTIONS": { "class": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", - "field": "end_options" + "field": "endOptions" }, "INTERSECT": { "class": "PhpMyAdmin\\SqlParser\\Components\\UnionKeyword", @@ -965,7 +965,7 @@ "statements": [ { "@type": "PhpMyAdmin\\SqlParser\\Statements\\InsertStatement", - "OPTIONS": { + "statementOptions": { "LOW_PRIORITY": 1, "DELAYED": 2, "HIGH_PRIORITY": 3, @@ -973,7 +973,7 @@ }, "into": { "@type": "PhpMyAdmin\\SqlParser\\Components\\IntoKeyword", - "FIELDS_OPTIONS": { + "statementFieldsOptions": { "TERMINATED BY": [ 1, "expr" @@ -988,7 +988,7 @@ "expr" ] }, - "LINES_OPTIONS": { + "statementLinesOptions": { "STARTING BY": [ 1, "expr" @@ -1001,7 +1001,7 @@ "type": null, "dest": { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -1025,19 +1025,19 @@ }, "columns": null, "values": null, - "fields_options": null, - "fields_keyword": null, - "lines_options": null + "fieldsOptions": null, + "fieldsKeyword": null, + "linesOptions": null }, "values": null, "set": null, "select": null, "with": { "@type": "PhpMyAdmin\\SqlParser\\Statements\\WithStatement", - "OPTIONS": { + "statementOptions": { "RECURSIVE": 1 }, - "CLAUSES": { + "clauses": { "WITH": [ "WITH", 2 @@ -1070,7 +1070,7 @@ } }, "cteStatementParser": null, - "END_OPTIONS": [], + "statementEndOptions": [], "options": { "@type": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", "options": [] @@ -1079,8 +1079,8 @@ "last": null }, "onDuplicateSet": null, - "CLAUSES": [], - "END_OPTIONS": [], + "clauses": [], + "statementEndOptions": [], "options": { "@type": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", "options": [] @@ -1090,7 +1090,7 @@ }, { "@type": "PhpMyAdmin\\SqlParser\\Statements\\InsertStatement", - "OPTIONS": { + "statementOptions": { "LOW_PRIORITY": 1, "DELAYED": 2, "HIGH_PRIORITY": 3, @@ -1098,7 +1098,7 @@ }, "into": { "@type": "PhpMyAdmin\\SqlParser\\Components\\IntoKeyword", - "FIELDS_OPTIONS": { + "statementFieldsOptions": { "TERMINATED BY": [ 1, "expr" @@ -1113,7 +1113,7 @@ "expr" ] }, - "LINES_OPTIONS": { + "statementLinesOptions": { "STARTING BY": [ 1, "expr" @@ -1126,7 +1126,7 @@ "type": null, "dest": { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -1154,9 +1154,9 @@ "column3" ], "values": null, - "fields_options": null, - "fields_keyword": null, - "lines_options": null + "fieldsOptions": null, + "fieldsKeyword": null, + "linesOptions": null }, "values": [ { @@ -1177,8 +1177,8 @@ "select": null, "with": null, "onDuplicateSet": null, - "CLAUSES": [], - "END_OPTIONS": [], + "clauses": [], + "statementEndOptions": [], "options": { "@type": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", "options": [] @@ -1188,7 +1188,7 @@ }, { "@type": "PhpMyAdmin\\SqlParser\\Statements\\SelectStatement", - "OPTIONS": { + "statementOptions": { "ALL": 1, "DISTINCT": 1, "DISTINCTROW": 1, @@ -1205,11 +1205,11 @@ "SQL_NO_CACHE": 8, "SQL_CALC_FOUND_ROWS": 9 }, - "END_OPTIONS": { + "statementEndOptions": { "FOR UPDATE": 1, "LOCK IN SHARE MODE": 1 }, - "CLAUSES": { + "clauses": { "SELECT": [ "SELECT", 2 @@ -1338,7 +1338,7 @@ "expr": [ { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -1364,7 +1364,7 @@ "from": [ { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -1387,7 +1387,7 @@ "subquery": null } ], - "index_hints": null, + "indexHints": null, "partition": null, "where": null, "group": null, @@ -1398,7 +1398,7 @@ "into": null, "join": null, "union": [], - "end_options": null, + "endOptions": null, "options": { "@type": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", "options": [] diff --git a/tests/data/parser/parseWithStatementErr7.out b/tests/data/parser/parseWithStatementErr7.out index f6bf16633..d38ecd264 100644 --- a/tests/data/parser/parseWithStatementErr7.out +++ b/tests/data/parser/parseWithStatementErr7.out @@ -2,7 +2,7 @@ "query": "WITH cte (col1) AS ( SELECT 1 UNN ALL SELECT 2 ) SELECT col1 FROM cte", "lexer": { "@type": "PhpMyAdmin\\SqlParser\\Lexer", - "PARSER_METHODS": [ + "parserMethods": [ "parseDelimiter", "parseWhitespace", "parseNumber", @@ -331,7 +331,7 @@ "count": 34, "idx": 34 }, - "DEFAULT_DELIMITER": ";", + "defaultDelimiter": ";", "delimiter": ";", "delimiterLen": 1, "strict": false, @@ -339,7 +339,7 @@ }, "parser": { "@type": "PhpMyAdmin\\SqlParser\\Parser", - "STATEMENT_PARSERS": { + "statementParsers": { "DESCRIBE": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", "DESC": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", "EXPLAIN": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", @@ -384,7 +384,7 @@ "LOCK": "PhpMyAdmin\\SqlParser\\Statements\\LockStatement", "UNLOCK": "PhpMyAdmin\\SqlParser\\Statements\\LockStatement" }, - "KEYWORD_PARSERS": { + "keywordParsers": { "PARTITION BY": [], "SUBPARTITION BY": [], "_OPTIONS": { @@ -393,7 +393,7 @@ }, "_END_OPTIONS": { "class": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", - "field": "end_options" + "field": "endOptions" }, "INTERSECT": { "class": "PhpMyAdmin\\SqlParser\\Components\\UnionKeyword", @@ -641,10 +641,10 @@ "statements": [ { "@type": "PhpMyAdmin\\SqlParser\\Statements\\WithStatement", - "OPTIONS": { + "statementOptions": { "RECURSIVE": 1 }, - "CLAUSES": { + "clauses": { "WITH": [ "WITH", 2 @@ -677,7 +677,7 @@ } }, "cteStatementParser": null, - "END_OPTIONS": [], + "statementEndOptions": [], "options": { "@type": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", "options": [] @@ -687,7 +687,7 @@ }, { "@type": "PhpMyAdmin\\SqlParser\\Statements\\SelectStatement", - "OPTIONS": { + "statementOptions": { "ALL": 1, "DISTINCT": 1, "DISTINCTROW": 1, @@ -704,11 +704,11 @@ "SQL_NO_CACHE": 8, "SQL_CALC_FOUND_ROWS": 9 }, - "END_OPTIONS": { + "statementEndOptions": { "FOR UPDATE": 1, "LOCK IN SHARE MODE": 1 }, - "CLAUSES": { + "clauses": { "SELECT": [ "SELECT", 2 @@ -837,7 +837,7 @@ "expr": [ { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -863,7 +863,7 @@ "from": [ { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -886,7 +886,7 @@ "subquery": null } ], - "index_hints": null, + "indexHints": null, "partition": null, "where": null, "group": null, @@ -897,7 +897,7 @@ "into": null, "join": null, "union": [], - "end_options": null, + "endOptions": null, "options": { "@type": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", "options": [] diff --git a/tests/data/parser/parseWithStatementErr8.out b/tests/data/parser/parseWithStatementErr8.out index 75bcc232f..b29bdfb6c 100644 --- a/tests/data/parser/parseWithStatementErr8.out +++ b/tests/data/parser/parseWithStatementErr8.out @@ -2,7 +2,7 @@ "query": "WITH cte (col1) AS ( SELECT 1 UNION ALL SELECT 2 ) SELECT col1 FR cte", "lexer": { "@type": "PhpMyAdmin\\SqlParser\\Lexer", - "PARSER_METHODS": [ + "parserMethods": [ "parseDelimiter", "parseWhitespace", "parseNumber", @@ -313,7 +313,7 @@ "count": 32, "idx": 32 }, - "DEFAULT_DELIMITER": ";", + "defaultDelimiter": ";", "delimiter": ";", "delimiterLen": 1, "strict": false, @@ -321,7 +321,7 @@ }, "parser": { "@type": "PhpMyAdmin\\SqlParser\\Parser", - "STATEMENT_PARSERS": { + "statementParsers": { "DESCRIBE": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", "DESC": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", "EXPLAIN": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", @@ -366,7 +366,7 @@ "LOCK": "PhpMyAdmin\\SqlParser\\Statements\\LockStatement", "UNLOCK": "PhpMyAdmin\\SqlParser\\Statements\\LockStatement" }, - "KEYWORD_PARSERS": { + "keywordParsers": { "PARTITION BY": [], "SUBPARTITION BY": [], "_OPTIONS": { @@ -375,7 +375,7 @@ }, "_END_OPTIONS": { "class": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", - "field": "end_options" + "field": "endOptions" }, "INTERSECT": { "class": "PhpMyAdmin\\SqlParser\\Components\\UnionKeyword", @@ -623,10 +623,10 @@ "statements": [ { "@type": "PhpMyAdmin\\SqlParser\\Statements\\WithStatement", - "OPTIONS": { + "statementOptions": { "RECURSIVE": 1 }, - "CLAUSES": { + "clauses": { "WITH": [ "WITH", 2 @@ -657,7 +657,7 @@ ], "statement": { "@type": "PhpMyAdmin\\SqlParser\\Parser", - "STATEMENT_PARSERS": { + "statementParsers": { "DESCRIBE": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", "DESC": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", "EXPLAIN": "PhpMyAdmin\\SqlParser\\Statements\\ExplainStatement", @@ -702,7 +702,7 @@ "LOCK": "PhpMyAdmin\\SqlParser\\Statements\\LockStatement", "UNLOCK": "PhpMyAdmin\\SqlParser\\Statements\\LockStatement" }, - "KEYWORD_PARSERS": { + "keywordParsers": { "PARTITION BY": [], "SUBPARTITION BY": [], "_OPTIONS": { @@ -711,7 +711,7 @@ }, "_END_OPTIONS": { "class": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", - "field": "end_options" + "field": "endOptions" }, "INTERSECT": { "class": "PhpMyAdmin\\SqlParser\\Components\\UnionKeyword", @@ -996,7 +996,7 @@ "statements": [ { "@type": "PhpMyAdmin\\SqlParser\\Statements\\SelectStatement", - "OPTIONS": { + "statementOptions": { "ALL": 1, "DISTINCT": 1, "DISTINCTROW": 1, @@ -1013,11 +1013,11 @@ "SQL_NO_CACHE": 8, "SQL_CALC_FOUND_ROWS": 9 }, - "END_OPTIONS": { + "statementEndOptions": { "FOR UPDATE": 1, "LOCK IN SHARE MODE": 1 }, - "CLAUSES": { + "clauses": { "SELECT": [ "SELECT", 2 @@ -1146,7 +1146,7 @@ "expr": [ { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -1170,7 +1170,7 @@ } ], "from": [], - "index_hints": null, + "indexHints": null, "partition": null, "where": null, "group": null, @@ -1185,7 +1185,7 @@ "UNION ALL", { "@type": "PhpMyAdmin\\SqlParser\\Statements\\SelectStatement", - "OPTIONS": { + "statementOptions": { "ALL": 1, "DISTINCT": 1, "DISTINCTROW": 1, @@ -1202,11 +1202,11 @@ "SQL_NO_CACHE": 8, "SQL_CALC_FOUND_ROWS": 9 }, - "END_OPTIONS": { + "statementEndOptions": { "FOR UPDATE": 1, "LOCK IN SHARE MODE": 1 }, - "CLAUSES": { + "clauses": { "SELECT": [ "SELECT", 2 @@ -1335,7 +1335,7 @@ "expr": [ { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -1359,7 +1359,7 @@ } ], "from": [], - "index_hints": null, + "indexHints": null, "partition": null, "where": null, "group": null, @@ -1370,7 +1370,7 @@ "into": null, "join": null, "union": [], - "end_options": null, + "endOptions": null, "options": { "@type": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", "options": [] @@ -1380,7 +1380,7 @@ } ] ], - "end_options": null, + "endOptions": null, "options": { "@type": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", "options": [] @@ -1396,7 +1396,7 @@ } }, "cteStatementParser": null, - "END_OPTIONS": [], + "statementEndOptions": [], "options": { "@type": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", "options": [] @@ -1406,7 +1406,7 @@ }, { "@type": "PhpMyAdmin\\SqlParser\\Statements\\SelectStatement", - "OPTIONS": { + "statementOptions": { "ALL": 1, "DISTINCT": 1, "DISTINCTROW": 1, @@ -1423,11 +1423,11 @@ "SQL_NO_CACHE": 8, "SQL_CALC_FOUND_ROWS": 9 }, - "END_OPTIONS": { + "statementEndOptions": { "FOR UPDATE": 1, "LOCK IN SHARE MODE": 1 }, - "CLAUSES": { + "clauses": { "SELECT": [ "SELECT", 2 @@ -1556,7 +1556,7 @@ "expr": [ { "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", - "ALLOWED_KEYWORDS": { + "allowedKeywords": { "AS": 1, "DUAL": 1, "NULL": 1, @@ -1580,7 +1580,7 @@ } ], "from": [], - "index_hints": null, + "indexHints": null, "partition": null, "where": null, "group": null, @@ -1591,7 +1591,7 @@ "into": null, "join": null, "union": [], - "end_options": null, + "endOptions": null, "options": { "@type": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", "options": []