Class TSqlCmdsMssql

Object
gudusoft.gsqlparser.sqlcmds.AbstractSqlCmds
gudusoft.gsqlparser.sqlcmds.TSqlCmdsMssql
All Implemented Interfaces:
ISqlCmds

public class TSqlCmdsMssql extends AbstractSqlCmds
Microsoft SQL Server-specific SQL command resolver. Handles T-SQL statement recognition.
Since:
3.1.0.9
  • Constructor Details

  • Method Details

    • setVendor

      public void setVendor(EDbVendor dbVendor)
      this method is used to set the vendor. this method is used temporarily due to ODBC use the TSqlCmdsMssql
      Parameters:
      dbVendor -
    • getToken1Str

      protected String getToken1Str(int token1)
      Description copied from class: AbstractSqlCmds
      Get the string representation for vendor-specific token codes. Subclasses should override this method to provide mappings for vendor-specific reserved words (tokens > TBaseType.rrw_abort).
      Overrides:
      getToken1Str in class AbstractSqlCmds
      Parameters:
      token1 - Token code
      Returns:
      String representation of the token, or null if not applicable
    • initializeCommands

      protected void initializeCommands()
      Description copied from class: AbstractSqlCmds
      Initialize vendor-specific commands. Subclasses must implement this to populate sqlCmdList.
      Specified by:
      initializeCommands in class AbstractSqlCmds
    • getStatementTypeForToken

      Description copied from interface: ISqlCmds
      Finds SQL command type for yacc parser integration. Used by vendor-specific yacc parsers to identify statement types.
      Specified by:
      getStatementTypeForToken in interface ISqlCmds
      Overrides:
      getStatementTypeForToken in class AbstractSqlCmds
      Parameters:
      token - Token to analyze
      Returns:
      SQL statement type, or sstunknown if not recognized
    • issql

      public TCustomSqlStatement issql(TSourceToken token, EFindSqlStateType state, TCustomSqlStatement currentStatement)
      Description copied from interface: ISqlCmds
      Identifies the SQL statement type from a token stream. This method is called repeatedly during parsing to identify statement boundaries and types in complex SQL scripts.
      Parameters:
      token - Current token being analyzed
      state - Current parsing state (start, in body, or in exception)
      currentStatement - Current statement being built (may be modified)
      Returns:
      The identified or modified SQL statement