├── .gitattributes ├── .gitignore ├── README.md ├── composer.json ├── rector.php └── sources ├── Analyzer ├── AnalyzerFlags.php ├── AnalyzerResult.php ├── AnalyzerResultList.php ├── AnalyzerResultSeverity.php ├── AnalyzerRule.php ├── AutoRepair.php ├── Rules │ ├── Charset │ │ └── CharsetAndCollationCompatibilityRule.php │ └── Variables │ │ └── SystemVariablesTypeRule.php ├── SimpleAnalyzer.php ├── SimpleContext.php ├── SimpleRule.php └── Types │ └── CastingTypeChecker.php ├── Formatter └── Formatter.php ├── Parser ├── Dal │ ├── BinlogCommandParser.php │ ├── CacheCommandsParser.php │ ├── ComponentCommandsParser.php │ ├── CreateFunctionCommandParser.php │ ├── FlushCommandParser.php │ ├── KillCommandParser.php │ ├── PluginCommandsParser.php │ ├── ReplicationCommandsParser.php │ ├── ResetCommandParser.php │ ├── ResourceCommandParser.php │ ├── RestartCommandParser.php │ ├── SetCommandsParser.php │ ├── ShowCommandsParser.php │ ├── ShutdownCommandParser.php │ ├── TableMaintenanceCommandsParser.php │ └── UserCommandsParser.php ├── Ddl │ ├── EventCommandsParser.php │ ├── IndexCommandsParser.php │ ├── InstanceCommandParser.php │ ├── LogfileGroupCommandsParser.php │ ├── RoutineCommandsParser.php │ ├── SchemaCommandsParser.php │ ├── ServerCommandsParser.php │ ├── SpatialCommandsParser.php │ ├── TableCommandsParser.php │ ├── TablespaceCommandsParser.php │ ├── TriggerCommandsParser.php │ └── ViewCommandsParser.php ├── Dml │ ├── CallCommandParser.php │ ├── DeleteCommandParser.php │ ├── DelimiterCommandParser.php │ ├── DoCommandsParser.php │ ├── ErrorCommandsParser.php │ ├── ExplainCommandParser.php │ ├── HandlerCommandsParser.php │ ├── HelpCommandParser.php │ ├── ImportCommandParser.php │ ├── InsertCommandParser.php │ ├── LoadCommandsParser.php │ ├── OptimizerHintParser.php │ ├── PreparedCommandsParser.php │ ├── QueryParser.php │ ├── TableReferenceParser.php │ ├── TransactionCommandsParser.php │ ├── UpdateCommandParser.php │ ├── UseCommandParser.php │ └── XaTransactionCommandsParser.php ├── EmptyCommand.php ├── ExpressionParser.php ├── ExpressionParserFunctions.php ├── InvalidCommand.php ├── Lexer.php ├── Parser.php ├── ParserConfig.php ├── ParserFactory.php ├── RoutineBodyParser.php ├── Token.php ├── TokenList.php ├── TokenType.php └── exceptions │ ├── AnalyzerException.php │ ├── InvalidTokenException.php │ ├── InvalidValueException.php │ ├── InvalidVersionException.php │ ├── LexerException.php │ ├── ParserException.php │ └── ParsingException.php ├── Platform ├── ClientSideExtension.php ├── Features │ ├── Feature.php │ ├── FeaturesList.php │ ├── FeaturesSql2003.php │ ├── FeaturesSql2008.php │ ├── FeaturesSql2011.php │ ├── FeaturesSql92.php │ ├── FeaturesSql99.php │ ├── FeaturesSqlite38.php │ ├── MysqlError.php │ └── MysqlFeatures.php ├── Naming │ ├── NamingStrategy.php │ └── NamingStrategyMysql.php ├── Platform.php └── Version.php ├── Resolver ├── Cast.php ├── ExpressionHelper.php ├── ExpressionResolver.php ├── Functions │ ├── Functions.php │ ├── FunctionsBitwise.php │ ├── FunctionsBool.php │ ├── FunctionsCast.php │ ├── FunctionsComparison.php │ ├── FunctionsDateTime.php │ ├── FunctionsEncryption.php │ ├── FunctionsFlowControl.php │ ├── FunctionsGtid.php │ ├── FunctionsInfo.php │ ├── FunctionsJson.php │ ├── FunctionsLocking.php │ ├── FunctionsMatching.php │ ├── FunctionsMisc.php │ ├── FunctionsNumeric.php │ ├── FunctionsPerfSchema.php │ ├── FunctionsSpatial.php │ ├── FunctionsString.php │ ├── FunctionsSys.php │ └── FunctionsXml.php └── exceptions │ ├── ResolveException.php │ ├── UncastableTypeException.php │ └── UnresolvableException.php ├── Session ├── Session.php └── SessionUpdater.php ├── Sql ├── Assignment.php ├── Charset.php ├── Collation.php ├── Command.php ├── CommonTableExpressionType.php ├── Dal │ ├── Binlog │ │ └── BinlogCommand.php │ ├── Cache │ │ ├── CacheCommand.php │ │ ├── CacheIndexCommand.php │ │ ├── LoadIndexIntoCacheCommand.php │ │ └── TableIndexList.php │ ├── Component │ │ ├── ComponentCommand.php │ │ ├── InstallComponentCommand.php │ │ └── UninstallComponentCommand.php │ ├── DalCommand.php │ ├── Flush │ │ ├── FlushCommand.php │ │ ├── FlushOption.php │ │ └── FlushTablesCommand.php │ ├── Kill │ │ └── KillCommand.php │ ├── Plugin │ │ ├── InstallPluginCommand.php │ │ ├── PluginCommand.php │ │ └── UninstallPluginCommand.php │ ├── Replication │ │ ├── ChangeMasterToCommand.php │ │ ├── ChangeReplicationFilterCommand.php │ │ ├── ChangeReplicationSourceToCommand.php │ │ ├── GroupReplicationCommand.php │ │ ├── PurgeBinaryLogsCommand.php │ │ ├── ReplicaOption.php │ │ ├── ReplicationCommand.php │ │ ├── ReplicationFilter.php │ │ ├── ReplicationFilterType.php │ │ ├── ReplicationGtidAssignOption.php │ │ ├── ReplicationPrimaryKeyCheckOption.php │ │ ├── ReplicationThreadType.php │ │ ├── ReplicationUntilOption.php │ │ ├── ResetMasterCommand.php │ │ ├── ResetReplicaCommand.php │ │ ├── ResetSlaveCommand.php │ │ ├── SlaveOption.php │ │ ├── StartGroupReplicationCommand.php │ │ ├── StartReplicaCommand.php │ │ ├── StartSlaveCommand.php │ │ ├── StopGroupReplicationCommand.php │ │ ├── StopReplicaCommand.php │ │ ├── StopSlaveCommand.php │ │ └── UuidSet.php │ ├── Reset │ │ ├── ResetCommand.php │ │ └── ResetOption.php │ ├── Resource │ │ ├── AlterResourceGroupCommand.php │ │ ├── CreateResourceGroupCommand.php │ │ ├── DropResourceGroupCommand.php │ │ ├── ResourceGroupCommand.php │ │ ├── ResourceGroupType.php │ │ └── SetResourceGroupCommand.php │ ├── Restart │ │ └── RestartCommand.php │ ├── Routines │ │ └── CreateFunctionSonameCommand.php │ ├── Set │ │ ├── ResetPersistCommand.php │ │ ├── SetCharacterSetCommand.php │ │ ├── SetCommand.php │ │ ├── SetNamesCommand.php │ │ └── SetVariablesCommand.php │ ├── Show │ │ ├── ShowBinaryLogsCommand.php │ │ ├── ShowBinlogEventsCommand.php │ │ ├── ShowCharacterSetCommand.php │ │ ├── ShowCollationCommand.php │ │ ├── ShowColumnsCommand.php │ │ ├── ShowCommand.php │ │ ├── ShowCreateEventCommand.php │ │ ├── ShowCreateFunctionCommand.php │ │ ├── ShowCreateProcedureCommand.php │ │ ├── ShowCreateSchemaCommand.php │ │ ├── ShowCreateTableCommand.php │ │ ├── ShowCreateTriggerCommand.php │ │ ├── ShowCreateUserCommand.php │ │ ├── ShowCreateViewCommand.php │ │ ├── ShowEngineCommand.php │ │ ├── ShowEngineOption.php │ │ ├── ShowEnginesCommand.php │ │ ├── ShowErrorsCommand.php │ │ ├── ShowEventsCommand.php │ │ ├── ShowFunctionCodeCommand.php │ │ ├── ShowFunctionStatusCommand.php │ │ ├── ShowGrantsCommand.php │ │ ├── ShowIndexesCommand.php │ │ ├── ShowMasterStatusCommand.php │ │ ├── ShowOpenTablesCommand.php │ │ ├── ShowPluginsCommand.php │ │ ├── ShowPrivilegesCommand.php │ │ ├── ShowProcedureCodeCommand.php │ │ ├── ShowProcedureStatusCommand.php │ │ ├── ShowProcessListCommand.php │ │ ├── ShowProfileCommand.php │ │ ├── ShowProfileType.php │ │ ├── ShowProfilesCommand.php │ │ ├── ShowRelaylogEventsCommand.php │ │ ├── ShowReplicaStatusCommand.php │ │ ├── ShowReplicasCommand.php │ │ ├── ShowSchemasCommand.php │ │ ├── ShowSlaveHostsCommand.php │ │ ├── ShowSlaveStatusCommand.php │ │ ├── ShowStatusCommand.php │ │ ├── ShowTableStatusCommand.php │ │ ├── ShowTablesCommand.php │ │ ├── ShowTriggersCommand.php │ │ ├── ShowVariablesCommand.php │ │ └── ShowWarningsCommand.php │ ├── Shutdown │ │ └── ShutdownCommand.php │ ├── Table │ │ ├── AnalyzeTableCommand.php │ │ ├── AnalyzeTableDropHistogramCommand.php │ │ ├── AnalyzeTableUpdateHistogramCommand.php │ │ ├── CheckTableCommand.php │ │ ├── CheckTableOption.php │ │ ├── ChecksumTableCommand.php │ │ ├── DalTableCommand.php │ │ ├── DalTablesCommand.php │ │ ├── OptimizeTableCommand.php │ │ └── RepairTableCommand.php │ └── User │ │ ├── AddAuthFactor.php │ │ ├── AlterAuthOption.php │ │ ├── AlterCurrentUserCommand.php │ │ ├── AlterUserAction.php │ │ ├── AlterUserCommand.php │ │ ├── AlterUserDefaultRoleCommand.php │ │ ├── AlterUserFinishRegistrationCommand.php │ │ ├── AlterUserInitiateRegistrationCommand.php │ │ ├── AlterUserRegistrationCommand.php │ │ ├── AlterUserUnregisterCommand.php │ │ ├── AlteredUser.php │ │ ├── AuthOption.php │ │ ├── CreateRoleCommand.php │ │ ├── CreateUserCommand.php │ │ ├── DiscardOldPasswordAction.php │ │ ├── DropAuthFactor.php │ │ ├── DropRoleCommand.php │ │ ├── DropUserCommand.php │ │ ├── DynamicUserPrivilege.php │ │ ├── GrantCommand.php │ │ ├── GrantProxyCommand.php │ │ ├── GrantRoleCommand.php │ │ ├── IdentifiedUser.php │ │ ├── IdentifiedUserAction.php │ │ ├── ModifyAuthFactor.php │ │ ├── RenameUserCommand.php │ │ ├── RevokeAllCommand.php │ │ ├── RevokeCommand.php │ │ ├── RevokeProxyCommand.php │ │ ├── RevokeRoleCommand.php │ │ ├── RolesSpecification.php │ │ ├── RolesSpecificationType.php │ │ ├── SetDefaultRoleCommand.php │ │ ├── SetPasswordCommand.php │ │ ├── SetRoleCommand.php │ │ ├── StaticUserPrivilege.php │ │ ├── UnknownDynamicUserPrivilege.php │ │ ├── UserCommand.php │ │ ├── UserDefaultRolesSpecification.php │ │ ├── UserPasswordLockOption.php │ │ ├── UserPasswordLockOptionType.php │ │ ├── UserPrivilege.php │ │ ├── UserPrivilegeResource.php │ │ ├── UserPrivilegeResourceType.php │ │ ├── UserPrivilegeType.php │ │ ├── UserResourceOption.php │ │ ├── UserResourceOptionType.php │ │ ├── UserTlsOption.php │ │ └── UserTlsOptionType.php ├── Ddl │ ├── DdlCommand.php │ ├── Event │ │ ├── AlterEventCommand.php │ │ ├── CreateEventCommand.php │ │ ├── DropEventCommand.php │ │ ├── EventCommand.php │ │ ├── EventDefinition.php │ │ ├── EventSchedule.php │ │ └── EventState.php │ ├── Index │ │ ├── CreateIndexCommand.php │ │ ├── DropIndexCommand.php │ │ └── IndexCommand.php │ ├── Instance │ │ ├── AlterInstanceAction.php │ │ └── AlterInstanceCommand.php │ ├── LogfileGroup │ │ ├── AlterLogfileGroupCommand.php │ │ ├── CreateLogfileGroupCommand.php │ │ ├── DropLogfileGroupCommand.php │ │ └── LogfileGroupCommand.php │ ├── Routine │ │ ├── AlterFunctionCommand.php │ │ ├── AlterProcedureCommand.php │ │ ├── AlterRoutineCommand.php │ │ ├── CreateFunctionCommand.php │ │ ├── CreateProcedureCommand.php │ │ ├── CreateRoutineCommand.php │ │ ├── DropFunctionCommand.php │ │ ├── DropProcedureCommand.php │ │ ├── DropRoutineCommand.php │ │ ├── InOutParamFlag.php │ │ ├── ProcedureParam.php │ │ ├── RoutineSideEffects.php │ │ ├── StoredFunctionCommand.php │ │ ├── StoredProcedureCommand.php │ │ ├── StoredRoutineCommand.php │ │ └── UdfReturnDataType.php │ ├── Schema │ │ ├── AlterSchemaCommand.php │ │ ├── CreateSchemaCommand.php │ │ ├── DropSchemaCommand.php │ │ ├── SchemaCommand.php │ │ └── SchemaOptions.php │ ├── SchemaObjectCommand.php │ ├── SchemaObjectsCommand.php │ ├── Server │ │ ├── AlterServerCommand.php │ │ ├── CreateServerCommand.php │ │ ├── DropServerCommand.php │ │ └── ServerCommand.php │ ├── Spatial │ │ ├── CreateSpatialReferenceSystemCommand.php │ │ ├── DropSpatialReferenceSystemCommand.php │ │ └── SpatialReferenceSystemCommand.php │ ├── SqlSecurity.php │ ├── StorageType.php │ ├── Table │ │ ├── Alter │ │ │ ├── Action │ │ │ │ ├── AddCheckAction.php │ │ │ │ ├── AddColumnAction.php │ │ │ │ ├── AddColumnsAction.php │ │ │ │ ├── AddConstraintAction.php │ │ │ │ ├── AddForeignKeyAction.php │ │ │ │ ├── AddIndexAction.php │ │ │ │ ├── AddPartitionAction.php │ │ │ │ ├── AddPartitionNumberAction.php │ │ │ │ ├── AlterCheckAction.php │ │ │ │ ├── AlterColumnAction.php │ │ │ │ ├── AlterConstraintAction.php │ │ │ │ ├── AlterIndexAction.php │ │ │ │ ├── AlterTableAction.php │ │ │ │ ├── AnalyzePartitionAction.php │ │ │ │ ├── ChangeColumnAction.php │ │ │ │ ├── CheckAction.php │ │ │ │ ├── CheckPartitionAction.php │ │ │ │ ├── CoalescePartitionAction.php │ │ │ │ ├── ColumnAction.php │ │ │ │ ├── ConstraintAction.php │ │ │ │ ├── ConvertToCharsetAction.php │ │ │ │ ├── DisableKeysAction.php │ │ │ │ ├── DiscardPartitionTablespaceAction.php │ │ │ │ ├── DiscardTablespaceAction.php │ │ │ │ ├── DropCheckAction.php │ │ │ │ ├── DropColumnAction.php │ │ │ │ ├── DropConstraintAction.php │ │ │ │ ├── DropForeignKeyAction.php │ │ │ │ ├── DropIndexAction.php │ │ │ │ ├── DropPartitionAction.php │ │ │ │ ├── DropPrimaryKeyAction.php │ │ │ │ ├── EnableKeysAction.php │ │ │ │ ├── ExchangePartitionAction.php │ │ │ │ ├── ForeignKeyAction.php │ │ │ │ ├── ImportPartitionTablespaceAction.php │ │ │ │ ├── ImportTablespaceAction.php │ │ │ │ ├── IndexAction.php │ │ │ │ ├── ModifyColumnAction.php │ │ │ │ ├── OptimizePartitionAction.php │ │ │ │ ├── OrderByAction.php │ │ │ │ ├── PartitioningAction.php │ │ │ │ ├── RebuildPartitionAction.php │ │ │ │ ├── RemovePartitioningAction.php │ │ │ │ ├── RenameColumnAction.php │ │ │ │ ├── RenameIndexAction.php │ │ │ │ ├── RenameToAction.php │ │ │ │ ├── ReorganizePartitionAction.php │ │ │ │ ├── RepairPartitionAction.php │ │ │ │ ├── TableAction.php │ │ │ │ ├── TablespaceAction.php │ │ │ │ ├── TruncatePartitionAction.php │ │ │ │ └── UpgradePartitioningAction.php │ │ │ ├── AlterActionsList.php │ │ │ ├── AlterTableActionType.php │ │ │ ├── AlterTableAlgorithm.php │ │ │ ├── AlterTableLock.php │ │ │ └── AlterTableOption.php │ │ ├── AlterTableCommand.php │ │ ├── AnyCreateTableCommand.php │ │ ├── Column │ │ │ ├── ColumnDefinition.php │ │ │ ├── ColumnFormat.php │ │ │ ├── ColumnList.php │ │ │ └── GeneratedColumnType.php │ │ ├── Constraint │ │ │ ├── CheckDefinition.php │ │ │ ├── ConstraintAction.php │ │ │ ├── ConstraintBody.php │ │ │ ├── ConstraintDefinition.php │ │ │ ├── ConstraintList.php │ │ │ ├── ConstraintType.php │ │ │ ├── ForeignKeyAction.php │ │ │ ├── ForeignKeyDefinition.php │ │ │ ├── ForeignKeyMatchType.php │ │ │ └── ReferenceDefinition.php │ │ ├── CreateTableCommand.php │ │ ├── CreateTableLikeCommand.php │ │ ├── DdlTableCommand.php │ │ ├── DdlTablesCommand.php │ │ ├── DropTableCommand.php │ │ ├── Index │ │ │ ├── IndexAlgorithm.php │ │ │ ├── IndexDefinition.php │ │ │ ├── IndexList.php │ │ │ ├── IndexOptions.php │ │ │ ├── IndexPart.php │ │ │ └── IndexType.php │ │ ├── Option │ │ │ ├── StorageEngine.php │ │ │ ├── TableCompression.php │ │ │ ├── TableInsertMethod.php │ │ │ ├── TableOption.php │ │ │ ├── TableOptionsList.php │ │ │ ├── TableRowFormat.php │ │ │ └── ThreeStateValue.php │ │ ├── Partition │ │ │ ├── PartitionDefinition.php │ │ │ ├── PartitionOption.php │ │ │ ├── PartitioningCondition.php │ │ │ ├── PartitioningConditionType.php │ │ │ └── PartitioningDefinition.php │ │ ├── RenameTableCommand.php │ │ ├── TableItem.php │ │ └── TruncateTableCommand.php │ ├── Tablespace │ │ ├── AlterTablespaceCommand.php │ │ ├── CreateTablespaceCommand.php │ │ ├── DropTablespaceCommand.php │ │ ├── TablespaceCommand.php │ │ └── TablespaceOption.php │ ├── Trigger │ │ ├── CreateTriggerCommand.php │ │ ├── DropTriggerCommand.php │ │ ├── TriggerCommand.php │ │ ├── TriggerEvent.php │ │ ├── TriggerOrder.php │ │ └── TriggerPosition.php │ ├── UserExpression.php │ └── View │ │ ├── AlterViewCommand.php │ │ ├── CreateViewCommand.php │ │ ├── DropViewCommand.php │ │ ├── DropViewOption.php │ │ ├── ViewAlgorithm.php │ │ ├── ViewCheckOption.php │ │ └── ViewCommand.php ├── Dml │ ├── Call │ │ └── CallCommand.php │ ├── Delete │ │ └── DeleteCommand.php │ ├── DmlCommand.php │ ├── DoCommand │ │ └── DoCommand.php │ ├── DuplicateOption.php │ ├── Error │ │ ├── ConditionInformationItem.php │ │ ├── DiagnosticsArea.php │ │ ├── DiagnosticsItem.php │ │ ├── ErrorHandlingCommand.php │ │ ├── GetDiagnosticsCommand.php │ │ ├── InformationItem.php │ │ ├── ResignalCommand.php │ │ ├── SignalCommand.php │ │ ├── SqlState.php │ │ ├── SqlStateCategory.php │ │ ├── SqlStateClass.php │ │ └── StatementInformationItem.php │ ├── FileFormat.php │ ├── Handler │ │ ├── HandlerCloseCommand.php │ │ ├── HandlerCommand.php │ │ ├── HandlerOpenCommand.php │ │ ├── HandlerReadCommand.php │ │ └── HandlerReadTarget.php │ ├── Import │ │ └── ImportCommand.php │ ├── Insert │ │ ├── InsertCommand.php │ │ ├── InsertOrReplaceCommand.php │ │ ├── InsertPriority.php │ │ ├── InsertSelectCommand.php │ │ ├── InsertSetCommand.php │ │ ├── InsertValuesCommand.php │ │ ├── OnDuplicateKeyActions.php │ │ ├── ReplaceCommand.php │ │ ├── ReplaceSelectCommand.php │ │ ├── ReplaceSetCommand.php │ │ └── ReplaceValuesCommand.php │ ├── Load │ │ ├── LoadCommand.php │ │ ├── LoadDataCommand.php │ │ ├── LoadPriority.php │ │ └── LoadXmlCommand.php │ ├── OptimizerHint │ │ ├── HintTableIdentifier.php │ │ ├── IndexLevelHint.php │ │ ├── JoinFixedOrderHint.php │ │ ├── JoinOrderHint.php │ │ ├── MaxExecutionTimeHint.php │ │ ├── NameWithQueryBlock.php │ │ ├── OptimizerHint.php │ │ ├── OptimizerHintType.php │ │ ├── QueryBlockNameHint.php │ │ ├── ResourceGroupHint.php │ │ ├── SemijoinHint.php │ │ ├── SemijoinHintStrategy.php │ │ ├── SetVarHint.php │ │ ├── SubqueryHint.php │ │ ├── SubqueryHintStrategy.php │ │ └── TableLevelHint.php │ ├── Prepared │ │ ├── DeallocatePrepareCommand.php │ │ ├── ExecuteCommand.php │ │ ├── PrepareCommand.php │ │ └── PreparedStatementCommand.php │ ├── Query │ │ ├── GroupByExpression.php │ │ ├── ParenthesizedQueryExpression.php │ │ ├── Query.php │ │ ├── QueryExpression.php │ │ ├── QueryOperator.php │ │ ├── QueryOperatorOption.php │ │ ├── QueryOperatorType.php │ │ ├── Row.php │ │ ├── SelectCommand.php │ │ ├── SelectDistinctOption.php │ │ ├── SelectExpression.php │ │ ├── SelectInto.php │ │ ├── SelectIntoDumpfile.php │ │ ├── SelectIntoOutfile.php │ │ ├── SelectIntoVariables.php │ │ ├── SelectLockOption.php │ │ ├── SelectLockWaitOption.php │ │ ├── SelectLocking.php │ │ ├── SelectOption.php │ │ ├── SimpleQuery.php │ │ ├── TableCommand.php │ │ ├── ValuesCommand.php │ │ ├── WindowFrame.php │ │ ├── WindowFrameType.php │ │ ├── WindowFrameUnits.php │ │ └── WindowSpecification.php │ ├── TableReference │ │ ├── EscapedTableReference.php │ │ ├── IndexHint.php │ │ ├── IndexHintAction.php │ │ ├── IndexHintTarget.php │ │ ├── InnerJoin.php │ │ ├── Join.php │ │ ├── JoinSide.php │ │ ├── NaturalJoin.php │ │ ├── OuterJoin.php │ │ ├── StraightJoin.php │ │ ├── TableReferenceJsonTable.php │ │ ├── TableReferenceList.php │ │ ├── TableReferenceNode.php │ │ ├── TableReferenceParentheses.php │ │ ├── TableReferenceSubquery.php │ │ └── TableReferenceTable.php │ ├── Transaction │ │ ├── CommitCommand.php │ │ ├── LockInstanceCommand.php │ │ ├── LockTableType.php │ │ ├── LockTablesCommand.php │ │ ├── LockTablesItem.php │ │ ├── ReleaseSavepointCommand.php │ │ ├── RollbackCommand.php │ │ ├── RollbackToSavepointCommand.php │ │ ├── SavepointCommand.php │ │ ├── SetTransactionCommand.php │ │ ├── StartTransactionCommand.php │ │ ├── TransactionCommand.php │ │ ├── TransactionIsolationLevel.php │ │ ├── UnlockInstanceCommand.php │ │ └── UnlockTablesCommand.php │ ├── Update │ │ └── UpdateCommand.php │ ├── Utility │ │ ├── DelimiterCommand.php │ │ ├── DescribeTableCommand.php │ │ ├── ExplainForConnectionCommand.php │ │ ├── ExplainStatementCommand.php │ │ ├── ExplainType.php │ │ ├── HelpCommand.php │ │ └── UseCommand.php │ ├── WithClause.php │ ├── WithExpression.php │ └── XaTransaction │ │ ├── XaCommitCommand.php │ │ ├── XaEndCommand.php │ │ ├── XaPrepareCommand.php │ │ ├── XaRecoverCommand.php │ │ ├── XaRollbackCommand.php │ │ ├── XaStartCommand.php │ │ ├── XaStartOption.php │ │ ├── XaTransactionCommand.php │ │ └── Xid.php ├── EntityType.php ├── Expression │ ├── ArgumentValue.php │ ├── BaseType.php │ ├── ColumnType.php │ ├── MatchMode.php │ ├── Operator.php │ ├── OperatorPrioritySolver.php │ ├── Subquery.php │ ├── UnresolvedExpression.php │ ├── UserName.php │ ├── identifier │ │ ├── BuiltInFunction.php │ │ ├── ColumnIdentifier.php │ │ ├── ColumnName.php │ │ ├── DoubleColonPlaceholder.php │ │ ├── FunctionIdentifier.php │ │ ├── Identifier.php │ │ ├── NumberedQuestionMarkPlaceholder.php │ │ ├── ObjectIdentifier.php │ │ ├── Placeholder.php │ │ ├── QualifiedName.php │ │ ├── QuestionMarkPlaceholder.php │ │ ├── Scope.php │ │ ├── SimpleName.php │ │ ├── SystemVariable.php │ │ └── UserVariable.php │ ├── json │ │ ├── JsonErrorCondition.php │ │ ├── JsonTableColumn.php │ │ ├── JsonTableColumnsList.php │ │ ├── JsonTableExistsPathColumn.php │ │ ├── JsonTableNestedColumns.php │ │ ├── JsonTableOrdinalityColumn.php │ │ └── JsonTablePathColumn.php │ ├── literal │ │ ├── AllLiteral.php │ │ ├── BinaryLiteral.php │ │ ├── BoolLiteral.php │ │ ├── BoolValue.php │ │ ├── DefaultLiteral.php │ │ ├── EnumValueLiteral.php │ │ ├── HexadecimalLiteral.php │ │ ├── IntLiteral.php │ │ ├── IntValue.php │ │ ├── KeywordLiteral.php │ │ ├── Literal.php │ │ ├── MaxValueLiteral.php │ │ ├── NoneLiteral.php │ │ ├── NullLiteral.php │ │ ├── NumericLiteral.php │ │ ├── NumericValue.php │ │ ├── OnOffLiteral.php │ │ ├── PrimaryLiteral.php │ │ ├── SizeLiteral.php │ │ ├── StringLiteral.php │ │ ├── StringValue.php │ │ ├── UintLiteral.php │ │ ├── UintValue.php │ │ ├── UnknownLiteral.php │ │ └── Value.php │ ├── operator │ │ ├── AssignOperator.php │ │ ├── BinaryOperator.php │ │ ├── ComparisonOperator.php │ │ ├── OperatorExpression.php │ │ ├── TernaryOperator.php │ │ └── UnaryOperator.php │ ├── other │ │ ├── AliasExpression.php │ │ ├── ArgumentNode.php │ │ ├── Asterisk.php │ │ ├── CaseExpression.php │ │ ├── CastType.php │ │ ├── CollateExpression.php │ │ ├── CurlyExpression.php │ │ ├── ExistsExpression.php │ │ ├── ExpressionNode.php │ │ ├── FunctionCall.php │ │ ├── ListExpression.php │ │ ├── MatchExpression.php │ │ ├── NoValue.php │ │ ├── OrderByExpression.php │ │ ├── OrderByListExpression.php │ │ ├── Parentheses.php │ │ ├── RootNode.php │ │ └── RowExpression.php │ └── time │ │ ├── DateLiteral.php │ │ ├── DatetimeLiteral.php │ │ ├── TimeInterval.php │ │ ├── TimeIntervalExpression.php │ │ ├── TimeIntervalLiteral.php │ │ ├── TimeIntervalUnit.php │ │ ├── TimeLiteral.php │ │ ├── TimeTypeLiteral.php │ │ ├── TimeValue.php │ │ ├── TimeZone.php │ │ ├── TimeZoneName.php │ │ ├── TimeZoneOffset.php │ │ └── TimestampLiteral.php ├── IntEnum.php ├── Keyword.php ├── MysqlVariable.php ├── Order.php ├── Routine │ ├── CaseStatement.php │ ├── CloseCursorStatement.php │ ├── CompoundStatement.php │ ├── CompoundStatementItem.php │ ├── Condition.php │ ├── ConditionType.php │ ├── DeclareConditionStatement.php │ ├── DeclareCursorStatement.php │ ├── DeclareHandlerStatement.php │ ├── DeclareVariablesStatement.php │ ├── FetchStatement.php │ ├── HandlerAction.php │ ├── IfStatement.php │ ├── IterateStatement.php │ ├── LeaveStatement.php │ ├── LoopStatement.php │ ├── OpenCursorStatement.php │ ├── RepeatStatement.php │ ├── ReturnStatement.php │ ├── RoutineType.php │ └── WhileStatement.php ├── SqlEnum.php ├── SqlMode.php ├── SqlSerializable.php ├── Statement.php ├── StatementImpl.php ├── StringEnum.php ├── SubqueryType.php ├── SystemVariableInfo.php ├── TableCommand.php ├── TablesCommand.php ├── VariableFlags.php └── exceptions │ ├── InvalidDefinitionException.php │ └── InvalidEnumValueException.php ├── SqlFtwException.php └── Util ├── TypeChecker.php └── Uuid.php /.gitattributes: -------------------------------------------------------------------------------- 1 | /build export-ignore 2 | /doc export-ignore 3 | /tests export-ignore 4 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | /bin 2 | /doc/api/* 3 | /log 4 | /temp 5 | /vendor 6 | /tests/**/output/* 7 | local.neon 8 | build.local.properties 9 | netteForms.js 10 | composer.lock 11 | -------------------------------------------------------------------------------- /sources/Analyzer/AnalyzerFlags.php: -------------------------------------------------------------------------------- 1 | 19 | */ 20 | public function process(Statement $statement, SimpleContext $context, int $flags): array; 21 | 22 | } 23 | -------------------------------------------------------------------------------- /sources/Parser/Dal/BinlogCommandParser.php: -------------------------------------------------------------------------------- 1 | expectKeyword(Keyword::BINLOG); 26 | $value = $tokenList->expectString(); 27 | if ($value === '') { 28 | throw new InvalidValueException('base64 encoded binlog command', $tokenList); 29 | } 30 | 31 | return new BinlogCommand($value); 32 | } 33 | 34 | } 35 | -------------------------------------------------------------------------------- /sources/Parser/Dal/RestartCommandParser.php: -------------------------------------------------------------------------------- 1 | expectKeyword(Keyword::RESTART); 25 | 26 | return new RestartCommand(); 27 | } 28 | 29 | } 30 | -------------------------------------------------------------------------------- /sources/Parser/Dal/ShutdownCommandParser.php: -------------------------------------------------------------------------------- 1 | expectKeyword(Keyword::SHUTDOWN); 25 | 26 | return new ShutdownCommand(); 27 | } 28 | 29 | } 30 | -------------------------------------------------------------------------------- /sources/Parser/Dml/HelpCommandParser.php: -------------------------------------------------------------------------------- 1 | expectKeyword(Keyword::HELP); 25 | $term = $tokenList->expectNonReservedNameOrString(); 26 | 27 | return new HelpCommand($term); 28 | } 29 | 30 | } 31 | -------------------------------------------------------------------------------- /sources/Parser/Dml/ImportCommandParser.php: -------------------------------------------------------------------------------- 1 | expectKeywords(Keyword::IMPORT, Keyword::TABLE, Keyword::FROM); 25 | 26 | $files = []; 27 | do { 28 | $files[] = $tokenList->expectString(); 29 | } while ($tokenList->hasSymbol(',')); 30 | 31 | return new ImportCommand($files); 32 | } 33 | 34 | } 35 | -------------------------------------------------------------------------------- /sources/Parser/Dml/UseCommandParser.php: -------------------------------------------------------------------------------- 1 | expectKeyword(Keyword::USE); 26 | $schema = $tokenList->expectName(EntityType::SCHEMA); 27 | 28 | return new UseCommand($schema); 29 | } 30 | 31 | } 32 | -------------------------------------------------------------------------------- /sources/Parser/EmptyCommand.php: -------------------------------------------------------------------------------- 1 | $commentsBefore 24 | */ 25 | public function __construct(array $commentsBefore) 26 | { 27 | $this->commentsBefore = $commentsBefore; 28 | } 29 | 30 | public function serialize(Formatter $formatter): string 31 | { 32 | return ''; 33 | } 34 | 35 | } 36 | -------------------------------------------------------------------------------- /sources/Parser/exceptions/InvalidVersionException.php: -------------------------------------------------------------------------------- 1 | format(); 23 | 24 | parent::__construct("Platform {$platformName} does not support feature {$feature}.", $tokenList, $previous); 25 | 26 | $this->feature = $feature; 27 | } 28 | 29 | public function getFeature(): string 30 | { 31 | return $this->feature; 32 | } 33 | 34 | } 35 | -------------------------------------------------------------------------------- /sources/Parser/exceptions/LexerException.php: -------------------------------------------------------------------------------- 1 | position = $position; 26 | $this->input = $input; 27 | } 28 | 29 | public function getPosition(): int 30 | { 31 | return $this->position; 32 | } 33 | 34 | public function getInput(): string 35 | { 36 | return $this->input; 37 | } 38 | 39 | } 40 | -------------------------------------------------------------------------------- /sources/Parser/exceptions/ParsingException.php: -------------------------------------------------------------------------------- 1 | =8.0.32 17 | 18 | // deprecation of old features 19 | public const OLD_NULL_LITERAL = 'old-null-literal'; // \N 20 | public const UNQUOTED_NAMES_CAN_START_WITH_DOLLAR_SIGN = 'unquoted-names-can-start-with-dollar-sign'; // depr. 8.0.32 21 | public const FULL_IS_VALID_NAME = 'full-is-valid-name'; // depr. 8.0.32 22 | 23 | } 24 | -------------------------------------------------------------------------------- /sources/Resolver/Functions/FunctionsFlowControl.php: -------------------------------------------------------------------------------- 1 | value = $value; 24 | } 25 | 26 | public function getValue(): string 27 | { 28 | return $this->value; 29 | } 30 | 31 | public function serialize(Formatter $formatter): string 32 | { 33 | return "BINLOG " . $formatter->formatString($this->value); 34 | } 35 | 36 | } 37 | -------------------------------------------------------------------------------- /sources/Sql/Dal/Cache/CacheCommand.php: -------------------------------------------------------------------------------- 1 | processId = $processId; 25 | } 26 | 27 | public function getProcessId(): RootNode 28 | { 29 | return $this->processId; 30 | } 31 | 32 | public function serialize(Formatter $formatter): string 33 | { 34 | return 'KILL ' . $this->processId->serialize($formatter); 35 | } 36 | 37 | } 38 | -------------------------------------------------------------------------------- /sources/Sql/Dal/Plugin/PluginCommand.php: -------------------------------------------------------------------------------- 1 | pluginName = $pluginName; 23 | } 24 | 25 | public function getPluginName(): string 26 | { 27 | return $this->pluginName; 28 | } 29 | 30 | public function serialize(Formatter $formatter): string 31 | { 32 | return 'UNINSTALL PLUGIN ' . $formatter->formatName($this->pluginName); 33 | } 34 | 35 | } 36 | -------------------------------------------------------------------------------- /sources/Sql/Dal/Replication/GroupReplicationCommand.php: -------------------------------------------------------------------------------- 1 | 20 | */ 21 | public function getAssignments(): array; 22 | 23 | } 24 | -------------------------------------------------------------------------------- /sources/Sql/Dal/Show/ShowBinaryLogsCommand.php: -------------------------------------------------------------------------------- 1 | event = $event; 24 | } 25 | 26 | public function getEvent(): ObjectIdentifier 27 | { 28 | return $this->event; 29 | } 30 | 31 | public function serialize(Formatter $formatter): string 32 | { 33 | return 'SHOW CREATE EVENT ' . $this->event->serialize($formatter); 34 | } 35 | 36 | } 37 | -------------------------------------------------------------------------------- /sources/Sql/Dal/Show/ShowCreateSchemaCommand.php: -------------------------------------------------------------------------------- 1 | schema = $schema; 23 | } 24 | 25 | public function getSchema(): string 26 | { 27 | return $this->schema; 28 | } 29 | 30 | public function serialize(Formatter $formatter): string 31 | { 32 | return 'SHOW CREATE DATABASE ' . $formatter->formatName($this->schema); 33 | } 34 | 35 | } 36 | -------------------------------------------------------------------------------- /sources/Sql/Dal/Show/ShowCreateTableCommand.php: -------------------------------------------------------------------------------- 1 | table = $table; 24 | } 25 | 26 | public function getTable(): ObjectIdentifier 27 | { 28 | return $this->table; 29 | } 30 | 31 | public function serialize(Formatter $formatter): string 32 | { 33 | return 'SHOW CREATE TABLE ' . $this->table->serialize($formatter); 34 | } 35 | 36 | } 37 | -------------------------------------------------------------------------------- /sources/Sql/Dal/Show/ShowCreateUserCommand.php: -------------------------------------------------------------------------------- 1 | user = $user; 24 | } 25 | 26 | public function getUser(): UserName 27 | { 28 | return $this->user; 29 | } 30 | 31 | public function serialize(Formatter $formatter): string 32 | { 33 | return 'SHOW CREATE USER ' . $this->user->serialize($formatter); 34 | } 35 | 36 | } 37 | -------------------------------------------------------------------------------- /sources/Sql/Dal/Show/ShowCreateViewCommand.php: -------------------------------------------------------------------------------- 1 | view = $view; 24 | } 25 | 26 | public function getView(): ObjectIdentifier 27 | { 28 | return $this->view; 29 | } 30 | 31 | public function serialize(Formatter $formatter): string 32 | { 33 | return 'SHOW CREATE VIEW ' . $this->view->serialize($formatter); 34 | } 35 | 36 | } 37 | -------------------------------------------------------------------------------- /sources/Sql/Dal/Show/ShowEngineOption.php: -------------------------------------------------------------------------------- 1 | full = $full; 23 | } 24 | 25 | public function isFull(): bool 26 | { 27 | return $this->full; 28 | } 29 | 30 | public function serialize(Formatter $formatter): string 31 | { 32 | return 'SHOW' . ($this->full ? ' FULL' : '') . ' PROCESSLIST'; 33 | } 34 | 35 | } 36 | -------------------------------------------------------------------------------- /sources/Sql/Dal/Show/ShowProfileType.php: -------------------------------------------------------------------------------- 1 | role = $role; 23 | } 24 | 25 | public function getRole(): RolesSpecification 26 | { 27 | return $this->role; 28 | } 29 | 30 | public function serialize(Formatter $formatter): string 31 | { 32 | return 'SET ROLE ' . $this->role->serialize($formatter); 33 | } 34 | 35 | } 36 | -------------------------------------------------------------------------------- /sources/Sql/Dal/User/UnknownDynamicUserPrivilege.php: -------------------------------------------------------------------------------- 1 | value = $value; 22 | } 23 | 24 | public function getValue(): string 25 | { 26 | return $this->value; 27 | } 28 | 29 | public function serialize(Formatter $formatter): string 30 | { 31 | return $this->value; 32 | } 33 | 34 | } 35 | -------------------------------------------------------------------------------- /sources/Sql/Dal/User/UserCommand.php: -------------------------------------------------------------------------------- 1 | check = $check; 23 | } 24 | 25 | public function getCheck(): CheckDefinition 26 | { 27 | return $this->check; 28 | } 29 | 30 | public function serialize(Formatter $formatter): string 31 | { 32 | return 'ADD ' . $this->check->serialize($formatter); 33 | } 34 | 35 | } 36 | -------------------------------------------------------------------------------- /sources/Sql/Ddl/Table/Alter/Action/AddIndexAction.php: -------------------------------------------------------------------------------- 1 | index = $index; 23 | } 24 | 25 | public function getIndex(): IndexDefinition 26 | { 27 | return $this->index; 28 | } 29 | 30 | public function serialize(Formatter $formatter): string 31 | { 32 | return 'ADD ' . $this->index->serialize($formatter); 33 | } 34 | 35 | } 36 | -------------------------------------------------------------------------------- /sources/Sql/Ddl/Table/Alter/Action/AddPartitionNumberAction.php: -------------------------------------------------------------------------------- 1 | partitions = $partition; 22 | } 23 | 24 | public function getPartitions(): int 25 | { 26 | return $this->partitions; 27 | } 28 | 29 | public function serialize(Formatter $formatter): string 30 | { 31 | return 'ADD PARTITION PARTITIONS ' . $this->partitions; 32 | } 33 | 34 | } 35 | -------------------------------------------------------------------------------- /sources/Sql/Ddl/Table/Alter/Action/AlterTableAction.php: -------------------------------------------------------------------------------- 1 | value = $value; 23 | } 24 | 25 | public function getValue(): int 26 | { 27 | return $this->value; 28 | } 29 | 30 | public function serialize(Formatter $formatter): string 31 | { 32 | return 'COALESCE PARTITION ' . strval($this->value); 33 | } 34 | 35 | } 36 | -------------------------------------------------------------------------------- /sources/Sql/Ddl/Table/Alter/Action/ColumnAction.php: -------------------------------------------------------------------------------- 1 | check = $check; 22 | } 23 | 24 | public function getCheck(): string 25 | { 26 | return $this->check; 27 | } 28 | 29 | public function serialize(Formatter $formatter): string 30 | { 31 | return 'DROP CHECK ' . $formatter->formatName($this->check); 32 | } 33 | 34 | } 35 | -------------------------------------------------------------------------------- /sources/Sql/Ddl/Table/Alter/Action/DropColumnAction.php: -------------------------------------------------------------------------------- 1 | column = $column; 22 | } 23 | 24 | public function getColumn(): string 25 | { 26 | return $this->column; 27 | } 28 | 29 | public function serialize(Formatter $formatter): string 30 | { 31 | return 'DROP COLUMN ' . $formatter->formatName($this->column); 32 | } 33 | 34 | } 35 | -------------------------------------------------------------------------------- /sources/Sql/Ddl/Table/Alter/Action/DropConstraintAction.php: -------------------------------------------------------------------------------- 1 | constraint = $constraint; 22 | } 23 | 24 | public function getConstraint(): string 25 | { 26 | return $this->constraint; 27 | } 28 | 29 | public function serialize(Formatter $formatter): string 30 | { 31 | return 'DROP CONSTRAINT ' . $formatter->formatName($this->constraint); 32 | } 33 | 34 | } 35 | -------------------------------------------------------------------------------- /sources/Sql/Ddl/Table/Alter/Action/DropForeignKeyAction.php: -------------------------------------------------------------------------------- 1 | foreignKey = $foreignKey; 22 | } 23 | 24 | public function getForeignKey(): string 25 | { 26 | return $this->foreignKey; 27 | } 28 | 29 | public function serialize(Formatter $formatter): string 30 | { 31 | return 'DROP FOREIGN KEY ' . $formatter->formatName($this->foreignKey); 32 | } 33 | 34 | } 35 | -------------------------------------------------------------------------------- /sources/Sql/Ddl/Table/Alter/Action/DropIndexAction.php: -------------------------------------------------------------------------------- 1 | index = $index; 22 | } 23 | 24 | public function getIndex(): string 25 | { 26 | return $this->index; 27 | } 28 | 29 | public function serialize(Formatter $formatter): string 30 | { 31 | return 'DROP INDEX ' . $formatter->formatName($this->index); 32 | } 33 | 34 | } 35 | -------------------------------------------------------------------------------- /sources/Sql/Ddl/Table/Alter/Action/DropPrimaryKeyAction.php: -------------------------------------------------------------------------------- 1 | newName = $newName; 23 | } 24 | 25 | public function getNewName(): ObjectIdentifier 26 | { 27 | return $this->newName; 28 | } 29 | 30 | public function serialize(Formatter $formatter): string 31 | { 32 | return 'RENAME TO ' . $this->newName->serialize($formatter); 33 | } 34 | 35 | } 36 | -------------------------------------------------------------------------------- /sources/Sql/Ddl/Table/Alter/Action/TableAction.php: -------------------------------------------------------------------------------- 1 | getValue() . "'"; 28 | } 29 | 30 | } 31 | -------------------------------------------------------------------------------- /sources/Sql/Ddl/Table/Option/TableInsertMethod.php: -------------------------------------------------------------------------------- 1 | name = $name; 24 | } 25 | 26 | public function getTable(): ObjectIdentifier 27 | { 28 | return $this->name; 29 | } 30 | 31 | public function serialize(Formatter $formatter): string 32 | { 33 | return 'TRUNCATE TABLE ' . $this->name->serialize($formatter); 34 | } 35 | 36 | } 37 | -------------------------------------------------------------------------------- /sources/Sql/Ddl/Tablespace/TablespaceCommand.php: -------------------------------------------------------------------------------- 1 | */ 20 | private array $files; 21 | 22 | /** 23 | * @param non-empty-list $files 24 | */ 25 | public function __construct(array $files) 26 | { 27 | $this->files = $files; 28 | } 29 | 30 | public function serialize(Formatter $formatter): string 31 | { 32 | return 'IMPORT TABLE FROM ' . $formatter->formatStringList($this->files); 33 | } 34 | 35 | } 36 | -------------------------------------------------------------------------------- /sources/Sql/Dml/Insert/InsertCommand.php: -------------------------------------------------------------------------------- 1 | limit = $limit; 22 | } 23 | 24 | public function getType(): string 25 | { 26 | return OptimizerHintType::MAX_EXECUTION_TIME; 27 | } 28 | 29 | public function getLimit(): int 30 | { 31 | return $this->limit; 32 | } 33 | 34 | public function serialize(Formatter $formatter): string 35 | { 36 | return 'MAX_EXECUTION_TIME(' . $this->limit . ')'; 37 | } 38 | 39 | } 40 | -------------------------------------------------------------------------------- /sources/Sql/Dml/OptimizerHint/OptimizerHint.php: -------------------------------------------------------------------------------- 1 | name = $name; 23 | } 24 | 25 | public function getName(): string 26 | { 27 | return $this->name; 28 | } 29 | 30 | public function serialize(Formatter $formatter): string 31 | { 32 | return 'DEALLOCATE PREPARE ' . $formatter->formatName($this->name); 33 | } 34 | 35 | } 36 | -------------------------------------------------------------------------------- /sources/Sql/Dml/Prepared/PreparedStatementCommand.php: -------------------------------------------------------------------------------- 1 | node = $node; 22 | } 23 | 24 | public function getNode(): TableReferenceNode 25 | { 26 | return $this->node; 27 | } 28 | 29 | public function serialize(Formatter $formatter): string 30 | { 31 | return '{ OJ ' . $this->node->serialize($formatter) . ' }'; 32 | } 33 | 34 | } 35 | -------------------------------------------------------------------------------- /sources/Sql/Dml/TableReference/IndexHintAction.php: -------------------------------------------------------------------------------- 1 | left = $left; 22 | $this->right = $right; 23 | } 24 | 25 | public function getLeft(): TableReferenceNode 26 | { 27 | return $this->left; 28 | } 29 | 30 | public function getRight(): TableReferenceNode 31 | { 32 | return $this->right; 33 | } 34 | 35 | } 36 | -------------------------------------------------------------------------------- /sources/Sql/Dml/TableReference/JoinSide.php: -------------------------------------------------------------------------------- 1 | savepoint = $savepoint; 23 | } 24 | 25 | public function getSavepoint(): string 26 | { 27 | return $this->savepoint; 28 | } 29 | 30 | public function serialize(Formatter $formatter): string 31 | { 32 | return 'RELEASE SAVEPOINT ' . $formatter->formatName($this->savepoint); 33 | } 34 | 35 | } 36 | -------------------------------------------------------------------------------- /sources/Sql/Dml/Transaction/RollbackToSavepointCommand.php: -------------------------------------------------------------------------------- 1 | savepoint = $savepoint; 23 | } 24 | 25 | public function getSavepoint(): string 26 | { 27 | return $this->savepoint; 28 | } 29 | 30 | public function serialize(Formatter $formatter): string 31 | { 32 | return 'ROLLBACK TO SAVEPOINT ' . $formatter->formatName($this->savepoint); 33 | } 34 | 35 | } 36 | -------------------------------------------------------------------------------- /sources/Sql/Dml/Transaction/SavepointCommand.php: -------------------------------------------------------------------------------- 1 | savepoint = $savepoint; 23 | } 24 | 25 | public function getSavepoint(): string 26 | { 27 | return $this->savepoint; 28 | } 29 | 30 | public function serialize(Formatter $formatter): string 31 | { 32 | return 'SAVEPOINT ' . $formatter->formatName($this->savepoint); 33 | } 34 | 35 | } 36 | -------------------------------------------------------------------------------- /sources/Sql/Dml/Transaction/TransactionCommand.php: -------------------------------------------------------------------------------- 1 | newDelimiter = $newDelimiter; 24 | } 25 | 26 | public function getNewDelimiter(): string 27 | { 28 | return $this->newDelimiter; 29 | } 30 | 31 | public function serialize(Formatter $formatter): string 32 | { 33 | return 'DELIMITER ' . $this->newDelimiter; 34 | } 35 | 36 | } 37 | -------------------------------------------------------------------------------- /sources/Sql/Dml/Utility/ExplainType.php: -------------------------------------------------------------------------------- 1 | term = $term; 24 | } 25 | 26 | public function getTerm(): string 27 | { 28 | return $this->term; 29 | } 30 | 31 | public function serialize(Formatter $formatter): string 32 | { 33 | return 'HELP ' . $formatter->formatString($this->term); 34 | } 35 | 36 | } 37 | -------------------------------------------------------------------------------- /sources/Sql/Dml/Utility/UseCommand.php: -------------------------------------------------------------------------------- 1 | schema = $schema; 24 | } 25 | 26 | public function getSchema(): string 27 | { 28 | return $this->schema; 29 | } 30 | 31 | public function serialize(Formatter $formatter): string 32 | { 33 | return 'USE ' . $formatter->formatName($this->schema); 34 | } 35 | 36 | } 37 | -------------------------------------------------------------------------------- /sources/Sql/Dml/XaTransaction/XaPrepareCommand.php: -------------------------------------------------------------------------------- 1 | xid = $xid; 23 | } 24 | 25 | public function getXid(): Xid 26 | { 27 | return $this->xid; 28 | } 29 | 30 | public function serialize(Formatter $formatter): string 31 | { 32 | return 'XA PREPARE ' . $this->xid->serialize($formatter); 33 | } 34 | 35 | } 36 | -------------------------------------------------------------------------------- /sources/Sql/Dml/XaTransaction/XaRecoverCommand.php: -------------------------------------------------------------------------------- 1 | convertXid = $convertXid; 23 | } 24 | 25 | public function convertXid(): bool 26 | { 27 | return $this->convertXid; 28 | } 29 | 30 | public function serialize(Formatter $formatter): string 31 | { 32 | return 'XA RECOVER' . ($this->convertXid ? ' CONVERT XID' : ''); 33 | } 34 | 35 | } 36 | -------------------------------------------------------------------------------- /sources/Sql/Dml/XaTransaction/XaRollbackCommand.php: -------------------------------------------------------------------------------- 1 | xid = $xid; 23 | } 24 | 25 | public function getXid(): Xid 26 | { 27 | return $this->xid; 28 | } 29 | 30 | public function serialize(Formatter $formatter): string 31 | { 32 | return 'XA ROLLBACK ' . $this->xid->serialize($formatter); 33 | } 34 | 35 | } 36 | -------------------------------------------------------------------------------- /sources/Sql/Dml/XaTransaction/XaStartOption.php: -------------------------------------------------------------------------------- 1 | > 21 | * & 22 | * | 23 | */ 24 | public function orderArithmeticOperators(RootNode $node): RootNode 25 | { 26 | // todo: operator priority 27 | return $node; 28 | } 29 | 30 | /** 31 | * priority: 32 | * NOT 33 | * AND, && 34 | * XOR 35 | * OR, || 36 | */ 37 | public function orderLogicOperators(RootNode $node): RootNode 38 | { 39 | // todo: operator priority 40 | return $node; 41 | } 42 | 43 | } 44 | -------------------------------------------------------------------------------- /sources/Sql/Expression/Subquery.php: -------------------------------------------------------------------------------- 1 | query = $query; 26 | } 27 | 28 | public function getQuery(): Query 29 | { 30 | return $this->query; 31 | } 32 | 33 | public function serialize(Formatter $formatter): string 34 | { 35 | return '(' . $this->query->serialize($formatter) . ')'; 36 | } 37 | 38 | } 39 | -------------------------------------------------------------------------------- /sources/Sql/Expression/UnresolvedExpression.php: -------------------------------------------------------------------------------- 1 | expression = $expression; 26 | } 27 | 28 | /** 29 | * @return ExpressionNode|Asterisk|SelectCommand|mixed[]|null 30 | */ 31 | public function getExpression() 32 | { 33 | return $this->expression; 34 | } 35 | 36 | } 37 | -------------------------------------------------------------------------------- /sources/Sql/Expression/identifier/ColumnIdentifier.php: -------------------------------------------------------------------------------- 1 | name = $name; 25 | } 26 | 27 | public function getName(): string 28 | { 29 | return $this->name; 30 | } 31 | 32 | public function getFullName(): string 33 | { 34 | return $this->name; 35 | } 36 | 37 | public function serialize(Formatter $formatter): string 38 | { 39 | return $this->name; 40 | } 41 | 42 | } 43 | -------------------------------------------------------------------------------- /sources/Sql/Expression/identifier/FunctionIdentifier.php: -------------------------------------------------------------------------------- 1 | name = $name; 25 | } 26 | 27 | public function getName(): string 28 | { 29 | return $this->name; 30 | } 31 | 32 | public function getFullName(): string 33 | { 34 | return $this->name; 35 | } 36 | 37 | public function serialize(Formatter $formatter): string 38 | { 39 | return $this->name; 40 | } 41 | 42 | } 43 | -------------------------------------------------------------------------------- /sources/Sql/Expression/identifier/ObjectIdentifier.php: -------------------------------------------------------------------------------- 1 | name = $name; 22 | } 23 | 24 | public function serialize(Formatter $formatter): string 25 | { 26 | return $this->name . ' FOR ORDINALITY'; 27 | } 28 | 29 | } 30 | -------------------------------------------------------------------------------- /sources/Sql/Expression/literal/AllLiteral.php: -------------------------------------------------------------------------------- 1 | value = $value; 25 | } 26 | 27 | public function getValue(): string 28 | { 29 | return $this->value ? 'TRUE' : 'FALSE'; 30 | } 31 | 32 | public function asBool(): bool 33 | { 34 | return $this->value; 35 | } 36 | 37 | public function serialize(Formatter $formatter): string 38 | { 39 | return $this->value ? 'TRUE' : 'FALSE'; 40 | } 41 | 42 | } 43 | -------------------------------------------------------------------------------- /sources/Sql/Expression/literal/BoolValue.php: -------------------------------------------------------------------------------- 1 | value; 21 | } 22 | 23 | public function asInt(): int 24 | { 25 | return (int) $this->value; 26 | } 27 | 28 | } 29 | -------------------------------------------------------------------------------- /sources/Sql/Expression/literal/IntValue.php: -------------------------------------------------------------------------------- 1 | value = $value; 25 | } 26 | 27 | public function getValue(): string 28 | { 29 | return $this->value ? 'ON' : 'OFF'; 30 | } 31 | 32 | public function asBool(): bool 33 | { 34 | return $this->value; 35 | } 36 | 37 | public function serialize(Formatter $formatter): string 38 | { 39 | return $this->value ? 'ON' : 'OFF'; 40 | } 41 | 42 | } 43 | -------------------------------------------------------------------------------- /sources/Sql/Expression/literal/PrimaryLiteral.php: -------------------------------------------------------------------------------- 1 | value; 25 | 26 | return $value; 27 | } 28 | 29 | } 30 | -------------------------------------------------------------------------------- /sources/Sql/Expression/literal/UintValue.php: -------------------------------------------------------------------------------- 1 | subquery = $subquery; 25 | } 26 | 27 | public function getSubquery(): Subquery 28 | { 29 | return $this->subquery; 30 | } 31 | 32 | public function serialize(Formatter $formatter): string 33 | { 34 | return 'EXISTS ' . $this->subquery->serialize($formatter); 35 | } 36 | 37 | } 38 | -------------------------------------------------------------------------------- /sources/Sql/Expression/other/ExpressionNode.php: -------------------------------------------------------------------------------- 1 | [BOTH => NoValue, FROM => foo] 18 | * as compared to "TRIM(BOTH "\r\n" FROM foo)") -> [BOTH => "\r\n", FROM => foo] 19 | */ 20 | class NoValue implements ArgumentNode 21 | { 22 | 23 | public function serialize(Formatter $formatter): string 24 | { 25 | return ''; 26 | } 27 | 28 | } 29 | -------------------------------------------------------------------------------- /sources/Sql/Expression/other/Parentheses.php: -------------------------------------------------------------------------------- 1 | contents = $contents; 25 | } 26 | 27 | public function getContents(): ExpressionNode 28 | { 29 | return $this->contents; 30 | } 31 | 32 | public function serialize(Formatter $formatter): string 33 | { 34 | return '(' . $this->contents->serialize($formatter) . ')'; 35 | } 36 | 37 | } 38 | -------------------------------------------------------------------------------- /sources/Sql/Expression/other/RootNode.php: -------------------------------------------------------------------------------- 1 | cursor = $cursor; 23 | } 24 | 25 | public function getCursor(): string 26 | { 27 | return $this->cursor; 28 | } 29 | 30 | public function serialize(Formatter $formatter): string 31 | { 32 | return 'CLOSE ' . $formatter->formatName($this->cursor); 33 | } 34 | 35 | } 36 | -------------------------------------------------------------------------------- /sources/Sql/Routine/CompoundStatementItem.php: -------------------------------------------------------------------------------- 1 | label = $label; 23 | } 24 | 25 | public function getLabel(): string 26 | { 27 | return $this->label; 28 | } 29 | 30 | public function serialize(Formatter $formatter): string 31 | { 32 | return 'ITERATE ' . $formatter->formatName($this->label); 33 | } 34 | 35 | } 36 | -------------------------------------------------------------------------------- /sources/Sql/Routine/LeaveStatement.php: -------------------------------------------------------------------------------- 1 | label = $label; 23 | } 24 | 25 | public function getLabel(): string 26 | { 27 | return $this->label; 28 | } 29 | 30 | public function serialize(Formatter $formatter): string 31 | { 32 | return 'LEAVE ' . $formatter->formatName($this->label); 33 | } 34 | 35 | } 36 | -------------------------------------------------------------------------------- /sources/Sql/Routine/OpenCursorStatement.php: -------------------------------------------------------------------------------- 1 | cursor = $cursor; 23 | } 24 | 25 | public function getCursor(): string 26 | { 27 | return $this->cursor; 28 | } 29 | 30 | public function serialize(Formatter $formatter): string 31 | { 32 | return 'OPEN ' . $formatter->formatName($this->cursor); 33 | } 34 | 35 | } 36 | -------------------------------------------------------------------------------- /sources/Sql/Routine/ReturnStatement.php: -------------------------------------------------------------------------------- 1 | expression = $expression; 24 | } 25 | 26 | public function getExpression(): RootNode 27 | { 28 | return $this->expression; 29 | } 30 | 31 | public function serialize(Formatter $formatter): string 32 | { 33 | return 'RETURN ' . $this->expression->serialize($formatter); 34 | } 35 | 36 | } 37 | -------------------------------------------------------------------------------- /sources/Sql/Routine/RoutineType.php: -------------------------------------------------------------------------------- 1 | $comments 27 | */ 28 | public function setCommentsBefore(array $comments): void; 29 | 30 | /** 31 | * @return list 32 | */ 33 | public function getCommentsBefore(): array; 34 | 35 | } 36 | -------------------------------------------------------------------------------- /sources/Sql/TableCommand.php: -------------------------------------------------------------------------------- 1 | 19 | */ 20 | public function getTables(): array; 21 | 22 | } 23 | -------------------------------------------------------------------------------- /sources/Sql/exceptions/InvalidDefinitionException.php: -------------------------------------------------------------------------------- 1 |