dolphindb 2.0.906 → 2.0.908
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/browser.js +22 -8
- package/browser.js.map +1 -1
- package/docs.en.json +16 -2
- package/docs.zh.json +307 -83
- package/index.js +22 -8
- package/index.js.map +1 -1
- package/package.json +2 -2
package/docs.en.json
CHANGED
|
@@ -14451,9 +14451,23 @@
|
|
|
14451
14451
|
"value": [
|
|
14452
14452
|
"`name` is a string indicating the name of the reactive state engine. It is the only identifier of the reactive state engine. It can have letter, number and \"_\". It must start with a letter.",
|
|
14453
14453
|
"",
|
|
14454
|
-
"`metrics` is metacode specifying the formulas for calculation. The formulas should use vector functions instead of aggregate functions. For more information about metacode please refer to :doc:`/Objects/Metaprogramming`. To use a user-defined function in the reactive state engine, please
|
|
14454
|
+
"`metrics` is metacode specifying the formulas for calculation. The formulas should use vector functions instead of aggregate functions. For more information about metacode please refer to :doc:`/Objects/Metaprogramming`. To use a user-defined function in the reactive state engine, please note:",
|
|
14455
14455
|
"",
|
|
14456
|
-
"
|
|
14456
|
+
"1. Add \"@state\" to declare the function before the definition. For state functions, only assignment statements and return statements are supported.",
|
|
14457
|
+
"",
|
|
14458
|
+
"2. If the rvalue of an assignment statement is a function that returns multiple values, the values must be assigned to variables at the same time. In the following example, the user-defined state function references linearTimeTrend, which returns two values:",
|
|
14459
|
+
"",
|
|
14460
|
+
".. code-block:: console",
|
|
14461
|
+
"",
|
|
14462
|
+
" $ @state",
|
|
14463
|
+
" $ def forcast2(S, N){",
|
|
14464
|
+
" $ linearregIntercept, linearregSlope = linearTimeTrend(S, N)",
|
|
14465
|
+
" $ return (N - 1) * linearregSlope + linearregIntercept",
|
|
14466
|
+
" $ }",
|
|
14467
|
+
"",
|
|
14468
|
+
".. _dummyTable_rs:",
|
|
14469
|
+
"",
|
|
14470
|
+
"The following state functions in DolphinDB's reactive state engine has been optimized. Currently, unoptimized state functions are not supported by this engine, and aggregate functions should be avoid.",
|
|
14457
14471
|
"",
|
|
14458
14472
|
"* cumulative function: cumavg, cumsum, cumprod, cumcount, cummin, cummax, cumvar, cumvarp, cumstd, cumstdp, cumcorr, cumcovar, cumbeta, cumwsum, cumwavg, cumfirstNot, cumlastNot, cummed, cumpercentile ",
|
|
14459
14473
|
"* moving function: ema, mavg, msum, mcount, mprod, mvar, mvarp, mstd, mstdp, mskew, mkurtosis, mmin, mmax, mimin, mimax, mmed, mpercentile, mrank, mcorr, mcovar, mbeta, mwsum, mwavg, mmad, mfirst, mlast, mslr, tmove, tmfirst, tmlast, tmsum, tmavg, tmcount, tmvar, tmvarp, tmstd, tmstdp, tmprod, tmskew, tmkurtosis, tmmin, tmmax, tmmed, tmpercentile, tmrank, tmcovar, tmbeta, tmcorr, tmwavg, tmwsum, tmoving, moving, sma,wma, dema, tema, trima, linearTimeTrend, talib, t3, ma",
|