diff --git a/docs/basics/cmdline.md b/docs/basics/cmdline.md index eb51153c4..9a010ddfb 100644 --- a/docs/basics/cmdline.md +++ b/docs/basics/cmdline.md @@ -307,7 +307,7 @@ and with `-q` Replicate from `:host:port`. :fontawesome-solid-book-open: -[`\r` system command](syscmds.md#r-replication-master) +[`\r` system command](syscmds.md#r-replication-primary) ## `-s` (secondary threads) diff --git a/docs/basics/comparison.md b/docs/basics/comparison.md index b8a28995a..b2933d505 100644 --- a/docs/basics/comparison.md +++ b/docs/basics/comparison.md @@ -73,39 +73,102 @@ q)(1 + 1e-13) = 1 ## Temporal values +Below is a matrix of the [type](datatypes.md) used when the temporal types differ in a comparison (note: you may need to scroll to the right to view the full table): + +| comparison types | **timestamp** | **month** | **date** | **datetime** | **timespan** | **minute** | **second** | **time** | +| --- | --- | --- | --- | --- | --- | --- | --- | --- | +| **timestamp** | _timestamp_ | _timestamp_ | _timestamp_ | _timestamp_ | _timespan_ | _minute_ | _second_ | _time_ | +| **month** | _timestamp_ | _month_ | _date_ | _not supported_ | _not supported_ | _not supported_ |_not supported_ | _not supported_ | +| **date** | _timestamp_ | _date_ | _date_ | _datetime_ | _not supported_ | _not supported_ |_not supported_ | _not supported_ | +| **datetime** | _timestamp_ | _not supported_ | _datetime_ | _datetime_ | _timespan_ | _minute_ | _second_ | _time_ | +| **timespan** | _timespan_ | _not supported_ | _not supported_ | _timespan_ | _timespan_ | _timespan_ | _timespan_ | _timespan_ | +| **minute** | _minute_ | _not supported_ | _not supported_ | _minute_ | _timespan_ | _minute_ | _second_ | _time_ | +| **second** | _second_ | _not supported_ | _not supported_ | _second_ | _timespan_ | _second_ | _second_ | _time_ | +| **time** | _time_ | _not supported_ | _not supported_ | _time_ | _timespan_ | _time_ | _time_ | _time_ | + +For example +```q +q)20:00:00.000603286 within 13:30 20:00t / comparison of timespan and time, time converted to timespan values 0D13:30:00.000000000 0D20:00:00.000000000 +0b +q)2024.10.07D20:00:00.000603286 within 13:30 20:00t / comparison of timestamp and time, timestamp converted to time value 20:00:00.000 +1b +``` + Particularly notice the comparison of ordinal with cardinal datatypes, such as timestamps with minutes. ```q q)times: 09:15:37 09:29:01 09:29:15 09:29:15 09:30:01 09:35:27 -q)spans:`timespan$times / timespans: cardinal -q)stamps:.z.D+times / timestamps: ordinal -q)t:09:29 / minute: cardinal +q)tab:([] timeSpan:`timespan$times; timeStamp:.z.D+times) +q)meta tab +c | t f a +---------| ----- +timeSpan | n +timeStamp| p ``` -When comparing ordinals with cardinals, ordinal is converted to the cardinal type first: `stamps=t` is equivalent to ``(`minute$stamps)=t`` and thus +When comparing `timestamp` with `minute`, the timestamps are converted to minutes such that `` `minute$2024.11.01D09:29:15.000000000 `` becomes `09:29` and therefore doesn't appear in the output: ```q -q)(stampst) -100000b +q)select from tab where timeStamp>09:29 / comparing timestamp with minute +timeSpan timeStamp +-------------------------------------------------- +0D09:30:01.000000000 2016.09.06D09:30:01.000000000 +0D09:35:27.000000000 2016.09.06D09:35:27.000000000 +``` + +When comparing `timespan` with `minute`, the minute is converted to timespan such that `09:29` becomes `0D09:29:00.000000000` for the following comparison: + +```q +q)select from tab where timeSpan>09:29 / comparing timespan with minute +timeSpan timeStamp +-------------------------------------------------- +0D09:29:01.000000000 2016.09.06D09:29:01.000000000 +0D09:29:15.000000000 2016.09.06D09:29:15.000000000 +0D09:29:15.000000000 2016.09.06D09:29:15.000000000 +0D09:30:01.000000000 2016.09.06D09:30:01.000000000 +0D09:35:27.000000000 2016.09.06D09:35:27.000000000 +``` + +Therefore, when comparing ordinals with cardinals (i.e. timestamp with minute), ordinal is converted to the cardinal type first. + +For example: +```q +q)select from tab where timeStamp=09:29 +timeSpan timeStamp +-------------------------------------------------- +0D09:29:01.000000000 2016.09.06D09:29:01.000000000 +0D09:29:15.000000000 2016.09.06D09:29:15.000000000 +0D09:29:15.000000000 2016.09.06D09:29:15.000000000 + +q)tab.timeStamp=09:29 011100b -000011b -q)(spanst) +``` + +is equivalent to + +```q +q)(`minute$tab.timeStamp)=09:29 +011100b +``` +and thus +```q +q)tab.timeStamp<09:29 100000b -000000b -011111b +q)tab.timeStamp>09:29 +000011b ``` -:fontawesome-solid-graduation-cap: -[Comparing temporals](../kb/temporal-data.md#comparing-temporals) -
:fontawesome-solid-street-view: _Q for Mortals_ [§4.9.1 Temporal Comparison](/q4m3/4_Operators/#491-temporal-comparison) +## Floating point + +The comparison of floating-point types are discussed in [`comparison tolerance`](precision.md#comparison-tolerance). ## Different types -The comparison operators also work on text values (characters, symbols) – not always intuitively. +The comparison operators also work on text values (characters, symbols). ```q q)"0" < ("4"; "f"; "F"; 4) / characters are treated as their numeric value @@ -141,7 +204,6 @@ q)n < neg inf 11111b ``` - ## Infinities Infinities of different type are ordered by their width. @@ -178,9 +240,6 @@ Keyword [`differ`](../ref/differ.md) is a uniform unary function that returns a [Match](../ref/match.md) (`~`) compares its arguments and returns a boolean atom to say whether they are the same. -:fontawesome-solid-book: -[Comparison tolerance](precision.md#comparison-tolerance) -
:fontawesome-solid-street-view: _Q for Mortals_ [§4.3.3 Order](/q4m3/4_Operators/#433-order) diff --git a/docs/basics/precision.md b/docs/basics/precision.md index fc1d904e3..6b4e4bcfc 100644 --- a/docs/basics/precision.md +++ b/docs/basics/precision.md @@ -10,7 +10,7 @@ keywords: comparison, float, precision, tolerance ## Float precision -Precision of floats is a tricky issue since floats (_doubles_ in other languages) are actually binary rational approximations to real numbers. Whenever you are concerned with precision, set `\P 0` before doing anything else, so that you can see what’s really going on. +Precision of floats is a complex issue because floats (known as _doubles_ in other programming languages) are actually binary rational approximations of real numbers. If you are concerned with precision, make sure to set [`\P 0`](syscmds.md#p-precision) before proceeding with anything else. This helps you understand what's really happening with your data. Due to the finite accuracy of the binary representation of floating-point numbers, the last decimal digit of a float is not reliable. This is not peculiar to kdb+. @@ -22,7 +22,7 @@ q)1%3 Efficient algorithms for complex calculations such as log and sine introduce imprecision. Moreover, even basic calculations raise issues of rounding. The IEEE floating-point spec addresses many such issues, but the topic is complex. -Q takes this into account in its implementation of the equality operator `=`, which should actually be read as “tolerantly equal.” Roughly speaking, this means that the difference is relatively small compared to some acceptable representation error. This makes the following hold: +Q takes this into account in its implementation of the equality operator [`=`](comparison.md), which should actually be read as “tolerantly equal.” Roughly speaking, this means that the difference is relatively small compared to some acceptable representation error. This makes the following hold: ```q q)r7:1%7 @@ -102,7 +102,7 @@ The l64 builds of kdb+ now have a faster SIMD [`sum`](../ref/sum.md) implementat Consider the task of calculating the sum of `1e-10*til 10000000`. -The SIMD code is equivalent to the following (`\P 0`): +The SIMD code is equivalent to the following ([`\P 0`](syscmds.md#p-precision)): ```q q){x+y}over{x+y}over 0N 8#1e-10*til 10000000 @@ -280,4 +280,4 @@ These do not use comparison tolerance, and are therefore appropriate for databas :fontawesome-regular-hand-point-right: [Comparison](comparison.md), -[Match](../ref/match.md), [`differ`](../ref/differ.md) \ No newline at end of file +[Match](../ref/match.md), [`differ`](../ref/differ.md) diff --git a/docs/basics/syscmds.md b/docs/basics/syscmds.md index c7a757c90..bf5cf2d7f 100644 --- a/docs/basics/syscmds.md +++ b/docs/basics/syscmds.md @@ -25,7 +25,7 @@ keywords: command, kdb+, q, system [\o offset from UTC](#o-offset-from-utc) [\\_ hide q code](#_-hide-q-code) [\p listening port](#p-listening-port) [\\ terminate](#terminate) [\P precision](#p-precision) [\\ toggle q/k](#toggle-qk) -[\r replication master](#r-replication-primary) [\\\\ quit](#quit) +[\r replication primary](#r-replication-primary) [\\\\ quit](#quit) [\r rename](#r-rename) diff --git a/docs/database/mdb-odbc.md b/docs/database/mdb-odbc.md index 4de022bd5..8656fd6a7 100644 --- a/docs/database/mdb-odbc.md +++ b/docs/database/mdb-odbc.md @@ -6,30 +6,29 @@ date: November 2020 # :fontawesome-brands-windows: Access a table from an MDB file via ODBC +Install the [ODBC client driver for kdb+](../interfaces/q-client-for-odbc.md). +Install Microsoft ODBC driver for Microsoft Access. -From Windows, load `odbc.k` into your q session, and then load the MDB file. +Using the driver installed, a MDB file can be opened using the following example command: -```powershell -C:>q w32\odbc.k -``` ```q -q)h: .odbc.load `mydb.mdb +q)h:.odbc.open "driver=Microsoft Access Driver (*.mdb, *.accdb);dbq=C:\\mydb.mdb" ``` -This loads the entire database, which may consist of several tables. Use `.odbc.tables` to list the tables. +!!! note "The name of the driver may differ between versions. The command above should be altered to reflect the driver name installed." + +Use [`.odbc.tables`](../interfaces/q-client-for-odbc.md#tables) to list the tables. ```q q).odbc.tables h `aa`bb`cc`dd`ii`nn ``` -Use `.odbc.eval` to evaluate SQL commands via ODBC. +Use [`.odbc.eval`](../interfaces/q-client-for-odbc.md#eval) to evaluate SQL commands via ODBC. ```q q).odbc.eval[h;"select * from aa"] ``` ---- -:fontawesome-solid-handshake: -[Q driver for ODBC3](../interfaces/q-server-for-odbc3.md) \ No newline at end of file +An alternative to querying through SQL is to load the entire database into kdb+ via the [.odbc.load](../interfaces/q-client-for-odbc.md#load) command, where the data can then be queried using kdb+ directly. diff --git a/docs/interfaces/capiref.md b/docs/interfaces/capiref.md index 1ff10f134..749ef564f 100644 --- a/docs/interfaces/capiref.md +++ b/docs/interfaces/capiref.md @@ -885,7 +885,7 @@ Increment an object‘s reference count. V sd0(I d) ``` -Remove the callback on `d` and call `kclose`. +Remove the callback on `d` and call `kclose`. Should only be called from main thread. Shared library only. @@ -896,9 +896,9 @@ Shared library only. V sd0x(I d, I f) ``` -Remove the callback on `d` and call `kclose` on `d` if `f` is 1. +Remove the callback on `d` and call `kclose` on `d` if `f` is 1. Should only be called from main thread. -Shared library only. Since V3.0 2013.04.04. +Shared library only. Ssince V3.0 2013.04.04. ### `sd1` (set function on loop) @@ -907,19 +907,21 @@ Shared library only. Since V3.0 2013.04.04. K sd1(I d, f) ``` -Put the function `K f(I d){…}` on the q main event loop given a socket `d`. +Put the function `K f(I d){…}` on the q main event loop given a socket `d`. Should only be called from main thread. If `d` is negative, the socket is switched to non-blocking. -The function `f` should return `NULL` or a pointer to a K object, and its reference count will be decremented. -(It is the return value of `f` that will be `r0`’d – and only if not null.) +The function `f` should return `NULL` or a pointer to a K object. +If the return value of `f` is a pointer to a K object, its reference count is decremented i.e. passed to [`r0`](#r0-decrement-refcount). -Shared library only. -On success, returns int K object containing `d`. On error, `NULL` is returned, `d` is closed. +On success, `sd1` returns a K object of type integer, containing `d`. On error, `NULL` is returned and `d` is closed. + Since 4.1t 2023.09.15, sd1 no longer imposes a limit of 1023 on the value of the descriptor submitted. +Shared library only. + :fontawesome-regular-hand-point-right: [Callbacks](c-client-for-q.md#callbacks) diff --git a/docs/interfaces/q-client-for-odbc.md b/docs/interfaces/q-client-for-odbc.md index be37a5689..f6ddf30ad 100644 --- a/docs/interfaces/q-client-for-odbc.md +++ b/docs/interfaces/q-client-for-odbc.md @@ -5,12 +5,8 @@ keywords: api, interface, kdb+, library, odbc, q --- # :fontawesome-solid-database: Q client for ODBC - - - In Windows and Linux, you can use ODBC to connect to a non-kdb+ database from q. - ## Installation To install, download @@ -47,7 +43,7 @@ This returns a connection handle, which is used for subsequent ODBC calls: ```q q)\l odbc.k -q)h:.odbc.open `northwind / open northwind database +q)h:.odbc.open "dsn=northwind" / use DSN to connect northwind database q).odbc.tables h / list tables `Categories`Customers`Employees`Order Details`Orders`Products.. q).odbc.eval[h;"select * from Orders"] / run a select statement @@ -61,7 +57,7 @@ OrderID CustomerID EmployeeID OrderDate RequiredDate.. Alternatively, use `.odbc.load` to load the entire database into q: ```q q)\l odbc.k -q).odbc.load `northwind / load northwind database +q).odbc.load "dsn=northwind" / load northwind database q)Orders OrderID| CustomerID EmployeeID OrderDate RequiredDate .. -------| ----------------------------------------------.. @@ -88,14 +84,26 @@ Functions defined in the `.odbc` context: Closes an ODBC connection handle: ```q -q).odbc.close h +.odbc.close x ``` +Where x is the connection value returned from [`.odbc.open`](#open). ### `eval` Evaluate a SQL expression: +```q +.odbc.eval[x;y] +``` + +Where + +* x is either + * the connection value returned from [`.odbc.open`](#open). + * a 2 item list containing the connection value returned from [`.odbc.open`](#open), and a timeout (long). +* y is the statement to execute on the data source. + ```q q)sel:"select CompanyName,Phone from Customers where City='London'" q)b:.odbc.eval[h;sel] @@ -113,6 +121,7 @@ CompanyName Phone ------------------------------------- "B's Beverages" "(171) 555-1212" "Seven Seas Imports" "(171) 555-1717" +q)b:.odbc.eval[(h;5);sel) / same query with 5 second timeout ``` @@ -121,7 +130,13 @@ CompanyName Phone Loads an entire database into the session: ```q -q).odbc.load `northwind +.odbc.load x +``` + +Where x is the same parameter defintion as that passed to [`.odbc.open`](#open). + +```q +q).odbc.load "dsn=northwind" q)\a `Categories`Customers`Employees`OrderDetails`Orders`Products`Shippers`Supplie.. q)Shippers @@ -135,19 +150,54 @@ ShipperID| CompanyName Phone ### `open` -Open a connection to a database, returning an ODBC connection handle. For example: +Open a connection to a database. ```q -q)h:.odbc.open `northwind -q)h -77932560 +.odbc.open x ``` +Where x is a + +* string representing an ODBC connection string. Can include DSN and various driver/vendor defined values. For example: + ```q + q)h:.odbc.open "dsn=kdb" + q)h:.odbc.open "driver=Microsoft Access Driver (*.mdb, *.accdb);dbq=C:\\CDCollection.mdb" + q)h:.odbc.open "dsn=kdb;uid=my_username;pwd=my_password" + ``` +* mixed list of connection string and timeout (long). For example: + ```q + q)h:.odbc.open ("dsn=kdb;";60) + ``` +* symbol representing a DSN. The symbol value may end with the following supported values for shortcut operations: + * `.dsn` is a shortcut for file DSN. For example: + ```q + h:.odbc.open `test.dsn / uses C:\Program Files\Common Files\odbc/data source\test.dsn on windows + / and /etc/ODBCDataSources/test.dsn on linux + ``` + * `.mdb` is a shortcut for the Microsoft Access driver. For example: + ```q + q)h:.odbc.open `$"C:\\CDCollection.mdb" / resolves to "driver=Microsoft Access Driver (*.mdb);dbq=C:\\CDCollection" + ``` + Note that the driver name above must match the driver installed. If the driver name differs, an alternative is to the use a string value rather than this shortcut. + * `.mdf` is a shortcut for the SQL Server driver. For example: + ```q + q)h:.odbc.open `my_db.mdf / resolves to "driver=sql server;server=(local);trusted_connection=yes;database=my_db" + ``` + Note that the driver name above must match the driver installed. If the driver name differs, an alternative is to the use a string value rather than this shortcut. +* list of three symbols. First symbol represents the DSN, the second is the username, and the third symbol is for password. + +Returns an ODBC connection handle. ### `tables` List tables in database: +```q +.odbc.tables x +``` + +Where x is the connection value returned from [`.odbc.open`](#open). + ```q q).odbc.tables h `Categories`Customers`Employees`Order Details`Orders`Products... @@ -158,6 +208,12 @@ q).odbc.tables h List views in database: +```q +.odbc.views x +``` + +Where x is the connection value returned from [`.odbc.open`](#open). + ```q q).odbc.views h `Alphabetical List of Products`Category Sales for 1997`Current... diff --git a/docs/interfaces/q-server-for-odbc3.md b/docs/interfaces/q-server-for-odbc3.md index 83128100a..113cd0ccc 100644 --- a/docs/interfaces/q-server-for-odbc3.md +++ b/docs/interfaces/q-server-for-odbc3.md @@ -154,6 +154,11 @@ Also, SQL selects from partitioned tables are not supported – one should pre-s `test.q` provides additional examples of SQL usage, including the create/insert/update/delete statement syntax. +## Custom authentication + +Custom authentication is supported, allowing the username and password specified in a DSN or connection string to be transformed by a user-defined function. +See `customauth.txt` in the [qodbc3.zip](https://github.com/KxSystems/kdb/blob/master/c/qodbc3.zip) for details. + ## Debugging ODBC implementations provide a tracing capability to log interactions with an ODBC driver. This can aid in diagnosing any issues. Tracing can have a detremental @@ -184,6 +189,21 @@ powershell da8-9a0 EXIT SQLGetData with return code 0 (SQL_SUCCESS) SQLLEN * 0x000000DAA198E160 (2) ``` +Note that Windows ODBC tracing can present a misleading invalid length error for connections that are null-terminated. +The `-3` (SQL_NTS) length value is used by ODBC to indicate a null-terminated string. + +```txt +powershell 127c-12c4 EXIT SQLDriverConnectW with return code 0 (SQL_SUCCESS) + HDBC 0x0000028E2F1EDAD0 + HWND 0x0000000000000000 + WCHAR * 0x00007FF9A40772C0 [ -3] "******\ 0" + SWORD -3 + WCHAR * 0x00007FF9A40772C0 [-3] + SWORD -3 + SWORD * 0x0000000000000000 + UWORD 0 +``` + Please ensure tracing is disabled after debugging complete. ### Linux diff --git a/docs/kb/temporal-data.md b/docs/kb/temporal-data.md index c43a7fc87..d7b863452 100644 --- a/docs/kb/temporal-data.md +++ b/docs/kb/temporal-data.md @@ -5,11 +5,6 @@ keywords: data, kdb+, q, temporal --- # How to handle temporal data in q - - - - - ## Stepped attribute In traditional RDMSs temporal changes in data are often represented by adding valid-time-interval information to each relationship, usually achieved by adding start and end columns to the relational tables. This approach is often wasteful because in many cases the end of each interval is the start of the next leading to a lot of repetition. Q offers a better alternative. Recall that adding an `` `s `` attribute to a dictionary makes it behave as a step function. @@ -101,63 +96,7 @@ To update such a dict, remove the `` `s`` attribute, upsert, and add the `` `s`` ## Comparing temporals -Particularly notice the comparison of ordinal with cardinal datatypes, such as timestamps with minutes. - -```q -q)times: 09:15:37 09:29:01 09:29:15 09:29:15 09:30:01 09:35:27 - -q)tab:([] timeSpan:`timespan$times; timeStamp:.z.D+times) -q)meta tab -c | t f a ----------| ----- -timeSpan | n -timeStamp| p - -q)select from tab where timeStamp>09:29 -timeSpan timeStamp --------------------------------------------------- -0D09:30:01.000000000 2016.09.06D09:30:01.000000000 -0D09:35:27.000000000 2016.09.06D09:35:27.000000000 - -q)select from tab where timeSpan>09:29 -timeSpan timeStamp --------------------------------------------------- -0D09:29:01.000000000 2016.09.06D09:29:01.000000000 -0D09:29:15.000000000 2016.09.06D09:29:15.000000000 -0D09:29:15.000000000 2016.09.06D09:29:15.000000000 -0D09:30:01.000000000 2016.09.06D09:30:01.000000000 -0D09:35:27.000000000 2016.09.06D09:35:27.000000000 -``` - -It looks like the timestamp filter is searching for any _minute_ greater than `09:29`, while the timespan is returning any _times_ that are greater than `09:29`. - -When comparing ordinals with cardinals (i.e. timestamp with minute), ordinal is converted to the cardinal type first. E.g. in - -```q -q)select from tab where timeStamp=09:29 -timeSpan timeStamp --------------------------------------------------- -0D09:29:01.000000000 2016.09.06D09:29:01.000000000 -0D09:29:15.000000000 2016.09.06D09:29:15.000000000 -0D09:29:15.000000000 2016.09.06D09:29:15.000000000 - -q)tab.timeStamp=09:29 -011100b -``` - -is equivalent to - -```q -q)(`minute$tab.timeStamp)=09:29 -011100b -``` -and thus -```q -q)tab.timeStamp<09:29 -100000b -q)tab.timeStamp>09:29 -000011b -``` +Note the [comparison of ordinal with cardinal datatypes](../basics/comparison.md#temporal-values), particularly when the types differ. :fontawesome-solid-book-open: [Comparison](../basics/comparison.md) diff --git a/docs/ref/cast.md b/docs/ref/cast.md index 996644dc2..d46cca09c 100644 --- a/docs/ref/cast.md +++ b/docs/ref/cast.md @@ -41,7 +41,7 @@ Where `x` is: - **`0h` or `"*"`**, and `y` is not a string, returns `y` ([Identity](#identity)) -- an **upper-case letter** or a **negative short int**, see [Tok](tok.md) +- an **upper-case letter** or a **negative short int** interprets the value from a string, see [Tok](tok.md) Casting does not change the underlying bit pattern of the data, only how it is represented. diff --git a/docs/ref/dotz.md b/docs/ref/dotz.md index b4120a7bd..c1011ca58 100644 --- a/docs/ref/dotz.md +++ b/docs/ref/dotz.md @@ -70,24 +70,45 @@ The IP address as a 32-bit integer ```q q).z.a --1062731737i +-1408172030i +``` + +Note its relationship to [`.z.h`](#zh-host) for the hostname, converted to an int using [`.Q.addr`](dotq.md#host-ip-to-hostname). +```q +q).Q.addr .z.h +-1408172030i ``` It can be split into components as follows: ```q q)"i"$0x0 vs .z.a -127 0 0 1 +172 17 0 2i ``` -!!! warning "Callbacks" +When invoked inside a `.z.p*` callback via a TCP/IP connection, it is the IP address of the client session, not the current session. For example, connecting from a remote machine: - When invoked inside a `.z.p*` callback via a TCP/IP connection, it is the IP address of the client session, not the current session. +```q +q)h:hopen myhost:1234 +q)h"\"i\"$0x0 vs .z.a" +192 168 65 1i +``` +or from same machine: +```q +q)h:hopen 1234 +q)h"\"i\"$0x0 vs .z.a" +127 0 0 1i +``` - When invoked via a Unix Domain Socket, it is 0. +When invoked via a Unix Domain Socket, it is 0. +```q +q)h:hopen `:unix://1234 +q)h".z.a" +0i +``` :fontawesome-solid-hand-point-right: -[`.z.h`](#zh-host) (host) +[`.z.h`](#zh-host) (host), [`.Q.host`](dotq.md#host-ip-to-hostname) (IP to hostname) ## `.z.ac` (HTTP auth) @@ -355,7 +376,7 @@ q).Q.host .z.a ``` :fontawesome-solid-hand-point-right: -[`.z.a`](#za-ip-address) (IP address) +[`.z.a`](#za-ip-address) (IP address), [`.Q.addr`](dotq.md#addr-iphost-as-int) (IP/host as int) ## `.z.i` (PID) diff --git a/docs/ref/index.md b/docs/ref/index.md index 8f336ca73..2e45874bb 100644 --- a/docs/ref/index.md +++ b/docs/ref/index.md @@ -152,7 +152,7 @@ author: Stephen Taylor [`-p`](../basics/cmdline.md#-p-listening-port) [`\p`](../basics/syscmds.md#p-listening-port)listening port[`\_`](../basics/syscmds.md#_-hide-q-code)hide q code [`-P`](../basics/cmdline.md#-p-display-precision) [`\P`](../basics/syscmds.md#p-precision)display precision[`\`](../basics/syscmds.md#terminate)terminate [`-q`](../basics/cmdline.md#-q-quiet-mode)quiet mode[`\`](../basics/syscmds.md#toggle-qk)toggle q/k -[`-r`](../basics/cmdline.md#-r-replicate) [`\r`](../basics/syscmds.md#r-replication-master)replicate[`\\`](../basics/syscmds.md#quit)quit +[`-r`](../basics/cmdline.md#-r-replicate) [`\r`](../basics/syscmds.md#r-replication-primary)replicate[`\\`](../basics/syscmds.md#quit)quit :fontawesome-solid-book: diff --git a/docs/ref/tok.md b/docs/ref/tok.md index 263690152..6b2767217 100644 --- a/docs/ref/tok.md +++ b/docs/ref/tok.md @@ -26,7 +26,6 @@ returns `y` as an atom value interpreted according to `x`. q){([result:key'[x$\:()]];short:neg x;char:upper .Q.t x)}5h$where" "<>20#.Q.t result | short char ---------| ---------- -string | 0 * boolean | -1 B guid | -2 G byte | -4 X diff --git a/docs/wp/surveillance-latency/index.md b/docs/wp/surveillance-latency/index.md index ed5ad0c31..e4727ef63 100644 --- a/docs/wp/surveillance-latency/index.md +++ b/docs/wp/surveillance-latency/index.md @@ -465,7 +465,7 @@ includeEachLoopTest | Boolean to toggle on or off the running of the perfo replayFinishTime | If set, only data up to this timestamp will be replayed. Otherwise, 5 minutes of data will be replayed. intradayFrequency | 0 for realTime, 1, 5 or 10 for the number of minutes to run intraday. This test has 4 alert engines running. `99` to run all execution points (all 16 alert engines). Defaults to 1. -These options can be set when starting the master kdb+ process, for +These options can be set when starting the primary kdb+ process, for example: ```bash