Пример #1
0
 def insert_relation(self, src_group, src_name, tgt_group, tgt_name, field, value=''):
     filters.check_group(src_group)
     filters.check_identifier(src_name, 64)
     filters.check_group(tgt_group)
     filters.check_identifier(tgt_name, 64)
     filters.check_float(value)
     self.db.insert(self.sitename, (src_group, src_name), (tgt_group, tgt_name), (field, value))
Пример #2
0
 def insert_meta(self, group, name, field, value):
     filters.check_group(group)
     filters.check_identifier(name, 64)
     field = filters.check_name(field, maxlen=64)
     filters.check_text(value, maxlenbits=16)
     #id = self.get_object_id(group, name, create=1)
     self.db.insert(self.sitename, (group, name), ('meta', field), value)