refactoring id naming
This commit is contained in:
18
Wohnungen.py
18
Wohnungen.py
@ -3,10 +3,10 @@ from dbpool import getConnection, getOne, getMany
|
||||
def get_wohnungen():
|
||||
return getMany("""
|
||||
SELECT w.id as id,
|
||||
w.objekt as objekt_id,
|
||||
w.shortname as wohnung,
|
||||
w.objekt as objekt,
|
||||
w.shortname as shortname,
|
||||
w.flaeche as flaeche,
|
||||
o.shortname as objekt
|
||||
o.shortname as objekt_shortname
|
||||
FROM wohnung w, objekt o
|
||||
WHERE o.id = w.objekt
|
||||
""", [], "Wohnung")
|
||||
@ -14,10 +14,10 @@ SELECT w.id as id,
|
||||
def get_wohnung(id=None):
|
||||
return getOne("""
|
||||
SELECT w.id as id,
|
||||
w.objekt as objekt_id,
|
||||
w.shortname as wohnung,
|
||||
w.objekt as objekt,
|
||||
w.shortname as shortname,
|
||||
w.flaeche as flaeche,
|
||||
o.shortname as objekt
|
||||
o.shortname as objekt_shortname
|
||||
FROM wohnung w, objekt o
|
||||
WHERE o.id = w.objekt AND
|
||||
w.id = ?
|
||||
@ -26,10 +26,10 @@ SELECT w.id as id,
|
||||
def get_wohnungen_by_objekt(id):
|
||||
return getMany("""
|
||||
SELECT w.id as id,
|
||||
w.objekt as objekt_id,
|
||||
w.shortname as wohnung,
|
||||
w.objekt as objekt,
|
||||
w.shortname as shortname,
|
||||
w.flaeche as flaeche,
|
||||
o.shortname as objekt
|
||||
o.shortname as objekt_shortname
|
||||
FROM wohnung w, objekt o
|
||||
WHERE o.id = w.objekt AND
|
||||
o.id = ?
|
||||
|
Reference in New Issue
Block a user