add missing deleted check
parent
285704daab
commit
fcdd8f950e
|
|
@ -1,3 +1,3 @@
|
|||
import type * as recordTypes from '../../types/recordTypes';
|
||||
export declare function getMap(mapId: number | string): Promise<recordTypes.Map>;
|
||||
export declare function getMap(mapId: number | string): Promise<recordTypes.Map | undefined>;
|
||||
export default getMap;
|
||||
|
|
|
|||
|
|
@ -13,6 +13,7 @@ export async function getMap(mapId) {
|
|||
from Maps m
|
||||
left join Lots l on m.mapId = l.mapId and l.recordDelete_timeMillis is null
|
||||
where m.mapId = ?
|
||||
and m.recordDelete_timeMillis is null
|
||||
group by m.mapId, m.mapName, m.mapDescription,
|
||||
m.mapLatitude, m.mapLongitude, m.mapSVG,
|
||||
m.mapAddress1, m.mapAddress2, m.mapCity, m.mapProvince, m.mapPostalCode,
|
||||
|
|
|
|||
|
|
@ -2,7 +2,9 @@ import { acquireConnection } from './pool.js'
|
|||
|
||||
import type * as recordTypes from '../../types/recordTypes'
|
||||
|
||||
export async function getMap(mapId: number | string): Promise<recordTypes.Map> {
|
||||
export async function getMap(
|
||||
mapId: number | string
|
||||
): Promise<recordTypes.Map | undefined> {
|
||||
const database = await acquireConnection()
|
||||
|
||||
const map: recordTypes.Map = database
|
||||
|
|
@ -18,6 +20,7 @@ export async function getMap(mapId: number | string): Promise<recordTypes.Map> {
|
|||
from Maps m
|
||||
left join Lots l on m.mapId = l.mapId and l.recordDelete_timeMillis is null
|
||||
where m.mapId = ?
|
||||
and m.recordDelete_timeMillis is null
|
||||
group by m.mapId, m.mapName, m.mapDescription,
|
||||
m.mapLatitude, m.mapLongitude, m.mapSVG,
|
||||
m.mapAddress1, m.mapAddress2, m.mapCity, m.mapProvince, m.mapPostalCode,
|
||||
|
|
|
|||
Loading…
Reference in New Issue