Replies: 1 comment
-
I think this is related to container is not an agtype (I can CREATE object, can't SET object). Am I right? That means object is not supported! So not all Agensgraph basic elements are implemented in AGE. @jrgemignani or other AGE developers Is my assumption right? |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi everyone and the AGE team,
I'm having a peculiar AGE behavior and wondered anyone have the same problem? Or, it is a BUG?
In Agengraph:
client.query("CREATE(m:members {name:'abc', phone_number:'00000000000',
email='a@email.com', verified:{ email: { vcode:'123456', expiration:82736463, done: true }}}) //<---- OBJECT
RETURN m.username, m.phone_number;",
(err: Error, result: any) =>{
....
});
client.query("MATCH (m:members {name:'abc', email='a@email.com') RETURN m.verified;",
(err: Error, result: any) =>
{
const v = result.rows[0];
console.log(typeof(v.email)); // Console displays 'Object'; <-------------------- I was expecting this
....
});
In AGE:
client.query("SELECT * FROM cypher('dingdongClub', $$ CREATE(m:members {name:'abc', phone_number:'00000000000',
email='a@email.com', verified:{ email: { vcode:'123456', expiration:82736463, done: true }}}) $$)
RETURN m.username, m.phone_number AS (username agtype, phone_number agtype);",
(err: Error, result: any) =>{
....
});
client.query("SELECT * FROM cypher('dingdongClub', $$ MATCH (m:members {name:'abc', email='a@email.com') RETURN m.verified AS (verified agtype);",
(err: Error, result: any) =>
{
const v = result.rows[0];
console.log(typeof(v.email)); // Console displays 'string';<------ Hmmmm... I have to use JSON.parse to make it an object!
....
});
I hope the about code fragment help.
Thank you.
Beta Was this translation helpful? Give feedback.
All reactions