AgensGraph语法

1、创建数据库、用户、图
--cmd连接数据库
psql -U agens -p 5432
--创建数据库
create database ncxauth;
--创建用户
create user ncxauth with password 'ncxauth';
--授权用户拥有数据库
grant all privileges on database ncxauth to ncxauth;
--重新登录数据库
\q
psql -U ncxauth -p 5432 -d ncxauth
--创建图
create graph ncxauth_graph;


2、更新用户信息
--查询顶点用户
match (p:person {user_name: 'test123'}) return p;
--更新用户属性
match (p:person {user_name: 'test123'}) set p.end_date = 4102444800000,p.pwd_expiration = 3110400000;
--删除用户属性
match (p:person {user_name: 'test123'}) remove p.end_date return p

posted @ 2023-03-07 13:03  publiter  阅读(38)  评论(0编辑  收藏  举报