tori.db.metadata

class tori.db.metadata.entity.EntityMetadata

Entity Metadata

cls

Entity Class

collection_name

Collection / Bucket / Table Name

index_list

Index List

relational_map

Relational Map

class tori.db.metadata.helper.EntityMetadataHelper

Entity Metadata Helper

static extract()

Extract the metadata of the given class

Parameters:cls (type) – the entity class
Return type:tori.db.metadata.entity.EntityMetadata
static hasMetadata()

Check if the given class cls has a metadata

Parameters:cls (type) – the entity class
Return type:bool
static imprint(collection_name, indexes)

Imprint the entity metadata to the class (type)

Parameters:
  • cls (type) – the entity class
  • collection_name (str) – the name of the collection (known as table, bucket etc.)
  • indexes (list) – the list of indexes