Package sqlline

Class HighlightStyle


  • public class HighlightStyle
    extends java.lang.Object
    Class to specify colors and styles while highlighting.
    • Constructor Summary

      Constructors 
      Constructor Description
      HighlightStyle​(org.jline.utils.AttributedStyle keywordStyle, org.jline.utils.AttributedStyle commandStyle, org.jline.utils.AttributedStyle quotedStyle, org.jline.utils.AttributedStyle identifierStyle, org.jline.utils.AttributedStyle commentStyle, org.jline.utils.AttributedStyle numberStyle, org.jline.utils.AttributedStyle defaultStyle)
      Creates a HighlightStyle.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      org.jline.utils.AttributedStyle getCommandStyle()
      Returns the style for SQLLine commands.
      org.jline.utils.AttributedStyle getCommentStyle()
      Returns the style for a SQL comments, such as /* This is a comment */ or -- End of line comment.
      org.jline.utils.AttributedStyle getDefaultStyle()
      Returns the style for text that does not match any other style.
      org.jline.utils.AttributedStyle getIdentifierStyle()
      Returns the style for a SQL identifier, such as EMP or "Employee table".
      org.jline.utils.AttributedStyle getKeywordStyle()
      Returns the style for a SQL keyword such as SELECT or ON.
      org.jline.utils.AttributedStyle getNumberStyle()
      Returns the style for numeric literals.
      org.jline.utils.AttributedStyle getQuotedStyle()
      Returns the style for a SQL character literal, such as 'Hello, world!'.
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • HighlightStyle

        public HighlightStyle​(org.jline.utils.AttributedStyle keywordStyle,
                              org.jline.utils.AttributedStyle commandStyle,
                              org.jline.utils.AttributedStyle quotedStyle,
                              org.jline.utils.AttributedStyle identifierStyle,
                              org.jline.utils.AttributedStyle commentStyle,
                              org.jline.utils.AttributedStyle numberStyle,
                              org.jline.utils.AttributedStyle defaultStyle)
        Creates a HighlightStyle.
        Parameters:
        keywordStyle - Style for SQL keywords
        commandStyle - Style for SQLLine commands
        quotedStyle - Style for SQL character literals
        identifierStyle - Style for SQL identifiers
        commentStyle - Style for SQL comments
        numberStyle - Style for numeric values
        defaultStyle - Default style
    • Method Detail

      • getKeywordStyle

        public org.jline.utils.AttributedStyle getKeywordStyle()
        Returns the style for a SQL keyword such as SELECT or ON.
        Returns:
        Style for SQL keywords
      • getQuotedStyle

        public org.jline.utils.AttributedStyle getQuotedStyle()
        Returns the style for a SQL character literal, such as 'Hello, world!'.
        Returns:
        Style for SQL character literals
      • getIdentifierStyle

        public org.jline.utils.AttributedStyle getIdentifierStyle()
        Returns the style for a SQL identifier, such as EMP or "Employee table".
        Returns:
        Style for SQL identifiers
      • getCommentStyle

        public org.jline.utils.AttributedStyle getCommentStyle()
        Returns the style for a SQL comments, such as /* This is a comment */ or -- End of line comment.
        Returns:
        Style for SQL comments
      • getNumberStyle

        public org.jline.utils.AttributedStyle getNumberStyle()
        Returns the style for numeric literals.
        Returns:
        Style for numeric literals
      • getDefaultStyle

        public org.jline.utils.AttributedStyle getDefaultStyle()
        Returns the style for text that does not match any other style.
        Returns:
        Default style
      • getCommandStyle

        public org.jline.utils.AttributedStyle getCommandStyle()
        Returns the style for SQLLine commands.
        Returns:
        Command style