• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1/*
2 * Copyright (c) 2022 Huawei Device Co., Ltd.
3 * Licensed under the Apache License, Version 2.0 (the "License");
4 * you may not use this file except in compliance with the License.
5 * You may obtain a copy of the License at
6 *
7 * http://www.apache.org/licenses/LICENSE-2.0
8 *
9 * Unless required by applicable law or agreed to in writing, software
10 * distributed under the License is distributed on an "AS IS" BASIS,
11 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 * See the License for the specific language governing permissions and
13 * limitations under the License.
14 */
15
16
17class Database {
18  addData(data) {
19    console.log('addData: ', data);
20  }
21
22  removeData(data) {
23    console.log('removeData: ', data);
24  }
25
26  querySql(sql) {
27    return 'querySql: ' + sql;
28  }
29
30  updateData(oldData, newData) {
31    console.log('updateData: ', oldData, '->', newData);
32  }
33}
34
35class DatabaseInterface extends Database {
36  getText() { }
37}
38
39export { DatabaseInterface as DBInterface };
40
41export function getDatabaseInstance() {
42  return new Database();
43}
44
45function getblankInstance1() { }
46export { getblankInstance1 as getblankInstanceInterface };
47
48export default function getblankInstance2() { }
49
50let newDB = new Database();
51newDB.addData();