1.Database
from py2neo import Database
db = Database("bolt://camelot.example.com:7687")
default_db = Database()
default_db
类 | 描述 |
---|
config | 返回配置信息 |
default_graph | 默认的图类 |
kernel_start_time | neo4j实例进入操作模式的时间 |
kernel_version | neo4j版本 |
name | neo4j数据库名称 |
primitive_counts | Return a dictionary of estimates of the numbers of different kinds of Neo4j primitives |
product | |
query_jmx(namespace, instance=None, name=None, type=None) | |
store_creation_time | |
store_file_sizes | |
store_id | |
uri | |
2.Graph
类创建
类 | 描述 |
---|
begin | 开始一个Transaction |
create(subgraph) | 返回Transaction.create() 方法 |
database = None | |
delete(subgraph) | 返回Transaction.delete() |
delete_all() | 删除所有的节点和方法 |
evaluate(cypher, parameters=None, **kwparameters) | 返回 Transaction.evaluate() |
exists(subgraph) | 返回Transaction.exists() |
match(nodes=None, r_type=None, limit=None) | 匹配返回相应节点和关系 |
match_one(nodes=None, r_type=None) | limit=1 |
merge(subgraph, label=None, *property_keys) | 返回 Transaction.merge() |
nodes | 返回节点 |
pull(subgraph) | |
push(subgraph) | |
relationships | |
run(cypher, parameters=None, **kwparameters) | 返回 Transaction.run() |
schema = None | |
separate(subgraph) | 返回 Transaction.separate() |
3.Schema
4.Transaction
Transaction是Cypher语言的容器
类 | 描述 |
---|
commit() | 提交 |
create(subgraph) | 创建 |
delete(subgraph) | |
evaluate(cypher, parameters=None, **kwparameters) | |
exists(subgraph)[source] | |
finished() | |
merge(subgraph, primary_label=None, primary_key=None) | |
process() | |
pull(subgraph) | |
push(subgraph) | |
rollback() | |
run(cypher, parameters=None, **kwparameters) | |
separate(subgraph) | |
5.Cursor
类 | 描述 |
---|
close() | |
current | |
data() | |
evaluate(field=0) | |
forward(amount=1) | |
keys() | |
plan() | |
stats() | |
summary() | |
to_data_frame(index=None, columns=None, dtype=None) | |
to_matrix(mutable=False) | |
to_ndarray(dtype=None, order=‘K’) | |
to_series(field=0, index=None, dtype=None) | |
to_subgraph() | |
to_table() | |
参考文献:
https://py2neo.org/v4/database.html