Example #1
0
class Empleado:
    def __init__(self):
        self.conn = Connection('Farmacia')

    def insert_empleado(self, data):
        collection = 'empleado'
        self.conn.insert(collection, data)

    def update_empleado(self, condition, change):
        collection = 'empleado'
        self.conn.update(collection, condition, change)

    def get_empleado_condition_selection(self, condition, selection):
        collection = 'empleado'
        return self.conn.get_all(collection, condition, selection)

    def get_empleado_condition(self, condition):
        collection = 'empleado'
        return self.conn.get_one(collection, condition)

    def delete_empleado(self, condition):
        collection = 'empleado'
        self.conn.delete(collection, condition)

    def get_all_validacion(self, condition={}):
        return self.conn.get_all_validacion('empleado', condition)
Example #2
0
class Lector:
    def __init__(self):
        self.model = Connection('biblioteca')

    def get_all_Lector(self,condition={}, select={}):
        return self.model.get_all('Lector',condition,select)

    def insert_Lector(self, data):
        return self.model.insert('Lector',data)

    def update_Lector(self, condition, change):
        return self.model.update('Lector',condition, change)

    def delete_Lector(self, condition):
        return self.model.delete('Lector', condition)
        
    def get_all_validacion(self,condition={}):
        return self.model.get_all_validacion('Lector',condition)