Пример #1
0
 def init_query(rpsl_object_class: str) -> RPSLDatabaseQuery:
     query = RPSLDatabaseQuery().sources([rpsl_obj_new.source()])
     query = query.object_classes([rpsl_object_class])
     return query.first_only()
Пример #2
0
def _init_related_object_query(rpsl_object_class: str,
                               rpsl_obj_new: RPSLObject) -> RPSLDatabaseQuery:
    query = RPSLDatabaseQuery().sources([rpsl_obj_new.source()])
    query = query.object_classes([rpsl_object_class])
    return query.first_only()
Пример #3
0
 def mntner_active(rpsl_pk: str):
     q = RPSLDatabaseQuery(column_names=['pk']).sources(
         [source]).rpsl_pk(rpsl_pk).object_classes(['mntner'])
     return bool(list(database_handler.execute_query(q.first_only())))