|
@ -55,8 +55,8 @@ function insertPluviometerData({ pluviometer, images, dateTime, location }) { |
|
|
transaction(global.userDataBase, query, values); |
|
|
transaction(global.userDataBase, query, values); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
function insertRainData({ images, rain, location }) { |
|
|
|
|
|
const query = `INSERT INTO RainLevel(RainIdx, Images, Latitude, Longitude) VALUES(?, ?, ?, ?);`; |
|
|
|
|
|
|
|
|
function insertRainData({ images, description, rain, location }) { |
|
|
|
|
|
const query = `INSERT INTO RainLevel(RainIdx, Description, Images, Latitude, Longitude) VALUES(?, ?, ?, ?, ?);`; |
|
|
|
|
|
|
|
|
if (location === undefined) { |
|
|
if (location === undefined) { |
|
|
console.debug("undefined location"); |
|
|
console.debug("undefined location"); |
|
@ -65,6 +65,7 @@ function insertRainData({ images, rain, location }) { |
|
|
|
|
|
|
|
|
const values = [ |
|
|
const values = [ |
|
|
parseInt(rain), |
|
|
parseInt(rain), |
|
|
|
|
|
description, |
|
|
JSON.stringify(images), |
|
|
JSON.stringify(images), |
|
|
parseFloat(location["latitude"]), |
|
|
parseFloat(location["latitude"]), |
|
|
parseFloat(location["longitude"]), |
|
|
parseFloat(location["longitude"]), |
|
@ -75,8 +76,8 @@ function insertRainData({ images, rain, location }) { |
|
|
transaction(global.userDataBase, query, values); |
|
|
transaction(global.userDataBase, query, values); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
function insertRiverData({ images, riverScale, location }) { |
|
|
|
|
|
const query = `INSERT INTO RiverLevel(RiverIdx, Images, Latitude, Longitude) VALUES(?, ?, ?, ?);`; |
|
|
|
|
|
|
|
|
function insertRiverData({ images, description, riverScale, location }) { |
|
|
|
|
|
const query = `INSERT INTO RiverLevel(RiverIdx, Description, Images, Latitude, Longitude) VALUES(?, ?, ?, ?, ?);`; |
|
|
|
|
|
|
|
|
if (location === undefined) { |
|
|
if (location === undefined) { |
|
|
console.debug("undefined location"); |
|
|
console.debug("undefined location"); |
|
@ -85,6 +86,7 @@ function insertRiverData({ images, riverScale, location }) { |
|
|
|
|
|
|
|
|
const values = [ |
|
|
const values = [ |
|
|
parseInt(riverScale), |
|
|
parseInt(riverScale), |
|
|
|
|
|
description, |
|
|
JSON.stringify(images), |
|
|
JSON.stringify(images), |
|
|
parseFloat(location["latitude"]), |
|
|
parseFloat(location["latitude"]), |
|
|
parseFloat(location["longitude"]), |
|
|
parseFloat(location["longitude"]), |
|
|