Package sqlline

Class SqlLineOpts

java.lang.Object
sqlline.SqlLineOpts
All Implemented Interfaces:
org.jline.reader.Completer

public class SqlLineOpts
extends java.lang.Object
implements org.jline.reader.Completer
Session options.
  • Field Details

  • Constructor Details

  • Method Details

    • resetOptionCompleters

      public java.util.List<org.jline.reader.Completer> resetOptionCompleters()
    • setOptionCompleters

      public java.util.List<org.jline.reader.Completer> setOptionCompleters​(java.util.Map<BuiltInProperty,​java.util.Collection<java.lang.String>> customCompletions)
      Builds and returns Completers.RegexCompleter for !set command based on (in decreasing order of priority)
      Parameters:
      customCompletions - defines custom completions values per property
      Returns:
      a singleton list with a built RegexCompleter
    • helpCompleters

      public java.util.List<org.jline.reader.Completer> helpCompleters()
    • saveDir

      public static java.io.File saveDir()
      The save directory if HOME/.sqlline/ on UNIX, and HOME/sqlline/ on Windows.
      Returns:
      save directory
    • complete

      public void complete​(org.jline.reader.LineReader lineReader, org.jline.reader.ParsedLine parsedLine, java.util.List<org.jline.reader.Candidate> list)
      Specified by:
      complete in interface org.jline.reader.Completer
    • save

      public void save() throws java.io.IOException
      Throws:
      java.io.IOException
    • save

      public void save​(java.io.OutputStream out)
    • propertyNames

      public java.util.Set<java.lang.String> propertyNames()
    • toProperties

      public java.util.Properties toProperties()
    • toProperties

      public java.util.Properties toProperties​(boolean toSave)
    • load

      public void load() throws java.io.IOException
      Throws:
      java.io.IOException
    • load

      public void load​(java.io.InputStream fin) throws java.io.IOException
      Throws:
      java.io.IOException
    • loadProperties

      public void loadProperties​(java.util.Properties props)
    • setEmptyValue

      public boolean setEmptyValue​(java.lang.String key, boolean quiet)
    • set

      public void set​(java.lang.String key, java.lang.String value)
    • set

      public boolean set​(java.lang.String key, boolean value, boolean quiet)
    • set

      public boolean set​(java.lang.String key, java.lang.String value, boolean quiet)
    • hasProperty

      public boolean hasProperty​(java.lang.String name)
    • get

      public java.lang.String get​(SqlLineProperty key)
    • getChar

      public char getChar​(SqlLineProperty key)
    • getInt

      public int getInt​(SqlLineProperty key)
    • getBoolean

      public boolean getBoolean​(SqlLineProperty key)
    • isDefault

      public boolean isDefault​(SqlLineProperty property)
      Returns whether the property is its default value.

      This true if it has not been assigned a value, or if has been assigned a value equal to its default value.

      Parameters:
      property - Property
      Returns:
      whether property has its default value
    • get

      public java.lang.String get​(java.lang.String key)
    • set

      public void set​(SqlLineProperty key, java.lang.Object value)
    • getFastConnect

      public boolean getFastConnect()
    • getAutoCommit

      public boolean getAutoCommit()
    • getReadOnly

      public boolean getReadOnly()
    • getVerbose

      public boolean getVerbose()
    • getShowElapsedTime

      public boolean getShowElapsedTime()
    • getShowWarnings

      public boolean getShowWarnings()
    • getShowCompletionDescr

      public boolean getShowCompletionDescr()
    • getShowNestedErrs

      public boolean getShowNestedErrs()
    • getShowTypes

      public boolean getShowTypes()
    • getNumberFormat

      public java.lang.String getNumberFormat()
    • getEscapeOutput

      public boolean getEscapeOutput()
    • setNumberFormat

      public void setNumberFormat​(java.lang.String numberFormat)
    • getDateFormat

      public java.lang.String getDateFormat()
    • setDateFormat

      public void setDateFormat​(java.lang.String dateFormat)
    • getTimeFormat

      public java.lang.String getTimeFormat()
    • setTimeFormat

      public void setTimeFormat​(java.lang.String timeFormat)
    • getTimestampFormat

      public java.lang.String getTimestampFormat()
    • setTimestampFormat

      public void setTimestampFormat​(java.lang.String timestampFormat)
    • setShowCompletionDesc

      public void setShowCompletionDesc​(java.lang.String setShowCompletionDesc)
    • getNullValue

      public java.lang.String getNullValue()
    • getRowLimit

      public int getRowLimit()
    • getTimeout

      public int getTimeout()
    • getIsolation

      public java.lang.String getIsolation()
    • setIsolation

      public void setIsolation​(java.lang.String isolation)
    • getHistoryFile

      public java.lang.String getHistoryFile()
    • setHistoryFile

      public void setHistoryFile​(java.lang.String historyFile)
    • setColorScheme

      public void setColorScheme​(java.lang.String colorScheme)
    • getColorScheme

      public java.lang.String getColorScheme()
    • getColor

      public boolean getColor()
    • getConnectionConfig

      public java.lang.String getConnectionConfig()
    • setConnectionConfig

      public void setConnectionConfig​(java.lang.String filename)
    • getCsvDelimiter

      public java.lang.String getCsvDelimiter()
    • getCsvQuoteCharacter

      public char getCsvQuoteCharacter()
    • setMaxHistoryRows

      public void setMaxHistoryRows​(java.lang.String maxHistoryRows)
    • setMaxHistoryFileRows

      public void setMaxHistoryFileRows​(java.lang.String maxHistoryFileRows)
    • setCsvQuoteCharacter

      public void setCsvQuoteCharacter​(java.lang.String csvQuoteCharacter)
    • getShowHeader

      public boolean getShowHeader()
    • getHeaderInterval

      public int getHeaderInterval()
    • getForce

      public boolean getForce()
    • getIncremental

      public boolean getIncremental()
    • getIncrementalBufferRows

      public int getIncrementalBufferRows()
    • getSilent

      public boolean getSilent()
    • getAutosave

      @Deprecated public boolean getAutosave()
      Deprecated.
      Returns:
      true if auto save is on, false otherwise
    • getAutoSave

      public boolean getAutoSave()
    • getAutoPairing

      public boolean getAutoPairing()
    • setAutoPairing

      public void setAutoPairing​(java.lang.String newValue)
    • getAutoResize

      public boolean getAutoResize()
    • getShowLineNumbers

      public boolean getShowLineNumbers()
    • getOutputFormat

      public java.lang.String getOutputFormat()
    • getPrompt

      public java.lang.String getPrompt()
    • getRightPrompt

      public java.lang.String getRightPrompt()
    • getTrimScripts

      public boolean getTrimScripts()
    • getKeepSemicolon

      public boolean getKeepSemicolon()
    • getMaxHeight

      public int getMaxHeight()
    • getMaxWidth

      public int getMaxWidth()
    • getMaxColumnWidth

      public int getMaxColumnWidth()
    • getUseLineContinuation

      public boolean getUseLineContinuation()
    • getLiveTemplatesFile

      public java.lang.String getLiveTemplatesFile()
    • setLiveTemplatesFile

      public void setLiveTemplatesFile​(java.lang.String fileName)
    • getMode

      public java.lang.String getMode()
    • setMode

      public void setMode​(java.lang.String mode)
    • setOutputFormat

      public void setOutputFormat​(java.lang.String outputFormat)
    • setTableStyle

      public void setTableStyle​(java.lang.String tableStyle)
    • getTableStyle

      public java.lang.String getTableStyle()
    • getStrictJdbc

      public boolean getStrictJdbc()
    • getPropertiesFile

      public java.lang.String getPropertiesFile()
    • setPropertiesFile

      public void setPropertiesFile​(java.lang.String propertyFile)
    • setRun

      public void setRun​(java.lang.String runFile)
    • getRun

      public java.lang.String getRun()
    • getConfirm

      public boolean getConfirm()
    • getConfirmPattern

      public java.lang.String getConfirmPattern()
    • setConfirmPattern

      public void setConfirmPattern​(java.lang.String confirmPattern)
    • getCompiledConfirmPattern

      public java.util.regex.Pattern getCompiledConfirmPattern()
    • getHistoryFlags

      public java.lang.String getHistoryFlags()
    • getScriptEngine

      public java.lang.String getScriptEngine()
    • setScriptEngine

      public void setScriptEngine​(java.lang.String engineName)