(habitArea)
| 39 | }; |
| 40 | |
| 41 | const findByArea = (habitArea) => { |
| 42 | return new Promise((resolve, reject) => { |
| 43 | db.transaction((tx) => { |
| 44 | tx.executeSql( |
| 45 | "SELECT * FROM habits WHERE habitArea LIKE ?;", |
| 46 | [habitArea], |
| 47 | (_, { rows }) => { |
| 48 | if (rows.length > 0) resolve(rows._array); |
| 49 | }, |
| 50 | (_, error) => reject(error) |
| 51 | ); |
| 52 | }); |
| 53 | }); |
| 54 | }; |
| 55 | |
| 56 | const updateHabit = (obj) => { |
| 57 | return new Promise((resolve, reject) => { |
nothing calls this directly
no outgoing calls
no test coverage detected