Beispiel #1
0
def insert(person):
    if type(person) == list:
        return list(map(lambda p: insert(p), person))
    id = define_id(person)
    entity = Datastore.insert(KIND, person, id=id)
    logger.debug('Insert person %s', id)
    return Datastore.entity_to_dict(entity)
Beispiel #2
0
def insert(detail):
    if type(detail) == list:
        return list(map(lambda d: insert(d), detail))
    id = define_id(detail)
    entity = Datastore.insert(KIND, detail, id=id)
    logger.debug('Insert detail %s', id)
    return Datastore.entity_to_dict(entity)
Beispiel #3
0
def insert(cluster):
    if type(cluster) == list:
        return list(map(lambda c: insert(c), cluster))
    id = define_id(cluster)
    entity = Datastore.insert(KIND, cluster, id=id)
    logger.debug('Insert cluster %s', id)
    return Datastore.entity_to_dict(entity)