英文:
How to change the graph name in Apache-AGE?
问题
我有一个在我的Apache数据库中创建的名为people
的图形(Graph)。
但现在我想将其更新为population
。
我该如何做呢?
英文:
I have a Graph with the name people
created inside my apache database.
But now I want to update it to population
How can I do that?
答案1
得分: 1
使用ALTER FUNCTION
语句将函数从people
重命名为population
:
ALTER FUNCTION people() RENAME TO population;
这个语句将函数people
重命名为population
。
执行这个语句后,你应该能够使用新名称population()
来调用该函数。请注意,任何引用旧函数名称的其他数据库对象都需要相应更新。
英文:
To rename the function from people
to population
, you can use the ALTER FUNCTION
statement:
ALTER FUNCTION people() RENAME TO population;
This statement renames the function people
to population
.
After executing this statement, you should be able to call the function using its new name population()
. Note that any other database objects that reference the old function name would need to be updated accordingly.
答案2
得分: 0
要将图的名称从'people'更改为'population',请使用以下方式使用alter_graph()函数:
SELECT alter_graph('people', 'RENAME', 'population');
您还可以通过执行以下命令来交叉检查:
SELECT * FROM ag_graph;
name 和 namespace 列中应该包含'population'。
英文:
In order to change the graph name from 'people' to 'population' use alter_graph() as follows:
SELECT alter_graph('people', 'RENAME', 'population');
You can also crosscheck this by issuing the following command:
SELECT * FROM ag_graph;
The name and namespace columns should have 'population' in it
答案3
得分: 0
你可以使用以下查询将图的名称从'People'更新为'Population':
ALTER GRAPH people RENAME TO population;
你也可以使用以下查询:
RENAME GRAPH people TO population;
英文:
You can update the graph name from 'People' to 'Population' using the following query:
ALTER GRAPH people RENAME TO population;
You can also use this query:
RENAME GRAPH people TO population;
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论