relationship 模块

Dataverse 的关系模型(输入和输出)。

CascadeConfiguration

定义关系操作的级联行为。

每个参数的有效值:

  • “Cascade”:对所有相关记录执行操作

  • “NoCascade”:不要对相关记录执行操作

  • “RemoveLink”:删除关系链接,但保留记录

  • “Restrict”:如果存在相关记录,则阻止操作

LookupAttributeMetadata

查找属性的元数据。

有效的required_level值:

  • “None”:属性是可选的

  • “建议”:建议使用属性

  • “ApplicationRequired”:属性是必需的

ManyToManyRelationshipMetadata

多对多实体关系的元数据。

OneToManyRelationshipMetadata

一对多实体关系的元数据。

RelationshipInfo

关系元数据的类型化返回模型。

返回者 create_one_to_many_relationshipcreate_many_to_many_relationshipget_relationshipcreate_lookup_field

例:


   result = client.tables.create_one_to_many_relationship(lookup, relationship)
   print(result.relationship_schema_name)
   print(result.lookup_schema_name)