Dispondremos de toda la información y control sobre los registros de nuestras aplicaciones.
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
// }]
// }
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
// }
| Propiedad | Descripcion | Tipo | Predefinido |
|---|---|---|---|
| id | ID único del registro | Integer | Necesario |
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
});
| Propiedad | Descripcion | Tipo | Predefinido |
|---|---|---|---|
| params | Datos del registro a añadir | Object | Necesario |
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
}
});
| Propiedad | Descripcion | Tipo | Predefinido |
|---|---|---|---|
| id | ID único del registro | Integer | Necesario |
| params | Datos del registro a añadir | Object | Necesario |
this.$cache.items(APPNAME).delete(id)
Elimina un registro de la cache de la aplicación
this.$cache.items('cars').delete(18);
| Propiedad | Descripcion | Tipo | Predefinido |
|---|---|---|---|
| id | ID único del registro | Integer | Necesario |