Package sqlline
Class HighlightStyle
java.lang.Object
sqlline.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
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 asEMP
or"Employee table"
.org.jline.utils.AttributedStyle
getKeywordStyle()
Returns the style for a SQL keyword such asSELECT
orON
.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!'
.
-
Constructor Details
-
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 keywordscommandStyle
- Style for SQLLine commandsquotedStyle
- Style for SQL character literalsidentifierStyle
- Style for SQL identifierscommentStyle
- Style for SQL commentsnumberStyle
- Style for numeric valuesdefaultStyle
- Default style
-
-
Method Details
-
getKeywordStyle
public org.jline.utils.AttributedStyle getKeywordStyle()Returns the style for a SQL keyword such asSELECT
orON
.- 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 asEMP
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
-