Commit dd733b1d authored by Aurel's avatar Aurel

add aurel storage

parent 3d68e978
......@@ -202,7 +202,8 @@ module.exports = function (grunt) {
'src/jio.storage/indexeddbstorage.js',
'src/jio.storage/cryptstorage.js',
'src/jio.storage/websqlstorage.js',
'src/jio.storage/mappingstorage.js'
'src/jio.storage/mappingstorage.js',
'src/jio.storage/aurelstorage.js'
],
dest: 'dist/<%= pkg.name %>-<%= pkg.version %>.js'
// dest: 'jio.js'
......
......@@ -14115,4 +14115,58 @@ return new Parser;
};
jIO.addStorage('mapping', MappingStorage);
}(jIO, RSVP, UriTemplate, SimpleQuery, ComplexQuery, QueryFactory, Query));
\ No newline at end of file
}(jIO, RSVP, UriTemplate, SimpleQuery, ComplexQuery, QueryFactory, Query));;/*jslint nomen: true*/
(function (jIO) {
"use strict";
/**
* The jIO AurelStorage extension
*
* @class AurelStorage
* @constructor
*/
function AurelStorage(spec) {
this._sub_storage = jIO.createJIO(spec.sub_storage);
this._index = spec.index;
}
AurelStorage.prototype.get = function () {
return this._sub_storage.get.apply(this._sub_storage, arguments);
};
AurelStorage.prototype.allAttachments = function () {
return this._sub_storage.allAttachments.apply(this._sub_storage, arguments);
};
AurelStorage.prototype.post = function (param) {
var id = param[this._index];
return this.put(id, param);
};
AurelStorage.prototype.put = function () {
return this._sub_storage.put.apply(this._sub_storage, arguments);
};
AurelStorage.prototype.remove = function () {
return this._sub_storage.remove.apply(this._sub_storage, arguments);
};
AurelStorage.prototype.getAttachment = function () {
return this._sub_storage.getAttachment.apply(this._sub_storage, arguments);
};
AurelStorage.prototype.putAttachment = function () {
return this._sub_storage.putAttachment.apply(this._sub_storage, arguments);
};
AurelStorage.prototype.removeAttachment = function () {
return this._sub_storage.removeAttachment.apply(this._sub_storage,
arguments);
};
AurelStorage.prototype.repair = function () {
return this._sub_storage.repair.apply(this._sub_storage, arguments);
};
AurelStorage.prototype.hasCapacity = function (name) {
return this._sub_storage.hasCapacity(name);
};
AurelStorage.prototype.buildQuery = function () {
return this._sub_storage.buildQuery.apply(this._sub_storage,
arguments);
};
jIO.addStorage('aurel', AurelStorage);
}(jIO));
This source diff could not be displayed because it is too large. You can view the blob instead.
......@@ -14115,4 +14115,58 @@ return new Parser;
};
jIO.addStorage('mapping', MappingStorage);
}(jIO, RSVP, UriTemplate, SimpleQuery, ComplexQuery, QueryFactory, Query));
\ No newline at end of file
}(jIO, RSVP, UriTemplate, SimpleQuery, ComplexQuery, QueryFactory, Query));;/*jslint nomen: true*/
(function (jIO) {
"use strict";
/**
* The jIO AurelStorage extension
*
* @class AurelStorage
* @constructor
*/
function AurelStorage(spec) {
this._sub_storage = jIO.createJIO(spec.sub_storage);
this._index = spec.index;
}
AurelStorage.prototype.get = function () {
return this._sub_storage.get.apply(this._sub_storage, arguments);
};
AurelStorage.prototype.allAttachments = function () {
return this._sub_storage.allAttachments.apply(this._sub_storage, arguments);
};
AurelStorage.prototype.post = function (param) {
var id = param[this._index];
return this.put(id, param);
};
AurelStorage.prototype.put = function () {
return this._sub_storage.put.apply(this._sub_storage, arguments);
};
AurelStorage.prototype.remove = function () {
return this._sub_storage.remove.apply(this._sub_storage, arguments);
};
AurelStorage.prototype.getAttachment = function () {
return this._sub_storage.getAttachment.apply(this._sub_storage, arguments);
};
AurelStorage.prototype.putAttachment = function () {
return this._sub_storage.putAttachment.apply(this._sub_storage, arguments);
};
AurelStorage.prototype.removeAttachment = function () {
return this._sub_storage.removeAttachment.apply(this._sub_storage,
arguments);
};
AurelStorage.prototype.repair = function () {
return this._sub_storage.repair.apply(this._sub_storage, arguments);
};
AurelStorage.prototype.hasCapacity = function (name) {
return this._sub_storage.hasCapacity(name);
};
AurelStorage.prototype.buildQuery = function () {
return this._sub_storage.buildQuery.apply(this._sub_storage,
arguments);
};
jIO.addStorage('aurel', AurelStorage);
}(jIO));
This source diff could not be displayed because it is too large. You can view the blob instead.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment