Overview

The plugin has a set of configuration settings available in Language & Frameworks section for KDB+ Q language:

optionsMain

All they are splat by categories for better orientation.

Console Options

Console options relating to all settings for Kdb Console.

Decimal Format

Allows defined some generator configuration flow displaying decimal numbers in the Console or the Table Result like:

  • Float precision - that defines how many numbers will be shown. Default value is 7.
  • Rounding Mode - if a decimal number has more digits when the number will be rounded. There are a few options that you can use here:
    • Up - Rounding mode to round away from zero.
    • Down - Rounding mode to round towards zero.
    • Ceiling - Rounding mode to round towards positive infinity.
    • Floor - Rounding mode to round towards negative infinity.
    • Half Up - Rounding mode to round towards “nearest neighbor” unless both neighbors are equidistant, in which case round up.
    • Half Down - Rounding mode to round towards “nearest neighbor” unless both neighbors are equidistant, in which case round down.
    • Half Even - Rounding mode to round towards the “nearest neighbor” unless both neighbors are equidistant, in which case, round towards the even neighbor.
  • Show decimals in scientific notation - shows all decimal numbers in scientific e-notation if it’s less than less or equal 10-5 or more or equal 107.

Table Options

Allows changing view of a Table Result, like table grid, index column, thousands’ separator and so on.

Execution Options

Log Queries

if enabled, when you execute a query in a console, your query is logged into .kdbinb folder of your project with an additional option (enabled by default) to split files by months folders.

optionsLogQuery

If slip is enabled, a log file will be stored in a directory the current year and month, like 2022.12:

.kdbinb
    /2022.11
        queries2022-11-01.log
        .
        queries2022-11-30.log
    /2022.12    
        queries2022-12-01.log
        .
        queries2022-12-31.log

If the option is disabled, all log files will be stored in root .kdbinb folder.

Each log file is splat by dates and each query has a header in format:

 <timestamp>, <instance uri>, <instance name>, <roundtrip, nanos>, <result type or error message>
 <Full query>
 <line separator>

and a simple log looks like:

/ 2022-12-02D16:37:09.822185100, `:localhost:5011, Local Instances/uat/RDB, 13662400, long
10+20

Normalize Query

When you load a script to KDB instance with \l xxx or system “l xxx” command, you can have no problems, but when you try to execute the same code from the editor, sometimes it fails.

It happens for two reasons:

  1. KDB interpreter doesn’t process load instructions (\l xxxx) and if the options are enabled, all load instructions are converted to system load calls (system “l xxx”)

  2. The issue is related to closing curly bracket indent placed on new line. Let’s suppose you have the following code:

.my.func1:{
}

.my.func2:{
}

this code will be loaded with no errors from a file but doesn’t work when you’ll try to execute it. We are not sure, is it the issue in KDB lib or expected behaviour, but closing curly bracket must have one space before and semicolon after:

.my.func1:{
 };

.my.func2:{
 };

if the option is enabled, the plug updates the code in the appropriate way as well to fix the issue.

As the option updates original code, it’s possible that something code go wrong. Please be careful with it.

Binding Strategy

When you have many open source files and many connections, probably that you work with all of these simultaneously and a legitimate question arises: how to manage a file with a connection?

The plugin provides three options here:

  • Manual binding - default options and editors are independent of active connection. That means when you change active connection or active editor tab, you have to make sure you are working with correct instance. In this mode you can also use manual binding button on the main toolbar:
    optionsBindConnection
    and when you open an editor with bound connection, the connection will be activated. If you open another tab without binding - active connection won’t be changed
  • Bind a tab to the connection - Each activated editor is binding to active connection and the connection will be selected each time when the editor is activated.
  • Bind a connection to the tab - When active connection is changed, new connection is binding to current editor and will be auto-selected each time when the tab is activated. No binding is happened if active connection is not changed.

Oversized response

The plugin checks the size of a response received from the server. There is nothing wrong with big responses, but as IDEA is Java-based application, the application has memory limits, you can easily get OutOfMemory, so the plugin shows a warning message if the response is more than a specified threshold:

optionsOversizedResponse

Please check tricks page to find out how to increase memory for IntelliJ IDEA

Inspector Options

Allows changing Inspector Options.