Skip to content

INSERT with CONTENT synax error when using named params v3.0.x #8666

@myflowpl

Description

@myflowpl

OrientDB Version: 3.0.10
Java Version: 1.8.0_111
OS: Ubuntu 18.04
OrientJS Version: 3.0.1
and the same error with Java driver as mentioned here: orientechnologies/orientjs#346

this works if you put json inline:

session.command('INSERT INTO Log CONTENT {test: "inline json"}')

and this not if you use named parameters:

session.command( 'INSERT INTO Log CONTENT :log',  {
    params: {log: { test: 'json in params' }}
})

it throws error:

OrientDB.RequestError: Error parsing query:
      INSERT INTO Log CONTENT ":log"
                            ^
      Encountered " <CONTENT> "CONTENT "" at line 1, column 17.
      Was expecting one of:
          <EOF> 
          <SELECT> ...
          <FROM> ...
          <RETURN> ...
          <UNSAFE> ...
          "(" ...
          ";" ...
          <CLUSTER> ...
          "(" ...
          
      	DB name="smdb_dev"
      	Error Code="1"
      at child.Object.<anonymous>.Operation.parseError (node_modules/orientjs/lib/client/network/protocol37/operation.js:1224:13)
      at child.Object.<anonymous>.Operation.consume (node_modules/orientjs/lib/client/network/protocol37/operation.js:566:35)
      at ONetworkConnection.Object.<anonymous>.Connection.process (node_modules/orientjs/lib/client/network/conn.js:460:17)
      at ONetworkConnection.Object.<anonymous>.Connection.handleSocketData (node_modules/orientjs/lib/client/network/conn.js:342:20)

It was working on 2.2 version
any ideas what i'm doing wrong ?

Metadata

Metadata

Labels

buglegacy not used anymore

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions