クラス Tokenizer

java.lang.Object
com.github.vertical_blank.sqlformatter.core.Tokenizer

public class Tokenizer extends Object
  • コンストラクタの詳細

    • Tokenizer

      public Tokenizer(DialectConfig cfg)
      パラメータ:
      cfg - {String[]} cfg.reservedWords Reserved words in SQL {String[]} cfg.reservedTopLevelWords Words that are set to new line separately {String[]} cfg.reservedNewlineWords Words that are set to newline {String[]} cfg.stringTypes String types to enable: "", "", ``, [], N"" {String[]} cfg.openParens Opening parentheses to enable, like (, [ {String[]} cfg.closeParens Closing parentheses to enable, like ), ] {String[]} cfg.indexedPlaceholderTypes Prefixes for indexed placeholders, like ? {String[]} cfg.namedPlaceholderTypes Prefixes for named placeholders, like @ and : {String[]} cfg.lineCommentTypes Line comments to enable, like # and -- {String[]} cfg.specialWordChars Special chars that can be found inside of words, like @ and #
  • メソッドの詳細

    • tokenize

      public JSLikeList<Token> tokenize(String input)
      Takes a SQL string and breaks it into tokens. Each token is an object with type and value.
      パラメータ:
      input - input The SQL string
      戻り値:
      {Object[]} tokens An array of tokens.