本文整理汇总了TypeScript中@ionic-native/sqlite-porter.SQLitePorter类的典型用法代码示例。如果您正苦于以下问题:TypeScript SQLitePorter类的具体用法?TypeScript SQLitePorter怎么用?TypeScript SQLitePorter使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了SQLitePorter类的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的TypeScript代码示例。
示例1: Number
this.db.create(ConectionDBName.connectionDB).then((db: any) => {
let dbInstance = db._objectInstance;
// we can pass db._objectInstance as the database option in all SQLitePorter methods
let sqlJsonBlock = {
"data":{
"inserts":{
"district": districtMs
}
}
};
this.sqlitePorter.importJsonToDb(dbInstance, sqlJsonBlock).then(
() => {
let num: number = SQLiteHandle.recordBeWrite;
SQLiteHandle.recordBeWrite = Number(num + districtMs.length);
},
(err) => {
console.log("********************** districtMs" + JSON.stringify(err));
reject(err);
}
);
});
示例2: Number
this.db.create(ConectionDBName.connectionDB).then((db: any) => {
let dbInstance = db._objectInstance;
let sqlJsonBlock = {
"data":{
"inserts":{
"stepsumassure": objMs
}
}
};
this.sqlitePorter.importJsonToDb(dbInstance, sqlJsonBlock).then(
() => {
let num: number = SQLiteHandle.recordBeWrite
SQLiteHandle.recordBeWrite = Number(num + objMs.length);
},
(err) => {
console.log("******************* stepsumassure " + JSON.stringify(err));
reject(err);
}
);
});