pq.q

The session itself: version, open connections, terminal size and colour support. Loaded by \l pq.

Examples

.pq.version
select handle, alias from .pq.conns[]

Entity Summary

EntitiesShort Description
.pq.cancolor[x]Whether stdout should carry ANSI colour: PEACHQ_COLORS=0/1 overrides everything, then NO_COLOR (off), FORCE_COLOR (on), else a tty whose TERM is not dumb.
.pq.conns[]Every open connection, one row each.
.pq.dr[verb]Print a verb's domain and range grid in the layout the KX reference pages use, probed by casting a sample of every type: a lower-case letter is an atom result, upper-case a list, "." an error.
.pq.termsize[x]The live terminal size, with the 25/80 fallback and [10,2000] clamp that \c 0N uses.
.pq.versionThe peachq version string.

Entity Details

.pq.cancolor[x]

Whether stdout should carry ANSI colour: PEACHQ_COLORS=0/1 overrides everything, then NO_COLOR (off), FORCE_COLOR (on), else a tty whose TERM is not dumb.

Return: boolean

Examples

.pq.cancolor[]

.pq.conns[]

Every open connection, one row each. The single-letter columns p f z n m are the -38! names so kdb code ports.

Columns:
  • alias - the :pq: alias, when the connection opened with one
  • handle - what hclose takes: the alias symbol of a :pq: provider, else the fd int

Examples

.pq.conns[]

.pq.dr[verb]

Print a verb's domain and range grid in the layout the KX reference pages use, probed by casting a sample of every type: a lower-case letter is an atom result, upper-case a list, "." an error.

Parameters:
  • verb - a symbol or char naming a verb in .Q.ops[], or a function

Examples

.pq.dr `neg
.pq.dr "+"

.pq.termsize[x]

The live terminal size, with the 25/80 fallback and [10,2000] clamp that \c 0N uses.

Return: (rows;cols)

Examples

.pq.termsize[]