diff --git a/zh-cn/application-dev/reference/apis/js-apis-application-DataShareExtensionAbility.md b/zh-cn/application-dev/reference/apis/js-apis-application-DataShareExtensionAbility.md index 0ba84b303d6afcad67f87899e868cfee5779d5d5..fd801fea7f6f8c6100b4c3b34d1c04003f4dcc52 100644 --- a/zh-cn/application-dev/reference/apis/js-apis-application-DataShareExtensionAbility.md +++ b/zh-cn/application-dev/reference/apis/js-apis-application-DataShareExtensionAbility.md @@ -47,9 +47,9 @@ import rdb from '@ohos.data.rdb'; let DB_NAME = "DB00.db"; let TBL_NAME = "TBL00"; -let DDL_TBL_CREATE = "CREATE TABLE IF NOT EXISTS " -+ TBL_NAME -+ " (id INTEGER PRIMARY KEY AUTOINCREMENT, name TEXT, age INTEGER, phoneNumber DOUBLE, isStudent BOOLEAN, Binary BINARY)"; +let DDL_TBL_CREATE = "CREATE TABLE IF NOT EXISTS "; + + TBL_NAME + + " (id INTEGER PRIMARY KEY AUTOINCREMENT, name TEXT, age INTEGER, phoneNumber DOUBLE, isStudent BOOLEAN, Binary BINARY)"; let rdbStore; export default class DataShareExtAbility extends DataShareExtensionAbility { @@ -93,9 +93,9 @@ import rdb from '@ohos.data.rdb'; let DB_NAME = "DB00.db"; let TBL_NAME = "TBL00"; -let DDL_TBL_CREATE = "CREATE TABLE IF NOT EXISTS " -+ TBL_NAME -+ " (id INTEGER PRIMARY KEY AUTOINCREMENT, name TEXT, age INTEGER, phoneNumber DOUBLE, isStudent BOOLEAN, Binary BINARY)"; +let DDL_TBL_CREATE = "CREATE TABLE IF NOT EXISTS "; + + TBL_NAME + + " (id INTEGER PRIMARY KEY AUTOINCREMENT, name TEXT, age INTEGER, phoneNumber DOUBLE, isStudent BOOLEAN, Binary BINARY)"; let rdbStore; export default class DataShareExtAbility extends DataShareExtensionAbility { @@ -138,9 +138,9 @@ import rdb from '@ohos.data.rdb'; let DB_NAME = "DB00.db"; let TBL_NAME = "TBL00"; -let DDL_TBL_CREATE = "CREATE TABLE IF NOT EXISTS " -+ TBL_NAME -+ " (id INTEGER PRIMARY KEY AUTOINCREMENT, name TEXT, age INTEGER, phoneNumber DOUBLE, isStudent BOOLEAN, Binary BINARY)"; +let DDL_TBL_CREATE = "CREATE TABLE IF NOT EXISTS "; + + TBL_NAME + + " (id INTEGER PRIMARY KEY AUTOINCREMENT, name TEXT, age INTEGER, phoneNumber DOUBLE, isStudent BOOLEAN, Binary BINARY)"; let rdbStore; export default class DataShareExtAbility extends DataShareExtensionAbility { @@ -180,9 +180,9 @@ import rdb from '@ohos.data.rdb'; let DB_NAME = "DB00.db"; let TBL_NAME = "TBL00"; -let DDL_TBL_CREATE = "CREATE TABLE IF NOT EXISTS " -+ TBL_NAME -+ " (id INTEGER PRIMARY KEY AUTOINCREMENT, name TEXT, age INTEGER, phoneNumber DOUBLE, isStudent BOOLEAN, Binary BINARY)"; +let DDL_TBL_CREATE = "CREATE TABLE IF NOT EXISTS "; + + TBL_NAME + + " (id INTEGER PRIMARY KEY AUTOINCREMENT, name TEXT, age INTEGER, phoneNumber DOUBLE, isStudent BOOLEAN, Binary BINARY)"; let rdbStore; export default class DataShareExtAbility extends DataShareExtensionAbility { @@ -223,9 +223,9 @@ import rdb from '@ohos.data.rdb'; let DB_NAME = "DB00.db"; let TBL_NAME = "TBL00"; -let DDL_TBL_CREATE = "CREATE TABLE IF NOT EXISTS " -+ TBL_NAME -+ " (id INTEGER PRIMARY KEY AUTOINCREMENT, name TEXT, age INTEGER, phoneNumber DOUBLE, isStudent BOOLEAN, Binary BINARY)"; +let DDL_TBL_CREATE = "CREATE TABLE IF NOT EXISTS "; + + TBL_NAME + + " (id INTEGER PRIMARY KEY AUTOINCREMENT, name TEXT, age INTEGER, phoneNumber DOUBLE, isStudent BOOLEAN, Binary BINARY)"; let rdbStore; export default class DataShareExtAbility extends DataShareExtensionAbility { @@ -268,9 +268,9 @@ import rdb from '@ohos.data.rdb'; let DB_NAME = "DB00.db"; let TBL_NAME = "TBL00"; -let DDL_TBL_CREATE = "CREATE TABLE IF NOT EXISTS " -+ TBL_NAME -+ " (id INTEGER PRIMARY KEY AUTOINCREMENT, name TEXT, age INTEGER, phoneNumber DOUBLE, isStudent BOOLEAN, Binary BINARY)"; +let DDL_TBL_CREATE = "CREATE TABLE IF NOT EXISTS "; + + TBL_NAME + + " (id INTEGER PRIMARY KEY AUTOINCREMENT, name TEXT, age INTEGER, phoneNumber DOUBLE, isStudent BOOLEAN, Binary BINARY)"; let rdbStore; export default class DataShareExtAbility extends DataShareExtensionAbility {