dolphindb 3.0.105 → 3.0.106

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 CHANGED
@@ -2996,12 +2996,12 @@ export class DDB {
2996
2996
  if (this.error)
2997
2997
  throw this.error;
2998
2998
  const args = DdbObj.to_ddbobjs(_args);
2999
- const rpc_id = ` (id = ${id})`;
2999
+ const rpc_id = `(id = ${id})`;
3000
3000
  const command = this.enc.encode((() => {
3001
3001
  switch (type) {
3002
3002
  case 'function':
3003
3003
  if (this.verbose)
3004
- console.log(func + args.map(arg => arg.toString()).join(', ').bracket() + rpc_id);
3004
+ console.log(func, args.map(arg => arg.data()), rpc_id);
3005
3005
  assert(!func.includes('\0'), t('发送至 DolphinDB 执行的脚本中间不能含有 \\0'));
3006
3006
  return 'function\n' +
3007
3007
  `${func}\n` +
@@ -3009,14 +3009,15 @@ export class DDB {
3009
3009
  `${Number(DDB.le_client)}\n`;
3010
3010
  case 'script':
3011
3011
  if (this.verbose)
3012
- console.log(script + rpc_id);
3012
+ console.log(script, rpc_id);
3013
3013
  assert(!script.includes('\0'), t('发送至 DolphinDB 执行的脚本中间不能含有 \\0'));
3014
3014
  return 'script\n' +
3015
3015
  script;
3016
3016
  case 'variable':
3017
3017
  if (this.verbose)
3018
- for (let i = 0; i < vars.length; i++)
3019
- console.log(`${vars[i]} = ${args[i].toString()}`);
3018
+ vars.forEach((v, i) => {
3019
+ console.log(v, '=', args[i].data());
3020
+ });
3020
3021
  return 'variable\n' +
3021
3022
  `${vars.join(',')}\n` +
3022
3023
  `${vars.length}\n` +
@@ -3029,7 +3030,7 @@ export class DDB {
3029
3030
  `login(${this.username.quote()}, ${this.password.quote()})`
3030
3031
  :
3031
3032
  '') +
3032
- rpc_id);
3033
+ ` ${rpc_id}`);
3033
3034
  return 'connect\n' +
3034
3035
  // 详见 InterProcessIO.cpp#APISocketConsole::parseScript 中的
3035
3036
  // Util::startWith "connect"
@@ -3087,7 +3088,7 @@ export class DDB {
3087
3088
  ]));
3088
3089
  });
3089
3090
  if (this.verbose)
3090
- console.log(result.toString() + rpc_id);
3091
+ console.log(result.data(), rpc_id);
3091
3092
  return result;
3092
3093
  });
3093
3094
  }