add: column query device _id
This commit is contained in:
@@ -32,7 +32,8 @@ const getAllDevicesDb = async (searchParams = {}) => {
|
|||||||
queryParams = whereParamAnd ? whereParamAnd : queryParams;
|
queryParams = whereParamAnd ? whereParamAnd : queryParams;
|
||||||
|
|
||||||
const queryText = `
|
const queryText = `
|
||||||
SELECT COUNT(*) OVER() AS total_data,
|
SELECT COUNT(*) OVER() AS total_data,
|
||||||
|
a.device_id,
|
||||||
a.device_status,
|
a.device_status,
|
||||||
a.device_location,
|
a.device_location,
|
||||||
a.device_description,
|
a.device_description,
|
||||||
@@ -69,7 +70,8 @@ const getAllDevicesDb = async (searchParams = {}) => {
|
|||||||
|
|
||||||
const getDeviceByIdDb = async (id) => {
|
const getDeviceByIdDb = async (id) => {
|
||||||
const queryText = `
|
const queryText = `
|
||||||
SELECT
|
SELECT
|
||||||
|
a.device_id,
|
||||||
a.device_status,
|
a.device_status,
|
||||||
a.device_location,
|
a.device_location,
|
||||||
a.device_description,
|
a.device_description,
|
||||||
|
|||||||
Reference in New Issue
Block a user