from pyorient.ogm import Config, Graph
# 配置连接数据
config = Config.from_url('/localhost/bomc',"username","pwd")# 建立连接
g = Graph(config,"username","pwd")# 发送查询命令(SQL)
result = g.client.command("select from V")# 发送查询命令(Gremlin)
result = g.client.gremlin("g.V().has('app_name', 'ArchErVal')")
Defines whether the property accepts a NULL value.
Boolean
2.1.4 Records Section
示例
"records":[{"@type":"d","@rid":"#12:476","@version":0,"@class":"Account","account_id":476,"date":"2011-12-09 00:00:00:0000","@fieldTypes":["account_id=i","date=t"]},{"@type":"d","@rid":"#12:477","@version":0,"@class":"Whiz","id":477,"date":"2011-12-09 00:00:00:000","text":"He in office return He inside electronics for $500,000 Jay","@fieldTypes":"date=t"}]
说明
Parameters for Metadata:
Parameter
Description
JSON Type
"@type"
Defines the record-type: d for Document, b for Binary.
String
"@rid"
Defines the Record ID, using the format: <cluster-id>:<cluster-position>.
String
"@version"
Defines the record version. Range: 0-2, 147, 483, 647.
Integer
"@class"
Defines the logical class name for the record.
String
"@fieldTypes"
Defines an array of the types for each field in this record.