Module kdb_c_api::native[][src]

Expand description

This module exposes bare C API functions. As most of them are provided with a “safe” wrapper function with an intuitive name and intuitive implementation for Rust, there is no gain to darely use these functions.

The only exceptions are k and knk which are not provided with a “safe” wrapper because these functions are using elipsis (...) as their argument.

Functions

b9

Serialize q object and return serialized q byte list object on success: otherwise null. Mode is either of:

d9

Deserialize a bytes into q object.

dj

Convert days from 2000.01.01 to a number expressed as yyyymmdd.

dl

Load C function as q function (K object).

dot

Apply a function to q list object .[func; args].

ee

Capture (and reset) error string into usual error object.

ja

Add a raw value to a q simple list and returns a pointer to the (potentially reallocated) K object.

jk

Add a q object to a q compound list. Returns a pointer to the (potentially reallocated) K object.

js

Add an internalized char array to a symbol list. Returns a pointer to the (potentially reallocated) K object.

jv

Append a q list object to a q list. Returns a pointer to the (potentially reallocated) K object.

k

Send a text query or evaluate the text query in a process which are loading the shared library. As this library is purposed to build shared object, the only choice of socket is 0. This executes against the kdb+ process in which it is loaded.

ka

Creates an atom of the specified type.

kb

Constructor of q bool object.

kc

Constructor of q char object.

kd

Constructor of q date object.

ke

Constructor of q real object.

kf

Constructor of q float object.

kg

Constructor of q byte object.

kh

Constructor of q short object.

ki

Constructor of q int object.

kj

Constructor of q long object.

knk

Constructor of q compound list.

knt

Constructor of q keyed table object.

kp

Constructor of q string object.

kpn

Constructor if q string object with a fixed length.

krr

Constructor of q error.

ks

Constructor of q symbol object.

kt

Constructor of q time object.

ktd

Constructor of simple q table object from q keyed table object.

ktj

Constructor of q timestamp from elapsed time in nanoseconds since kdb+ epoch (2000.01.01) or timespan object from nanoseconds.

ktn

Constructor of q simple list.

ku

Constructor of q GUID object.

kz

Constructor of q datetime object from the number of days since kdb+ epoch (2000.01.01).

m9

Release the memory allocated for the thread’s pool. Call when the thread is about to complete, releasing the memory allocated for that thread’s pool.

orr

Similar to krr but this function appends a system-error message to string S before passing it to krr.

r0

Decrement reference count of the q object. The decrement must be done when k function gets an error object whose type is qtype::ERROR and when you created an object but do not intend to return it to q side. See details on the reference page.

r1

Increment reference count of the q object. Increment must be done when you passed arguments to Rust function and intends to return it to q side or when you pass some K objects to k function and intend to use the parameter after the call. See details on the reference page.

sd0

Remove callback from the associated kdb+ socket and call kclose. Return null if the socket is invalid or not the one which had been registered by sd1.

sd0x

Remove callback from the associated kdb+ socket and call kclose if the given condition is satisfied. Return null if the socket is invalid or not the one which had been registered by sd1.

sd1

Register callback to the associated kdb+ socket.

setm

Set whether interning symbols uses a lock: lock is either 0 or 1. Returns the previously set value.

sn

Intern n chars from a char array. Returns an interned char array and should be used to add char array to a symbol vector.

ss

Intern a null-terminated char array. Returns an interned char array and should be used to add char array to a symbol vector.

xD

Constructor of q dictionary object.

xT

Constructor of q table object from q dictionary object.

ymd

Convert ymd to the number of days from 2000.01.01.