1

I'm working on a Go application where I need to update records in an Apache Age table. I'm facing an error "unsupported operation" when performing the update operation.

Error message: When executing the update query against the Apache Age table, I encounter the following error message: "unsupported operation."

Expected behaviour: The expected outcome is to successfully update the records in the Apache Age table.

Prachi
  • 39
  • 3

7 Answers7

0

Please share the code that used to make update operation and caused this error.

But in general make sure that the code connects to a PostgreSQL database and loads the AGE extension. then sets the search_path to ag_catalog.

and this is a general example of updating a node property with the label Person and the property name set to 'Alice'. The update sets the age property of the node to 30

updateQuery := `MATCH (n:Person {name: 'Alice'}) SET n.age = 30`

result, err := age.ExecCypher(db, updateQuery)

if err != nil {
        panic(err)
}

0

You need to check wheter you are fulfilling all the requirements of update query or not. For example, I am writing an update query below:

SELECT * 
FROM cypher('graph_name', $$
MATCH (v {name: 'Andres'})
SET v.surname = 'Taylor'
$$) as (v agtype);

This query will work perfectly if you have a vertex which has properties of name and surname while if you don't have the name and surname properties of doing some syntax mistake, then this will throw an error.

I am adding one more query for removing the node property.

SELECT * 
FROM cypher('graph_name', $$
MATCH (v {name: 'Andres'})
SET v.name = NULL
RETURN v
$$) as (v agtype);

Match your syntax with this one and update your query and it will work.

0

Please provide the code snippet that you are using to perform the update operation.

"unsupported operation" means that you are attempting to perform an operation that is not allowed or not implemented for the specific scenario, because it's not supported or defined for a particular type or value.

Marcos Silva
  • 115
  • 5
0

A specific answer can be provided if you could provide the code. But for now, just for clarification, the "unsupported operation" error typically indicates that the operation you're trying to perform is not supported by the Apache Age table or the Go driver you're using.

So I would recommend that you should:

  1. Review the Apache Age Documentation.
  2. It would be best to check Apache Age's compatibility with the GO driver.
0

The "unsupported operation" error shows when one's trying to perform an operation that is not supported by either Apache Age table or the Go driver. Therefore, it is best to check out the Apache AGE docs here.

mtoaima
  • 1
  • 2
  • While this link may answer the question, it is better to include the essential parts of the answer here and provide the link for reference. Link-only answers can become invalid if the linked page changes. - [From Review](/review/late-answers/34617920) – JimB Jul 03 '23 at 18:41
0

There are a couple of possible fixes that could help you resolve this issue:

  • Some databases especially the ones that are in incubating phase don't support all the operations so make sure the version you're using supports the UPDATE operation. Moreover, if you're using an older version, try upgrading to the latest stable one which might help with resolving the issue.

  • If the version supports the operation, check the error logs and maybe paste them here as they will help give more context about the problem.

0

The error message unsupported operation indicates the operation you are trying to perform is not supported by Go driver.

Check whether the you are fulfilling all the requirements of the update query or not For Example:

  • Make sure that you are connecting database to PostgreSQL database and loading extension.
  • Then set the search_path to ag_catalog.