Class MsCreateFunction


public final class MsCreateFunction extends MsBatchContextProcessor
Parser for Microsoft SQL CREATE FUNCTION statements. Handles both regular T-SQL functions and CLR functions with support for different function types (scalar, table-valued, multi-statement table-valued).
  • Constructor Details

    • MsCreateFunction

      public MsCreateFunction(TSQLParser.Batch_statementContext ctx, MsDatabase db, boolean ansiNulls, boolean quotedIdentifier, org.antlr.v4.runtime.CommonTokenStream stream, ISettings settings)
      Creates a parser for Microsoft SQL CREATE FUNCTION statements.
      Parameters:
      ctx - the batch statement context containing the function definition
      db - the Microsoft SQL database schema being processed
      ansiNulls - the ANSI_NULLS setting for the function
      quotedIdentifier - the QUOTED_IDENTIFIER setting for the function
      stream - the token stream for source code processing
      settings - parsing configuration settings
  • Method Details

    • parseObject

      public void parseObject()
      Description copied from class: ParserAbstract
      Parses a database object from the current context. Must be implemented by concrete subclasses to handle specific object types.
      Specified by:
      parseObject in class ParserAbstract<MsDatabase>
    • getObject

      public MsAbstractCommonFunction getObject(MsSchema schema, boolean isJdbc)
      Creates and configures the function object from the parse context. Handles both CLR external functions and regular T-SQL functions with appropriate analysis setup.
      Parameters:
      schema - the schema to add the function to
      isJdbc - whether this is being parsed in JDBC mode
      Returns:
      the created function object