Table of Contents

Class ProcessorFactory

Namespace
gudusoft.gsqlparser.pp.processor
Assembly
gudusoft.gsqlparser.dll

a formattor para processor factory used for create the processor instance

@author zhoujun

public class ProcessorFactory
Inheritance
ProcessorFactory
Inherited Members

Methods

appendNewLineAfterAndBeforeReverseKeyWordProcessor(GFmtOpt, bool, string, string)

create the keyword in new line processor

public static AppendNewLineAfterAndBeforeReverseKeyWordProcessor appendNewLineAfterAndBeforeReverseKeyWordProcessor(GFmtOpt option, bool inNewLine, string startKeyword, string endKeyword)

Parameters

option GFmtOpt
inNewLine bool
startKeyword string
endKeyword string

Returns

AppendNewLineAfterAndBeforeReverseKeyWordProcessor

appendNewLineAfterReverseKeyWordProcessor(GFmtOpt, bool, string)

create the new line processor for item list

public static AppendNewLineAfterReverseKeyWordProcessor appendNewLineAfterReverseKeyWordProcessor(GFmtOpt option, bool isItemInNewLine, string keyword)

Parameters

option GFmtOpt

@return

isItemInNewLine bool
keyword string

Returns

AppendNewLineAfterReverseKeyWordProcessor

clear(string)

public static void clear(string sessionId)

Parameters

sessionId string

createAlignAliasProcessor(GFmtOpt, bool, TAlignStyle)

create the alias processor

public static AlignAliasProcessor createAlignAliasProcessor(GFmtOpt option, bool option2, TAlignStyle style)

Parameters

option GFmtOpt
option2 bool
style TAlignStyle

Returns

AlignAliasProcessor

instance

createAlterTableOptionAlignProcessor(GFmtOpt, bool)

public static AlterTableOptionItemAlignProcessor createAlterTableOptionAlignProcessor(GFmtOpt option, bool inNewLine)

Parameters

option GFmtOpt
inNewLine bool

Returns

AlterTableOptionItemAlignProcessor

createAppendLineAfterInsertTableNameProcessor(GFmtOpt)

create the processor used to append an new line after the table name

public static AppendLineAfterInsertTableNameProcessor createAppendLineAfterInsertTableNameProcessor(GFmtOpt option)

Parameters

option GFmtOpt

@return

Returns

AppendLineAfterInsertTableNameProcessor

createAppendLineAfterMergeTableNameProcessor(GFmtOpt)

public static AppendLineAfterMergeTableNameProcessor createAppendLineAfterMergeTableNameProcessor(GFmtOpt option)

Parameters

option GFmtOpt

Returns

AppendLineAfterMergeTableNameProcessor

createAppendNewLineBeforeKeyWordProcessor(GFmtOpt, bool, string, bool)

public static AppendNewLineBeforeKeyWordProcessor createAppendNewLineBeforeKeyWordProcessor(GFmtOpt option, bool inNewLine, string keyword, bool completely)

Parameters

option GFmtOpt
inNewLine bool
keyword string
completely bool

Returns

AppendNewLineBeforeKeyWordProcessor

createAppendNewLineBeforeReverseKeyWordProcessor(GFmtOpt, bool, string)

create the processor used to append new line before the keyword

public static AppendNewLineBeforeReverseKeyWordProcessor createAppendNewLineBeforeReverseKeyWordProcessor(GFmtOpt option, bool inNewLine, string keyword)

Parameters

option GFmtOpt
inNewLine bool
keyword string

@return

Returns

AppendNewLineBeforeReverseKeyWordProcessor

createBeginAndEndProcessor(GFmtOpt)

public static BeginAndEndProcessor createBeginAndEndProcessor(GFmtOpt opt)

Parameters

opt GFmtOpt

Returns

BeginAndEndProcessor

createCTEProcessor(GFmtOpt, bool?)

public static CTEProcessor createCTEProcessor(GFmtOpt option, bool? cteNewlineBeforeAs)

Parameters

option GFmtOpt
cteNewlineBeforeAs bool?

Returns

CTEProcessor

createCapitalisationProcessor(GFmtOpt)

create the processor used to capitalize the text

public static CapitalisationProcessor createCapitalisationProcessor(GFmtOpt option)

Parameters

option GFmtOpt

@return

Returns

CapitalisationProcessor

createCaseWhenProcessor(GFmtOpt, bool?, int?)

create the processor used to process the 'case when' paramters

public static CaseWhenProcessor createCaseWhenProcessor(GFmtOpt option, bool? caseWhenThenInSameLine, int? indentCaseFromSwitch)

Parameters

option GFmtOpt
caseWhenThenInSameLine bool?
indentCaseFromSwitch int?

@return

Returns

CaseWhenProcessor

createColumnlistCommaProcessor(GFmtOpt, TLinefeedsCommaOption, TAlignStyle)

create the comma processor

public static ColumnlistCommaProcessor createColumnlistCommaProcessor(GFmtOpt option, TLinefeedsCommaOption commaOption, TAlignStyle option2)

Parameters

option GFmtOpt
commaOption TLinefeedsCommaOption
option2 TAlignStyle

Returns

ColumnlistCommaProcessor

instance

createCombineWhitespaceAndClearReturnProcessor(GFmtOpt)

public static CombineWhitespaceAndClearReturnProcessor createCombineWhitespaceAndClearReturnProcessor(GFmtOpt opt)

Parameters

opt GFmtOpt

Returns

CombineWhitespaceAndClearReturnProcessor

createCreateFuncFirstParamInNewlineProcessor(GFmtOpt, bool?)

public static CreateFuncFirstParamInNewlineProcessor createCreateFuncFirstParamInNewlineProcessor(GFmtOpt opt, bool? beStyleFunctionFirstParamInNewline)

Parameters

opt GFmtOpt
beStyleFunctionFirstParamInNewline bool?

Returns

CreateFuncFirstParamInNewlineProcessor

createCreateFuncLeftBEProcessor(GFmtOpt, bool?, int?)

public static CreateFuncLeftBEProcessor createCreateFuncLeftBEProcessor(GFmtOpt opt, bool? beStyleFunctionLeftBEOnNewline, int? beStyleFunctionLeftBEIndentSize)

Parameters

opt GFmtOpt
beStyleFunctionLeftBEOnNewline bool?
beStyleFunctionLeftBEIndentSize int?

Returns

CreateFuncLeftBEProcessor

createCreateFuncReturnsTableProcessor(GFmtOpt)

public static CreateFuncReturnsTableProcessor createCreateFuncReturnsTableProcessor(GFmtOpt opt)

Parameters

opt GFmtOpt

Returns

CreateFuncReturnsTableProcessor

createCreateFuncRightBEProcessor(GFmtOpt, bool?, int?)

public static CreateFuncRightBEProcessor createCreateFuncRightBEProcessor(GFmtOpt opt, bool? beStyleFunctionRightBEOnNewline, int? beStyleFunctionRightBEIndentSize)

Parameters

opt GFmtOpt
beStyleFunctionRightBEOnNewline bool?
beStyleFunctionRightBEIndentSize int?

Returns

CreateFuncRightBEProcessor

createCreateFuncWSPaddingParenthesesProcessor(GFmtOpt)

public static CreateFuncWSPaddingParenthesesProcessor createCreateFuncWSPaddingParenthesesProcessor(GFmtOpt opt)

Parameters

opt GFmtOpt

Returns

CreateFuncWSPaddingParenthesesProcessor

createCreateTableBEInNewLineProcessor(GFmtOpt, bool?, bool?, bool?)

create the processor used to insert new line after the parenthesis

public static CreateTableBEInNewLineProcessor createCreateTableBEInNewLineProcessor(GFmtOpt option, bool? leftBEOnNewline, bool? rightBeOnNewline, bool? itemListInNewLine)

Parameters

option GFmtOpt
leftBEOnNewline bool?
rightBeOnNewline bool?

@return

itemListInNewLine bool?

Returns

CreateTableBEInNewLineProcessor

createCreateTableConstraintAlignProcessor(GFmtOpt)

public static CreateTableConstraintAlignProcessor createCreateTableConstraintAlignProcessor(GFmtOpt option)

Parameters

option GFmtOpt

Returns

CreateTableConstraintAlignProcessor

createCreateTableItemAlignProcessor(GFmtOpt, TAlignOption)

create the processor used to align the items

public static CreateTableItemAlignProcessor createCreateTableItemAlignProcessor(GFmtOpt option, TAlignOption alignOption)

Parameters

option GFmtOpt
alignOption TAlignOption

@return

Returns

CreateTableItemAlignProcessor

createCreateViewReturnProcessor(GFmtOpt)

public static CreateViewReturnProcessor createCreateViewReturnProcessor(GFmtOpt opt)

Parameters

opt GFmtOpt

Returns

CreateViewReturnProcessor

createDeclareVarItemAlignProcessor(GFmtOpt)

used to align the variable names

public static DeclareVarItemAlignProcessor createDeclareVarItemAlignProcessor(GFmtOpt option)

Parameters

option GFmtOpt

@return

Returns

DeclareVarItemAlignProcessor

createDeleteKeyWordAlignProcessor(GFmtOpt)

create the processor used to align the keywords in the delete statement

public static DeleteKeyWordAlignProcessor createDeleteKeyWordAlignProcessor(GFmtOpt option)

Parameters

option GFmtOpt

@return

Returns

DeleteKeyWordAlignProcessor

createDistinctKeyWordProcessor(GFmtOpt, bool)

create the distinct keyword processor

public static DistinctKeyWordProcessor createDistinctKeyWordProcessor(GFmtOpt option, bool isTreatDistinctAsVirtualColumn)

Parameters

option GFmtOpt
isTreatDistinctAsVirtualColumn bool

@return

Returns

DistinctKeyWordProcessor

createExecParaNewLineProcessor(GFmtOpt, bool?)

public static ExecParaNewLineProcessor createExecParaNewLineProcessor(GFmtOpt opt, bool? linebreakBeforeParamInExec)

Parameters

opt GFmtOpt
linebreakBeforeParamInExec bool?

Returns

ExecParaNewLineProcessor

createExpressionProcessor(GFmtOpt)

create the expression processor for all statements

public static ExpressionProcessor createExpressionProcessor(GFmtOpt option)

Parameters

option GFmtOpt

@return

Returns

ExpressionProcessor

createExpressionProcessor(GFmtOpt, bool?)

public static ExpressionProcessor createExpressionProcessor(GFmtOpt option, bool? isAndUnderWhere)

Parameters

option GFmtOpt
isAndUnderWhere bool?

Returns

ExpressionProcessor

createIfStmtBEProcessor(GFmtOpt)

public static IfStmtBEProcessor createIfStmtBEProcessor(GFmtOpt opt)

Parameters

opt GFmtOpt

Returns

IfStmtBEProcessor

createInsertKeyWordAlignProcessor(GFmtOpt)

create the processor used to align the keywords in insert statement

public static InsertKeyWordAlignProcessor createInsertKeyWordAlignProcessor(GFmtOpt option)

Parameters

option GFmtOpt

@return

Returns

InsertKeyWordAlignProcessor

createInsertOutputClauseProcessor(GFmtOpt)

public static InsertOutputClauseProcessor createInsertOutputClauseProcessor(GFmtOpt opt)

Parameters

opt GFmtOpt

Returns

InsertOutputClauseProcessor

createInsertValuesParenthsesAdjustProcessor(GFmtOpt)

create the processor used to adjust the left parenthesis

public static InsertValuesParenthsesAdjustProcessor createInsertValuesParenthsesAdjustProcessor(GFmtOpt option)

Parameters

option GFmtOpt

@return

Returns

InsertValuesParenthsesAdjustProcessor

createJoinOnProcessor(GFmtOpt, bool, bool)

create the join on processor for the select statement

public static JoinOnProcessor createJoinOnProcessor(GFmtOpt option, bool selectFromclauseJoinOnInNewline, bool alignJoinWithFromKeyword)

Parameters

option GFmtOpt
selectFromclauseJoinOnInNewline bool

@return

alignJoinWithFromKeyword bool

Returns

JoinOnProcessor

createMergeKeyWordAlignProcessor(GFmtOpt)

public static MergeKeyWordAlignProcessor createMergeKeyWordAlignProcessor(GFmtOpt option)

Parameters

option GFmtOpt

Returns

MergeKeyWordAlignProcessor

createMergeWhenClauseProcessor(GFmtOpt)

public static MergeWhenClauseProcessor createMergeWhenClauseProcessor(GFmtOpt option)

Parameters

option GFmtOpt

Returns

MergeWhenClauseProcessor

createPlsqlIfStmtBEProcessor(GFmtOpt)

public static PlsqlIfStmtBEProcessor createPlsqlIfStmtBEProcessor(GFmtOpt opt)

Parameters

opt GFmtOpt

Returns

PlsqlIfStmtBEProcessor

createReturnStmtProcessor(GFmtOpt)

public static ReturnStmtProcessor createReturnStmtProcessor(GFmtOpt opt)

Parameters

opt GFmtOpt

Returns

ReturnStmtProcessor

createSelectKeyWordAlignProcessor(GFmtOpt)

create the processor used to align the keywords in select statement

public static SelectKeyWordAlignProcessor createSelectKeyWordAlignProcessor(GFmtOpt option)

Parameters

option GFmtOpt

@return

Returns

SelectKeyWordAlignProcessor

createStmtListProcessor(GFmtOpt, string)

public static StmtListProcessor createStmtListProcessor(GFmtOpt opt, string alignKeyword)

Parameters

opt GFmtOpt
alignKeyword string

Returns

StmtListProcessor

createUnionProcessor(GFmtOpt)

create the union processor for the select statement

public static UnionProcessor createUnionProcessor(GFmtOpt option)

Parameters

option GFmtOpt

@return

Returns

UnionProcessor

createUpdateKeyWordAlignProcessor(GFmtOpt)

create the processor used to align the keywords in the update statement

public static UpdateKeyWordAlignProcessor createUpdateKeyWordAlignProcessor(GFmtOpt option)

Parameters

option GFmtOpt

@return

Returns

UpdateKeyWordAlignProcessor

create<E>(Type, GFmtOpt, params object[])

create a instance

public static E create<E>(Type type, GFmtOpt option, params object[] parameters) where E : AbstractProcessor

Parameters

type Type

@return

option GFmtOpt
parameters object[]

Returns

E

Type Parameters

E

newInstance<E>(Type)

create a new processor instance

public static E newInstance<E>(Type type) where E : AbstractProcessor

Parameters

type Type

the processor type

Returns

E

insteance

Type Parameters

E