I'm trying to use the golang driver for apache age to run cypher queries on Windows. For the postgres server I'm using the the Apache-Age docker image.
While running the sample, I get the following error:
ahmar> go run main.go age_wrapper_sample.go sql_api_sample.go
# Do cypher query with Age API
SELECT * FROM age_prepare_cypher($1, $2); testGraph CREATE (n:Person {name: '%s'})
panic: pq: function age_prepare_cypher(unknown, unknown) does not exist
goroutine 1 [running]:
main.doWithAgeWrapper({0x1004e94?, 0xc00000a018?}, {0xff0efb?, 0x1?})
C:/Users/ahmar/Desktop/GOlang drivers/samples/age_wrapper_sample.go:43 +0xcb4
main.main()
C:/Users/ahmar/Desktop/GOlang drivers/samples/main.go:41 +0x77
exit status 2
The queries are working fine when I run them on the postgres server directly. Also other age commands like LOAD 'age';
etc, are working from the driver but the ExecCypher()
function is not working.
The error seems to be originating from the age.go
file in execCypher()
, when the age_prepare_cypher()
function is called.
Note: I'm not facing this error on Linux. There, the queries are working fine when using the age go driver and I'm getting the expected output.