Buscar en la wiki...

📦 Aplicaciones

Dispondremos de toda la información y control sobre los registros de nuestras aplicaciones.

🧠 Debes saber que...

Recuerda que todo lo tratado bajo este plugin solo se verá reflejado en la cache del navegador del usuario. Las acciones realizadas aquí no tienen efecto directo con API.

Listar registros

this.$cache.items(APPNAME).list

Devuelve todos los registros cacheados de una aplicacion específica

this.$cache.items('cars').list;

// {
//      total: 2,
//      results: [{
//          name: "Hyundai Coupe 1.6",
//          date: "2019-05-04",
//          brand: 1,
//          _Comments: [],
//          _EntityCreateDate: "2019-05-04 20:11:23",
//          _EntityCreateIp: "127.0.0.1",
//          _EntityCreateUser: {ID: 123, Nick: "jhondoe", Nombre: "Jhon Doe", Email: "jhon@doe.com"},
//          _EntityId: 18,
//          _EntityStatus: 1,
//          _EntityUpdateDate: null,
//          _EntityUpdateIp: null,
//          _EntityUpdateUser: null
//      },{
//          name: "Hyundai Accent 2.0",
//          date: "2019-06-01",
//          brand: 1,
//          _Comments: [],
//          _EntityCreateDate: "2019-05-03 16:11:23",
//          _EntityCreateIp: "127.0.0.1",
//          _EntityCreateUser: {ID: 123, Nick: "jhondoe", Nombre: "Jhon Doe", Email: "jhon@doe.com"},
//          _EntityId: 19,
//          _EntityStatus: 1,
//          _EntityUpdateDate: null,
//          _EntityUpdateIp: null,
//          _EntityUpdateUser: null
//      }]
// }

Obtener registro

this.$cache.items(APPNAME).get(id)

Devuelve el registro específico cacheado de una aplicacion

this.$cache.items('cars').get(18);

// {
//      name: "Hyundai Coupe 1.6",
//      date: "2019-05-04",
//      brand: 1,
//      _Comments: [],
//      _EntityCreateDate: "2019-05-04 20:11:23",
//      _EntityCreateIp: "127.0.0.1",
//      _EntityCreateUser: {ID: 123, Nick: "jhondoe", Nombre: "Jhon Doe", Email: "jhon@doe.com"},
//      _EntityId: 18,
//      _EntityStatus: 1,
//      _EntityUpdateDate: null,
//      _EntityUpdateIp: null,
//      _EntityUpdateUser: null
// }

PropiedadDescripcionTipoPredefinido
idID único del registroIntegerNecesario

Añadir registro

this.$cache.items(APPNAME).add(params)

Añade un registro a la cache de la aplicación

this.$cache.items('cars').add({
    name: "Hyundai Coupe 1.6",
    date: "2019-05-04",
    brand: 1,
    _Comments: [],
    _EntityCreateDate: "2019-05-04 20:11:23",
    _EntityCreateIp: "127.0.0.1",
    _EntityCreateUser: {ID: 123, Nick: "jhondoe", Nombre: "Jhon Doe", Email: "jhon@doe.com"},
    _EntityId: 18,
    _EntityStatus: 1,
    _EntityUpdateDate: null,
    _EntityUpdateIp: null,
    _EntityUpdateUser: null
});
PropiedadDescripcionTipoPredefinido
paramsDatos del registro a añadirObjectNecesario

Editar registro

this.$cache.items(APPNAME).edit({ id, params })

Modifica un registro en la cache de la aplicación

this.$cache.items('cars').edit({
    id: 18,
    params: {
        name: "Hyundai Coupe 1.8",
        date: "2019-05-04",
        brand: 1,
        _Comments: [],
        _EntityCreateDate: "2019-05-04 20:11:23",
        _EntityCreateIp: "127.0.0.1",
        _EntityCreateUser: {ID: 123, Nick: "jhondoe", Nombre: "Jhon Doe", Email: "jhon@doe.com"},
        _EntityId: 18,
        _EntityStatus: 1,
        _EntityUpdateDate: null,
        _EntityUpdateIp: null,
        _EntityUpdateUser: null
    }
});
PropiedadDescripcionTipoPredefinido
idID único del registroIntegerNecesario
paramsDatos del registro a añadirObjectNecesario

Eliminar registro

this.$cache.items(APPNAME).delete(id)

Elimina un registro de la cache de la aplicación

this.$cache.items('cars').delete(18);
PropiedadDescripcionTipoPredefinido
idID único del registroIntegerNecesario