Sudhakar and Mason,
If you don't mind using jQuery, what about something like this?
<code>
var PersistenceJS = function(dbname, description, size)
{
jQuery.extend(true, this, persistence);
this.store.websql.config(this, dbname, description, size);
};
PersistenceJS.prototype = new Object();
PersistenceJS.prototype.constructor = PersistenceJS;
</code>
<code>
$(document).ready( function()
{
var dbA = new PersistenceJS('dba', 'DBA', 1024 * 1024);
dbA.debug = true;
var EntityA = dbA.define('EntityA', {});
EntityA.enableSync();
var dbB = new PersistenceJS('dbb', 'DBB', 1024 * 1024);
dbB.debug = true;
var EntityB = dbB.define('EntityB', {});
EntityB.enableSync();
dbA.schemaSync( function()
{
console.log('DBA schema synced');
dbA.add( new EntityA());
dbA.flush('DBA flushed');
dbB.schemaSync( function()
{
console.log('DBB schema synced');
dbB.add( new EntityB());
dbB.flush('DBB flushed');
});
});
});
</code>
Regards,
Mark M. Young
On 6/30/12, Mason <
alad...@gmail.com> wrote:
> Hi Sudhakar,
>
> What's going on in your project? I have the exactly same requirement to
> sync DBs between devices. I tested persisntence serer sync, and also found
> some issues. Are you going to contribute to github or create a new branch?
>
> Thanks,
> Mason
--
"When pride comes, then comes disgrace, but with humility comes wisdom."
—Proverbs 11:2