Extjs 如何在sqlite代理存储中更新记录

Extjs 如何在sqlite代理存储中更新记录,extjs,sencha-touch-2,Extjs,Sencha Touch 2,我正在使用我的sencha应用程序的SQLite代理使该应用程序脱机。有人能告诉我怎么更新商店里的记录吗。我尝试了store.set('field',value),但没有成功 这是我正在使用的代码 Ext.getStore('Team').each(function(record) { if(record.get('race_id') == raceId && record.get('round') == round) { record.s

我正在使用我的sencha应用程序的SQLite代理使该应用程序脱机。有人能告诉我怎么更新商店里的记录吗。我尝试了store.set('field',value),但没有成功

这是我正在使用的代码

Ext.getStore('Team').each(function(record) {
        if(record.get('race_id') == raceId && record.get('round') == round) {
            record.set('start_position', startPosition);
        }
    });
Ext.getStore('Team').sync();

我指的是实现SqlLite代理。

首先,set方法不适用于存储此方法是有记录的,您必须在更新记录后同步存储,以便在localstorage中进行最终更改,如`

record.set('field',value); 
store.sync();

谢谢你的快速回复。。我使用了上面的代码,但现在我得到了这个错误。。。未定义----由于约束失败(19约束失败)而无法执行语句,我认为note.set('start\u position',startPosition);该行应为record.set('start_position',startPosition');代理类型是“localstorage”抱歉。。。那是错的。。但还是有同样的问题。。。您能给我介绍一下SQLite代理实现的其他源代码或示例吗。